vim_rs/types/
traits.rs

1use super::vim_object_trait::VimObjectTrait;
2use super::dyn_serialize;
3use super::convert::CastFrom;
4use super::struct_enum::StructType;
5use super::structs::*;
6use serde::de;
7use super::vim_any::VimAny;
8
9/// This is the built-in base interface implemented by all
10/// data objects.
11pub trait DataObjectTrait : super::traits::VimObjectTrait {
12}
13impl<'s> serde::Serialize for dyn DataObjectTrait + 's {
14            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15            where
16                S: serde::Serializer,
17            {
18                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19            }
20        }
21impl<'de> serde::Deserialize<'de> for Box<dyn DataObjectTrait> {
22            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23                deserializer.deserialize_map(DataObjectVisitor)
24            }
25        }
26
27struct DataObjectVisitor;
28
29impl<'de> de::Visitor<'de> for DataObjectVisitor {
30    type Value = Box<dyn DataObjectTrait>;
31
32    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33        formatter.write_str("a valid DataObjectTrait JSON object with a _typeName field")
34    }
35
36    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37    where
38        A: de::MapAccess<'de>,
39    {
40        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42        match any {
43            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
44                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
45            VimAny::Value(value) => Err(de::Error::custom(format!(
46                "expected object not wrapped value: {:?}",
47                value))),
48        }
49    }
50}
51
52impl DataObjectTrait for DataObject {
53}
54impl DataObjectTrait for AgencyConfigInfo {
55}
56impl DataObjectTrait for AgencyScope {
57}
58impl DataObjectTrait for AgencyComputeResourceScope {
59}
60impl DataObjectTrait for AgencyVmFolder {
61}
62impl DataObjectTrait for AgencyVmResourcePool {
63}
64impl DataObjectTrait for AgentConfigInfo {
65}
66impl DataObjectTrait for AgentOvfEnvironmentInfo {
67}
68impl DataObjectTrait for AgentOvfEnvironmentInfoOvfProperty {
69}
70impl DataObjectTrait for AgentSslTrust {
71}
72impl DataObjectTrait for AgentAnyCertificate {
73}
74impl DataObjectTrait for AgentPinnedPemCertificate {
75}
76impl DataObjectTrait for AgentStoragePolicy {
77}
78impl DataObjectTrait for AgentVsanStoragePolicy {
79}
80impl DataObjectTrait for AgentVibMatchingRule {
81}
82impl DataObjectTrait for AgentVmHook {
83}
84impl DataObjectTrait for EamObjectRuntimeInfo {
85}
86impl DataObjectTrait for AgentRuntimeInfo {
87}
88impl DataObjectTrait for Issue {
89}
90impl DataObjectTrait for AgencyIssue {
91}
92impl DataObjectTrait for AgencyDisabled {
93}
94impl DataObjectTrait for AgentIssue {
95}
96impl DataObjectTrait for EamCertificateNotTrusted {
97}
98impl DataObjectTrait for HostInPartialMaintenanceMode {
99}
100impl DataObjectTrait for ManagedHostNotReachable {
101}
102impl DataObjectTrait for MissingDvFilterSwitch {
103}
104impl DataObjectTrait for OvfInvalidProperty {
105}
106impl DataObjectTrait for TransitionFailed {
107}
108impl DataObjectTrait for VibIssue {
109}
110impl DataObjectTrait for ImmediateHostRebootRequired {
111}
112impl DataObjectTrait for VibCannotPutHostInMaintenanceMode {
113}
114impl DataObjectTrait for VibCannotPutHostOutOfMaintenanceMode {
115}
116impl DataObjectTrait for VibNotInstalled {
117}
118impl DataObjectTrait for CannotAccessAgentVib {
119}
120impl DataObjectTrait for VibDependenciesNotMetByHost {
121}
122impl DataObjectTrait for VibInvalidFormat {
123}
124impl DataObjectTrait for VibRequirementsNotMetByHost {
125}
126impl DataObjectTrait for VibRequiresHostInMaintenanceMode {
127}
128impl DataObjectTrait for VibRequiresHostReboot {
129}
130impl DataObjectTrait for VibRequiresManualInstallation {
131}
132impl DataObjectTrait for VibRequiresManualUninstallation {
133}
134impl DataObjectTrait for VmIssue {
135}
136impl DataObjectTrait for InvalidConfig {
137}
138impl DataObjectTrait for VmCorrupted {
139}
140impl DataObjectTrait for VmDeployed {
141}
142impl DataObjectTrait for HostInMaintenanceMode {
143}
144impl DataObjectTrait for HostInStandbyMode {
145}
146impl DataObjectTrait for HostPoweredOff {
147}
148impl DataObjectTrait for VmHookFailed {
149}
150impl DataObjectTrait for VmHookTimedout {
151}
152impl DataObjectTrait for VmInaccessible {
153}
154impl DataObjectTrait for VmMarkedAsTemplate {
155}
156impl DataObjectTrait for VmOrphaned {
157}
158impl DataObjectTrait for VmPoweredOff {
159}
160impl DataObjectTrait for InsufficientIpAddresses {
161}
162impl DataObjectTrait for MissingAgentIpPool {
163}
164impl DataObjectTrait for VmPoweredOn {
165}
166impl DataObjectTrait for VmProtected {
167}
168impl DataObjectTrait for VmSuspended {
169}
170impl DataObjectTrait for VmWrongFolder {
171}
172impl DataObjectTrait for VmWrongResourcePool {
173}
174impl DataObjectTrait for VmNotDeployed {
175}
176impl DataObjectTrait for CannotAccessAgentOvf {
177}
178impl DataObjectTrait for IncompatibleHostVersion {
179}
180impl DataObjectTrait for InsufficientResources {
181}
182impl DataObjectTrait for InsufficientSpace {
183}
184impl DataObjectTrait for NoAgentVmDatastore {
185}
186impl DataObjectTrait for NoCustomAgentVmDatastore {
187}
188impl DataObjectTrait for NoAgentVmNetwork {
189}
190impl DataObjectTrait for NoCustomAgentVmNetwork {
191}
192impl DataObjectTrait for NoDiscoverableAgentVmDatastore {
193}
194impl DataObjectTrait for NoDiscoverableAgentVmNetwork {
195}
196impl DataObjectTrait for OvfInvalidFormat {
197}
198impl DataObjectTrait for VmRequiresHostOutOfMaintenanceMode {
199}
200impl DataObjectTrait for PersonalityAgentPmIssue {
201}
202impl DataObjectTrait for PersonalityAgentAwaitingPmRemediation {
203}
204impl DataObjectTrait for PersonalityAgentBlockedByAgencyOperation {
205}
206impl DataObjectTrait for OrphanedAgency {
207}
208impl DataObjectTrait for ClusterAgentAgentIssue {
209}
210impl DataObjectTrait for ClusterAgentOvfInvalidProperty {
211}
212impl DataObjectTrait for ClusterAgentTransitionFailed {
213}
214impl DataObjectTrait for ClusterAgentVmIssue {
215}
216impl DataObjectTrait for ClusterAgentHostInMaintenanceMode {
217}
218impl DataObjectTrait for ClusterAgentHostInPartialMaintenanceMode {
219}
220impl DataObjectTrait for ClusterAgentInvalidConfig {
221}
222impl DataObjectTrait for ClusterAgentVmHookFailed {
223}
224impl DataObjectTrait for ClusterAgentVmHookTimedout {
225}
226impl DataObjectTrait for ClusterAgentVmInaccessible {
227}
228impl DataObjectTrait for ClusterAgentVmNotRemoved {
229}
230impl DataObjectTrait for ClusterAgentVmPoweredOff {
231}
232impl DataObjectTrait for ClusterAgentInsufficientClusterResources {
233}
234impl DataObjectTrait for ClusterAgentVmPoweredOn {
235}
236impl DataObjectTrait for ClusterAgentVmProtected {
237}
238impl DataObjectTrait for ClusterAgentVmSuspended {
239}
240impl DataObjectTrait for ClusterAgentVmNotDeployed {
241}
242impl DataObjectTrait for ClusterAgentCertificateNotTrusted {
243}
244impl DataObjectTrait for ClusterAgentInsufficientClusterSpace {
245}
246impl DataObjectTrait for ClusterAgentMissingClusterVmDatastore {
247}
248impl DataObjectTrait for ClusterAgentMissingClusterVmNetwork {
249}
250impl DataObjectTrait for IntegrityAgencyVumIssue {
251}
252impl DataObjectTrait for IntegrityAgencyCannotDeleteSoftware {
253}
254impl DataObjectTrait for IntegrityAgencyCannotStageSoftware {
255}
256impl DataObjectTrait for IntegrityAgencyVumUnavailable {
257}
258impl DataObjectTrait for PersonalityAgencyPmIssue {
259}
260impl DataObjectTrait for PersonalityAgencyCannotConfigureSolutions {
261}
262impl DataObjectTrait for PersonalityAgencyDepotIssue {
263}
264impl DataObjectTrait for PersonalityAgencyCannotUploadDepot {
265}
266impl DataObjectTrait for PersonalityAgencyInaccessibleDepot {
267}
268impl DataObjectTrait for PersonalityAgencyInvalidDepot {
269}
270impl DataObjectTrait for PersonalityAgencyPmUnavailable {
271}
272impl DataObjectTrait for ExtensibleIssue {
273}
274impl DataObjectTrait for HostIssue {
275}
276impl DataObjectTrait for OrphanedDvFilterSwitch {
277}
278impl DataObjectTrait for UnknownAgentVm {
279}
280impl DataObjectTrait for HooksHookListSpec {
281}
282impl DataObjectTrait for HooksMarkAsProcessedSpec {
283}
284impl DataObjectTrait for SolutionsApplySpec {
285}
286impl DataObjectTrait for SolutionsClusterSolutionComplianceResult {
287}
288impl DataObjectTrait for SolutionsComplianceResult {
289}
290impl DataObjectTrait for SolutionsComplianceSpec {
291}
292impl DataObjectTrait for SolutionsDeploymentUnitComplianceResult {
293}
294impl DataObjectTrait for SolutionsHookAcknowledgeConfig {
295}
296impl DataObjectTrait for SolutionsInteractiveHookAcknowledgeConfig {
297}
298impl DataObjectTrait for SolutionsHookConfig {
299}
300impl DataObjectTrait for SolutionsHookInfo {
301}
302impl DataObjectTrait for SolutionsHostComplianceResult {
303}
304impl DataObjectTrait for SolutionsOvfProperty {
305}
306impl DataObjectTrait for SolutionsSolutionComplianceResult {
307}
308impl DataObjectTrait for SolutionsSolutionConfig {
309}
310impl DataObjectTrait for SolutionsSolutionValidationResult {
311}
312impl DataObjectTrait for SolutionsStoragePolicy {
313}
314impl DataObjectTrait for SolutionsProfileIdStoragePolicy {
315}
316impl DataObjectTrait for SolutionsTransitionSpec {
317}
318impl DataObjectTrait for SolutionsTypeSpecificSolutionConfig {
319}
320impl DataObjectTrait for SolutionsClusterBoundSolutionConfig {
321}
322impl DataObjectTrait for SolutionsHostBoundSolutionConfig {
323}
324impl DataObjectTrait for SolutionsVmNetworkMapping {
325}
326impl DataObjectTrait for SolutionsVmSource {
327}
328impl DataObjectTrait for SolutionsUrlVmSource {
329}
330impl DataObjectTrait for SolutionsValidateSpec {
331}
332impl DataObjectTrait for SolutionsValidationResult {
333}
334impl DataObjectTrait for SolutionsVmResourceSpec {
335}
336impl DataObjectTrait for VibVibInfo {
337}
338impl DataObjectTrait for VibVibInfoSoftwareTags {
339}
340impl DataObjectTrait for VibVibServicesSslTrust {
341}
342impl DataObjectTrait for VibVibServicesAnyCertificate {
343}
344impl DataObjectTrait for VibVibServicesPinnedPemCertificate {
345}
346impl DataObjectTrait for PbmAboutInfo {
347}
348impl DataObjectTrait for PbmExtendedElementDescription {
349}
350impl DataObjectTrait for PbmLoggingConfiguration {
351}
352impl DataObjectTrait for PbmServerObjectRef {
353}
354impl DataObjectTrait for PbmServiceInstanceContent {
355}
356impl DataObjectTrait for PbmCapabilityInstance {
357}
358impl DataObjectTrait for PbmCapabilityMetadata {
359}
360impl DataObjectTrait for PbmCapabilityMetadataUniqueId {
361}
362impl DataObjectTrait for PbmCapabilityConstraintInstance {
363}
364impl DataObjectTrait for PbmCapabilityPropertyInstance {
365}
366impl DataObjectTrait for PbmCapabilityPropertyMetadata {
367}
368impl DataObjectTrait for PbmCapabilityTypeInfo {
369}
370impl DataObjectTrait for PbmCapabilityGenericTypeInfo {
371}
372impl DataObjectTrait for PbmCapabilityMetadataPerCategory {
373}
374impl DataObjectTrait for PbmCapabilitySchema {
375}
376impl DataObjectTrait for PbmCapabilityNamespaceInfo {
377}
378impl DataObjectTrait for PbmCapabilitySchemaVendorInfo {
379}
380impl DataObjectTrait for PbmCapabilityVendorNamespaceInfo {
381}
382impl DataObjectTrait for PbmCapabilityVendorResourceTypeInfo {
383}
384impl DataObjectTrait for PbmLineOfServiceInfo {
385}
386impl DataObjectTrait for PbmPersistenceBasedDataServiceInfo {
387}
388impl DataObjectTrait for PbmVaioDataServiceInfo {
389}
390impl DataObjectTrait for PbmCapabilityDescription {
391}
392impl DataObjectTrait for PbmCapabilityDiscreteSet {
393}
394impl DataObjectTrait for PbmCapabilityRange {
395}
396impl DataObjectTrait for PbmCapabilityTimeSpan {
397}
398impl DataObjectTrait for PbmComplianceResult {
399}
400impl DataObjectTrait for PbmFetchEntityHealthStatusSpec {
401}
402impl DataObjectTrait for PbmComplianceOperationalStatus {
403}
404impl DataObjectTrait for PbmCompliancePolicyStatus {
405}
406impl DataObjectTrait for PbmRollupComplianceResult {
407}
408impl DataObjectTrait for PbmFaultNoPermissionEntityPrivileges {
409}
410impl DataObjectTrait for PbmPlacementCompatibilityResult {
411}
412impl DataObjectTrait for PbmPlacementMatchingResources {
413}
414impl DataObjectTrait for PbmPlacementMatchingReplicationResources {
415}
416impl DataObjectTrait for PbmPlacementHub {
417}
418impl DataObjectTrait for PbmPlacementRequirement {
419}
420impl DataObjectTrait for PbmPlacementCapabilityConstraintsRequirement {
421}
422impl DataObjectTrait for PbmPlacementCapabilityProfileRequirement {
423}
424impl DataObjectTrait for PbmPlacementResourceUtilization {
425}
426impl DataObjectTrait for PbmCapabilityProfileCreateSpec {
427}
428impl DataObjectTrait for PbmCapabilityProfileUpdateSpec {
429}
430impl DataObjectTrait for PbmCapabilityConstraints {
431}
432impl DataObjectTrait for PbmCapabilitySubProfileConstraints {
433}
434impl DataObjectTrait for PbmDataServiceToPoliciesMap {
435}
436impl DataObjectTrait for PbmDefaultProfileInfo {
437}
438impl DataObjectTrait for PbmProfile {
439}
440impl DataObjectTrait for PbmCapabilityProfile {
441}
442impl DataObjectTrait for PbmDefaultCapabilityProfile {
443}
444impl DataObjectTrait for PbmProfileId {
445}
446impl DataObjectTrait for PbmProfileOperationOutcome {
447}
448impl DataObjectTrait for PbmProfileType {
449}
450impl DataObjectTrait for PbmQueryProfileResult {
451}
452impl DataObjectTrait for PbmProfileResourceType {
453}
454impl DataObjectTrait for PbmCapabilitySubProfile {
455}
456impl DataObjectTrait for PbmDatastoreSpaceStatistics {
457}
458impl DataObjectTrait for PbmQueryReplicationGroupResult {
459}
460impl DataObjectTrait for SmsAboutInfo {
461}
462impl DataObjectTrait for EntityReference {
463}
464impl DataObjectTrait for FaultDomainFilter {
465}
466impl DataObjectTrait for ReplicationGroupFilter {
467}
468impl DataObjectTrait for SmsTaskInfo {
469}
470impl DataObjectTrait for AlarmFilter {
471}
472impl DataObjectTrait for AlarmResult {
473}
474impl DataObjectTrait for SmsProviderInfo {
475}
476impl DataObjectTrait for VasaProviderInfo {
477}
478impl DataObjectTrait for SmsProviderSpec {
479}
480impl DataObjectTrait for VasaProviderSpec {
481}
482impl DataObjectTrait for VasaProviderUpgradeSpec {
483}
484impl DataObjectTrait for RelatedStorageArray {
485}
486impl DataObjectTrait for SupportedVendorModelMapping {
487}
488impl DataObjectTrait for BackingConfig {
489}
490impl DataObjectTrait for BackingStoragePool {
491}
492impl DataObjectTrait for DatastoreBackingPoolMapping {
493}
494impl DataObjectTrait for DatastorePair {
495}
496impl DataObjectTrait for DrsMigrationCapabilityResult {
497}
498impl DataObjectTrait for FaultDomainProviderMapping {
499}
500impl DataObjectTrait for StorageFileSystemInfo {
501}
502impl DataObjectTrait for LunHbaAssociation {
503}
504impl DataObjectTrait for NameValuePair {
505}
506impl DataObjectTrait for StorageAlarm {
507}
508impl DataObjectTrait for StorageArray {
509}
510impl DataObjectTrait for StorageCapability {
511}
512impl DataObjectTrait for StorageContainer {
513}
514impl DataObjectTrait for StorageContainerResult {
515}
516impl DataObjectTrait for StorageContainerSpec {
517}
518impl DataObjectTrait for StorageFileSystem {
519}
520impl DataObjectTrait for StorageLun {
521}
522impl DataObjectTrait for StoragePort {
523}
524impl DataObjectTrait for FcStoragePort {
525}
526impl DataObjectTrait for FcoeStoragePort {
527}
528impl DataObjectTrait for IscsiStoragePort {
529}
530impl DataObjectTrait for StorageProcessor {
531}
532impl DataObjectTrait for DeviceId {
533}
534impl DataObjectTrait for VVolId {
535}
536impl DataObjectTrait for VasaVirtualDiskId {
537}
538impl DataObjectTrait for VirtualDiskKey {
539}
540impl DataObjectTrait for VirtualDiskMoId {
541}
542impl DataObjectTrait for VirtualMachineId {
543}
544impl DataObjectTrait for VirtualMachineFilePath {
545}
546impl DataObjectTrait for VirtualMachineMoId {
547}
548impl DataObjectTrait for VirtualMachineUuid {
549}
550impl DataObjectTrait for FailoverParam {
551}
552impl DataObjectTrait for TestFailoverParam {
553}
554impl DataObjectTrait for PolicyAssociation {
555}
556impl DataObjectTrait for ReplicationGroupData {
557}
558impl DataObjectTrait for RecoveredDevice {
559}
560impl DataObjectTrait for RecoveredDiskInfo {
561}
562impl DataObjectTrait for GroupInfo {
563}
564impl DataObjectTrait for SourceGroupInfo {
565}
566impl DataObjectTrait for TargetGroupInfo {
567}
568impl DataObjectTrait for GroupOperationResult {
569}
570impl DataObjectTrait for FailoverSuccessResult {
571}
572impl DataObjectTrait for GroupErrorResult {
573}
574impl DataObjectTrait for QueryPointInTimeReplicaSuccessResult {
575}
576impl DataObjectTrait for QueryPointInTimeReplicaSummaryResult {
577}
578impl DataObjectTrait for QueryReplicationGroupSuccessResult {
579}
580impl DataObjectTrait for ReverseReplicationSuccessResult {
581}
582impl DataObjectTrait for SyncReplicationGroupSuccessResult {
583}
584impl DataObjectTrait for PointInTimeReplicaId {
585}
586impl DataObjectTrait for PromoteParam {
587}
588impl DataObjectTrait for QueryPointInTimeReplicaParam {
589}
590impl DataObjectTrait for ReplicaQueryIntervalParam {
591}
592impl DataObjectTrait for PointInTimeReplicaInfo {
593}
594impl DataObjectTrait for ReplicaIntervalQueryResult {
595}
596impl DataObjectTrait for QueryReplicationPeerResult {
597}
598impl DataObjectTrait for ReplicaId {
599}
600impl DataObjectTrait for ReplicationTargetInfo {
601}
602impl DataObjectTrait for SourceGroupMemberInfo {
603}
604impl DataObjectTrait for TargetDeviceId {
605}
606impl DataObjectTrait for TargetToSourceInfo {
607}
608impl DataObjectTrait for TargetGroupMemberInfo {
609}
610impl DataObjectTrait for RecoveredTargetGroupMemberInfo {
611}
612impl DataObjectTrait for AboutInfo {
613}
614impl DataObjectTrait for AuthorizationDescription {
615}
616impl DataObjectTrait for EntityPrivilege {
617}
618impl DataObjectTrait for Permission {
619}
620impl DataObjectTrait for AuthorizationPrivilege {
621}
622impl DataObjectTrait for PrivilegeAvailability {
623}
624impl DataObjectTrait for AuthorizationRole {
625}
626impl DataObjectTrait for UserPrivilegeResult {
627}
628impl DataObjectTrait for BatchResult {
629}
630impl DataObjectTrait for Capability {
631}
632impl DataObjectTrait for ClusterComputeResourceClusterConfigResult {
633}
634impl DataObjectTrait for ClusterComputeResourceCryptoModePolicy {
635}
636impl DataObjectTrait for ClusterComputeResourceDvsSetting {
637}
638impl DataObjectTrait for ClusterComputeResourceDvsSettingDvPortgroupToServiceMapping {
639}
640impl DataObjectTrait for ClusterComputeResourceDvsProfile {
641}
642impl DataObjectTrait for ClusterComputeResourceDvsProfileDvPortgroupSpecToServiceMapping {
643}
644impl DataObjectTrait for ClusterComputeResourceHciConfigInfo {
645}
646impl DataObjectTrait for ClusterComputeResourceHciConfigSpec {
647}
648impl DataObjectTrait for ClusterComputeResourceHostConfigurationInput {
649}
650impl DataObjectTrait for ClusterComputeResourceHostConfigurationProfile {
651}
652impl DataObjectTrait for ClusterComputeResourceHostEvacuationInfo {
653}
654impl DataObjectTrait for ClusterComputeResourceHostVmkNicInfo {
655}
656impl DataObjectTrait for ClusterComputeResourceMaintenanceInfo {
657}
658impl DataObjectTrait for ClusterComputeResourceVcProfile {
659}
660impl DataObjectTrait for ClusterComputeResourceValidationResultBase {
661}
662impl DataObjectTrait for ClusterComputeResourceDvsConfigurationValidation {
663}
664impl DataObjectTrait for ClusterComputeResourceHostConfigurationValidation {
665}
666impl DataObjectTrait for VsanClusterConfigPrecheckItem {
667}
668impl DataObjectTrait for ClusterComputeResourceVcsSlots {
669}
670impl DataObjectTrait for ComputeResourceConfigInfo {
671}
672impl DataObjectTrait for ClusterConfigInfoEx {
673}
674impl DataObjectTrait for ComputeResourceConfigSpec {
675}
676impl DataObjectTrait for ClusterConfigSpecEx {
677}
678impl DataObjectTrait for ComputeResourceHostSpbmLicenseInfo {
679}
680impl DataObjectTrait for ComputeResourceHostSeedSpec {
681}
682impl DataObjectTrait for ComputeResourceHostSeedSpecSingleHostSpec {
683}
684impl DataObjectTrait for ComputeResourceSummary {
685}
686impl DataObjectTrait for ClusterComputeResourceSummary {
687}
688impl DataObjectTrait for CustomFieldDef {
689}
690impl DataObjectTrait for CustomFieldValue {
691}
692impl DataObjectTrait for CustomFieldStringValue {
693}
694impl DataObjectTrait for CustomizationSpecInfo {
695}
696impl DataObjectTrait for CustomizationSpecItem {
697}
698impl DataObjectTrait for DatacenterBasicConnectInfo {
699}
700impl DataObjectTrait for DatacenterConfigInfo {
701}
702impl DataObjectTrait for DatacenterConfigSpec {
703}
704impl DataObjectTrait for DatastoreCapability {
705}
706impl DataObjectTrait for DatastoreHostMount {
707}
708impl DataObjectTrait for DatastoreInfo {
709}
710impl DataObjectTrait for LocalDatastoreInfo {
711}
712impl DataObjectTrait for NasDatastoreInfo {
713}
714impl DataObjectTrait for PMemDatastoreInfo {
715}
716impl DataObjectTrait for VmfsDatastoreInfo {
717}
718impl DataObjectTrait for VsanDatastoreInfo {
719}
720impl DataObjectTrait for VvolDatastoreInfo {
721}
722impl DataObjectTrait for DatastoreMountPathDatastorePair {
723}
724impl DataObjectTrait for DatastoreSummary {
725}
726impl DataObjectTrait for DatastoreVVolContainerFailoverPair {
727}
728impl DataObjectTrait for DatastoreNamespaceManagerDirectoryInfo {
729}
730impl DataObjectTrait for Description {
731}
732impl DataObjectTrait for ElementDescription {
733}
734impl DataObjectTrait for EvcMode {
735}
736impl DataObjectTrait for ExtendedElementDescription {
737}
738impl DataObjectTrait for FeatureEvcMode {
739}
740impl DataObjectTrait for OptionDef {
741}
742impl DataObjectTrait for ExtendedDescription {
743}
744impl DataObjectTrait for MethodDescription {
745}
746impl DataObjectTrait for TypeDescription {
747}
748impl DataObjectTrait for ScheduledTaskDetail {
749}
750impl DataObjectTrait for DesiredSoftwareSpec {
751}
752impl DataObjectTrait for DesiredSoftwareSpecBaseImageSpec {
753}
754impl DataObjectTrait for DesiredSoftwareSpecComponentSpec {
755}
756impl DataObjectTrait for DesiredSoftwareSpecVendorAddOnSpec {
757}
758impl DataObjectTrait for DiagnosticManagerAuditRecordResult {
759}
760impl DataObjectTrait for DiagnosticManagerBundleInfo {
761}
762impl DataObjectTrait for DiagnosticManagerLogDescriptor {
763}
764impl DataObjectTrait for DiagnosticManagerLogHeader {
765}
766impl DataObjectTrait for DirectPathProfileManagerCapacityQuerySpec {
767}
768impl DataObjectTrait for DirectPathProfileManagerCapacityQueryByDeviceConfig {
769}
770impl DataObjectTrait for DirectPathProfileManagerCapacityQueryById {
771}
772impl DataObjectTrait for DirectPathProfileManagerCapacityQueryByName {
773}
774impl DataObjectTrait for DirectPathProfileManagerCapacityResult {
775}
776impl DataObjectTrait for DirectPathProfileManagerCapacityInfo {
777}
778impl DataObjectTrait for DirectPathProfileManagerCapacityUnknown {
779}
780impl DataObjectTrait for DirectPathProfileManagerCreateSpec {
781}
782impl DataObjectTrait for DirectPathProfileManagerDirectPathConfig {
783}
784impl DataObjectTrait for DirectPathProfileManagerDvxDirectPathConfig {
785}
786impl DataObjectTrait for DirectPathProfileManagerDynamicDirectPathConfig {
787}
788impl DataObjectTrait for DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig {
789}
790impl DataObjectTrait for DirectPathProfileManagerVmiopDirectPathConfig {
791}
792impl DataObjectTrait for DirectPathProfileInfo {
793}
794impl DataObjectTrait for DirectPathProfileManagerFilterSpec {
795}
796impl DataObjectTrait for DirectPathProfileManagerTargetEntity {
797}
798impl DataObjectTrait for DirectPathProfileManagerTargetCluster {
799}
800impl DataObjectTrait for DirectPathProfileManagerTargetHost {
801}
802impl DataObjectTrait for DirectPathProfileManagerUpdateSpec {
803}
804impl DataObjectTrait for DvsBackupRestoreCapability {
805}
806impl DataObjectTrait for DvsCapability {
807}
808impl DataObjectTrait for DvsConfigInfo {
809}
810impl DataObjectTrait for VMwareDvsConfigInfo {
811}
812impl DataObjectTrait for DvsConfigSpec {
813}
814impl DataObjectTrait for VMwareDvsConfigSpec {
815}
816impl DataObjectTrait for DvsContactInfo {
817}
818impl DataObjectTrait for DvsCreateSpec {
819}
820impl DataObjectTrait for DvsFeatureCapability {
821}
822impl DataObjectTrait for VMwareDvsFeatureCapability {
823}
824impl DataObjectTrait for DvsHealthCheckConfig {
825}
826impl DataObjectTrait for VMwareDvsHealthCheckConfig {
827}
828impl DataObjectTrait for VMwareDvsTeamingHealthCheckConfig {
829}
830impl DataObjectTrait for VMwareDvsVlanMtuHealthCheckConfig {
831}
832impl DataObjectTrait for DvsHealthCheckCapability {
833}
834impl DataObjectTrait for VMwareDvsHealthCheckCapability {
835}
836impl DataObjectTrait for DvsHostInfrastructureTrafficResource {
837}
838impl DataObjectTrait for DvsHostInfrastructureTrafficResourceAllocation {
839}
840impl DataObjectTrait for DvsNetworkResourceManagementCapability {
841}
842impl DataObjectTrait for DvsResourceRuntimeInfo {
843}
844impl DataObjectTrait for DvsRollbackCapability {
845}
846impl DataObjectTrait for DvsRuntimeInfo {
847}
848impl DataObjectTrait for DvsSummary {
849}
850impl DataObjectTrait for DvsPolicy {
851}
852impl DataObjectTrait for DvsUplinkPortPolicy {
853}
854impl DataObjectTrait for DvsNameArrayUplinkPortPolicy {
855}
856impl DataObjectTrait for EnumDescription {
857}
858impl DataObjectTrait for EnvironmentBrowserConfigOptionQuerySpec {
859}
860impl DataObjectTrait for Extension {
861}
862impl DataObjectTrait for ExtensionClientInfo {
863}
864impl DataObjectTrait for ExtensionEventTypeInfo {
865}
866impl DataObjectTrait for ExtensionFaultTypeInfo {
867}
868impl DataObjectTrait for ExtensionHealthInfo {
869}
870impl DataObjectTrait for ExtensionOvfConsumerInfo {
871}
872impl DataObjectTrait for ExtensionPrivilegeInfo {
873}
874impl DataObjectTrait for ExtensionResourceInfo {
875}
876impl DataObjectTrait for ExtensionServerInfo {
877}
878impl DataObjectTrait for ExtensionTaskTypeInfo {
879}
880impl DataObjectTrait for ExtensionManagerIpAllocationUsage {
881}
882impl DataObjectTrait for FaultsByHost {
883}
884impl DataObjectTrait for FaultsByVm {
885}
886impl DataObjectTrait for FileLockInfo {
887}
888impl DataObjectTrait for FileLockInfoResult {
889}
890impl DataObjectTrait for FolderBatchAddHostsToClusterResult {
891}
892impl DataObjectTrait for FolderBatchAddStandaloneHostsResult {
893}
894impl DataObjectTrait for FolderExternallyManagedFolderInfo {
895}
896impl DataObjectTrait for FolderFailedHostResult {
897}
898impl DataObjectTrait for FolderNewHostSpec {
899}
900impl DataObjectTrait for HbrManagerReplicationVmInfo {
901}
902impl DataObjectTrait for ReplicationVmProgressInfo {
903}
904impl DataObjectTrait for HbrManagerVmReplicationCapability {
905}
906impl DataObjectTrait for HbrReplicationTargetSpec {
907}
908impl DataObjectTrait for HbrTargetSpecReplacement {
909}
910impl DataObjectTrait for HbrTargetSpec {
911}
912impl DataObjectTrait for HealthUpdate {
913}
914impl DataObjectTrait for HealthUpdateInfo {
915}
916impl DataObjectTrait for PerfInterval {
917}
918impl DataObjectTrait for HostServiceTicket {
919}
920impl DataObjectTrait for HostSystemComplianceCheckState {
921}
922impl DataObjectTrait for HostSystemReconnectSpec {
923}
924impl DataObjectTrait for HostSystemRemediationState {
925}
926impl DataObjectTrait for HttpNfcLeaseCapabilities {
927}
928impl DataObjectTrait for HttpNfcLeaseDatastoreLeaseInfo {
929}
930impl DataObjectTrait for HttpNfcLeaseDeviceUrl {
931}
932impl DataObjectTrait for HttpNfcLeaseHostInfo {
933}
934impl DataObjectTrait for HttpNfcLeaseInfo {
935}
936impl DataObjectTrait for HttpNfcLeaseManifestEntry {
937}
938impl DataObjectTrait for HttpNfcLeaseProbeResult {
939}
940impl DataObjectTrait for HttpNfcLeaseSourceFile {
941}
942impl DataObjectTrait for ImportSpec {
943}
944impl DataObjectTrait for VirtualAppImportSpec {
945}
946impl DataObjectTrait for VirtualMachineImportSpec {
947}
948impl DataObjectTrait for InheritablePolicy {
949}
950impl DataObjectTrait for BoolPolicy {
951}
952impl DataObjectTrait for IntPolicy {
953}
954impl DataObjectTrait for LongPolicy {
955}
956impl DataObjectTrait for StringPolicy {
957}
958impl DataObjectTrait for DvsFilterConfig {
959}
960impl DataObjectTrait for DvsFilterConfigSpec {
961}
962impl DataObjectTrait for DvsTrafficFilterConfig {
963}
964impl DataObjectTrait for DvsTrafficFilterConfigSpec {
965}
966impl DataObjectTrait for DvsFilterPolicy {
967}
968impl DataObjectTrait for DvsTrafficShapingPolicy {
969}
970impl DataObjectTrait for DvsVendorSpecificConfig {
971}
972impl DataObjectTrait for DvsFailureCriteria {
973}
974impl DataObjectTrait for DvsMacLearningPolicy {
975}
976impl DataObjectTrait for DvsMacManagementPolicy {
977}
978impl DataObjectTrait for DvsSecurityPolicy {
979}
980impl DataObjectTrait for VMwareUplinkLacpPolicy {
981}
982impl DataObjectTrait for VMwareUplinkPortOrderPolicy {
983}
984impl DataObjectTrait for VmwareUplinkPortTeamingPolicy {
985}
986impl DataObjectTrait for VmwareDistributedVirtualSwitchVlanSpec {
987}
988impl DataObjectTrait for VmwareDistributedVirtualSwitchPvlanSpec {
989}
990impl DataObjectTrait for VmwareDistributedVirtualSwitchTrunkVlanSpec {
991}
992impl DataObjectTrait for VmwareDistributedVirtualSwitchVlanIdSpec {
993}
994impl DataObjectTrait for IoFilterInfo {
995}
996impl DataObjectTrait for ClusterIoFilterInfo {
997}
998impl DataObjectTrait for HostIoFilterInfo {
999}
1000impl DataObjectTrait for IoFilterQueryIssueResult {
1001}
1002impl DataObjectTrait for IoFilterHostIssue {
1003}
1004impl DataObjectTrait for IoFilterManagerSslTrust {
1005}
1006impl DataObjectTrait for PinnedCertificate {
1007}
1008impl DataObjectTrait for UntrustedCertificate {
1009}
1010impl DataObjectTrait for IpPoolManagerIpAllocation {
1011}
1012impl DataObjectTrait for KeyValue {
1013}
1014impl DataObjectTrait for LatencySensitivity {
1015}
1016impl DataObjectTrait for LicenseAssignmentManagerLicenseAssignment {
1017}
1018impl DataObjectTrait for LicenseAvailabilityInfo {
1019}
1020impl DataObjectTrait for LicenseDiagnostics {
1021}
1022impl DataObjectTrait for LicenseManagerEvaluationInfo {
1023}
1024impl DataObjectTrait for LicenseFeatureInfo {
1025}
1026impl DataObjectTrait for HostLicensableResourceInfo {
1027}
1028impl DataObjectTrait for LicenseManagerLicenseInfo {
1029}
1030impl DataObjectTrait for LicenseSource {
1031}
1032impl DataObjectTrait for EvaluationLicenseSource {
1033}
1034impl DataObjectTrait for LicenseServerSource {
1035}
1036impl DataObjectTrait for LocalLicenseSource {
1037}
1038impl DataObjectTrait for LicenseUsageInfo {
1039}
1040impl DataObjectTrait for LicenseReservationInfo {
1041}
1042impl DataObjectTrait for LocalizationManagerMessageCatalog {
1043}
1044impl DataObjectTrait for NegatableExpression {
1045}
1046impl DataObjectTrait for IntExpression {
1047}
1048impl DataObjectTrait for IpAddress {
1049}
1050impl DataObjectTrait for IpRange {
1051}
1052impl DataObjectTrait for SingleIp {
1053}
1054impl DataObjectTrait for MacAddress {
1055}
1056impl DataObjectTrait for MacRange {
1057}
1058impl DataObjectTrait for SingleMac {
1059}
1060impl DataObjectTrait for StringExpression {
1061}
1062impl DataObjectTrait for DvsIpPort {
1063}
1064impl DataObjectTrait for DvsIpPortRange {
1065}
1066impl DataObjectTrait for DvsSingleIpPort {
1067}
1068impl DataObjectTrait for NetworkSummary {
1069}
1070impl DataObjectTrait for OpaqueNetworkSummary {
1071}
1072impl DataObjectTrait for NumericRange {
1073}
1074impl DataObjectTrait for OpaqueNetworkCapability {
1075}
1076impl DataObjectTrait for OvfConsumerOstNode {
1077}
1078impl DataObjectTrait for OvfConsumerOvfSection {
1079}
1080impl DataObjectTrait for OvfManagerCommonParams {
1081}
1082impl DataObjectTrait for OvfCreateImportSpecParams {
1083}
1084impl DataObjectTrait for OvfImportParams {
1085}
1086impl DataObjectTrait for OvfParseDescriptorParams {
1087}
1088impl DataObjectTrait for OvfValidateHostParams {
1089}
1090impl DataObjectTrait for OvfCreateDescriptorParams {
1091}
1092impl DataObjectTrait for OvfCreateDescriptorResult {
1093}
1094impl DataObjectTrait for OvfCreateImportSpecResult {
1095}
1096impl DataObjectTrait for OvfDatastoreMapping {
1097}
1098impl DataObjectTrait for OvfDeploymentOption {
1099}
1100impl DataObjectTrait for OvfFileItem {
1101}
1102impl DataObjectTrait for OvfNetworkInfo {
1103}
1104impl DataObjectTrait for OvfNetworkMapping {
1105}
1106impl DataObjectTrait for OvfFile {
1107}
1108impl DataObjectTrait for OvfOptionInfo {
1109}
1110impl DataObjectTrait for OvfParseDescriptorResult {
1111}
1112impl DataObjectTrait for OvfResourceMap {
1113}
1114impl DataObjectTrait for OvfStorageProfileMapping {
1115}
1116impl DataObjectTrait for OvfValidateHostResult {
1117}
1118impl DataObjectTrait for PasswordField {
1119}
1120impl DataObjectTrait for PerformanceDescription {
1121}
1122impl DataObjectTrait for PerfCompositeMetric {
1123}
1124impl DataObjectTrait for PerfCounterInfo {
1125}
1126impl DataObjectTrait for PerformanceManagerCounterLevelMapping {
1127}
1128impl DataObjectTrait for PerfEntityMetricBase {
1129}
1130impl DataObjectTrait for PerfEntityMetric {
1131}
1132impl DataObjectTrait for PerfEntityMetricCsv {
1133}
1134impl DataObjectTrait for PerfMetricId {
1135}
1136impl DataObjectTrait for PerfMetricSeries {
1137}
1138impl DataObjectTrait for PerfMetricIntSeries {
1139}
1140impl DataObjectTrait for PerfMetricSeriesCsv {
1141}
1142impl DataObjectTrait for PerfProviderSummary {
1143}
1144impl DataObjectTrait for PerfQuerySpec {
1145}
1146impl DataObjectTrait for PerfSampleInfo {
1147}
1148impl DataObjectTrait for PrivilegePolicyDef {
1149}
1150impl DataObjectTrait for ResourceAllocationInfo {
1151}
1152impl DataObjectTrait for ResourceAllocationOption {
1153}
1154impl DataObjectTrait for ResourceConfigOption {
1155}
1156impl DataObjectTrait for ResourceConfigSpec {
1157}
1158impl DataObjectTrait for DatabaseSizeEstimate {
1159}
1160impl DataObjectTrait for DatabaseSizeParam {
1161}
1162impl DataObjectTrait for InventoryDescription {
1163}
1164impl DataObjectTrait for PerformanceStatisticsDescription {
1165}
1166impl DataObjectTrait for ResourcePoolResourceUsage {
1167}
1168impl DataObjectTrait for ResourcePoolRuntimeInfo {
1169}
1170impl DataObjectTrait for ResourcePoolSummary {
1171}
1172impl DataObjectTrait for VirtualAppSummary {
1173}
1174impl DataObjectTrait for ResourcePoolQuickStats {
1175}
1176impl DataObjectTrait for SddcBase {
1177}
1178impl DataObjectTrait for VimVsanReconfigSpec {
1179}
1180impl DataObjectTrait for SelectionSet {
1181}
1182impl DataObjectTrait for DvPortgroupSelection {
1183}
1184impl DataObjectTrait for DvsSelection {
1185}
1186impl DataObjectTrait for HostVMotionCompatibility {
1187}
1188impl DataObjectTrait for ProductComponentInfo {
1189}
1190impl DataObjectTrait for ServiceContent {
1191}
1192impl DataObjectTrait for ServiceLocator {
1193}
1194impl DataObjectTrait for ServiceLocatorCredential {
1195}
1196impl DataObjectTrait for ServiceLocatorNamePassword {
1197}
1198impl DataObjectTrait for ServiceLocatorSamlCredential {
1199}
1200impl DataObjectTrait for ServiceManagerServiceInfo {
1201}
1202impl DataObjectTrait for SessionManagerGenericServiceTicket {
1203}
1204impl DataObjectTrait for SessionManagerLocalTicket {
1205}
1206impl DataObjectTrait for SessionManagerServiceRequestSpec {
1207}
1208impl DataObjectTrait for SessionManagerHttpServiceRequestSpec {
1209}
1210impl DataObjectTrait for SessionManagerVmomiServiceRequestSpec {
1211}
1212impl DataObjectTrait for SharesInfo {
1213}
1214impl DataObjectTrait for SharesOption {
1215}
1216impl DataObjectTrait for SiteInfo {
1217}
1218impl DataObjectTrait for StoragePodSummary {
1219}
1220impl DataObjectTrait for StorageIoAllocationInfo {
1221}
1222impl DataObjectTrait for StorageIoAllocationOption {
1223}
1224impl DataObjectTrait for StorageIormInfo {
1225}
1226impl DataObjectTrait for StorageIormConfigOption {
1227}
1228impl DataObjectTrait for StorageIormConfigSpec {
1229}
1230impl DataObjectTrait for PodStorageDrsEntry {
1231}
1232impl DataObjectTrait for StoragePerformanceSummary {
1233}
1234impl DataObjectTrait for StorageResourceManagerStorageProfileStatistics {
1235}
1236impl DataObjectTrait for Tag {
1237}
1238impl DataObjectTrait for TaskDescription {
1239}
1240impl DataObjectTrait for TaskFilterSpec {
1241}
1242impl DataObjectTrait for TaskFilterSpecByEntity {
1243}
1244impl DataObjectTrait for TaskFilterSpecByTime {
1245}
1246impl DataObjectTrait for TaskFilterSpecByUsername {
1247}
1248impl DataObjectTrait for TaskInfo {
1249}
1250impl DataObjectTrait for TaskInfoFilterSpec {
1251}
1252impl DataObjectTrait for TaskInfoFilterSpecFilterTaskResults {
1253}
1254impl DataObjectTrait for TaskManagerTaskViewSpec {
1255}
1256impl DataObjectTrait for TaskManagerViewByStartId {
1257}
1258impl DataObjectTrait for TaskReason {
1259}
1260impl DataObjectTrait for TaskReasonAlarm {
1261}
1262impl DataObjectTrait for TaskReasonSchedule {
1263}
1264impl DataObjectTrait for TaskReasonSystem {
1265}
1266impl DataObjectTrait for TaskReasonUser {
1267}
1268impl DataObjectTrait for UpdateVirtualMachineFilesResult {
1269}
1270impl DataObjectTrait for UpdateVirtualMachineFilesResultFailedVmFileInfo {
1271}
1272impl DataObjectTrait for UserSearchResult {
1273}
1274impl DataObjectTrait for PosixUserSearchResult {
1275}
1276impl DataObjectTrait for UserSession {
1277}
1278impl DataObjectTrait for VVolVmConfigFileUpdateResult {
1279}
1280impl DataObjectTrait for VVolVmConfigFileUpdateResultFailedVmConfigFileInfo {
1281}
1282impl DataObjectTrait for VasaStorageArray {
1283}
1284impl DataObjectTrait for VasaStorageArrayDiscoveryFcTransport {
1285}
1286impl DataObjectTrait for VasaStorageArrayDiscoveryIpTransport {
1287}
1288impl DataObjectTrait for VasaStorageArrayDiscoverySvcInfo {
1289}
1290impl DataObjectTrait for VasaProviderContainerSpec {
1291}
1292impl DataObjectTrait for VimVasaProvider {
1293}
1294impl DataObjectTrait for VimVasaProviderStatePerArray {
1295}
1296impl DataObjectTrait for VimVasaProviderVirtualHostConfig {
1297}
1298impl DataObjectTrait for VimVasaProviderInfo {
1299}
1300impl DataObjectTrait for VirtualAppLinkInfo {
1301}
1302impl DataObjectTrait for VirtualDiskSpec {
1303}
1304impl DataObjectTrait for DeviceBackedVirtualDiskSpec {
1305}
1306impl DataObjectTrait for FileBackedVirtualDiskSpec {
1307}
1308impl DataObjectTrait for SeSparseVirtualDiskSpec {
1309}
1310impl DataObjectTrait for VirtualMachineConnection {
1311}
1312impl DataObjectTrait for VirtualMachineMksConnection {
1313}
1314impl DataObjectTrait for DiskChangeInfo {
1315}
1316impl DataObjectTrait for DiskChangeExtent {
1317}
1318impl DataObjectTrait for VirtualMachineDisplayTopology {
1319}
1320impl DataObjectTrait for VirtualMachineMksTicket {
1321}
1322impl DataObjectTrait for StorageRequirement {
1323}
1324impl DataObjectTrait for VirtualMachineTicket {
1325}
1326impl DataObjectTrait for VirtualMachineWipeResult {
1327}
1328impl DataObjectTrait for VsanComparator {
1329}
1330impl DataObjectTrait for VsanJsonComparator {
1331}
1332impl DataObjectTrait for VsanNestJsonComparator {
1333}
1334impl DataObjectTrait for VsanDataObfuscationRule {
1335}
1336impl DataObjectTrait for VsanJsonFilterRule {
1337}
1338impl DataObjectTrait for VsanMassCollectorPropertyParams {
1339}
1340impl DataObjectTrait for VsanMassCollectorSpec {
1341}
1342impl DataObjectTrait for VsanObjectTypeRule {
1343}
1344impl DataObjectTrait for VsanRegexBasedRule {
1345}
1346impl DataObjectTrait for VsanResourceConstraint {
1347}
1348impl DataObjectTrait for VsanCompositeConstraint {
1349}
1350impl DataObjectTrait for VsanPropertyConstraint {
1351}
1352impl DataObjectTrait for VsanUpgradeSystemNetworkPartitionInfo {
1353}
1354impl DataObjectTrait for VsanUpgradeSystemPreflightCheckIssue {
1355}
1356impl DataObjectTrait for VsanUpgradeSystemApiBrokenIssue {
1357}
1358impl DataObjectTrait for VsanUpgradeSystemAutoClaimEnabledOnHostsIssue {
1359}
1360impl DataObjectTrait for VsanUpgradeSystemHostsDisconnectedIssue {
1361}
1362impl DataObjectTrait for VsanUpgradeSystemMissingHostsInClusterIssue {
1363}
1364impl DataObjectTrait for VsanUpgradeSystemNetworkPartitionIssue {
1365}
1366impl DataObjectTrait for VsanUpgradeSystemNotEnoughFreeCapacityIssue {
1367}
1368impl DataObjectTrait for VsanUpgradeSystemRogueHostsInClusterIssue {
1369}
1370impl DataObjectTrait for VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue {
1371}
1372impl DataObjectTrait for VsanUpgradeSystemWrongEsxVersionIssue {
1373}
1374impl DataObjectTrait for VsanBrokenDiskChainIssue {
1375}
1376impl DataObjectTrait for VsanDisallowDataMovementIssue {
1377}
1378impl DataObjectTrait for VsanDisallowEvacuateDataIssue {
1379}
1380impl DataObjectTrait for VsanDiskUnhealthIssue {
1381}
1382impl DataObjectTrait for VsanHigherObjectsPresentDuringDowngradeIssue {
1383}
1384impl DataObjectTrait for VsanHostPropertyRetrieveIssue {
1385}
1386impl DataObjectTrait for VsanHostWithHybridDiskgroupIssue {
1387}
1388impl DataObjectTrait for VsanHostsCompressionOnlyNotSupported {
1389}
1390impl DataObjectTrait for VsanMixedEsxVersionInClientIssue {
1391}
1392impl DataObjectTrait for VsanMixedEsxVersionIssue {
1393}
1394impl DataObjectTrait for VsanObjectInaccessibleIssue {
1395}
1396impl DataObjectTrait for VsanObjectPolicyIssue {
1397}
1398impl DataObjectTrait for VsanRemoteClusterNotCompatible {
1399}
1400impl DataObjectTrait for VsanUnknownScanIssue {
1401}
1402impl DataObjectTrait for VsanUnsupportedHighDiskVersionIssue {
1403}
1404impl DataObjectTrait for VsanUpgradeSystemPreflightCheckResult {
1405}
1406impl DataObjectTrait for VsanDiskFormatConversionCheckResult {
1407}
1408impl DataObjectTrait for VsanUpgradeSystemUpgradeHistoryItem {
1409}
1410impl DataObjectTrait for VsanUpgradeSystemUpgradeHistoryDiskGroupOp {
1411}
1412impl DataObjectTrait for VsanUpgradeSystemUpgradeHistoryPreflightFail {
1413}
1414impl DataObjectTrait for VsanUpgradeSystemUpgradeHistoryStoragePoolOp {
1415}
1416impl DataObjectTrait for VsanUpgradeSystemUpgradeStatus {
1417}
1418impl DataObjectTrait for VsanUpgradeStatusEx {
1419}
1420impl DataObjectTrait for Action {
1421}
1422impl DataObjectTrait for CreateTaskAction {
1423}
1424impl DataObjectTrait for MethodAction {
1425}
1426impl DataObjectTrait for RunScriptAction {
1427}
1428impl DataObjectTrait for SendEmailAction {
1429}
1430impl DataObjectTrait for SendSnmpAction {
1431}
1432impl DataObjectTrait for MethodActionArgument {
1433}
1434impl DataObjectTrait for AlarmAction {
1435}
1436impl DataObjectTrait for AlarmTriggeringAction {
1437}
1438impl DataObjectTrait for GroupAlarmAction {
1439}
1440impl DataObjectTrait for AlarmDescription {
1441}
1442impl DataObjectTrait for AlarmExpression {
1443}
1444impl DataObjectTrait for AndAlarmExpression {
1445}
1446impl DataObjectTrait for EventAlarmExpression {
1447}
1448impl DataObjectTrait for MetricAlarmExpression {
1449}
1450impl DataObjectTrait for OrAlarmExpression {
1451}
1452impl DataObjectTrait for StateAlarmExpression {
1453}
1454impl DataObjectTrait for AlarmFilterSpec {
1455}
1456impl DataObjectTrait for AlarmSetting {
1457}
1458impl DataObjectTrait for AlarmSpec {
1459}
1460impl DataObjectTrait for AlarmInfo {
1461}
1462impl DataObjectTrait for AlarmState {
1463}
1464impl DataObjectTrait for AlarmTriggeringActionTransitionSpec {
1465}
1466impl DataObjectTrait for EventAlarmExpressionComparison {
1467}
1468impl DataObjectTrait for ClusterAction {
1469}
1470impl DataObjectTrait for ClusterClusterInitialPlacementAction {
1471}
1472impl DataObjectTrait for ClusterHostInfraUpdateHaModeAction {
1473}
1474impl DataObjectTrait for ClusterHostPowerAction {
1475}
1476impl DataObjectTrait for ClusterInitialPlacementAction {
1477}
1478impl DataObjectTrait for ClusterMigrationAction {
1479}
1480impl DataObjectTrait for PlacementAction {
1481}
1482impl DataObjectTrait for HbrDiskMigrationAction {
1483}
1484impl DataObjectTrait for StorageMigrationAction {
1485}
1486impl DataObjectTrait for StoragePlacementAction {
1487}
1488impl DataObjectTrait for ClusterActionHistory {
1489}
1490impl DataObjectTrait for ClusterAttemptedVmInfo {
1491}
1492impl DataObjectTrait for ClusterPowerContext {
1493}
1494impl DataObjectTrait for ClusterConfigInfo {
1495}
1496impl DataObjectTrait for ClusterConfigSpec {
1497}
1498impl DataObjectTrait for ClusterCryptoConfigInfo {
1499}
1500impl DataObjectTrait for ClusterDasAamNodeState {
1501}
1502impl DataObjectTrait for ClusterDasAdmissionControlInfo {
1503}
1504impl DataObjectTrait for ClusterFailoverHostAdmissionControlInfo {
1505}
1506impl DataObjectTrait for ClusterFailoverLevelAdmissionControlInfo {
1507}
1508impl DataObjectTrait for ClusterFailoverResourcesAdmissionControlInfo {
1509}
1510impl DataObjectTrait for ClusterDasAdmissionControlPolicy {
1511}
1512impl DataObjectTrait for ClusterFailoverHostAdmissionControlPolicy {
1513}
1514impl DataObjectTrait for ClusterFailoverLevelAdmissionControlPolicy {
1515}
1516impl DataObjectTrait for ClusterFailoverResourcesAdmissionControlPolicy {
1517}
1518impl DataObjectTrait for ClusterDasAdvancedRuntimeInfo {
1519}
1520impl DataObjectTrait for ClusterDasFailoverLevelAdvancedRuntimeInfo {
1521}
1522impl DataObjectTrait for DasHeartbeatDatastoreInfo {
1523}
1524impl DataObjectTrait for ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo {
1525}
1526impl DataObjectTrait for ClusterDasConfigInfo {
1527}
1528impl DataObjectTrait for ClusterDasData {
1529}
1530impl DataObjectTrait for ClusterDasDataSummary {
1531}
1532impl DataObjectTrait for ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots {
1533}
1534impl DataObjectTrait for ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo {
1535}
1536impl DataObjectTrait for ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots {
1537}
1538impl DataObjectTrait for ClusterDasFdmHostState {
1539}
1540impl DataObjectTrait for ClusterDasHostInfo {
1541}
1542impl DataObjectTrait for ClusterDasAamHostInfo {
1543}
1544impl DataObjectTrait for ClusterDasHostRecommendation {
1545}
1546impl DataObjectTrait for ClusterDasVmConfigInfo {
1547}
1548impl DataObjectTrait for ClusterDasVmSettings {
1549}
1550impl DataObjectTrait for ClusterDpmConfigInfo {
1551}
1552impl DataObjectTrait for ClusterDpmHostConfigInfo {
1553}
1554impl DataObjectTrait for ClusterDrsConfigInfo {
1555}
1556impl DataObjectTrait for ClusterDrsFaults {
1557}
1558impl DataObjectTrait for ClusterDrsFaultsFaultsByVm {
1559}
1560impl DataObjectTrait for ClusterDrsFaultsFaultsByVirtualDisk {
1561}
1562impl DataObjectTrait for ClusterDrsMigration {
1563}
1564impl DataObjectTrait for ClusterDrsRecommendation {
1565}
1566impl DataObjectTrait for ClusterDrsVmConfigInfo {
1567}
1568impl DataObjectTrait for ClusterEvcManagerCheckResult {
1569}
1570impl DataObjectTrait for ClusterEvcManagerEvcState {
1571}
1572impl DataObjectTrait for ClusterEnterMaintenanceResult {
1573}
1574impl DataObjectTrait for ClusterFailoverHostAdmissionControlInfoHostStatus {
1575}
1576impl DataObjectTrait for ClusterGroupInfo {
1577}
1578impl DataObjectTrait for ClusterHostGroup {
1579}
1580impl DataObjectTrait for ClusterVmGroup {
1581}
1582impl DataObjectTrait for ClusterHostRecommendation {
1583}
1584impl DataObjectTrait for ClusterInfraUpdateHaConfigInfo {
1585}
1586impl DataObjectTrait for ClusterNotAttemptedVmInfo {
1587}
1588impl DataObjectTrait for ClusterOrchestrationInfo {
1589}
1590impl DataObjectTrait for PerformClusterPowerActionSpec {
1591}
1592impl DataObjectTrait for PlacementResult {
1593}
1594impl DataObjectTrait for PlacementSpec {
1595}
1596impl DataObjectTrait for ClusterPowerOnVmResult {
1597}
1598impl DataObjectTrait for ClusterPreemptibleVmPairInfo {
1599}
1600impl DataObjectTrait for ClusterProactiveDrsConfigInfo {
1601}
1602impl DataObjectTrait for QueryVsanManagedStorageSpaceUsageSpec {
1603}
1604impl DataObjectTrait for ClusterRecommendation {
1605}
1606impl DataObjectTrait for ClusterResourceUsageSummary {
1607}
1608impl DataObjectTrait for ClusterRuleInfo {
1609}
1610impl DataObjectTrait for ClusterAffinityRuleSpec {
1611}
1612impl DataObjectTrait for ClusterAntiAffinityRuleSpec {
1613}
1614impl DataObjectTrait for ClusterDependencyRuleInfo {
1615}
1616impl DataObjectTrait for ClusterFtVmHostRuleInfo {
1617}
1618impl DataObjectTrait for ClusterVmHostRuleInfo {
1619}
1620impl DataObjectTrait for VirtualDiskAntiAffinityRuleSpec {
1621}
1622impl DataObjectTrait for VirtualDiskRuleSpec {
1623}
1624impl DataObjectTrait for VsanSiteFaultDomain {
1625}
1626impl DataObjectTrait for VsanSiteFaultDomainConfig {
1627}
1628impl DataObjectTrait for ClusterSlotPolicy {
1629}
1630impl DataObjectTrait for ClusterFixedSizeSlotPolicy {
1631}
1632impl DataObjectTrait for VsanStorageComplianceResult {
1633}
1634impl DataObjectTrait for VsanStorageOperationalStatus {
1635}
1636impl DataObjectTrait for VsanStoragePolicyStatus {
1637}
1638impl DataObjectTrait for ClusterSystemVMsConfigInfo {
1639}
1640impl DataObjectTrait for ClusterSystemVMsConfigSpec {
1641}
1642impl DataObjectTrait for ClusterUsageSummary {
1643}
1644impl DataObjectTrait for VimClusterVsanPreferredFaultDomainInfo {
1645}
1646impl DataObjectTrait for VimClusterVsanStretchedClusterCapability {
1647}
1648impl DataObjectTrait for VimClusterVsanStretchedClusterFaultDomainConfig {
1649}
1650impl DataObjectTrait for VsanStretchedClusterHostVirtualApplianceStatus {
1651}
1652impl DataObjectTrait for VimClusterVsanWitnessHostInfo {
1653}
1654impl DataObjectTrait for ClusterVmComponentProtectionSettings {
1655}
1656impl DataObjectTrait for ClusterVmOrchestrationInfo {
1657}
1658impl DataObjectTrait for ClusterVmReadiness {
1659}
1660impl DataObjectTrait for ClusterVmToolsMonitoringSettings {
1661}
1662impl DataObjectTrait for VsanAttachToSrOperation {
1663}
1664impl DataObjectTrait for VsanCapability {
1665}
1666impl DataObjectTrait for VsanClusterAdvCfgSyncHostResult {
1667}
1668impl DataObjectTrait for VsanClusterAdvCfgSyncResult {
1669}
1670impl DataObjectTrait for VsanClusterBalancePerDiskInfo {
1671}
1672impl DataObjectTrait for VsanClusterBalanceSummary {
1673}
1674impl DataObjectTrait for VsanClusterClomdLivenessResult {
1675}
1676impl DataObjectTrait for VsanClusterConfig {
1677}
1678impl DataObjectTrait for VsanClusterCreateVmHealthTestResult {
1679}
1680impl DataObjectTrait for VsanClusterDitEncryptionHealthSummary {
1681}
1682impl DataObjectTrait for VsanClusterEncryptionHealthSummary {
1683}
1684impl DataObjectTrait for VsanClusterFileServiceHealthSummary {
1685}
1686impl DataObjectTrait for VsanClusterGlobalDedupHealthSummary {
1687}
1688impl DataObjectTrait for VsanClusterHclInfo {
1689}
1690impl DataObjectTrait for VsanClusterHealthAction {
1691}
1692impl DataObjectTrait for VsanClusterHealthCheckInfo {
1693}
1694impl DataObjectTrait for VsanClusterHealthConfigs {
1695}
1696impl DataObjectTrait for VsanClusterHealthGroup {
1697}
1698impl DataObjectTrait for VsanClusterHealthLinkBase {
1699}
1700impl DataObjectTrait for VsanClusterHealthLink {
1701}
1702impl DataObjectTrait for VsanClusterHealthQuerySpec {
1703}
1704impl DataObjectTrait for VsanClusterHealthResultBase {
1705}
1706impl DataObjectTrait for VsanClusterHealthResultTable {
1707}
1708impl DataObjectTrait for VsanClusterHealthResultWithRemediation {
1709}
1710impl DataObjectTrait for VsanClusterHealthResultColumnInfo {
1711}
1712impl DataObjectTrait for VsanClusterHealthResultKeyValuePair {
1713}
1714impl DataObjectTrait for VsanClusterHealthResultRow {
1715}
1716impl DataObjectTrait for VsanClusterHealthSummary {
1717}
1718impl DataObjectTrait for VsanClusterHealthSystemObjectsRepairResult {
1719}
1720impl DataObjectTrait for VsanClusterHealthSystemStatusResult {
1721}
1722impl DataObjectTrait for VsanClusterHealthSystemVersionResult {
1723}
1724impl DataObjectTrait for VsanClusterHealthTest {
1725}
1726impl DataObjectTrait for VsanClusterHostVmknicMapping {
1727}
1728impl DataObjectTrait for VsanClusterLimitHealthResult {
1729}
1730impl DataObjectTrait for VsanClusterNetworkHealthResult {
1731}
1732impl DataObjectTrait for VsanClusterNetworkLoadTestResult {
1733}
1734impl DataObjectTrait for VsanClusterNetworkPartitionInfo {
1735}
1736impl DataObjectTrait for VsanClusterNetworkPerfTaskSpec {
1737}
1738impl DataObjectTrait for VsanClusterProactiveTestResult {
1739}
1740impl DataObjectTrait for VsanClusterTelemetryProxyConfig {
1741}
1742impl DataObjectTrait for VsanClusterVMsHealthOverallResult {
1743}
1744impl DataObjectTrait for VsanClusterVMsHealthSummaryResult {
1745}
1746impl DataObjectTrait for VsanClusterVmdkLoadTestResult {
1747}
1748impl DataObjectTrait for VsanClusterWhatifHostFailuresResult {
1749}
1750impl DataObjectTrait for VsanConfigGeneration {
1751}
1752impl DataObjectTrait for VsanDataDrivenApiAction {
1753}
1754impl DataObjectTrait for VsanDiagnosticsThreshold {
1755}
1756impl DataObjectTrait for VsanDiskFormatConversionSpec {
1757}
1758impl DataObjectTrait for VimClusterVsanDiskMappingsConfigSpec {
1759}
1760impl DataObjectTrait for VsanEntitySpaceUsage {
1761}
1762impl DataObjectTrait for VimClusterVsanFaultDomainSpec {
1763}
1764impl DataObjectTrait for VsanFaultDomainDestroySpec {
1765}
1766impl DataObjectTrait for VsanFaultDomainUpdateSpec {
1767}
1768impl DataObjectTrait for VimClusterVsanFaultDomainsConfigSpec {
1769}
1770impl DataObjectTrait for VsanHealthActionBase {
1771}
1772impl DataObjectTrait for VsanHealthActionSteps {
1773}
1774impl DataObjectTrait for VsanHealthApiBasedAction {
1775}
1776impl DataObjectTrait for VsanHealthCmdBasedAction {
1777}
1778impl DataObjectTrait for VsanHealthDataDrivenAction {
1779}
1780impl DataObjectTrait for VsanHealthTxtBasedAction {
1781}
1782impl DataObjectTrait for VsanHealthConfirmationDialog {
1783}
1784impl DataObjectTrait for VsanHealthCorrelation {
1785}
1786impl DataObjectTrait for VsanHealthExtMgmtPreCheckResult {
1787}
1788impl DataObjectTrait for VsanHealthTroubleshooting {
1789}
1790impl DataObjectTrait for VsanHistoricalHealthQuerySpec {
1791}
1792impl DataObjectTrait for VsanHistoricalHealthTest {
1793}
1794impl DataObjectTrait for VsanHostClomdLivenessResult {
1795}
1796impl DataObjectTrait for VsanHostCreateVmHealthTestResult {
1797}
1798impl DataObjectTrait for VimClusterVsanHostDiskMapping {
1799}
1800impl DataObjectTrait for VsanHostHealthSystemVersionResult {
1801}
1802impl DataObjectTrait for VsanIoInsightInstance {
1803}
1804impl DataObjectTrait for VsanIoInsightInstanceQuerySpec {
1805}
1806impl DataObjectTrait for VsanIscsiHomeObjectSpec {
1807}
1808impl DataObjectTrait for VsanIscsiInitiatorGroup {
1809}
1810impl DataObjectTrait for VsanIscsiLunCommonInfo {
1811}
1812impl DataObjectTrait for VsanIscsiLun {
1813}
1814impl DataObjectTrait for VsanIscsiLunSpec {
1815}
1816impl DataObjectTrait for VsanIscsiTargetAuthSpec {
1817}
1818impl DataObjectTrait for VsanIscsiTargetBasicInfo {
1819}
1820impl DataObjectTrait for VsanIscsiTargetCommonInfo {
1821}
1822impl DataObjectTrait for VsanIscsiTarget {
1823}
1824impl DataObjectTrait for VsanIscsiTargetSpec {
1825}
1826impl DataObjectTrait for VsanIscsiTargetServiceConfig {
1827}
1828impl DataObjectTrait for VsanIscsiTargetServiceSpec {
1829}
1830impl DataObjectTrait for VsanIscsiTargetServiceDefaultConfigSpec {
1831}
1832impl DataObjectTrait for VsanNetworkDiagnostics {
1833}
1834impl DataObjectTrait for VsanObjIdentityQuerySpec {
1835}
1836impl DataObjectTrait for VsanClusterObjectExtAttrs {
1837}
1838impl DataObjectTrait for VsanObjectExtraAttributes {
1839}
1840impl DataObjectTrait for VsanObjectIdentity {
1841}
1842impl DataObjectTrait for VsanObjectIdentityAndHealth {
1843}
1844impl DataObjectTrait for VsanObjectInformation {
1845}
1846impl DataObjectTrait for VsanObjectQuerySpec {
1847}
1848impl DataObjectTrait for VsanObjectSpaceSummary {
1849}
1850impl DataObjectTrait for VsanPerfDiagnoseQuerySpec {
1851}
1852impl DataObjectTrait for VsanPerfDiagnosticException {
1853}
1854impl DataObjectTrait for VsanPerfDiagnosticResult {
1855}
1856impl DataObjectTrait for VsanPerfEntityMetricCsv {
1857}
1858impl DataObjectTrait for VsanPerfEntityType {
1859}
1860impl DataObjectTrait for VsanPerfGraph {
1861}
1862impl DataObjectTrait for VsanPerfHotspotEntitiesMetrics {
1863}
1864impl DataObjectTrait for VsanPerfHotspotQuerySpec {
1865}
1866impl DataObjectTrait for VsanPerfMasterInformation {
1867}
1868impl DataObjectTrait for VsanPerfMemberInfo {
1869}
1870impl DataObjectTrait for VsanPerfMetricId {
1871}
1872impl DataObjectTrait for VsanPerfMetricSeriesCsv {
1873}
1874impl DataObjectTrait for VsanPerfNodeInformation {
1875}
1876impl DataObjectTrait for VsanPerfQuerySpec {
1877}
1878impl DataObjectTrait for VsanPerfThreshold {
1879}
1880impl DataObjectTrait for VsanPerfTimeRange {
1881}
1882impl DataObjectTrait for VsanPerfTimeRangeQuerySpec {
1883}
1884impl DataObjectTrait for VsanPerfTopEntities {
1885}
1886impl DataObjectTrait for VsanPerfTopEntity {
1887}
1888impl DataObjectTrait for VsanPerfTopQuerySpec {
1889}
1890impl DataObjectTrait for VsanPerfsvcConfig {
1891}
1892impl DataObjectTrait for VsanRemoteClusterQuerySpec {
1893}
1894impl DataObjectTrait for VsanSpaceQuerySpec {
1895}
1896impl DataObjectTrait for VsanSpaceUsage {
1897}
1898impl DataObjectTrait for VsanSpaceUsageDetailResult {
1899}
1900impl DataObjectTrait for VsanSpaceUsageWithDatastoreType {
1901}
1902impl DataObjectTrait for VsanStorageWorkloadType {
1903}
1904impl DataObjectTrait for VsanStretchedClusterConfig {
1905}
1906impl DataObjectTrait for VsanSyncingObjectFilter {
1907}
1908impl DataObjectTrait for VsanUnicastAddressInfo {
1909}
1910impl DataObjectTrait for VsanVcKmipServersHealth {
1911}
1912impl DataObjectTrait for VsanVcLifecycleCheckResult {
1913}
1914impl DataObjectTrait for VsanVcLifecycleCheckSpec {
1915}
1916impl DataObjectTrait for VsanVsanClusterPcapGroup {
1917}
1918impl DataObjectTrait for VsanVsanClusterPcapResult {
1919}
1920impl DataObjectTrait for VsanVumSystemConfig {
1921}
1922impl DataObjectTrait for VsanWhatifCapacity {
1923}
1924impl DataObjectTrait for VimClusterVsanWitnessSpec {
1925}
1926impl DataObjectTrait for CnsAccessControlSpec {
1927}
1928impl DataObjectTrait for CnsNfsAccessControlSpec {
1929}
1930impl DataObjectTrait for CnsBackingObjectDetails {
1931}
1932impl DataObjectTrait for CnsBlockBackingDetails {
1933}
1934impl DataObjectTrait for CnsFileBackingDetails {
1935}
1936impl DataObjectTrait for CnsVsanFileShareBackingDetails {
1937}
1938impl DataObjectTrait for CnsBaseCreateSpec {
1939}
1940impl DataObjectTrait for CnsFileCreateSpec {
1941}
1942impl DataObjectTrait for CnsVsanFileCreateSpec {
1943}
1944impl DataObjectTrait for CnsContainerCluster {
1945}
1946impl DataObjectTrait for CnsCursor {
1947}
1948impl DataObjectTrait for CnsEntityMetadata {
1949}
1950impl DataObjectTrait for CnsKubernetesEntityMetadata {
1951}
1952impl DataObjectTrait for CnsKubernetesEntityReference {
1953}
1954impl DataObjectTrait for CnsPlacementResult {
1955}
1956impl DataObjectTrait for CnsQueryFilter {
1957}
1958impl DataObjectTrait for CnsKubernetesQueryFilter {
1959}
1960impl DataObjectTrait for CnsQueryResult {
1961}
1962impl DataObjectTrait for CnsQuerySelection {
1963}
1964impl DataObjectTrait for CnsSnapshotCreateSpec {
1965}
1966impl DataObjectTrait for CnsSnapshotDeleteSpec {
1967}
1968impl DataObjectTrait for CnsSnapshotId {
1969}
1970impl DataObjectTrait for CnsVolume {
1971}
1972impl DataObjectTrait for CnsVolumeAclConfigureSpec {
1973}
1974impl DataObjectTrait for CnsVolumeAttachDetachSpec {
1975}
1976impl DataObjectTrait for CnsVolumeCreateSpec {
1977}
1978impl DataObjectTrait for CnsVolumeExtendSpec {
1979}
1980impl DataObjectTrait for CnsVolumeId {
1981}
1982impl DataObjectTrait for CnsVolumeMetadata {
1983}
1984impl DataObjectTrait for CnsVolumeMetadataUpdateSpec {
1985}
1986impl DataObjectTrait for CnsVolumeOperationBatchResult {
1987}
1988impl DataObjectTrait for CnsVolumeOperationResult {
1989}
1990impl DataObjectTrait for CnsAsyncQueryResult {
1991}
1992impl DataObjectTrait for CnsVolumeAttachResult {
1993}
1994impl DataObjectTrait for CnsVolumeCreateResult {
1995}
1996impl DataObjectTrait for CnsVolumePolicyReconfigSpec {
1997}
1998impl DataObjectTrait for CnsVolumeRelocateSpec {
1999}
2000impl DataObjectTrait for CnsBlockVolumeRelocateSpec {
2001}
2002impl DataObjectTrait for CnsVolumeSource {
2003}
2004impl DataObjectTrait for CnsSnapshotVolumeSource {
2005}
2006impl DataObjectTrait for DistributedVirtualPort {
2007}
2008impl DataObjectTrait for DvPortConfigInfo {
2009}
2010impl DataObjectTrait for DvPortConfigSpec {
2011}
2012impl DataObjectTrait for DvsFilterParameter {
2013}
2014impl DataObjectTrait for DvsHostLocalPortInfo {
2015}
2016impl DataObjectTrait for DvPortStatus {
2017}
2018impl DataObjectTrait for DvPortSetting {
2019}
2020impl DataObjectTrait for VMwareDvsPortSetting {
2021}
2022impl DataObjectTrait for DvPortState {
2023}
2024impl DataObjectTrait for DvPortgroupConfigInfo {
2025}
2026impl DataObjectTrait for DvPortgroupConfigSpec {
2027}
2028impl DataObjectTrait for DistributedVirtualPortgroupNsxPortgroupOperationResult {
2029}
2030impl DataObjectTrait for DvPortgroupPolicy {
2031}
2032impl DataObjectTrait for VMwareDvsPortgroupPolicy {
2033}
2034impl DataObjectTrait for DistributedVirtualPortgroupProblem {
2035}
2036impl DataObjectTrait for DistributedVirtualPortgroupInfo {
2037}
2038impl DataObjectTrait for DistributedVirtualSwitchInfo {
2039}
2040impl DataObjectTrait for DistributedVirtualSwitchManagerCompatibilityResult {
2041}
2042impl DataObjectTrait for DvsManagerDvsConfigTarget {
2043}
2044impl DataObjectTrait for DistributedVirtualSwitchManagerDvsProductSpec {
2045}
2046impl DataObjectTrait for DistributedVirtualSwitchManagerHostContainer {
2047}
2048impl DataObjectTrait for DistributedVirtualSwitchManagerHostDvsFilterSpec {
2049}
2050impl DataObjectTrait for DistributedVirtualSwitchManagerHostArrayFilter {
2051}
2052impl DataObjectTrait for DistributedVirtualSwitchManagerHostContainerFilter {
2053}
2054impl DataObjectTrait for DistributedVirtualSwitchManagerHostDvsMembershipFilter {
2055}
2056impl DataObjectTrait for DistributedVirtualSwitchManagerImportResult {
2057}
2058impl DataObjectTrait for DvsManagerPhysicalNicsList {
2059}
2060impl DataObjectTrait for EntityBackup {
2061}
2062impl DataObjectTrait for EntityBackupConfig {
2063}
2064impl DataObjectTrait for DvsFilterSpecConnecteeSpec {
2065}
2066impl DataObjectTrait for DvsFilterSpecPnicConnecteeSpec {
2067}
2068impl DataObjectTrait for DvsFilterSpecVmConnecteeSpec {
2069}
2070impl DataObjectTrait for DvsFilterSpecVmknicConnecteeSpec {
2071}
2072impl DataObjectTrait for DvsFilterSpecVlanSpec {
2073}
2074impl DataObjectTrait for DvsFilterSpecPvlanSpec {
2075}
2076impl DataObjectTrait for DvsFilterSpecTrunkVlanSpec {
2077}
2078impl DataObjectTrait for DvsFilterSpecVlanIdSpec {
2079}
2080impl DataObjectTrait for DistributedVirtualSwitchHostMember {
2081}
2082impl DataObjectTrait for DistributedVirtualSwitchHostMemberBacking {
2083}
2084impl DataObjectTrait for DistributedVirtualSwitchHostMemberPnicBacking {
2085}
2086impl DataObjectTrait for DistributedVirtualSwitchHostMemberConfigInfo {
2087}
2088impl DataObjectTrait for DistributedVirtualSwitchHostMemberConfigSpec {
2089}
2090impl DataObjectTrait for HostMemberHealthCheckResult {
2091}
2092impl DataObjectTrait for HostMemberUplinkHealthCheckResult {
2093}
2094impl DataObjectTrait for VMwareDvsMtuHealthCheckResult {
2095}
2096impl DataObjectTrait for VMwareDvsVlanHealthCheckResult {
2097}
2098impl DataObjectTrait for VMwareDvsTeamingHealthCheckResult {
2099}
2100impl DataObjectTrait for DistributedVirtualSwitchHostMemberHostUplinkState {
2101}
2102impl DataObjectTrait for DistributedVirtualSwitchHostMemberPnicSpec {
2103}
2104impl DataObjectTrait for HostMemberRuntimeInfo {
2105}
2106impl DataObjectTrait for DistributedVirtualSwitchHostMemberRuntimeState {
2107}
2108impl DataObjectTrait for DistributedVirtualSwitchHostMemberTransportZoneInfo {
2109}
2110impl DataObjectTrait for DistributedVirtualSwitchHostProductSpec {
2111}
2112impl DataObjectTrait for DistributedVirtualSwitchKeyedOpaqueBlob {
2113}
2114impl DataObjectTrait for DistributedVirtualSwitchNetworkOffloadSpec {
2115}
2116impl DataObjectTrait for DvsNetworkResourcePool {
2117}
2118impl DataObjectTrait for DvsNetworkResourcePoolAllocationInfo {
2119}
2120impl DataObjectTrait for DvsNetworkResourcePoolConfigSpec {
2121}
2122impl DataObjectTrait for DistributedVirtualSwitchPortConnectee {
2123}
2124impl DataObjectTrait for DistributedVirtualSwitchPortConnection {
2125}
2126impl DataObjectTrait for DistributedVirtualSwitchPortCriteria {
2127}
2128impl DataObjectTrait for DistributedVirtualSwitchPortStatistics {
2129}
2130impl DataObjectTrait for DistributedVirtualSwitchProductSpec {
2131}
2132impl DataObjectTrait for DvsTrafficRule {
2133}
2134impl DataObjectTrait for DvsNetworkRuleAction {
2135}
2136impl DataObjectTrait for DvsAcceptNetworkRuleAction {
2137}
2138impl DataObjectTrait for DvsCopyNetworkRuleAction {
2139}
2140impl DataObjectTrait for DvsDropNetworkRuleAction {
2141}
2142impl DataObjectTrait for DvsGreEncapNetworkRuleAction {
2143}
2144impl DataObjectTrait for DvsLogNetworkRuleAction {
2145}
2146impl DataObjectTrait for DvsMacRewriteNetworkRuleAction {
2147}
2148impl DataObjectTrait for DvsPuntNetworkRuleAction {
2149}
2150impl DataObjectTrait for DvsRateLimitNetworkRuleAction {
2151}
2152impl DataObjectTrait for DvsUpdateTagNetworkRuleAction {
2153}
2154impl DataObjectTrait for DvsNetworkRuleQualifier {
2155}
2156impl DataObjectTrait for DvsIpNetworkRuleQualifier {
2157}
2158impl DataObjectTrait for DvsMacNetworkRuleQualifier {
2159}
2160impl DataObjectTrait for DvsSystemTrafficNetworkRuleQualifier {
2161}
2162impl DataObjectTrait for DvsTrafficRuleset {
2163}
2164impl DataObjectTrait for DvsVmVnicNetworkResourcePool {
2165}
2166impl DataObjectTrait for DvsVmVnicResourcePoolConfigSpec {
2167}
2168impl DataObjectTrait for DvsVmVnicResourceAllocation {
2169}
2170impl DataObjectTrait for DvsVmVnicNetworkResourcePoolRuntimeInfo {
2171}
2172impl DataObjectTrait for DvsVnicAllocatedResource {
2173}
2174impl DataObjectTrait for VmwareDistributedVirtualSwitchDpuFailoverPolicy {
2175}
2176impl DataObjectTrait for VMwareDvsDpuCapability {
2177}
2178impl DataObjectTrait for VMwareIpfixConfig {
2179}
2180impl DataObjectTrait for VMwareDvsIpfixCapability {
2181}
2182impl DataObjectTrait for VMwareDvsLacpCapability {
2183}
2184impl DataObjectTrait for VMwareDvsLacpGroupConfig {
2185}
2186impl DataObjectTrait for VMwareDvsLacpGroupSpec {
2187}
2188impl DataObjectTrait for VMwareDvsLagIpfixConfig {
2189}
2190impl DataObjectTrait for VMwareDvsLagVlanConfig {
2191}
2192impl DataObjectTrait for VMwareDvsMtuCapability {
2193}
2194impl DataObjectTrait for VmwareDistributedVirtualSwitchNetworkOffloadConfig {
2195}
2196impl DataObjectTrait for VMwareDvsPvlanConfigSpec {
2197}
2198impl DataObjectTrait for VMwareDvsPvlanMapEntry {
2199}
2200impl DataObjectTrait for VmwareDistributedVirtualSwitchRealTimeConfig {
2201}
2202impl DataObjectTrait for VmwareDistributedVirtualSwitchRealTimeLanAnnotation {
2203}
2204impl DataObjectTrait for VMwareDvsVspanConfigSpec {
2205}
2206impl DataObjectTrait for VMwareDvsVspanCapability {
2207}
2208impl DataObjectTrait for VMwareVspanPort {
2209}
2210impl DataObjectTrait for VMwareVspanSession {
2211}
2212impl DataObjectTrait for CryptoKeyId {
2213}
2214impl DataObjectTrait for CryptoKeyPlain {
2215}
2216impl DataObjectTrait for CryptoKeyResult {
2217}
2218impl DataObjectTrait for CryptoManagerHostKeyStatus {
2219}
2220impl DataObjectTrait for CryptoManagerKmipCertSignRequest {
2221}
2222impl DataObjectTrait for CryptoManagerKmipCertificateInfo {
2223}
2224impl DataObjectTrait for CryptoManagerKmipClusterStatus {
2225}
2226impl DataObjectTrait for CryptoManagerKmipCryptoKeyStatus {
2227}
2228impl DataObjectTrait for CryptoManagerKmipCryptoKeyStatusKeyInfo {
2229}
2230impl DataObjectTrait for CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo {
2231}
2232impl DataObjectTrait for CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo {
2233}
2234impl DataObjectTrait for CryptoManagerKmipCustomAttributeSpec {
2235}
2236impl DataObjectTrait for CryptoManagerKmipGenerateKeySpec {
2237}
2238impl DataObjectTrait for CryptoManagerKmipServerCertInfo {
2239}
2240impl DataObjectTrait for CryptoManagerKmipServerStatus {
2241}
2242impl DataObjectTrait for CryptoSpec {
2243}
2244impl DataObjectTrait for CryptoSpecDecrypt {
2245}
2246impl DataObjectTrait for CryptoSpecDeepRecrypt {
2247}
2248impl DataObjectTrait for CryptoSpecEncrypt {
2249}
2250impl DataObjectTrait for CryptoSpecNoOp {
2251}
2252impl DataObjectTrait for CryptoSpecRegister {
2253}
2254impl DataObjectTrait for CryptoSpecShallowRecrypt {
2255}
2256impl DataObjectTrait for KeyProviderId {
2257}
2258impl DataObjectTrait for KmipClusterInfo {
2259}
2260impl DataObjectTrait for KmipClusterInfoKeyInfo {
2261}
2262impl DataObjectTrait for KmipClusterInfoWrappingKeyIdKeyInfo {
2263}
2264impl DataObjectTrait for KmipClusterInfoWrappingRotationIntervalKeyInfo {
2265}
2266impl DataObjectTrait for KmipServerInfo {
2267}
2268impl DataObjectTrait for KmipServerSpec {
2269}
2270impl DataObjectTrait for KmipServerSpecKeySpec {
2271}
2272impl DataObjectTrait for KmipServerSpecWrappingKeyIdKeySpec {
2273}
2274impl DataObjectTrait for KmipServerSpecWrappingRotationIntervalKeySpec {
2275}
2276impl DataObjectTrait for KmipServerStatus {
2277}
2278impl DataObjectTrait for ChangesInfoEventArgument {
2279}
2280impl DataObjectTrait for DvsOutOfSyncHostArgument {
2281}
2282impl DataObjectTrait for Event {
2283}
2284impl DataObjectTrait for EventArgument {
2285}
2286impl DataObjectTrait for EntityEventArgument {
2287}
2288impl DataObjectTrait for AlarmEventArgument {
2289}
2290impl DataObjectTrait for ComputeResourceEventArgument {
2291}
2292impl DataObjectTrait for DatacenterEventArgument {
2293}
2294impl DataObjectTrait for DatastoreEventArgument {
2295}
2296impl DataObjectTrait for DvsEventArgument {
2297}
2298impl DataObjectTrait for FolderEventArgument {
2299}
2300impl DataObjectTrait for HostEventArgument {
2301}
2302impl DataObjectTrait for ManagedEntityEventArgument {
2303}
2304impl DataObjectTrait for NetworkEventArgument {
2305}
2306impl DataObjectTrait for ResourcePoolEventArgument {
2307}
2308impl DataObjectTrait for ScheduledTaskEventArgument {
2309}
2310impl DataObjectTrait for VmEventArgument {
2311}
2312impl DataObjectTrait for ProfileEventArgument {
2313}
2314impl DataObjectTrait for RoleEventArgument {
2315}
2316impl DataObjectTrait for EventDescription {
2317}
2318impl DataObjectTrait for EventArgDesc {
2319}
2320impl DataObjectTrait for EventDescriptionEventDetail {
2321}
2322impl DataObjectTrait for EventFilterSpec {
2323}
2324impl DataObjectTrait for EventFilterSpecByEntity {
2325}
2326impl DataObjectTrait for EventFilterSpecByTime {
2327}
2328impl DataObjectTrait for EventFilterSpecByUsername {
2329}
2330impl DataObjectTrait for EventManagerEventViewSpec {
2331}
2332impl DataObjectTrait for EventManagerViewByStartId {
2333}
2334impl DataObjectTrait for ExtendedEventPair {
2335}
2336impl DataObjectTrait for VnicPortArgument {
2337}
2338impl DataObjectTrait for ExtExtendedProductInfo {
2339}
2340impl DataObjectTrait for ManagedByInfo {
2341}
2342impl DataObjectTrait for ExtManagedEntityInfo {
2343}
2344impl DataObjectTrait for ExtSolutionManagerInfo {
2345}
2346impl DataObjectTrait for ExtSolutionManagerInfoTabInfo {
2347}
2348impl DataObjectTrait for AnswerFileUpdateFailure {
2349}
2350impl DataObjectTrait for ConflictingConfigurationConfig {
2351}
2352impl DataObjectTrait for DatacenterMismatchArgument {
2353}
2354impl DataObjectTrait for DvsApplyOperationFaultFaultOnObject {
2355}
2356impl DataObjectTrait for DvsOperationBulkFaultFaultOnHost {
2357}
2358impl DataObjectTrait for ImportOperationBulkFaultFaultOnImport {
2359}
2360impl DataObjectTrait for MultipleCertificatesVerifyFaultThumbprintData {
2361}
2362impl DataObjectTrait for NoPermissionEntityPrivileges {
2363}
2364impl DataObjectTrait for ProfileUpdateFailedUpdateFailure {
2365}
2366impl DataObjectTrait for HostActiveDirectory {
2367}
2368impl DataObjectTrait for HostActiveDirectorySpec {
2369}
2370impl DataObjectTrait for HostAssignableHardwareBinding {
2371}
2372impl DataObjectTrait for HostAssignableHardwareConfig {
2373}
2374impl DataObjectTrait for HostAssignableHardwareConfigAttributeOverride {
2375}
2376impl DataObjectTrait for HostAuthenticationInfo {
2377}
2378impl DataObjectTrait for HostAuthenticationManagerInfo {
2379}
2380impl DataObjectTrait for HostAuthenticationStoreInfo {
2381}
2382impl DataObjectTrait for HostDirectoryStoreInfo {
2383}
2384impl DataObjectTrait for HostActiveDirectoryInfo {
2385}
2386impl DataObjectTrait for HostLocalAuthenticationInfo {
2387}
2388impl DataObjectTrait for AutoStartPowerInfo {
2389}
2390impl DataObjectTrait for HostAutoStartManagerConfig {
2391}
2392impl DataObjectTrait for AutoStartDefaults {
2393}
2394impl DataObjectTrait for HostBiosInfo {
2395}
2396impl DataObjectTrait for HostBootDeviceInfo {
2397}
2398impl DataObjectTrait for HostBootDevice {
2399}
2400impl DataObjectTrait for HostCacheConfigurationInfo {
2401}
2402impl DataObjectTrait for HostCacheConfigurationSpec {
2403}
2404impl DataObjectTrait for HostCapability {
2405}
2406impl DataObjectTrait for HostCertificateManagerCertificateInfo {
2407}
2408impl DataObjectTrait for HostCertificateManagerCertificateSpec {
2409}
2410impl DataObjectTrait for HostConfigChange {
2411}
2412impl DataObjectTrait for HostConfigInfo {
2413}
2414impl DataObjectTrait for HostConfigManager {
2415}
2416impl DataObjectTrait for HostConfigSpec {
2417}
2418impl DataObjectTrait for HostConnectInfo {
2419}
2420impl DataObjectTrait for HostDatastoreConnectInfo {
2421}
2422impl DataObjectTrait for HostDatastoreExistsConnectInfo {
2423}
2424impl DataObjectTrait for HostDatastoreNameConflictConnectInfo {
2425}
2426impl DataObjectTrait for HostLicenseConnectInfo {
2427}
2428impl DataObjectTrait for HostConnectInfoNetworkInfo {
2429}
2430impl DataObjectTrait for HostNewNetworkConnectInfo {
2431}
2432impl DataObjectTrait for HostConnectSpec {
2433}
2434impl DataObjectTrait for HostCpuIdInfo {
2435}
2436impl DataObjectTrait for HostCpuInfo {
2437}
2438impl DataObjectTrait for HostCpuPackage {
2439}
2440impl DataObjectTrait for HostCpuPowerManagementInfo {
2441}
2442impl DataObjectTrait for HostCpuSchedulerInfo {
2443}
2444impl DataObjectTrait for HostHyperThreadScheduleInfo {
2445}
2446impl DataObjectTrait for HostDataTransportConnectionInfo {
2447}
2448impl DataObjectTrait for HostNfcConnectionInfo {
2449}
2450impl DataObjectTrait for FileInfo {
2451}
2452impl DataObjectTrait for FloppyImageFileInfo {
2453}
2454impl DataObjectTrait for FolderFileInfo {
2455}
2456impl DataObjectTrait for IsoImageFileInfo {
2457}
2458impl DataObjectTrait for VmConfigFileInfo {
2459}
2460impl DataObjectTrait for TemplateConfigFileInfo {
2461}
2462impl DataObjectTrait for VmDiskFileInfo {
2463}
2464impl DataObjectTrait for VmLogFileInfo {
2465}
2466impl DataObjectTrait for VmNvramFileInfo {
2467}
2468impl DataObjectTrait for VmSnapshotFileInfo {
2469}
2470impl DataObjectTrait for FileQueryFlags {
2471}
2472impl DataObjectTrait for FileQuery {
2473}
2474impl DataObjectTrait for FloppyImageFileQuery {
2475}
2476impl DataObjectTrait for FolderFileQuery {
2477}
2478impl DataObjectTrait for IsoImageFileQuery {
2479}
2480impl DataObjectTrait for VmConfigFileQuery {
2481}
2482impl DataObjectTrait for TemplateConfigFileQuery {
2483}
2484impl DataObjectTrait for VmDiskFileQuery {
2485}
2486impl DataObjectTrait for VmLogFileQuery {
2487}
2488impl DataObjectTrait for VmNvramFileQuery {
2489}
2490impl DataObjectTrait for VmSnapshotFileQuery {
2491}
2492impl DataObjectTrait for HostDatastoreBrowserSearchResults {
2493}
2494impl DataObjectTrait for HostDatastoreBrowserSearchSpec {
2495}
2496impl DataObjectTrait for VmConfigFileEncryptionInfo {
2497}
2498impl DataObjectTrait for VmConfigFileQueryFlags {
2499}
2500impl DataObjectTrait for VmConfigFileQueryFilter {
2501}
2502impl DataObjectTrait for VmDiskFileEncryptionInfo {
2503}
2504impl DataObjectTrait for VmDiskFileQueryFlags {
2505}
2506impl DataObjectTrait for VmDiskFileQueryFilter {
2507}
2508impl DataObjectTrait for HostDatastoreSystemCapabilities {
2509}
2510impl DataObjectTrait for HostDatastoreSystemDatastoreResult {
2511}
2512impl DataObjectTrait for HostDatastoreSystemVvolDatastoreSpec {
2513}
2514impl DataObjectTrait for HostDateTimeConfig {
2515}
2516impl DataObjectTrait for HostDateTimeInfo {
2517}
2518impl DataObjectTrait for HostDateTimeSystemServiceTestResult {
2519}
2520impl DataObjectTrait for HostDateTimeSystemTimeZone {
2521}
2522impl DataObjectTrait for HostDeploymentInfo {
2523}
2524impl DataObjectTrait for HostDevice {
2525}
2526impl DataObjectTrait for ScsiLun {
2527}
2528impl DataObjectTrait for HostScsiDisk {
2529}
2530impl DataObjectTrait for DevicePciId {
2531}
2532impl DataObjectTrait for HostDhcpService {
2533}
2534impl DataObjectTrait for HostDhcpServiceConfig {
2535}
2536impl DataObjectTrait for HostDhcpServiceSpec {
2537}
2538impl DataObjectTrait for HostDiagnosticPartition {
2539}
2540impl DataObjectTrait for HostDiagnosticPartitionCreateDescription {
2541}
2542impl DataObjectTrait for HostDiagnosticPartitionCreateOption {
2543}
2544impl DataObjectTrait for HostDiagnosticPartitionCreateSpec {
2545}
2546impl DataObjectTrait for HostDigestInfo {
2547}
2548impl DataObjectTrait for HostTpmDigestInfo {
2549}
2550impl DataObjectTrait for HostDiskConfigurationResult {
2551}
2552impl DataObjectTrait for HostDiskDimensions {
2553}
2554impl DataObjectTrait for HostDiskDimensionsChs {
2555}
2556impl DataObjectTrait for HostDiskDimensionsLba {
2557}
2558impl DataObjectTrait for HostDiskPartitionInfo {
2559}
2560impl DataObjectTrait for HostDiskPartitionBlockRange {
2561}
2562impl DataObjectTrait for HostDiskPartitionLayout {
2563}
2564impl DataObjectTrait for HostDiskPartitionAttributes {
2565}
2566impl DataObjectTrait for HostDiskPartitionSpec {
2567}
2568impl DataObjectTrait for HostDnsConfig {
2569}
2570impl DataObjectTrait for HostDnsConfigSpec {
2571}
2572impl DataObjectTrait for HostDvxClass {
2573}
2574impl DataObjectTrait for HostEnterMaintenanceResult {
2575}
2576impl DataObjectTrait for HostEsxAgentHostManagerConfigInfo {
2577}
2578impl DataObjectTrait for HostFaultToleranceManagerComponentHealthInfo {
2579}
2580impl DataObjectTrait for FcoeConfig {
2581}
2582impl DataObjectTrait for FcoeConfigFcoeCapabilities {
2583}
2584impl DataObjectTrait for FcoeConfigFcoeSpecification {
2585}
2586impl DataObjectTrait for FcoeConfigVlanRange {
2587}
2588impl DataObjectTrait for HostFeatureCapability {
2589}
2590impl DataObjectTrait for HostFeatureMask {
2591}
2592impl DataObjectTrait for HostFeatureVersionInfo {
2593}
2594impl DataObjectTrait for HostFibreChannelOverEthernetHbaLinkInfo {
2595}
2596impl DataObjectTrait for HostFileAccess {
2597}
2598impl DataObjectTrait for ModeInfo {
2599}
2600impl DataObjectTrait for HostFileSystemMountInfo {
2601}
2602impl DataObjectTrait for HostFileSystemVolume {
2603}
2604impl DataObjectTrait for HostLocalFileSystemVolume {
2605}
2606impl DataObjectTrait for HostNasVolume {
2607}
2608impl DataObjectTrait for HostPMemVolume {
2609}
2610impl DataObjectTrait for HostVfatVolume {
2611}
2612impl DataObjectTrait for HostVffsVolume {
2613}
2614impl DataObjectTrait for HostVmfsVolume {
2615}
2616impl DataObjectTrait for HostVvolVolume {
2617}
2618impl DataObjectTrait for HostFileSystemVolumeInfo {
2619}
2620impl DataObjectTrait for HostFirewallConfig {
2621}
2622impl DataObjectTrait for HostFirewallConfigRuleSetConfig {
2623}
2624impl DataObjectTrait for HostFirewallInfo {
2625}
2626impl DataObjectTrait for HostFirewallDefaultPolicy {
2627}
2628impl DataObjectTrait for HostFlagInfo {
2629}
2630impl DataObjectTrait for HostForceMountedInfo {
2631}
2632impl DataObjectTrait for HostFru {
2633}
2634impl DataObjectTrait for HostGatewaySpec {
2635}
2636impl DataObjectTrait for HostGraphicsConfig {
2637}
2638impl DataObjectTrait for HostGraphicsConfigDeviceType {
2639}
2640impl DataObjectTrait for HostGraphicsInfo {
2641}
2642impl DataObjectTrait for HostHardwareInfo {
2643}
2644impl DataObjectTrait for HostHardwareStatusInfo {
2645}
2646impl DataObjectTrait for DpuStatusInfoOperationalInfo {
2647}
2648impl DataObjectTrait for HostHardwareElementInfo {
2649}
2650impl DataObjectTrait for DpuStatusInfo {
2651}
2652impl DataObjectTrait for HostStorageElementInfo {
2653}
2654impl DataObjectTrait for HostStorageOperationalInfo {
2655}
2656impl DataObjectTrait for HostHbaCreateSpec {
2657}
2658impl DataObjectTrait for HostTcpHbaCreateSpec {
2659}
2660impl DataObjectTrait for HealthSystemRuntime {
2661}
2662impl DataObjectTrait for HostAccessControlEntry {
2663}
2664impl DataObjectTrait for HostHostBusAdapter {
2665}
2666impl DataObjectTrait for HostBlockHba {
2667}
2668impl DataObjectTrait for HostFibreChannelHba {
2669}
2670impl DataObjectTrait for HostFibreChannelOverEthernetHba {
2671}
2672impl DataObjectTrait for HostInternetScsiHba {
2673}
2674impl DataObjectTrait for HostParallelScsiHba {
2675}
2676impl DataObjectTrait for HostPcieHba {
2677}
2678impl DataObjectTrait for HostRdmaHba {
2679}
2680impl DataObjectTrait for HostSerialAttachedHba {
2681}
2682impl DataObjectTrait for HostTcpHba {
2683}
2684impl DataObjectTrait for HostProxySwitch {
2685}
2686impl DataObjectTrait for HostProxySwitchConfig {
2687}
2688impl DataObjectTrait for HostProxySwitchEnsInfo {
2689}
2690impl DataObjectTrait for HostProxySwitchHostLagConfig {
2691}
2692impl DataObjectTrait for HostProxySwitchSpec {
2693}
2694impl DataObjectTrait for HostSpbmDatastoreInfo {
2695}
2696impl DataObjectTrait for HostSpbmHashInfo {
2697}
2698impl DataObjectTrait for HostSpbmPolicyBlobInfo {
2699}
2700impl DataObjectTrait for HostSpbmPolicyInfo {
2701}
2702impl DataObjectTrait for HostImageProfileSummary {
2703}
2704impl DataObjectTrait for HostInternetScsiHbaAuthenticationCapabilities {
2705}
2706impl DataObjectTrait for HostInternetScsiHbaAuthenticationProperties {
2707}
2708impl DataObjectTrait for HostInternetScsiHbaDigestCapabilities {
2709}
2710impl DataObjectTrait for HostInternetScsiHbaDigestProperties {
2711}
2712impl DataObjectTrait for HostInternetScsiHbaDiscoveryCapabilities {
2713}
2714impl DataObjectTrait for HostInternetScsiHbaDiscoveryProperties {
2715}
2716impl DataObjectTrait for HostInternetScsiHbaIpCapabilities {
2717}
2718impl DataObjectTrait for HostInternetScsiHbaIpProperties {
2719}
2720impl DataObjectTrait for HostInternetScsiHbaIPv6Properties {
2721}
2722impl DataObjectTrait for HostInternetScsiHbaIscsiIpv6Address {
2723}
2724impl DataObjectTrait for HostInternetScsiHbaSendTarget {
2725}
2726impl DataObjectTrait for HostInternetScsiHbaStaticTarget {
2727}
2728impl DataObjectTrait for HostInternetScsiHbaTargetSet {
2729}
2730impl DataObjectTrait for HostIpConfig {
2731}
2732impl DataObjectTrait for VsanFileServiceIpConfig {
2733}
2734impl DataObjectTrait for HostIpConfigIpV6Address {
2735}
2736impl DataObjectTrait for HostIpConfigIpV6AddressConfiguration {
2737}
2738impl DataObjectTrait for HostIpRouteConfig {
2739}
2740impl DataObjectTrait for HostIpRouteConfigSpec {
2741}
2742impl DataObjectTrait for HostIpRouteEntry {
2743}
2744impl DataObjectTrait for HostIpRouteOp {
2745}
2746impl DataObjectTrait for HostIpRouteTableConfig {
2747}
2748impl DataObjectTrait for HostIpRouteTableInfo {
2749}
2750impl DataObjectTrait for HostIpmiInfo {
2751}
2752impl DataObjectTrait for IscsiDependencyEntity {
2753}
2754impl DataObjectTrait for IscsiMigrationDependency {
2755}
2756impl DataObjectTrait for IscsiPortInfo {
2757}
2758impl DataObjectTrait for IscsiStatus {
2759}
2760impl DataObjectTrait for KernelModuleInfo {
2761}
2762impl DataObjectTrait for KernelModuleSectionInfo {
2763}
2764impl DataObjectTrait for LacpInfo {
2765}
2766impl DataObjectTrait for LagInfo {
2767}
2768impl DataObjectTrait for LagUplinkInfo {
2769}
2770impl DataObjectTrait for HostLicenseSpec {
2771}
2772impl DataObjectTrait for LinkDiscoveryProtocolConfig {
2773}
2774impl DataObjectTrait for HostAccountSpec {
2775}
2776impl DataObjectTrait for HostPosixAccountSpec {
2777}
2778impl DataObjectTrait for HostLocalFileSystemVolumeSpec {
2779}
2780impl DataObjectTrait for HostLowLevelProvisioningManagerDiskLayoutSpec {
2781}
2782impl DataObjectTrait for HostLowLevelProvisioningManagerFileDeleteResult {
2783}
2784impl DataObjectTrait for HostLowLevelProvisioningManagerFileDeleteSpec {
2785}
2786impl DataObjectTrait for HostLowLevelProvisioningManagerFileReserveResult {
2787}
2788impl DataObjectTrait for HostLowLevelProvisioningManagerFileReserveSpec {
2789}
2790impl DataObjectTrait for HostLowLevelProvisioningManagerSnapshotLayoutSpec {
2791}
2792impl DataObjectTrait for HostLowLevelProvisioningManagerVmMigrationStatus {
2793}
2794impl DataObjectTrait for HostLowLevelProvisioningManagerVmRecoveryInfo {
2795}
2796impl DataObjectTrait for HostMaintenanceSpec {
2797}
2798impl DataObjectTrait for ServiceConsoleReservationInfo {
2799}
2800impl DataObjectTrait for VirtualMachineMemoryReservationInfo {
2801}
2802impl DataObjectTrait for VirtualMachineMemoryReservationSpec {
2803}
2804impl DataObjectTrait for HostMemorySpec {
2805}
2806impl DataObjectTrait for HostMemoryTierInfo {
2807}
2808impl DataObjectTrait for HostMountInfo {
2809}
2810impl DataObjectTrait for HostMultipathInfo {
2811}
2812impl DataObjectTrait for HostMultipathInfoLogicalUnit {
2813}
2814impl DataObjectTrait for HostMultipathInfoLogicalUnitPolicy {
2815}
2816impl DataObjectTrait for HostMultipathInfoFixedLogicalUnitPolicy {
2817}
2818impl DataObjectTrait for HostMultipathInfoHppLogicalUnitPolicy {
2819}
2820impl DataObjectTrait for HostMultipathInfoLogicalUnitStorageArrayTypePolicy {
2821}
2822impl DataObjectTrait for HostMultipathInfoPath {
2823}
2824impl DataObjectTrait for HostMultipathStateInfo {
2825}
2826impl DataObjectTrait for HostMultipathStateInfoPath {
2827}
2828impl DataObjectTrait for HostNasVolumeConfig {
2829}
2830impl DataObjectTrait for HostNasVolumeSpec {
2831}
2832impl DataObjectTrait for HostNasVolumeUserInfo {
2833}
2834impl DataObjectTrait for HostNatService {
2835}
2836impl DataObjectTrait for HostNatServiceConfig {
2837}
2838impl DataObjectTrait for HostNatServiceNameServiceSpec {
2839}
2840impl DataObjectTrait for HostNatServicePortForwardSpec {
2841}
2842impl DataObjectTrait for HostNatServiceSpec {
2843}
2844impl DataObjectTrait for HostNetCapabilities {
2845}
2846impl DataObjectTrait for HostNetOffloadCapabilities {
2847}
2848impl DataObjectTrait for HostNetStackInstance {
2849}
2850impl DataObjectTrait for HostNetworkConfig {
2851}
2852impl DataObjectTrait for HostNetworkConfigNetStackSpec {
2853}
2854impl DataObjectTrait for HostNetworkConfigResult {
2855}
2856impl DataObjectTrait for HostNetworkInfo {
2857}
2858impl DataObjectTrait for HostNetworkPolicy {
2859}
2860impl DataObjectTrait for HostNicFailureCriteria {
2861}
2862impl DataObjectTrait for HostNicOrderPolicy {
2863}
2864impl DataObjectTrait for HostNicTeamingPolicy {
2865}
2866impl DataObjectTrait for HostNetworkSecurityPolicy {
2867}
2868impl DataObjectTrait for HostNetworkTrafficShapingPolicy {
2869}
2870impl DataObjectTrait for HostNtpConfig {
2871}
2872impl DataObjectTrait for HostNumaInfo {
2873}
2874impl DataObjectTrait for HostNumaNode {
2875}
2876impl DataObjectTrait for HostNumericSensorInfo {
2877}
2878impl DataObjectTrait for NvdimmDimmInfo {
2879}
2880impl DataObjectTrait for NvdimmGuid {
2881}
2882impl DataObjectTrait for NvdimmHealthInfo {
2883}
2884impl DataObjectTrait for NvdimmInterleaveSetInfo {
2885}
2886impl DataObjectTrait for NvdimmNamespaceCreateSpec {
2887}
2888impl DataObjectTrait for NvdimmNamespaceDeleteSpec {
2889}
2890impl DataObjectTrait for NvdimmNamespaceDetails {
2891}
2892impl DataObjectTrait for NvdimmNamespaceInfo {
2893}
2894impl DataObjectTrait for NvdimmSystemInfo {
2895}
2896impl DataObjectTrait for NvdimmPMemNamespaceCreateSpec {
2897}
2898impl DataObjectTrait for NvdimmRegionInfo {
2899}
2900impl DataObjectTrait for NvdimmSummary {
2901}
2902impl DataObjectTrait for HostNvmeController {
2903}
2904impl DataObjectTrait for HostNvmeDisconnectSpec {
2905}
2906impl DataObjectTrait for HostNvmeDiscoveryLog {
2907}
2908impl DataObjectTrait for HostNvmeDiscoveryLogEntry {
2909}
2910impl DataObjectTrait for HostNvmeNamespace {
2911}
2912impl DataObjectTrait for HostNvmeSpec {
2913}
2914impl DataObjectTrait for HostNvmeConnectSpec {
2915}
2916impl DataObjectTrait for HostNvmeDiscoverSpec {
2917}
2918impl DataObjectTrait for HostNvmeTopology {
2919}
2920impl DataObjectTrait for HostNvmeTopologyInterface {
2921}
2922impl DataObjectTrait for HostNvmeTransportParameters {
2923}
2924impl DataObjectTrait for HostNvmeOpaqueTransportParameters {
2925}
2926impl DataObjectTrait for HostNvmeOverFibreChannelParameters {
2927}
2928impl DataObjectTrait for HostNvmeOverRdmaParameters {
2929}
2930impl DataObjectTrait for HostNvmeOverTcpParameters {
2931}
2932impl DataObjectTrait for HostOpaqueNetworkInfo {
2933}
2934impl DataObjectTrait for HostOpaqueSwitch {
2935}
2936impl DataObjectTrait for HostOpaqueSwitchPhysicalNicZone {
2937}
2938impl DataObjectTrait for HostPartialMaintenanceModeRuntimeInfo {
2939}
2940impl DataObjectTrait for HostPatchManagerLocator {
2941}
2942impl DataObjectTrait for HostPatchManagerPatchManagerOperationSpec {
2943}
2944impl DataObjectTrait for HostPatchManagerResult {
2945}
2946impl DataObjectTrait for HostPatchManagerStatus {
2947}
2948impl DataObjectTrait for HostPatchManagerStatusPrerequisitePatch {
2949}
2950impl DataObjectTrait for HostPathSelectionPolicyOption {
2951}
2952impl DataObjectTrait for HostPciDevice {
2953}
2954impl DataObjectTrait for HostPciPassthruConfig {
2955}
2956impl DataObjectTrait for HostSriovConfig {
2957}
2958impl DataObjectTrait for HostPciPassthruInfo {
2959}
2960impl DataObjectTrait for HostSriovInfo {
2961}
2962impl DataObjectTrait for HostPersistentMemoryInfo {
2963}
2964impl DataObjectTrait for PhysicalNic {
2965}
2966impl DataObjectTrait for PhysicalNicCdpDeviceCapability {
2967}
2968impl DataObjectTrait for PhysicalNicCdpInfo {
2969}
2970impl DataObjectTrait for PhysicalNicConfig {
2971}
2972impl DataObjectTrait for PhysicalNicLinkInfo {
2973}
2974impl DataObjectTrait for LinkLayerDiscoveryProtocolInfo {
2975}
2976impl DataObjectTrait for PhysicalNicHintInfo {
2977}
2978impl DataObjectTrait for PhysicalNicHint {
2979}
2980impl DataObjectTrait for PhysicalNicIpHint {
2981}
2982impl DataObjectTrait for PhysicalNicNameHint {
2983}
2984impl DataObjectTrait for PhysicalNicSpec {
2985}
2986impl DataObjectTrait for HostPlugStoreTopology {
2987}
2988impl DataObjectTrait for HostPlugStoreTopologyAdapter {
2989}
2990impl DataObjectTrait for HostPlugStoreTopologyDevice {
2991}
2992impl DataObjectTrait for HostPlugStoreTopologyPath {
2993}
2994impl DataObjectTrait for HostPlugStoreTopologyPlugin {
2995}
2996impl DataObjectTrait for HostPlugStoreTopologyTarget {
2997}
2998impl DataObjectTrait for PnicTsoInfo {
2999}
3000impl DataObjectTrait for HostPortGroup {
3001}
3002impl DataObjectTrait for HostPortGroupConfig {
3003}
3004impl DataObjectTrait for HostPortGroupPort {
3005}
3006impl DataObjectTrait for HostPortGroupSpec {
3007}
3008impl DataObjectTrait for PowerSystemCapability {
3009}
3010impl DataObjectTrait for PowerSystemInfo {
3011}
3012impl DataObjectTrait for HostPowerPolicy {
3013}
3014impl DataObjectTrait for HostProtocolEndpoint {
3015}
3016impl DataObjectTrait for HostPtpConfig {
3017}
3018impl DataObjectTrait for HostPtpConfigPtpPort {
3019}
3020impl DataObjectTrait for HostQualifiedName {
3021}
3022impl DataObjectTrait for HostRdmaDevice {
3023}
3024impl DataObjectTrait for HostRdmaDeviceBacking {
3025}
3026impl DataObjectTrait for HostRdmaDevicePnicBacking {
3027}
3028impl DataObjectTrait for HostRdmaDeviceCapability {
3029}
3030impl DataObjectTrait for HostRdmaDeviceConnectionInfo {
3031}
3032impl DataObjectTrait for HostReliableMemoryInfo {
3033}
3034impl DataObjectTrait for HostResignatureRescanResult {
3035}
3036impl DataObjectTrait for HostFirewallRuleset {
3037}
3038impl DataObjectTrait for HostFirewallRulesetIpList {
3039}
3040impl DataObjectTrait for HostFirewallRulesetIpNetwork {
3041}
3042impl DataObjectTrait for HostFirewallRule {
3043}
3044impl DataObjectTrait for HostFirewallRulesetRulesetSpec {
3045}
3046impl DataObjectTrait for HostRuntimeInfo {
3047}
3048impl DataObjectTrait for HostRuntimeInfoNetStackInstanceRuntimeInfo {
3049}
3050impl DataObjectTrait for HostNetworkResourceRuntime {
3051}
3052impl DataObjectTrait for HostRuntimeInfoNetworkRuntimeInfo {
3053}
3054impl DataObjectTrait for HostPlacedVirtualNicIdentifier {
3055}
3056impl DataObjectTrait for HostPnicNetworkResourceInfo {
3057}
3058impl DataObjectTrait for HostRuntimeInfoStateEncryptionInfo {
3059}
3060impl DataObjectTrait for HostScsiDiskPartition {
3061}
3062impl DataObjectTrait for ScsiLunCapabilities {
3063}
3064impl DataObjectTrait for ScsiLunDescriptor {
3065}
3066impl DataObjectTrait for ScsiLunDurableName {
3067}
3068impl DataObjectTrait for HostScsiTopology {
3069}
3070impl DataObjectTrait for HostScsiTopologyInterface {
3071}
3072impl DataObjectTrait for HostScsiTopologyLun {
3073}
3074impl DataObjectTrait for HostScsiTopologyTarget {
3075}
3076impl DataObjectTrait for HostSecuritySpec {
3077}
3078impl DataObjectTrait for HostService {
3079}
3080impl DataObjectTrait for HostServiceSourcePackage {
3081}
3082impl DataObjectTrait for HostServiceConfig {
3083}
3084impl DataObjectTrait for HostServiceInfo {
3085}
3086impl DataObjectTrait for HostSevInfo {
3087}
3088impl DataObjectTrait for HostSgxInfo {
3089}
3090impl DataObjectTrait for HostSgxRegistrationInfo {
3091}
3092impl DataObjectTrait for HostSharedGpuCapabilities {
3093}
3094impl DataObjectTrait for HostSnmpSystemAgentLimits {
3095}
3096impl DataObjectTrait for HostSnmpConfigSpec {
3097}
3098impl DataObjectTrait for HostSnmpDestination {
3099}
3100impl DataObjectTrait for SoftwarePackage {
3101}
3102impl DataObjectTrait for SoftwarePackageCapability {
3103}
3104impl DataObjectTrait for Relation {
3105}
3106impl DataObjectTrait for HostSriovDevicePoolInfo {
3107}
3108impl DataObjectTrait for HostSriovNetworkDevicePoolInfo {
3109}
3110impl DataObjectTrait for HostSslThumbprintInfo {
3111}
3112impl DataObjectTrait for HostStorageArrayTypePolicyOption {
3113}
3114impl DataObjectTrait for HostStorageDeviceInfo {
3115}
3116impl DataObjectTrait for HostStorageSystemDiskLocatorLedResult {
3117}
3118impl DataObjectTrait for HostStorageSystemScsiLunResult {
3119}
3120impl DataObjectTrait for HostStorageSystemVmfsVolumeResult {
3121}
3122impl DataObjectTrait for HostListSummary {
3123}
3124impl DataObjectTrait for HostConfigSummary {
3125}
3126impl DataObjectTrait for HostListSummaryGatewaySummary {
3127}
3128impl DataObjectTrait for HostHardwareSummary {
3129}
3130impl DataObjectTrait for HostListSummaryQuickStats {
3131}
3132impl DataObjectTrait for SystemEventInfo {
3133}
3134impl DataObjectTrait for HostSystemHealthInfo {
3135}
3136impl DataObjectTrait for HostSystemIdentificationInfo {
3137}
3138impl DataObjectTrait for HostSystemInfo {
3139}
3140impl DataObjectTrait for HostSystemResourceInfo {
3141}
3142impl DataObjectTrait for HostSystemSwapConfiguration {
3143}
3144impl DataObjectTrait for HostSystemSwapConfigurationSystemSwapOption {
3145}
3146impl DataObjectTrait for HostSystemSwapConfigurationDatastoreOption {
3147}
3148impl DataObjectTrait for HostSystemSwapConfigurationDisabledOption {
3149}
3150impl DataObjectTrait for HostSystemSwapConfigurationHostCacheOption {
3151}
3152impl DataObjectTrait for HostSystemSwapConfigurationHostLocalSwapOption {
3153}
3154impl DataObjectTrait for HostTargetTransport {
3155}
3156impl DataObjectTrait for HostBlockAdapterTargetTransport {
3157}
3158impl DataObjectTrait for HostFibreChannelTargetTransport {
3159}
3160impl DataObjectTrait for HostFibreChannelOverEthernetTargetTransport {
3161}
3162impl DataObjectTrait for HostInternetScsiTargetTransport {
3163}
3164impl DataObjectTrait for HostParallelScsiTargetTransport {
3165}
3166impl DataObjectTrait for HostPcieTargetTransport {
3167}
3168impl DataObjectTrait for HostRdmaTargetTransport {
3169}
3170impl DataObjectTrait for HostSerialAttachedTargetTransport {
3171}
3172impl DataObjectTrait for HostTcpTargetTransport {
3173}
3174impl DataObjectTrait for HostTdxInfo {
3175}
3176impl DataObjectTrait for HostTpmAttestationInfo {
3177}
3178impl DataObjectTrait for HostTpmAttestationReport {
3179}
3180impl DataObjectTrait for HostTpmEventDetails {
3181}
3182impl DataObjectTrait for HostTpmBootCompleteEventDetails {
3183}
3184impl DataObjectTrait for HostTpmBootSecurityOptionEventDetails {
3185}
3186impl DataObjectTrait for HostTpmNvTagEventDetails {
3187}
3188impl DataObjectTrait for HostTpmSignerEventDetails {
3189}
3190impl DataObjectTrait for HostTpmCommandEventDetails {
3191}
3192impl DataObjectTrait for HostTpmOptionEventDetails {
3193}
3194impl DataObjectTrait for HostTpmSoftwareComponentEventDetails {
3195}
3196impl DataObjectTrait for HostTpmVersionEventDetails {
3197}
3198impl DataObjectTrait for HostTpmEventLogEntry {
3199}
3200impl DataObjectTrait for HostTrustAuthorityAttestationInfo {
3201}
3202impl DataObjectTrait for HostUnresolvedVmfsExtent {
3203}
3204impl DataObjectTrait for HostUnresolvedVmfsResignatureSpec {
3205}
3206impl DataObjectTrait for HostUnresolvedVmfsResolutionResult {
3207}
3208impl DataObjectTrait for HostUnresolvedVmfsResolutionSpec {
3209}
3210impl DataObjectTrait for HostUnresolvedVmfsVolume {
3211}
3212impl DataObjectTrait for HostUnresolvedVmfsVolumeResolveStatus {
3213}
3214impl DataObjectTrait for HostVFlashManagerVFlashCacheConfigInfo {
3215}
3216impl DataObjectTrait for HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption {
3217}
3218impl DataObjectTrait for HostVFlashManagerVFlashCacheConfigSpec {
3219}
3220impl DataObjectTrait for HostVFlashManagerVFlashConfigInfo {
3221}
3222impl DataObjectTrait for HostVFlashManagerVFlashResourceConfigInfo {
3223}
3224impl DataObjectTrait for HostVFlashManagerVFlashResourceConfigSpec {
3225}
3226impl DataObjectTrait for HostVFlashManagerVFlashResourceRunTimeInfo {
3227}
3228impl DataObjectTrait for HostVFlashResourceConfigurationResult {
3229}
3230impl DataObjectTrait for HostVMotionConfig {
3231}
3232impl DataObjectTrait for HostVMotionInfo {
3233}
3234impl DataObjectTrait for HostVMotionManagerDstInstantCloneResult {
3235}
3236impl DataObjectTrait for HostVMotionManagerSrcInstantCloneResult {
3237}
3238impl DataObjectTrait for HostVMotionNetConfig {
3239}
3240impl DataObjectTrait for VimHostVsanStretchedClusterHostCapability {
3241}
3242impl DataObjectTrait for HostVffsSpec {
3243}
3244impl DataObjectTrait for HostVirtualNic {
3245}
3246impl DataObjectTrait for HostVirtualNicConfig {
3247}
3248impl DataObjectTrait for HostVirtualNicIpRouteSpec {
3249}
3250impl DataObjectTrait for HostVirtualNicOpaqueNetworkSpec {
3251}
3252impl DataObjectTrait for HostVirtualNicSpec {
3253}
3254impl DataObjectTrait for HostVirtualNicConnection {
3255}
3256impl DataObjectTrait for VirtualNicManagerNetConfig {
3257}
3258impl DataObjectTrait for HostVirtualNicManagerNicTypeSelection {
3259}
3260impl DataObjectTrait for HostVirtualNicManagerInfo {
3261}
3262impl DataObjectTrait for HostVirtualSwitch {
3263}
3264impl DataObjectTrait for HostVirtualSwitchBeaconConfig {
3265}
3266impl DataObjectTrait for HostVirtualSwitchBridge {
3267}
3268impl DataObjectTrait for HostVirtualSwitchAutoBridge {
3269}
3270impl DataObjectTrait for HostVirtualSwitchBondBridge {
3271}
3272impl DataObjectTrait for HostVirtualSwitchSimpleBridge {
3273}
3274impl DataObjectTrait for HostVirtualSwitchConfig {
3275}
3276impl DataObjectTrait for HostVirtualSwitchSpec {
3277}
3278impl DataObjectTrait for HostVmciAccessManagerAccessSpec {
3279}
3280impl DataObjectTrait for VmfsDatastoreOption {
3281}
3282impl DataObjectTrait for VmfsDatastoreBaseOption {
3283}
3284impl DataObjectTrait for VmfsDatastoreMultipleExtentOption {
3285}
3286impl DataObjectTrait for VmfsDatastoreSingleExtentOption {
3287}
3288impl DataObjectTrait for VmfsDatastoreAllExtentOption {
3289}
3290impl DataObjectTrait for VmfsDatastoreSpec {
3291}
3292impl DataObjectTrait for VmfsDatastoreCreateSpec {
3293}
3294impl DataObjectTrait for VmfsDatastoreExpandSpec {
3295}
3296impl DataObjectTrait for VmfsDatastoreExtendSpec {
3297}
3298impl DataObjectTrait for HostVmfsRescanResult {
3299}
3300impl DataObjectTrait for VmfsConfigOption {
3301}
3302impl DataObjectTrait for HostVmfsSpec {
3303}
3304impl DataObjectTrait for VmfsUnmapBandwidthSpec {
3305}
3306impl DataObjectTrait for VsanBasicDeviceInfo {
3307}
3308impl DataObjectTrait for VsanClusterMembershipInfo {
3309}
3310impl DataObjectTrait for VsanDaemonHealth {
3311}
3312impl DataObjectTrait for VsanDiskEncryptionHealth {
3313}
3314impl DataObjectTrait for VsanDiskRebalanceResult {
3315}
3316impl DataObjectTrait for VsanDitEncryptionHealthSummary {
3317}
3318impl DataObjectTrait for VsanEncryptionHealthSummary {
3319}
3320impl DataObjectTrait for VsanFailedRepairObjectResult {
3321}
3322impl DataObjectTrait for VsanFileServerHealthSummary {
3323}
3324impl DataObjectTrait for VsanFileServiceBalanceHealth {
3325}
3326impl DataObjectTrait for VsanFileServiceHealthSummary {
3327}
3328impl DataObjectTrait for VsanFileServiceRootFsHealth {
3329}
3330impl DataObjectTrait for VsanFileServiceShareHealthSummary {
3331}
3332impl DataObjectTrait for VsanHclCommonDeviceInfo {
3333}
3334impl DataObjectTrait for VsanHclNicInfo {
3335}
3336impl DataObjectTrait for VsanHclComputeResource {
3337}
3338impl DataObjectTrait for VsanHclControllerInfo {
3339}
3340impl DataObjectTrait for VsanHclDiskInfo {
3341}
3342impl DataObjectTrait for VsanHclFirmwareFile {
3343}
3344impl DataObjectTrait for VsanHclFirmwareUpdateSpec {
3345}
3346impl DataObjectTrait for VsanHclMemInfo {
3347}
3348impl DataObjectTrait for VsanHealthQuerySpec {
3349}
3350impl DataObjectTrait for VsanHostCimProviderInfo {
3351}
3352impl DataObjectTrait for VsanHostEmmSummary {
3353}
3354impl DataObjectTrait for VsanHostFwComponent {
3355}
3356impl DataObjectTrait for VsanHostGlobalDedupConfigHealthSummary {
3357}
3358impl DataObjectTrait for VsanHostHclInfo {
3359}
3360impl DataObjectTrait for VsanHostHealthSystemStatusResult {
3361}
3362impl DataObjectTrait for VsanHostHwDeviceId {
3363}
3364impl DataObjectTrait for VsanHostIoInsightInfo {
3365}
3366impl DataObjectTrait for VsanHostQueryCheckLimitsSpec {
3367}
3368impl DataObjectTrait for VsanHostReference {
3369}
3370impl DataObjectTrait for VsanHostVirtualApplianceInfo {
3371}
3372impl DataObjectTrait for VsanHostVmdkLoadTestResult {
3373}
3374impl DataObjectTrait for VsanHwToVcgInfoMapping {
3375}
3376impl DataObjectTrait for HostVsanInternalSystemCmmdsQuery {
3377}
3378impl DataObjectTrait for HostVsanInternalSystemDeleteVsanObjectsResult {
3379}
3380impl DataObjectTrait for VsanNewPolicyBatch {
3381}
3382impl DataObjectTrait for VsanPolicyChangeBatch {
3383}
3384impl DataObjectTrait for VsanPolicyCost {
3385}
3386impl DataObjectTrait for VsanPolicySatisfiability {
3387}
3388impl DataObjectTrait for HostVsanInternalSystemVsanObjectOperationResult {
3389}
3390impl DataObjectTrait for HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult {
3391}
3392impl DataObjectTrait for VsanIoInsightInfo {
3393}
3394impl DataObjectTrait for VsanIperfClientSpec {
3395}
3396impl DataObjectTrait for VsanKmsHealth {
3397}
3398impl DataObjectTrait for VsanLimitHealthResult {
3399}
3400impl DataObjectTrait for VsanNetworkDiagnosticsHealthInfo {
3401}
3402impl DataObjectTrait for VsanNetworkHealthResult {
3403}
3404impl DataObjectTrait for VsanNetworkLoadTestResult {
3405}
3406impl DataObjectTrait for VsanNetworkPeerHealthResult {
3407}
3408impl DataObjectTrait for VsanNicRdmaInfo {
3409}
3410impl DataObjectTrait for VsanObjectHealth {
3411}
3412impl DataObjectTrait for VsanObjectOverallHealth {
3413}
3414impl DataObjectTrait for VsanPhysicalDiskHealth {
3415}
3416impl DataObjectTrait for VsanPhysicalDiskHealthSummary {
3417}
3418impl DataObjectTrait for VsanProactiveRebalanceInfoEx {
3419}
3420impl DataObjectTrait for VsanQueryResultHostInfo {
3421}
3422impl DataObjectTrait for VsanRepairObjectsResult {
3423}
3424impl DataObjectTrait for VsanResourceHealth {
3425}
3426impl DataObjectTrait for VsanServerClusterInfo {
3427}
3428impl DataObjectTrait for VsanSmartDiskStats {
3429}
3430impl DataObjectTrait for VsanSmartParameter {
3431}
3432impl DataObjectTrait for VsanSmartStatsHostSummary {
3433}
3434impl DataObjectTrait for VsanVcgDeviceInfo {
3435}
3436impl DataObjectTrait for VsanVmdkIoLoadSpec {
3437}
3438impl DataObjectTrait for VsanVmdkLoadTestResult {
3439}
3440impl DataObjectTrait for VsanVmdkLoadTestSpec {
3441}
3442impl DataObjectTrait for VsanVsanPcapResult {
3443}
3444impl DataObjectTrait for HostVvolNqn {
3445}
3446impl DataObjectTrait for VVolHostPe {
3447}
3448impl DataObjectTrait for HostVvolVolumeHostVvolNqn {
3449}
3450impl DataObjectTrait for HostVvolVolumeSpecification {
3451}
3452impl DataObjectTrait for NetDhcpConfigInfo {
3453}
3454impl DataObjectTrait for NetDhcpConfigInfoDhcpOptions {
3455}
3456impl DataObjectTrait for NetDhcpConfigSpec {
3457}
3458impl DataObjectTrait for NetDhcpConfigSpecDhcpOptionsSpec {
3459}
3460impl DataObjectTrait for NetDnsConfigInfo {
3461}
3462impl DataObjectTrait for NetDnsConfigSpec {
3463}
3464impl DataObjectTrait for NetIpConfigInfo {
3465}
3466impl DataObjectTrait for NetIpConfigInfoIpAddress {
3467}
3468impl DataObjectTrait for NetIpConfigSpec {
3469}
3470impl DataObjectTrait for NetIpConfigSpecIpAddressSpec {
3471}
3472impl DataObjectTrait for NetIpRouteConfigInfo {
3473}
3474impl DataObjectTrait for NetIpRouteConfigInfoGateway {
3475}
3476impl DataObjectTrait for NetIpRouteConfigInfoIpRoute {
3477}
3478impl DataObjectTrait for NetIpRouteConfigSpec {
3479}
3480impl DataObjectTrait for NetIpRouteConfigSpecGatewaySpec {
3481}
3482impl DataObjectTrait for NetIpRouteConfigSpecIpRouteSpec {
3483}
3484impl DataObjectTrait for NetIpStackInfo {
3485}
3486impl DataObjectTrait for NetIpStackInfoDefaultRouter {
3487}
3488impl DataObjectTrait for NetIpStackInfoNetToMedia {
3489}
3490impl DataObjectTrait for NetBiosConfigInfo {
3491}
3492impl DataObjectTrait for WinNetBiosConfigInfo {
3493}
3494impl DataObjectTrait for ArrayUpdateSpec {
3495}
3496impl DataObjectTrait for ClusterDasVmConfigSpec {
3497}
3498impl DataObjectTrait for ClusterDatastoreUpdateSpec {
3499}
3500impl DataObjectTrait for ClusterDpmHostConfigSpec {
3501}
3502impl DataObjectTrait for ClusterDrsVmConfigSpec {
3503}
3504impl DataObjectTrait for ClusterGroupSpec {
3505}
3506impl DataObjectTrait for ClusterPreemptibleVmPairSpec {
3507}
3508impl DataObjectTrait for ClusterRuleSpec {
3509}
3510impl DataObjectTrait for ClusterTagCategoryUpdateSpec {
3511}
3512impl DataObjectTrait for ClusterVmOrchestrationSpec {
3513}
3514impl DataObjectTrait for StorageDrsOptionSpec {
3515}
3516impl DataObjectTrait for StorageDrsVmConfigSpec {
3517}
3518impl DataObjectTrait for VAppOvfSectionSpec {
3519}
3520impl DataObjectTrait for VAppProductSpec {
3521}
3522impl DataObjectTrait for VAppPropertySpec {
3523}
3524impl DataObjectTrait for VirtualMachineCpuIdInfoSpec {
3525}
3526impl DataObjectTrait for OptionType {
3527}
3528impl DataObjectTrait for BoolOption {
3529}
3530impl DataObjectTrait for ChoiceOption {
3531}
3532impl DataObjectTrait for FloatOption {
3533}
3534impl DataObjectTrait for IntOption {
3535}
3536impl DataObjectTrait for LongOption {
3537}
3538impl DataObjectTrait for StringOption {
3539}
3540impl DataObjectTrait for OptionValue {
3541}
3542impl DataObjectTrait for HostInternetScsiHbaParamValue {
3543}
3544impl DataObjectTrait for ApplyProfile {
3545}
3546impl DataObjectTrait for ProfileApplyProfileElement {
3547}
3548impl DataObjectTrait for ActiveDirectoryProfile {
3549}
3550impl DataObjectTrait for AuthenticationProfile {
3551}
3552impl DataObjectTrait for DateTimeProfile {
3553}
3554impl DataObjectTrait for DvsProfile {
3555}
3556impl DataObjectTrait for DvsVNicProfile {
3557}
3558impl DataObjectTrait for DvsHostVNicProfile {
3559}
3560impl DataObjectTrait for DvsServiceConsoleVNicProfile {
3561}
3562impl DataObjectTrait for FirewallProfile {
3563}
3564impl DataObjectTrait for FirewallProfileRulesetProfile {
3565}
3566impl DataObjectTrait for HostApplyProfile {
3567}
3568impl DataObjectTrait for HostMemoryProfile {
3569}
3570impl DataObjectTrait for IpAddressProfile {
3571}
3572impl DataObjectTrait for IpRouteProfile {
3573}
3574impl DataObjectTrait for NasStorageProfile {
3575}
3576impl DataObjectTrait for NetStackInstanceProfile {
3577}
3578impl DataObjectTrait for NetworkPolicyProfile {
3579}
3580impl DataObjectTrait for NetworkProfile {
3581}
3582impl DataObjectTrait for NetworkProfileDnsConfigProfile {
3583}
3584impl DataObjectTrait for NsxHostVNicProfile {
3585}
3586impl DataObjectTrait for OpaqueSwitchProfile {
3587}
3588impl DataObjectTrait for OptionProfile {
3589}
3590impl DataObjectTrait for PermissionProfile {
3591}
3592impl DataObjectTrait for PhysicalNicProfile {
3593}
3594impl DataObjectTrait for PnicUplinkProfile {
3595}
3596impl DataObjectTrait for PortGroupProfile {
3597}
3598impl DataObjectTrait for HostPortGroupProfile {
3599}
3600impl DataObjectTrait for ServiceConsolePortGroupProfile {
3601}
3602impl DataObjectTrait for VmPortGroupProfile {
3603}
3604impl DataObjectTrait for VirtualSwitchSelectionProfile {
3605}
3606impl DataObjectTrait for VlanProfile {
3607}
3608impl DataObjectTrait for SecurityProfile {
3609}
3610impl DataObjectTrait for ServiceProfile {
3611}
3612impl DataObjectTrait for StaticRouteProfile {
3613}
3614impl DataObjectTrait for StorageProfile {
3615}
3616impl DataObjectTrait for UserGroupProfile {
3617}
3618impl DataObjectTrait for UserProfile {
3619}
3620impl DataObjectTrait for VirtualSwitchProfile {
3621}
3622impl DataObjectTrait for LinkProfile {
3623}
3624impl DataObjectTrait for NumPortsProfile {
3625}
3626impl DataObjectTrait for ProfileApplyProfileProperty {
3627}
3628impl DataObjectTrait for ComplianceLocator {
3629}
3630impl DataObjectTrait for ComplianceProfile {
3631}
3632impl DataObjectTrait for ComplianceResult {
3633}
3634impl DataObjectTrait for ComplianceFailure {
3635}
3636impl DataObjectTrait for ComplianceFailureComplianceFailureValues {
3637}
3638impl DataObjectTrait for ProfileDeferredPolicyOptionParameter {
3639}
3640impl DataObjectTrait for ProfileExpression {
3641}
3642impl DataObjectTrait for ProfileCompositeExpression {
3643}
3644impl DataObjectTrait for ProfileSimpleExpression {
3645}
3646impl DataObjectTrait for ProfileExpressionMetadata {
3647}
3648impl DataObjectTrait for ProfileParameterMetadata {
3649}
3650impl DataObjectTrait for ProfileParameterMetadataParameterRelationMetadata {
3651}
3652impl DataObjectTrait for ProfilePolicy {
3653}
3654impl DataObjectTrait for ProfilePolicyMetadata {
3655}
3656impl DataObjectTrait for PolicyOption {
3657}
3658impl DataObjectTrait for CompositePolicyOption {
3659}
3660impl DataObjectTrait for ProfilePolicyOptionMetadata {
3661}
3662impl DataObjectTrait for ProfileCompositePolicyOptionMetadata {
3663}
3664impl DataObjectTrait for UserInputRequiredParameterMetadata {
3665}
3666impl DataObjectTrait for ProfileConfigInfo {
3667}
3668impl DataObjectTrait for ClusterProfileConfigInfo {
3669}
3670impl DataObjectTrait for HostProfileConfigInfo {
3671}
3672impl DataObjectTrait for ProfileCreateSpec {
3673}
3674impl DataObjectTrait for ProfileSerializedCreateSpec {
3675}
3676impl DataObjectTrait for HostProfileSerializedHostProfileSpec {
3677}
3678impl DataObjectTrait for ClusterProfileCreateSpec {
3679}
3680impl DataObjectTrait for ClusterProfileConfigSpec {
3681}
3682impl DataObjectTrait for ClusterProfileCompleteConfigSpec {
3683}
3684impl DataObjectTrait for ClusterProfileConfigServiceCreateSpec {
3685}
3686impl DataObjectTrait for HostProfileConfigSpec {
3687}
3688impl DataObjectTrait for HostProfileCompleteConfigSpec {
3689}
3690impl DataObjectTrait for HostProfileHostBasedConfigSpec {
3691}
3692impl DataObjectTrait for ProfileDescription {
3693}
3694impl DataObjectTrait for ProfileDescriptionSection {
3695}
3696impl DataObjectTrait for ProfileMetadata {
3697}
3698impl DataObjectTrait for ProfileMetadataProfileOperationMessage {
3699}
3700impl DataObjectTrait for ProfileMetadataProfileSortSpec {
3701}
3702impl DataObjectTrait for ProfilePropertyPath {
3703}
3704impl DataObjectTrait for ProfileProfileStructure {
3705}
3706impl DataObjectTrait for ProfileProfileStructureProperty {
3707}
3708impl DataObjectTrait for AnswerFile {
3709}
3710impl DataObjectTrait for AnswerFileStatusResult {
3711}
3712impl DataObjectTrait for AnswerFileStatusError {
3713}
3714impl DataObjectTrait for ProfileExecuteResult {
3715}
3716impl DataObjectTrait for ApplyHostProfileConfigurationSpec {
3717}
3718impl DataObjectTrait for ProfileExecuteError {
3719}
3720impl DataObjectTrait for HostProfileValidationFailureInfo {
3721}
3722impl DataObjectTrait for HostSpecification {
3723}
3724impl DataObjectTrait for HostSubSpecification {
3725}
3726impl DataObjectTrait for AnswerFileCreateSpec {
3727}
3728impl DataObjectTrait for AnswerFileOptionsCreateSpec {
3729}
3730impl DataObjectTrait for AnswerFileSerializedCreateSpec {
3731}
3732impl DataObjectTrait for ApplyHostProfileConfigurationResult {
3733}
3734impl DataObjectTrait for HostProfileManagerCompositionResult {
3735}
3736impl DataObjectTrait for HostProfileManagerCompositionResultResultElement {
3737}
3738impl DataObjectTrait for HostProfileManagerCompositionValidationResult {
3739}
3740impl DataObjectTrait for HostProfileManagerCompositionValidationResultResultElement {
3741}
3742impl DataObjectTrait for HostProfileManagerConfigTaskList {
3743}
3744impl DataObjectTrait for HostProfilesEntityCustomizations {
3745}
3746impl DataObjectTrait for StructuredCustomizations {
3747}
3748impl DataObjectTrait for HostProfileManagerHostToConfigSpecMap {
3749}
3750impl DataObjectTrait for ScheduledTaskDescription {
3751}
3752impl DataObjectTrait for ScheduledTaskSpec {
3753}
3754impl DataObjectTrait for ScheduledTaskInfo {
3755}
3756impl DataObjectTrait for TaskScheduler {
3757}
3758impl DataObjectTrait for AfterStartupTaskScheduler {
3759}
3760impl DataObjectTrait for OnceTaskScheduler {
3761}
3762impl DataObjectTrait for RecurrentTaskScheduler {
3763}
3764impl DataObjectTrait for HourlyTaskScheduler {
3765}
3766impl DataObjectTrait for DailyTaskScheduler {
3767}
3768impl DataObjectTrait for MonthlyTaskScheduler {
3769}
3770impl DataObjectTrait for MonthlyByDayTaskScheduler {
3771}
3772impl DataObjectTrait for MonthlyByWeekdayTaskScheduler {
3773}
3774impl DataObjectTrait for WeeklyTaskScheduler {
3775}
3776impl DataObjectTrait for ApplyStorageRecommendationResult {
3777}
3778impl DataObjectTrait for StorageDrsAutomationConfig {
3779}
3780impl DataObjectTrait for StorageDrsConfigInfo {
3781}
3782impl DataObjectTrait for StorageDrsConfigSpec {
3783}
3784impl DataObjectTrait for StorageDrsIoLoadBalanceConfig {
3785}
3786impl DataObjectTrait for PlacementAffinityRule {
3787}
3788impl DataObjectTrait for PlacementRankResult {
3789}
3790impl DataObjectTrait for PlacementRankSpec {
3791}
3792impl DataObjectTrait for StorageDrsPlacementRankVmSpec {
3793}
3794impl DataObjectTrait for StorageDrsPodConfigInfo {
3795}
3796impl DataObjectTrait for StorageDrsPodConfigSpec {
3797}
3798impl DataObjectTrait for StorageDrsPodSelectionSpec {
3799}
3800impl DataObjectTrait for PodDiskLocator {
3801}
3802impl DataObjectTrait for VmPodConfigForPlacement {
3803}
3804impl DataObjectTrait for StorageDrsSpaceLoadBalanceConfig {
3805}
3806impl DataObjectTrait for StoragePlacementResult {
3807}
3808impl DataObjectTrait for StoragePlacementSpec {
3809}
3810impl DataObjectTrait for StorageDrsVmConfigInfo {
3811}
3812impl DataObjectTrait for VAppCloneSpec {
3813}
3814impl DataObjectTrait for VAppCloneSpecNetworkMappingPair {
3815}
3816impl DataObjectTrait for VAppCloneSpecResourceMap {
3817}
3818impl DataObjectTrait for VAppEntityConfigInfo {
3819}
3820impl DataObjectTrait for VAppIpAssignmentInfo {
3821}
3822impl DataObjectTrait for IpPool {
3823}
3824impl DataObjectTrait for IpPoolAssociation {
3825}
3826impl DataObjectTrait for IpPoolIpPoolConfigInfo {
3827}
3828impl DataObjectTrait for VAppOvfSectionInfo {
3829}
3830impl DataObjectTrait for VAppProductInfo {
3831}
3832impl DataObjectTrait for VAppPropertyInfo {
3833}
3834impl DataObjectTrait for VmConfigInfo {
3835}
3836impl DataObjectTrait for VAppConfigInfo {
3837}
3838impl DataObjectTrait for VmConfigSpec {
3839}
3840impl DataObjectTrait for VAppConfigSpec {
3841}
3842impl DataObjectTrait for ClusterNetworkConfigSpec {
3843}
3844impl DataObjectTrait for FailoverNodeInfo {
3845}
3846impl DataObjectTrait for NodeDeploymentSpec {
3847}
3848impl DataObjectTrait for PassiveNodeDeploymentSpec {
3849}
3850impl DataObjectTrait for NodeNetworkSpec {
3851}
3852impl DataObjectTrait for PassiveNodeNetworkSpec {
3853}
3854impl DataObjectTrait for SourceNodeSpec {
3855}
3856impl DataObjectTrait for VchaClusterConfigInfo {
3857}
3858impl DataObjectTrait for VchaClusterConfigSpec {
3859}
3860impl DataObjectTrait for VchaClusterDeploymentSpec {
3861}
3862impl DataObjectTrait for VchaClusterNetworkSpec {
3863}
3864impl DataObjectTrait for WitnessNodeInfo {
3865}
3866impl DataObjectTrait for VchaClusterHealth {
3867}
3868impl DataObjectTrait for VchaClusterRuntimeInfo {
3869}
3870impl DataObjectTrait for VchaNodeRuntimeInfo {
3871}
3872impl DataObjectTrait for VirtualMachineAffinityInfo {
3873}
3874impl DataObjectTrait for VirtualMachineBaseIndependentFilterSpec {
3875}
3876impl DataObjectTrait for VirtualMachineEmptyIndependentFilterSpec {
3877}
3878impl DataObjectTrait for VirtualMachineIndependentFilterSpec {
3879}
3880impl DataObjectTrait for VirtualMachineBootOptions {
3881}
3882impl DataObjectTrait for VirtualMachineBootOptionsBootableDevice {
3883}
3884impl DataObjectTrait for VirtualMachineBootOptionsBootableCdromDevice {
3885}
3886impl DataObjectTrait for VirtualMachineBootOptionsBootableDiskDevice {
3887}
3888impl DataObjectTrait for VirtualMachineBootOptionsBootableEthernetDevice {
3889}
3890impl DataObjectTrait for VirtualMachineBootOptionsBootableFloppyDevice {
3891}
3892impl DataObjectTrait for VirtualMachineCapability {
3893}
3894impl DataObjectTrait for VirtualMachineCertThumbprint {
3895}
3896impl DataObjectTrait for VirtualMachineCloneSpec {
3897}
3898impl DataObjectTrait for VirtualMachineConfigInfo {
3899}
3900impl DataObjectTrait for VirtualMachineConfigInfoDatastoreUrlPair {
3901}
3902impl DataObjectTrait for VirtualMachineConfigInfoOverheadInfo {
3903}
3904impl DataObjectTrait for VirtualMachineConfigOption {
3905}
3906impl DataObjectTrait for VirtualMachineConfigOptionDescriptor {
3907}
3908impl DataObjectTrait for VirtualMachineConfigSpec {
3909}
3910impl DataObjectTrait for ConfigTarget {
3911}
3912impl DataObjectTrait for VirtualMachineConsolePreferences {
3913}
3914impl DataObjectTrait for VirtualMachineContentLibraryItemInfo {
3915}
3916impl DataObjectTrait for DatastoreOption {
3917}
3918impl DataObjectTrait for VirtualMachineDatastoreVolumeOption {
3919}
3920impl DataObjectTrait for VirtualMachineDefaultPowerOpInfo {
3921}
3922impl DataObjectTrait for VirtualMachineDeviceRuntimeInfo {
3923}
3924impl DataObjectTrait for VirtualMachineDeviceRuntimeInfoDeviceRuntimeState {
3925}
3926impl DataObjectTrait for VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState {
3927}
3928impl DataObjectTrait for VirtualMachineDvxClassInfo {
3929}
3930impl DataObjectTrait for FaultToleranceConfigInfo {
3931}
3932impl DataObjectTrait for FaultTolerancePrimaryConfigInfo {
3933}
3934impl DataObjectTrait for FaultToleranceSecondaryConfigInfo {
3935}
3936impl DataObjectTrait for FaultToleranceConfigSpec {
3937}
3938impl DataObjectTrait for FaultToleranceMetaSpec {
3939}
3940impl DataObjectTrait for FaultToleranceSecondaryOpResult {
3941}
3942impl DataObjectTrait for FaultToleranceVmConfigSpec {
3943}
3944impl DataObjectTrait for FaultToleranceDiskSpec {
3945}
3946impl DataObjectTrait for VirtualMachineFeatureRequirement {
3947}
3948impl DataObjectTrait for VirtualMachineFileInfo {
3949}
3950impl DataObjectTrait for VirtualMachineFileLayout {
3951}
3952impl DataObjectTrait for VirtualMachineFileLayoutDiskLayout {
3953}
3954impl DataObjectTrait for VirtualMachineFileLayoutSnapshotLayout {
3955}
3956impl DataObjectTrait for VirtualMachineFileLayoutEx {
3957}
3958impl DataObjectTrait for VirtualMachineFileLayoutExDiskLayout {
3959}
3960impl DataObjectTrait for VirtualMachineFileLayoutExDiskUnit {
3961}
3962impl DataObjectTrait for VirtualMachineFileLayoutExFileInfo {
3963}
3964impl DataObjectTrait for VirtualMachineFileLayoutExSnapshotLayout {
3965}
3966impl DataObjectTrait for VirtualMachineFlagInfo {
3967}
3968impl DataObjectTrait for VirtualMachineForkConfigInfo {
3969}
3970impl DataObjectTrait for GuestInfo {
3971}
3972impl DataObjectTrait for GuestInfoCustomizationInfo {
3973}
3974impl DataObjectTrait for GuestDiskInfo {
3975}
3976impl DataObjectTrait for GuestInfoNamespaceGenerationInfo {
3977}
3978impl DataObjectTrait for GuestNicInfo {
3979}
3980impl DataObjectTrait for GuestScreenInfo {
3981}
3982impl DataObjectTrait for GuestStackInfo {
3983}
3984impl DataObjectTrait for GuestInfoVirtualDiskMapping {
3985}
3986impl DataObjectTrait for VirtualMachineGuestIntegrityInfo {
3987}
3988impl DataObjectTrait for VirtualMachineGuestMonitoringModeInfo {
3989}
3990impl DataObjectTrait for GuestOsDescriptor {
3991}
3992impl DataObjectTrait for VirtualMachineGuestQuiesceSpec {
3993}
3994impl DataObjectTrait for VirtualMachineWindowsQuiesceSpec {
3995}
3996impl DataObjectTrait for VirtualMachineIdeDiskDevicePartitionInfo {
3997}
3998impl DataObjectTrait for VirtualMachineInstantCloneSpec {
3999}
4000impl DataObjectTrait for VirtualMachineLegacyNetworkSwitchInfo {
4001}
4002impl DataObjectTrait for VirtualMachineMessage {
4003}
4004impl DataObjectTrait for VirtualMachineMetadataManagerVmMetadata {
4005}
4006impl DataObjectTrait for VirtualMachineMetadataManagerVmMetadataInput {
4007}
4008impl DataObjectTrait for VirtualMachineMetadataManagerVmMetadataOwner {
4009}
4010impl DataObjectTrait for VirtualMachineMetadataManagerVmMetadataResult {
4011}
4012impl DataObjectTrait for VirtualMachineNetworkShaperInfo {
4013}
4014impl DataObjectTrait for VirtualMachineProfileDetails {
4015}
4016impl DataObjectTrait for VirtualMachineProfileDetailsDiskProfileDetails {
4017}
4018impl DataObjectTrait for VirtualMachineProfileRawData {
4019}
4020impl DataObjectTrait for VirtualMachineProfileSpec {
4021}
4022impl DataObjectTrait for VirtualMachineDefaultProfileSpec {
4023}
4024impl DataObjectTrait for VirtualMachineDefinedProfileSpec {
4025}
4026impl DataObjectTrait for VirtualMachineEmptyProfileSpec {
4027}
4028impl DataObjectTrait for VirtualMachinePropertyRelation {
4029}
4030impl DataObjectTrait for VirtualMachineQuestionInfo {
4031}
4032impl DataObjectTrait for VirtualMachineRelocateSpec {
4033}
4034impl DataObjectTrait for VirtualMachineRelocateSpecDiskLocator {
4035}
4036impl DataObjectTrait for VirtualMachineRelocateSpecDiskLocatorBackingSpec {
4037}
4038impl DataObjectTrait for ReplicationConfigSpec {
4039}
4040impl DataObjectTrait for ReplicationInfoDiskSettings {
4041}
4042impl DataObjectTrait for VirtualMachineRuntimeInfo {
4043}
4044impl DataObjectTrait for VirtualMachineRuntimeInfoDasProtectionState {
4045}
4046impl DataObjectTrait for ScheduledHardwareUpgradeInfo {
4047}
4048impl DataObjectTrait for VirtualMachineSgxInfo {
4049}
4050impl DataObjectTrait for VirtualMachineSnapshotInfo {
4051}
4052impl DataObjectTrait for SnapshotSelectionSpec {
4053}
4054impl DataObjectTrait for VirtualMachineSnapshotTree {
4055}
4056impl DataObjectTrait for VirtualMachineSriovDevicePoolInfo {
4057}
4058impl DataObjectTrait for VirtualMachineSriovNetworkDevicePoolInfo {
4059}
4060impl DataObjectTrait for VirtualMachineStorageInfo {
4061}
4062impl DataObjectTrait for VirtualMachineUsageOnDatastore {
4063}
4064impl DataObjectTrait for SubnetInfoFolderInfo {
4065}
4066impl DataObjectTrait for VirtualMachineSummary {
4067}
4068impl DataObjectTrait for VirtualMachineConfigSummary {
4069}
4070impl DataObjectTrait for VirtualMachineGuestSummary {
4071}
4072impl DataObjectTrait for VirtualMachineQuickStats {
4073}
4074impl DataObjectTrait for VirtualMachineQuickStatsMemoryTierStats {
4075}
4076impl DataObjectTrait for VirtualMachineStorageSummary {
4077}
4078impl DataObjectTrait for VirtualMachineTargetInfo {
4079}
4080impl DataObjectTrait for VirtualMachineCdromInfo {
4081}
4082impl DataObjectTrait for VirtualMachineDatastoreInfo {
4083}
4084impl DataObjectTrait for VirtualMachineDiskDeviceInfo {
4085}
4086impl DataObjectTrait for VirtualMachineIdeDiskDeviceInfo {
4087}
4088impl DataObjectTrait for VirtualMachineScsiDiskDeviceInfo {
4089}
4090impl DataObjectTrait for VirtualMachineDynamicPassthroughInfo {
4091}
4092impl DataObjectTrait for VirtualMachineFloppyInfo {
4093}
4094impl DataObjectTrait for VirtualMachineNetworkInfo {
4095}
4096impl DataObjectTrait for OpaqueNetworkTargetInfo {
4097}
4098impl DataObjectTrait for VirtualMachineParallelInfo {
4099}
4100impl DataObjectTrait for VirtualMachinePciPassthroughInfo {
4101}
4102impl DataObjectTrait for VirtualMachineSriovInfo {
4103}
4104impl DataObjectTrait for VirtualMachinePciSharedGpuPassthroughInfo {
4105}
4106impl DataObjectTrait for VirtualMachinePrecisionClockInfo {
4107}
4108impl DataObjectTrait for VirtualMachineScsiPassthroughInfo {
4109}
4110impl DataObjectTrait for VirtualMachineSerialInfo {
4111}
4112impl DataObjectTrait for VirtualMachineSgxTargetInfo {
4113}
4114impl DataObjectTrait for VirtualMachineSoundInfo {
4115}
4116impl DataObjectTrait for SubnetInfo {
4117}
4118impl DataObjectTrait for VirtualMachineUsbInfo {
4119}
4120impl DataObjectTrait for VirtualMachineVFlashModuleInfo {
4121}
4122impl DataObjectTrait for VirtualMachineVMotionStunTimeInfo {
4123}
4124impl DataObjectTrait for VirtualMachineVendorDeviceGroupInfo {
4125}
4126impl DataObjectTrait for VirtualMachineVgpuDeviceInfo {
4127}
4128impl DataObjectTrait for VirtualMachineVgpuProfileInfo {
4129}
4130impl DataObjectTrait for ToolsConfigInfo {
4131}
4132impl DataObjectTrait for ToolsConfigInfoToolsLastInstallInfo {
4133}
4134impl DataObjectTrait for UsbScanCodeSpec {
4135}
4136impl DataObjectTrait for UsbScanCodeSpecKeyEvent {
4137}
4138impl DataObjectTrait for UsbScanCodeSpecModifierType {
4139}
4140impl DataObjectTrait for VirtualMachineVcpuConfig {
4141}
4142impl DataObjectTrait for VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo {
4143}
4144impl DataObjectTrait for VirtualMachineVirtualDeviceGroups {
4145}
4146impl DataObjectTrait for VirtualMachineVirtualDeviceGroupsDeviceGroup {
4147}
4148impl DataObjectTrait for VirtualMachineVirtualDeviceGroupsVendorDeviceGroup {
4149}
4150impl DataObjectTrait for VirtualMachineVirtualDeviceSwap {
4151}
4152impl DataObjectTrait for VirtualMachineVirtualDeviceSwapDeviceSwapInfo {
4153}
4154impl DataObjectTrait for VirtualHardware {
4155}
4156impl DataObjectTrait for VirtualHardwareOption {
4157}
4158impl DataObjectTrait for VirtualMachineVirtualNuma {
4159}
4160impl DataObjectTrait for VirtualMachineVirtualNumaInfo {
4161}
4162impl DataObjectTrait for VirtualMachineVirtualPMem {
4163}
4164impl DataObjectTrait for CheckResult {
4165}
4166impl DataObjectTrait for CustomizationAdapterMapping {
4167}
4168impl DataObjectTrait for CustomizationGlobalIpSettings {
4169}
4170impl DataObjectTrait for CustomizationGuiRunOnce {
4171}
4172impl DataObjectTrait for CustomizationGuiUnattended {
4173}
4174impl DataObjectTrait for CustomizationIpSettings {
4175}
4176impl DataObjectTrait for CustomizationIpSettingsIpV6AddressSpec {
4177}
4178impl DataObjectTrait for CustomizationIdentification {
4179}
4180impl DataObjectTrait for CustomizationIdentitySettings {
4181}
4182impl DataObjectTrait for CustomizationCloudinitPrep {
4183}
4184impl DataObjectTrait for CustomizationLinuxPrep {
4185}
4186impl DataObjectTrait for CustomizationSysprep {
4187}
4188impl DataObjectTrait for CustomizationSysprepText {
4189}
4190impl DataObjectTrait for CustomizationIpGenerator {
4191}
4192impl DataObjectTrait for CustomizationCustomIpGenerator {
4193}
4194impl DataObjectTrait for CustomizationDhcpIpGenerator {
4195}
4196impl DataObjectTrait for CustomizationFixedIp {
4197}
4198impl DataObjectTrait for CustomizationUnknownIpGenerator {
4199}
4200impl DataObjectTrait for CustomizationIpV6Generator {
4201}
4202impl DataObjectTrait for CustomizationAutoIpV6Generator {
4203}
4204impl DataObjectTrait for CustomizationCustomIpV6Generator {
4205}
4206impl DataObjectTrait for CustomizationDhcpIpV6Generator {
4207}
4208impl DataObjectTrait for CustomizationFixedIpV6 {
4209}
4210impl DataObjectTrait for CustomizationStatelessIpV6Generator {
4211}
4212impl DataObjectTrait for CustomizationUnknownIpV6Generator {
4213}
4214impl DataObjectTrait for CustomizationLicenseFilePrintData {
4215}
4216impl DataObjectTrait for CustomizationName {
4217}
4218impl DataObjectTrait for CustomizationCustomName {
4219}
4220impl DataObjectTrait for CustomizationFixedName {
4221}
4222impl DataObjectTrait for CustomizationPrefixName {
4223}
4224impl DataObjectTrait for CustomizationUnknownName {
4225}
4226impl DataObjectTrait for CustomizationVirtualMachineName {
4227}
4228impl DataObjectTrait for CustomizationOptions {
4229}
4230impl DataObjectTrait for CustomizationLinuxOptions {
4231}
4232impl DataObjectTrait for CustomizationWinOptions {
4233}
4234impl DataObjectTrait for CustomizationPassword {
4235}
4236impl DataObjectTrait for CustomizationSpec {
4237}
4238impl DataObjectTrait for CustomizationUserData {
4239}
4240impl DataObjectTrait for HostDiskMappingInfo {
4241}
4242impl DataObjectTrait for HostDiskMappingPartitionInfo {
4243}
4244impl DataObjectTrait for HostDiskMappingOption {
4245}
4246impl DataObjectTrait for HostDiskMappingPartitionOption {
4247}
4248impl DataObjectTrait for VirtualDevice {
4249}
4250impl DataObjectTrait for VirtualCdrom {
4251}
4252impl DataObjectTrait for VirtualController {
4253}
4254impl DataObjectTrait for VirtualIdeController {
4255}
4256impl DataObjectTrait for VirtualNvdimmController {
4257}
4258impl DataObjectTrait for VirtualNvmeController {
4259}
4260impl DataObjectTrait for VirtualPciController {
4261}
4262impl DataObjectTrait for VirtualPs2Controller {
4263}
4264impl DataObjectTrait for VirtualSataController {
4265}
4266impl DataObjectTrait for VirtualAhciController {
4267}
4268impl DataObjectTrait for VirtualScsiController {
4269}
4270impl DataObjectTrait for ParaVirtualScsiController {
4271}
4272impl DataObjectTrait for VirtualBusLogicController {
4273}
4274impl DataObjectTrait for VirtualLsiLogicController {
4275}
4276impl DataObjectTrait for VirtualLsiLogicSasController {
4277}
4278impl DataObjectTrait for VirtualSioController {
4279}
4280impl DataObjectTrait for VirtualUsbController {
4281}
4282impl DataObjectTrait for VirtualUsbxhciController {
4283}
4284impl DataObjectTrait for VirtualDisk {
4285}
4286impl DataObjectTrait for VirtualEthernetCard {
4287}
4288impl DataObjectTrait for VirtualE1000 {
4289}
4290impl DataObjectTrait for VirtualE1000E {
4291}
4292impl DataObjectTrait for VirtualPcNet32 {
4293}
4294impl DataObjectTrait for VirtualSriovEthernetCard {
4295}
4296impl DataObjectTrait for VirtualVmxnet {
4297}
4298impl DataObjectTrait for VirtualVmxnet2 {
4299}
4300impl DataObjectTrait for VirtualVmxnet3 {
4301}
4302impl DataObjectTrait for VirtualVmxnet3Vrdma {
4303}
4304impl DataObjectTrait for VirtualFloppy {
4305}
4306impl DataObjectTrait for VirtualKeyboard {
4307}
4308impl DataObjectTrait for VirtualNvdimm {
4309}
4310impl DataObjectTrait for VirtualPciPassthrough {
4311}
4312impl DataObjectTrait for VirtualParallelPort {
4313}
4314impl DataObjectTrait for VirtualPointingDevice {
4315}
4316impl DataObjectTrait for VirtualPrecisionClock {
4317}
4318impl DataObjectTrait for VirtualScsiPassthrough {
4319}
4320impl DataObjectTrait for VirtualSerialPort {
4321}
4322impl DataObjectTrait for VirtualSoundCard {
4323}
4324impl DataObjectTrait for VirtualEnsoniq1371 {
4325}
4326impl DataObjectTrait for VirtualHdAudioCard {
4327}
4328impl DataObjectTrait for VirtualSoundBlaster16 {
4329}
4330impl DataObjectTrait for VirtualTpm {
4331}
4332impl DataObjectTrait for VirtualUsb {
4333}
4334impl DataObjectTrait for VirtualMachineVmciDevice {
4335}
4336impl DataObjectTrait for VirtualMachineVmirom {
4337}
4338impl DataObjectTrait for VirtualMachineVideoCard {
4339}
4340impl DataObjectTrait for VirtualWdt {
4341}
4342impl DataObjectTrait for VirtualDeviceBackingInfo {
4343}
4344impl DataObjectTrait for VirtualDeviceDeviceBackingInfo {
4345}
4346impl DataObjectTrait for VirtualCdromAtapiBackingInfo {
4347}
4348impl DataObjectTrait for VirtualCdromPassthroughBackingInfo {
4349}
4350impl DataObjectTrait for VirtualDiskRawDiskVer2BackingInfo {
4351}
4352impl DataObjectTrait for VirtualDiskPartitionedRawDiskVer2BackingInfo {
4353}
4354impl DataObjectTrait for VirtualEthernetCardLegacyNetworkBackingInfo {
4355}
4356impl DataObjectTrait for VirtualEthernetCardNetworkBackingInfo {
4357}
4358impl DataObjectTrait for VirtualFloppyDeviceBackingInfo {
4359}
4360impl DataObjectTrait for VirtualPciPassthroughDeviceBackingInfo {
4361}
4362impl DataObjectTrait for VirtualPciPassthroughDynamicBackingInfo {
4363}
4364impl DataObjectTrait for VirtualParallelPortDeviceBackingInfo {
4365}
4366impl DataObjectTrait for VirtualPointingDeviceDeviceBackingInfo {
4367}
4368impl DataObjectTrait for VirtualScsiPassthroughDeviceBackingInfo {
4369}
4370impl DataObjectTrait for VirtualSerialPortDeviceBackingInfo {
4371}
4372impl DataObjectTrait for VirtualSoundCardDeviceBackingInfo {
4373}
4374impl DataObjectTrait for VirtualUsbRemoteHostBackingInfo {
4375}
4376impl DataObjectTrait for VirtualUsbusbBackingInfo {
4377}
4378impl DataObjectTrait for VirtualDeviceFileBackingInfo {
4379}
4380impl DataObjectTrait for VirtualCdromIsoBackingInfo {
4381}
4382impl DataObjectTrait for VirtualDiskFlatVer1BackingInfo {
4383}
4384impl DataObjectTrait for VirtualDiskFlatVer2BackingInfo {
4385}
4386impl DataObjectTrait for VirtualDiskLocalPMemBackingInfo {
4387}
4388impl DataObjectTrait for VirtualDiskRawDiskMappingVer1BackingInfo {
4389}
4390impl DataObjectTrait for VirtualDiskSeSparseBackingInfo {
4391}
4392impl DataObjectTrait for VirtualDiskSparseVer1BackingInfo {
4393}
4394impl DataObjectTrait for VirtualDiskSparseVer2BackingInfo {
4395}
4396impl DataObjectTrait for VirtualFloppyImageBackingInfo {
4397}
4398impl DataObjectTrait for VirtualNvdimmBackingInfo {
4399}
4400impl DataObjectTrait for VirtualParallelPortFileBackingInfo {
4401}
4402impl DataObjectTrait for VirtualSerialPortFileBackingInfo {
4403}
4404impl DataObjectTrait for VirtualDevicePipeBackingInfo {
4405}
4406impl DataObjectTrait for VirtualSerialPortPipeBackingInfo {
4407}
4408impl DataObjectTrait for VirtualDeviceRemoteDeviceBackingInfo {
4409}
4410impl DataObjectTrait for VirtualCdromRemoteAtapiBackingInfo {
4411}
4412impl DataObjectTrait for VirtualCdromRemotePassthroughBackingInfo {
4413}
4414impl DataObjectTrait for VirtualFloppyRemoteDeviceBackingInfo {
4415}
4416impl DataObjectTrait for VirtualUsbRemoteClientBackingInfo {
4417}
4418impl DataObjectTrait for VirtualDeviceUriBackingInfo {
4419}
4420impl DataObjectTrait for VirtualSerialPortUriBackingInfo {
4421}
4422impl DataObjectTrait for VirtualEthernetCardDistributedVirtualPortBackingInfo {
4423}
4424impl DataObjectTrait for VirtualEthernetCardOpaqueNetworkBackingInfo {
4425}
4426impl DataObjectTrait for VirtualPciPassthroughDvxBackingInfo {
4427}
4428impl DataObjectTrait for VirtualPciPassthroughPluginBackingInfo {
4429}
4430impl DataObjectTrait for VirtualPciPassthroughVmiopBackingInfo {
4431}
4432impl DataObjectTrait for VirtualPrecisionClockSystemClockBackingInfo {
4433}
4434impl DataObjectTrait for VirtualSerialPortThinPrintBackingInfo {
4435}
4436impl DataObjectTrait for VirtualSriovEthernetCardSriovBackingInfo {
4437}
4438impl DataObjectTrait for VirtualDeviceBusSlotInfo {
4439}
4440impl DataObjectTrait for VirtualDevicePciBusSlotInfo {
4441}
4442impl DataObjectTrait for VirtualUsbControllerPciBusSlotInfo {
4443}
4444impl DataObjectTrait for VirtualDeviceConnectInfo {
4445}
4446impl DataObjectTrait for VirtualDeviceDeviceGroupInfo {
4447}
4448impl DataObjectTrait for VirtualDeviceOption {
4449}
4450impl DataObjectTrait for VirtualCdromOption {
4451}
4452impl DataObjectTrait for VirtualControllerOption {
4453}
4454impl DataObjectTrait for VirtualIdeControllerOption {
4455}
4456impl DataObjectTrait for VirtualNvdimmControllerOption {
4457}
4458impl DataObjectTrait for VirtualNvmeControllerOption {
4459}
4460impl DataObjectTrait for VirtualPciControllerOption {
4461}
4462impl DataObjectTrait for VirtualPs2ControllerOption {
4463}
4464impl DataObjectTrait for VirtualSataControllerOption {
4465}
4466impl DataObjectTrait for VirtualAhciControllerOption {
4467}
4468impl DataObjectTrait for VirtualScsiControllerOption {
4469}
4470impl DataObjectTrait for ParaVirtualScsiControllerOption {
4471}
4472impl DataObjectTrait for VirtualBusLogicControllerOption {
4473}
4474impl DataObjectTrait for VirtualLsiLogicControllerOption {
4475}
4476impl DataObjectTrait for VirtualLsiLogicSasControllerOption {
4477}
4478impl DataObjectTrait for VirtualSioControllerOption {
4479}
4480impl DataObjectTrait for VirtualUsbControllerOption {
4481}
4482impl DataObjectTrait for VirtualUsbxhciControllerOption {
4483}
4484impl DataObjectTrait for VirtualDiskOption {
4485}
4486impl DataObjectTrait for VirtualEthernetCardOption {
4487}
4488impl DataObjectTrait for VirtualE1000Option {
4489}
4490impl DataObjectTrait for VirtualE1000EOption {
4491}
4492impl DataObjectTrait for VirtualPcNet32Option {
4493}
4494impl DataObjectTrait for VirtualSriovEthernetCardOption {
4495}
4496impl DataObjectTrait for VirtualVmxnetOption {
4497}
4498impl DataObjectTrait for VirtualVmxnet2Option {
4499}
4500impl DataObjectTrait for VirtualVmxnet3Option {
4501}
4502impl DataObjectTrait for VirtualVmxnet3VrdmaOption {
4503}
4504impl DataObjectTrait for VirtualFloppyOption {
4505}
4506impl DataObjectTrait for VirtualKeyboardOption {
4507}
4508impl DataObjectTrait for VirtualNvdimmOption {
4509}
4510impl DataObjectTrait for VirtualPciPassthroughOption {
4511}
4512impl DataObjectTrait for VirtualParallelPortOption {
4513}
4514impl DataObjectTrait for VirtualPointingDeviceOption {
4515}
4516impl DataObjectTrait for VirtualPrecisionClockOption {
4517}
4518impl DataObjectTrait for VirtualScsiPassthroughOption {
4519}
4520impl DataObjectTrait for VirtualSerialPortOption {
4521}
4522impl DataObjectTrait for VirtualSoundCardOption {
4523}
4524impl DataObjectTrait for VirtualEnsoniq1371Option {
4525}
4526impl DataObjectTrait for VirtualHdAudioCardOption {
4527}
4528impl DataObjectTrait for VirtualSoundBlaster16Option {
4529}
4530impl DataObjectTrait for VirtualTpmOption {
4531}
4532impl DataObjectTrait for VirtualUsbOption {
4533}
4534impl DataObjectTrait for VirtualMachineVmciDeviceOption {
4535}
4536impl DataObjectTrait for VirtualVmiromOption {
4537}
4538impl DataObjectTrait for VirtualVideoCardOption {
4539}
4540impl DataObjectTrait for VirtualWdtOption {
4541}
4542impl DataObjectTrait for VirtualDeviceBackingOption {
4543}
4544impl DataObjectTrait for VirtualDeviceDeviceBackingOption {
4545}
4546impl DataObjectTrait for VirtualCdromAtapiBackingOption {
4547}
4548impl DataObjectTrait for VirtualCdromPassthroughBackingOption {
4549}
4550impl DataObjectTrait for VirtualCdromRemoteAtapiBackingOption {
4551}
4552impl DataObjectTrait for VirtualDiskRawDiskMappingVer1BackingOption {
4553}
4554impl DataObjectTrait for VirtualDiskRawDiskVer2BackingOption {
4555}
4556impl DataObjectTrait for VirtualDiskPartitionedRawDiskVer2BackingOption {
4557}
4558impl DataObjectTrait for VirtualEthernetCardLegacyNetworkBackingOption {
4559}
4560impl DataObjectTrait for VirtualEthernetCardNetworkBackingOption {
4561}
4562impl DataObjectTrait for VirtualFloppyDeviceBackingOption {
4563}
4564impl DataObjectTrait for VirtualPciPassthroughDeviceBackingOption {
4565}
4566impl DataObjectTrait for VirtualPciPassthroughDynamicBackingOption {
4567}
4568impl DataObjectTrait for VirtualParallelPortDeviceBackingOption {
4569}
4570impl DataObjectTrait for VirtualPointingDeviceBackingOption {
4571}
4572impl DataObjectTrait for VirtualScsiPassthroughDeviceBackingOption {
4573}
4574impl DataObjectTrait for VirtualSerialPortDeviceBackingOption {
4575}
4576impl DataObjectTrait for VirtualSoundCardDeviceBackingOption {
4577}
4578impl DataObjectTrait for VirtualUsbRemoteHostBackingOption {
4579}
4580impl DataObjectTrait for VirtualUsbusbBackingOption {
4581}
4582impl DataObjectTrait for VirtualDeviceFileBackingOption {
4583}
4584impl DataObjectTrait for VirtualCdromIsoBackingOption {
4585}
4586impl DataObjectTrait for VirtualDiskFlatVer1BackingOption {
4587}
4588impl DataObjectTrait for VirtualDiskFlatVer2BackingOption {
4589}
4590impl DataObjectTrait for VirtualDiskLocalPMemBackingOption {
4591}
4592impl DataObjectTrait for VirtualDiskSeSparseBackingOption {
4593}
4594impl DataObjectTrait for VirtualDiskSparseVer1BackingOption {
4595}
4596impl DataObjectTrait for VirtualDiskSparseVer2BackingOption {
4597}
4598impl DataObjectTrait for VirtualFloppyImageBackingOption {
4599}
4600impl DataObjectTrait for VirtualParallelPortFileBackingOption {
4601}
4602impl DataObjectTrait for VirtualSerialPortFileBackingOption {
4603}
4604impl DataObjectTrait for VirtualDevicePipeBackingOption {
4605}
4606impl DataObjectTrait for VirtualSerialPortPipeBackingOption {
4607}
4608impl DataObjectTrait for VirtualDeviceRemoteDeviceBackingOption {
4609}
4610impl DataObjectTrait for VirtualCdromRemotePassthroughBackingOption {
4611}
4612impl DataObjectTrait for VirtualFloppyRemoteDeviceBackingOption {
4613}
4614impl DataObjectTrait for VirtualUsbRemoteClientBackingOption {
4615}
4616impl DataObjectTrait for VirtualDeviceUriBackingOption {
4617}
4618impl DataObjectTrait for VirtualSerialPortUriBackingOption {
4619}
4620impl DataObjectTrait for VirtualEthernetCardDvPortBackingOption {
4621}
4622impl DataObjectTrait for VirtualEthernetCardOpaqueNetworkBackingOption {
4623}
4624impl DataObjectTrait for VirtualPciPassthroughDvxBackingOption {
4625}
4626impl DataObjectTrait for VirtualPciPassthroughPluginBackingOption {
4627}
4628impl DataObjectTrait for VirtualPciPassthroughVmiopBackingOption {
4629}
4630impl DataObjectTrait for VirtualPrecisionClockSystemClockBackingOption {
4631}
4632impl DataObjectTrait for VirtualSerialPortThinPrintBackingOption {
4633}
4634impl DataObjectTrait for VirtualSriovEthernetCardSriovBackingOption {
4635}
4636impl DataObjectTrait for VirtualDeviceBusSlotOption {
4637}
4638impl DataObjectTrait for VirtualDeviceConnectOption {
4639}
4640impl DataObjectTrait for VirtualDeviceConfigSpec {
4641}
4642impl DataObjectTrait for VirtualDiskConfigSpec {
4643}
4644impl DataObjectTrait for VirtualDeviceConfigSpecBackingSpec {
4645}
4646impl DataObjectTrait for VirtualDiskVFlashCacheConfigInfo {
4647}
4648impl DataObjectTrait for VirtualDiskId {
4649}
4650impl DataObjectTrait for VirtualDiskDeltaDiskFormatsSupported {
4651}
4652impl DataObjectTrait for VirtualDiskOptionVFlashCacheConfigOption {
4653}
4654impl DataObjectTrait for VirtualEthernetCardResourceAllocation {
4655}
4656impl DataObjectTrait for VirtualPciPassthroughAllowedDevice {
4657}
4658impl DataObjectTrait for VirtualMachineVmciDeviceFilterInfo {
4659}
4660impl DataObjectTrait for VirtualMachineVmciDeviceFilterSpec {
4661}
4662impl DataObjectTrait for VirtualMachineVmciDeviceOptionFilterSpecOption {
4663}
4664impl DataObjectTrait for VirtualVmxnet3StrictLatencyConfig {
4665}
4666impl DataObjectTrait for VirtualVmxnet3OptionStrictLatencyConfigOption {
4667}
4668impl DataObjectTrait for GuestAliases {
4669}
4670impl DataObjectTrait for GuestAuthAliasInfo {
4671}
4672impl DataObjectTrait for GuestAuthSubject {
4673}
4674impl DataObjectTrait for GuestAuthAnySubject {
4675}
4676impl DataObjectTrait for GuestAuthNamedSubject {
4677}
4678impl DataObjectTrait for GuestMappedAliases {
4679}
4680impl DataObjectTrait for GuestFileAttributes {
4681}
4682impl DataObjectTrait for GuestPosixFileAttributes {
4683}
4684impl DataObjectTrait for GuestWindowsFileAttributes {
4685}
4686impl DataObjectTrait for GuestFileInfo {
4687}
4688impl DataObjectTrait for FileTransferInformation {
4689}
4690impl DataObjectTrait for GuestListFileInfo {
4691}
4692impl DataObjectTrait for GuestAuthentication {
4693}
4694impl DataObjectTrait for NamePasswordAuthentication {
4695}
4696impl DataObjectTrait for SamlTokenAuthentication {
4697}
4698impl DataObjectTrait for SspiAuthentication {
4699}
4700impl DataObjectTrait for TicketedSessionAuthentication {
4701}
4702impl DataObjectTrait for GuestProcessInfo {
4703}
4704impl DataObjectTrait for GuestProgramSpec {
4705}
4706impl DataObjectTrait for GuestWindowsProgramSpec {
4707}
4708impl DataObjectTrait for GuestRegKeySpec {
4709}
4710impl DataObjectTrait for GuestRegKeyNameSpec {
4711}
4712impl DataObjectTrait for GuestRegKeyRecordSpec {
4713}
4714impl DataObjectTrait for GuestRegValueSpec {
4715}
4716impl DataObjectTrait for GuestRegValueDataSpec {
4717}
4718impl DataObjectTrait for GuestRegValueBinarySpec {
4719}
4720impl DataObjectTrait for GuestRegValueDwordSpec {
4721}
4722impl DataObjectTrait for GuestRegValueExpandStringSpec {
4723}
4724impl DataObjectTrait for GuestRegValueMultiStringSpec {
4725}
4726impl DataObjectTrait for GuestRegValueQwordSpec {
4727}
4728impl DataObjectTrait for GuestRegValueStringSpec {
4729}
4730impl DataObjectTrait for GuestRegValueNameSpec {
4731}
4732impl DataObjectTrait for DeviceGroupId {
4733}
4734impl DataObjectTrait for FaultDomainId {
4735}
4736impl DataObjectTrait for FaultDomainInfo {
4737}
4738impl DataObjectTrait for ReplicationGroupId {
4739}
4740impl DataObjectTrait for ReplicationSpec {
4741}
4742impl DataObjectTrait for VsanCapacityReservationInfo {
4743}
4744impl DataObjectTrait for ClusterRuntimeInfo {
4745}
4746impl DataObjectTrait for VsanCompatibilityCheckResult {
4747}
4748impl DataObjectTrait for VimVsanDataEfficiencyCapacityState {
4749}
4750impl DataObjectTrait for VsanDataEfficiencyConfig {
4751}
4752impl DataObjectTrait for VsanDataEfficiencyConfigEx {
4753}
4754impl DataObjectTrait for VsanDataEncryptionConfig {
4755}
4756impl DataObjectTrait for VsanDataInTransitEncryptionConfig {
4757}
4758impl DataObjectTrait for VsanDatastoreConfig {
4759}
4760impl DataObjectTrait for VsanAdvancedDatastoreConfig {
4761}
4762impl DataObjectTrait for VsanDatastoreSpec {
4763}
4764impl DataObjectTrait for VsanClientDatastoreConfig {
4765}
4766impl DataObjectTrait for VsanXvcClientConfig {
4767}
4768impl DataObjectTrait for DefaultDatastorePolicySelectionInfo {
4769}
4770impl DataObjectTrait for VsanDirectoryServerConfig {
4771}
4772impl DataObjectTrait for ActiveVsanDirectoryServerConfig {
4773}
4774impl DataObjectTrait for DiskClaimConfiguration {
4775}
4776impl DataObjectTrait for VsanEntityCompatibilityResult {
4777}
4778impl DataObjectTrait for EntityResourceCheckDetails {
4779}
4780impl DataObjectTrait for VsanDiskGroupResourceCheckResult {
4781}
4782impl DataObjectTrait for VsanDiskResourceCheckResult {
4783}
4784impl DataObjectTrait for VsanStoragePoolDiskResourceCheckResult {
4785}
4786impl DataObjectTrait for VsanFaultDomainResourceCheckResult {
4787}
4788impl DataObjectTrait for VsanHostResourceCheckResult {
4789}
4790impl DataObjectTrait for VsanResourceCheckResult {
4791}
4792impl DataObjectTrait for VsanResourceCheckComponentResult {
4793}
4794impl DataObjectTrait for VsanResourceCheckDataPersistenceResult {
4795}
4796impl DataObjectTrait for VsanResourceCheckVsanResult {
4797}
4798impl DataObjectTrait for VsanStoragePoolResourceCheckResult {
4799}
4800impl DataObjectTrait for VsanFileServiceConfig {
4801}
4802impl DataObjectTrait for VsanFileServiceDomain {
4803}
4804impl DataObjectTrait for VsanFileServiceDomainConfig {
4805}
4806impl DataObjectTrait for VsanFileServiceDomainQuerySpec {
4807}
4808impl DataObjectTrait for VsanFileShare {
4809}
4810impl DataObjectTrait for VsanFileShareConfig {
4811}
4812impl DataObjectTrait for VsanFileShareNetPermission {
4813}
4814impl DataObjectTrait for VsanFileShareQueryProperties {
4815}
4816impl DataObjectTrait for FileShareQueryResult {
4817}
4818impl DataObjectTrait for VsanFileShareQuerySpec {
4819}
4820impl DataObjectTrait for VsanFileShareRuntimeInfo {
4821}
4822impl DataObjectTrait for VsanFileShareSmbOptions {
4823}
4824impl DataObjectTrait for VsanFileShareSnapshot {
4825}
4826impl DataObjectTrait for VsanFileShareSnapshotConfig {
4827}
4828impl DataObjectTrait for VsanFileShareSnapshotQueryResult {
4829}
4830impl DataObjectTrait for VsanFileShareSnapshotQuerySpec {
4831}
4832impl DataObjectTrait for VsanHciMeshDatastoreSource {
4833}
4834impl DataObjectTrait for VsanIoDiagnosticsFailedCheck {
4835}
4836impl DataObjectTrait for VsanIoDiagnosticsInstance {
4837}
4838impl DataObjectTrait for VsanIoDiagnosticsInstanceEvent {
4839}
4840impl DataObjectTrait for VsanIoDiagnosticsInstanceQuerySpec {
4841}
4842impl DataObjectTrait for VsanIoDiagnosticsObjectLayout {
4843}
4844impl DataObjectTrait for VsanIoDiagnosticsPrecheckResult {
4845}
4846impl DataObjectTrait for VsanIoDiagnosticsStats {
4847}
4848impl DataObjectTrait for VsanIoDiagnosticsTarget {
4849}
4850impl DataObjectTrait for VsanIoDiagnosticsTargetStats {
4851}
4852impl DataObjectTrait for VsanIoLatency {
4853}
4854impl DataObjectTrait for VsanIoLatencyMetrics {
4855}
4856impl DataObjectTrait for LifecycleConfigDetails {
4857}
4858impl DataObjectTrait for LifecycleFaultDomainDetails {
4859}
4860impl DataObjectTrait for LifecyclePreCheckResult {
4861}
4862impl DataObjectTrait for LifecycleWitnessDetails {
4863}
4864impl DataObjectTrait for VsanMetricProfile {
4865}
4866impl DataObjectTrait for VsanMetricsConfig {
4867}
4868impl DataObjectTrait for VsanMountPrecheckItem {
4869}
4870impl DataObjectTrait for VsanDatastoreSourcePrecheckItem {
4871}
4872impl DataObjectTrait for VsanMountPrecheckNetworkConnectivityResult {
4873}
4874impl DataObjectTrait for VsanMountPrecheckNetworkLatencyResult {
4875}
4876impl DataObjectTrait for VsanMountPrecheckNetworkConnectivity {
4877}
4878impl DataObjectTrait for VsanMountPrecheckNetworkConnectivityDetail {
4879}
4880impl DataObjectTrait for VsanMountPrecheckNetworkLatency {
4881}
4882impl DataObjectTrait for VsanMountPrecheckNetworkLatencyDetail {
4883}
4884impl DataObjectTrait for VsanMountPrecheckResult {
4885}
4886impl DataObjectTrait for VsanDatastoreSourcePrecheckResult {
4887}
4888impl DataObjectTrait for VsanObjectHealthTelemetrySummary {
4889}
4890impl DataObjectTrait for VsanObjectIoStats {
4891}
4892impl DataObjectTrait for VsanProactiveRebalanceInfo {
4893}
4894impl DataObjectTrait for VsanRdmaConfig {
4895}
4896impl DataObjectTrait for VsanRemoteVcInfo {
4897}
4898impl DataObjectTrait for VsanRemoteVcInfoStandalone {
4899}
4900impl DataObjectTrait for RemoteVsanSite {
4901}
4902impl DataObjectTrait for RemoteVsanSiteAffinity {
4903}
4904impl DataObjectTrait for RepairTimerInfo {
4905}
4906impl DataObjectTrait for VsanResourceCheckSpec {
4907}
4908impl DataObjectTrait for VsanResourceCheckStatus {
4909}
4910impl DataObjectTrait for VsanResourceCheckTaskDetails {
4911}
4912impl DataObjectTrait for VsanDiskDataEvacuationResourceCheckTaskDetails {
4913}
4914impl DataObjectTrait for ResyncIopsInfo {
4915}
4916impl DataObjectTrait for VsanRuntimeStatsHostMap {
4917}
4918impl DataObjectTrait for SsdEnduranceThresholdSpec {
4919}
4920impl DataObjectTrait for VsanServerHostUnicastInfo {
4921}
4922impl DataObjectTrait for VsanSharedWitnessCompatibilityResult {
4923}
4924impl DataObjectTrait for VsanSnapServiceConfig {
4925}
4926impl DataObjectTrait for VcRemoteVsanServerClusterConfig {
4927}
4928impl DataObjectTrait for VcRemoteVsanServerClusterInfo {
4929}
4930impl DataObjectTrait for VsanIscsiVipConfigSpec {
4931}
4932impl DataObjectTrait for VsanIscsiVipConfig {
4933}
4934impl DataObjectTrait for VsanIscsiVipDVswitchConfig {
4935}
4936impl DataObjectTrait for VsanVipNetworkConfig {
4937}
4938impl DataObjectTrait for VsanIscsiVipVswitchConfig {
4939}
4940impl DataObjectTrait for VsanBurnInTest {
4941}
4942impl DataObjectTrait for VsanBurnInTestCheckResult {
4943}
4944impl DataObjectTrait for VsanCloudHealthStatus {
4945}
4946impl DataObjectTrait for VsanClusterBurnInTestResultList {
4947}
4948impl DataObjectTrait for VsanCompliantDriver {
4949}
4950impl DataObjectTrait for VsanCompliantFirmware {
4951}
4952impl DataObjectTrait for VsanConfigBaseIssue {
4953}
4954impl DataObjectTrait for VsanConfigNotAllDisksClaimedIssue {
4955}
4956impl DataObjectTrait for VsanConfigCheckResult {
4957}
4958impl DataObjectTrait for VsanDatastoreDefaultPolicySelectionConfig {
4959}
4960impl DataObjectTrait for VsanDeconvergedNetConfig {
4961}
4962impl DataObjectTrait for VsanDiskModelInfo {
4963}
4964impl DataObjectTrait for VsanDownloadItem {
4965}
4966impl DataObjectTrait for VsanEsaConfig {
4967}
4968impl DataObjectTrait for VsanEsaConfigInfo {
4969}
4970impl DataObjectTrait for VsanEsaDiskConfiguration {
4971}
4972impl DataObjectTrait for VsanExtendedConfig {
4973}
4974impl DataObjectTrait for VsanFileServiceOvfSpec {
4975}
4976impl DataObjectTrait for VsanFileServicePreflightCheckResult {
4977}
4978impl DataObjectTrait for VsanGenericClusterBaseIssue {
4979}
4980impl DataObjectTrait for VsanGenericClusterBestPracticeHealth {
4981}
4982impl DataObjectTrait for VsanHclDeviceConstraint {
4983}
4984impl DataObjectTrait for VsanHclDiskConstraint {
4985}
4986impl DataObjectTrait for VsanHclDriverInfo {
4987}
4988impl DataObjectTrait for VsanHclMinFwConstraint {
4989}
4990impl DataObjectTrait for VsanHclQuerySpec {
4991}
4992impl DataObjectTrait for VsanHclReleaseConstraint {
4993}
4994impl DataObjectTrait for VsanHealthConfigSpec {
4995}
4996impl DataObjectTrait for VsanHealthCustomizationSpec {
4997}
4998impl DataObjectTrait for VsanHealthThreshold {
4999}
5000impl DataObjectTrait for VsanHistoricalHealthConfig {
5001}
5002impl DataObjectTrait for VsanHostDeviceInfo {
5003}
5004impl DataObjectTrait for VsanHwToVcgInfoMappingSpec {
5005}
5006impl DataObjectTrait for VsanIoTripAnalyzerConfig {
5007}
5008impl DataObjectTrait for VsanIoTripAnalyzerRecurrence {
5009}
5010impl DataObjectTrait for VsanInternalExtendedConfig {
5011}
5012impl DataObjectTrait for VsanNetworkConfigBaseIssue {
5013}
5014impl DataObjectTrait for VsanNetworkConfigPnicSpeedInconsistencyIssue {
5015}
5016impl DataObjectTrait for VsanNetworkConfigPortgroupWithNoRedundancyIssue {
5017}
5018impl DataObjectTrait for VsanNetworkConfigVdsScopeIssue {
5019}
5020impl DataObjectTrait for VsanNetworkConfigVsanNotOnVdsIssue {
5021}
5022impl DataObjectTrait for VsanNetworkConfigVswitchWithNoRedundancyIssue {
5023}
5024impl DataObjectTrait for VsanNetworkVMotionVmknicNotFountIssue {
5025}
5026impl DataObjectTrait for VsanNetworkConfigBestPracticeHealth {
5027}
5028impl DataObjectTrait for VsanObjSnapParams {
5029}
5030impl DataObjectTrait for VsanObjectDetail {
5031}
5032impl DataObjectTrait for VsanObjectSnapshotId {
5033}
5034impl DataObjectTrait for VimVsanVsanPMemConfig {
5035}
5036impl DataObjectTrait for VsanPerfsvcHealthResult {
5037}
5038impl DataObjectTrait for VsanPrepareVsanForVcsaSpec {
5039}
5040impl DataObjectTrait for VsanSnapshotDetail {
5041}
5042impl DataObjectTrait for VsanSnapshotQueryResult {
5043}
5044impl DataObjectTrait for VsanSnapshotQuerySpec {
5045}
5046impl DataObjectTrait for VsanSpaceEfficiencyMetadataSize {
5047}
5048impl DataObjectTrait for VsanSpaceEfficiencyRatio {
5049}
5050impl DataObjectTrait for VsanUnmapConfig {
5051}
5052impl DataObjectTrait for VsanUpdateItem {
5053}
5054impl DataObjectTrait for VsanVcPostDeployConfigSpec {
5055}
5056impl DataObjectTrait for VsanVcStretchedClusterConfigSpec {
5057}
5058impl DataObjectTrait for VsanVcsaDeploymentProgress {
5059}
5060impl DataObjectTrait for VsanVdsMigrationPlan {
5061}
5062impl DataObjectTrait for VsanVdsPgMigrationHostInfo {
5063}
5064impl DataObjectTrait for VsanVdsPgMigrationSpec {
5065}
5066impl DataObjectTrait for VsanVdsPgMigrationVmInfo {
5067}
5068impl DataObjectTrait for VsanVibInstallPreflightStatus {
5069}
5070impl DataObjectTrait for VsanVibScanResult {
5071}
5072impl DataObjectTrait for VsanVibSpec {
5073}
5074impl DataObjectTrait for VsanVmVdsMigrationSpec {
5075}
5076impl DataObjectTrait for VsanVnicVdsMigrationSpec {
5077}
5078impl DataObjectTrait for VsanVumConfig {
5079}
5080impl DataObjectTrait for VsanWitnessHostConfig {
5081}
5082impl DataObjectTrait for VsanXvcClientInfo {
5083}
5084impl DataObjectTrait for VsanXvcDatastoreConfig {
5085}
5086impl DataObjectTrait for VsanXvcDatastoreInfo {
5087}
5088impl DataObjectTrait for VsanXvcClientInfoSpec {
5089}
5090impl DataObjectTrait for VsanXvcQueryCriteria {
5091}
5092impl DataObjectTrait for VsanXvcQueryFilter {
5093}
5094impl DataObjectTrait for VsanXvcQueryPropertyValue {
5095}
5096impl DataObjectTrait for VsanXvcQueryResultSet {
5097}
5098impl DataObjectTrait for VsanXvcQuerySpec {
5099}
5100impl DataObjectTrait for VsanXvcResultItem {
5101}
5102impl DataObjectTrait for VsanClusterConfigInfo {
5103}
5104impl DataObjectTrait for VsanConfigInfoEx {
5105}
5106impl DataObjectTrait for VsanClusterConfigInfoHostDefaultInfo {
5107}
5108impl DataObjectTrait for VsanClusterCoreConfig {
5109}
5110impl DataObjectTrait for VsanClusterCoreConfigSpec {
5111}
5112impl DataObjectTrait for VsanHostAbortWipeDiskStatus {
5113}
5114impl DataObjectTrait for VsanHostAboutInfoEx {
5115}
5116impl DataObjectTrait for VsanAddStoragePoolDiskSpec {
5117}
5118impl DataObjectTrait for VsanHostClusterStatus {
5119}
5120impl DataObjectTrait for VsanHostClusterStatusState {
5121}
5122impl DataObjectTrait for VsanHostClusterStatusStateCompletionEstimate {
5123}
5124impl DataObjectTrait for VsanComplianceDetail {
5125}
5126impl DataObjectTrait for VsanComplianceResult {
5127}
5128impl DataObjectTrait for VsanHostConfigInfo {
5129}
5130impl DataObjectTrait for VsanHostConfigInfoEx {
5131}
5132impl DataObjectTrait for VsanHostConfigInfoClusterInfo {
5133}
5134impl DataObjectTrait for VsanHostFaultDomainInfo {
5135}
5136impl DataObjectTrait for VsanHostConfigInfoNetworkInfo {
5137}
5138impl DataObjectTrait for VsanHostConfigInfoNetworkInfoPortConfig {
5139}
5140impl DataObjectTrait for VsanHostPortConfigEx {
5141}
5142impl DataObjectTrait for VsanHostConfigInfoStorageInfo {
5143}
5144impl DataObjectTrait for VsanHostCreateNativeKeyProviderSpec {
5145}
5146impl DataObjectTrait for VsanInTransitEncryptionInfo {
5147}
5148impl DataObjectTrait for VsanHostDecommissionMode {
5149}
5150impl DataObjectTrait for VsanDeleteStoragePoolDiskSpec {
5151}
5152impl DataObjectTrait for VsanHostDiskMapInfo {
5153}
5154impl DataObjectTrait for VimVsanHostDiskMapInfoEx {
5155}
5156impl DataObjectTrait for VsanHostDiskMapResult {
5157}
5158impl DataObjectTrait for VsanHostDiskMapping {
5159}
5160impl DataObjectTrait for VimVsanHostDiskMappingCreationSpec {
5161}
5162impl DataObjectTrait for VsanHostDiskResult {
5163}
5164impl DataObjectTrait for VimVsanHostDiskResultEx {
5165}
5166impl DataObjectTrait for VsanHostDrsStats {
5167}
5168impl DataObjectTrait for VsanHostEncryptionInfo {
5169}
5170impl DataObjectTrait for VsanHostIpConfig {
5171}
5172impl DataObjectTrait for VsanHostIpConfigEx {
5173}
5174impl DataObjectTrait for VsanHostMembershipInfo {
5175}
5176impl DataObjectTrait for VsanPolicyStatus {
5177}
5178impl DataObjectTrait for VimVsanHostQueryVsanDisksSpec {
5179}
5180impl DataObjectTrait for RemoteVsanServerClusterConfig {
5181}
5182impl DataObjectTrait for VsanHostRuntimeStats {
5183}
5184impl DataObjectTrait for VsanHostServerClusterUnicastConfig {
5185}
5186impl DataObjectTrait for VsanHostServerClusterUnicastInfo {
5187}
5188impl DataObjectTrait for SiteAffinityInfo {
5189}
5190impl DataObjectTrait for VsanStoragePoolDisk {
5191}
5192impl DataObjectTrait for VimVsanHostStoragePoolDiskInfo {
5193}
5194impl DataObjectTrait for VimVsanHostStoragePoolInfo {
5195}
5196impl DataObjectTrait for VimVsanHostTrimDiskEntry {
5197}
5198impl DataObjectTrait for VimVsanHostTrimDiskSpec {
5199}
5200impl DataObjectTrait for VimVsanHostUpdateStoragePoolDiskSpec {
5201}
5202impl DataObjectTrait for VsanHostAssociatedObjects {
5203}
5204impl DataObjectTrait for VsanHostAssociatedObjectsResult {
5205}
5206impl DataObjectTrait for VsanComplianceQuerySpec {
5207}
5208impl DataObjectTrait for VsanHostComponentSyncState {
5209}
5210impl DataObjectTrait for VimVsanHostVsanDirectStorage {
5211}
5212impl DataObjectTrait for VsanHostVsanDiskInfo {
5213}
5214impl DataObjectTrait for VimVsanHostVsanDiskManagementSystemCapability {
5215}
5216impl DataObjectTrait for VimVsanHostVsanHostCapability {
5217}
5218impl DataObjectTrait for VimVsanHostVsanManagedDisksInfo {
5219}
5220impl DataObjectTrait for VimVsanHostVsanManagedPMemInfo {
5221}
5222impl DataObjectTrait for VsanObjectProfileInfo {
5223}
5224impl DataObjectTrait for VsanHostVsanObjectSyncState {
5225}
5226impl DataObjectTrait for VsanHostRuntimeInfo {
5227}
5228impl DataObjectTrait for VsanHostRuntimeInfoDiskIssue {
5229}
5230impl DataObjectTrait for VimVsanHostVsanScsiDisk {
5231}
5232impl DataObjectTrait for VsanHostVsanObjectSyncQueryResult {
5233}
5234impl DataObjectTrait for VsanSyncingObjectRecoveryDetails {
5235}
5236impl DataObjectTrait for VsanWhatIfEvacDetail {
5237}
5238impl DataObjectTrait for VsanWhatIfEvacResult {
5239}
5240impl DataObjectTrait for VsanHostWipeDiskStatus {
5241}
5242impl DataObjectTrait for BaseConfigInfo {
5243}
5244impl DataObjectTrait for VStorageObjectConfigInfo {
5245}
5246impl DataObjectTrait for BaseConfigInfoBackingInfo {
5247}
5248impl DataObjectTrait for BaseConfigInfoFileBackingInfo {
5249}
5250impl DataObjectTrait for BaseConfigInfoDiskFileBackingInfo {
5251}
5252impl DataObjectTrait for BaseConfigInfoRawDiskMappingBackingInfo {
5253}
5254impl DataObjectTrait for VslmCreateSpec {
5255}
5256impl DataObjectTrait for VslmCreateSpecBackingSpec {
5257}
5258impl DataObjectTrait for VslmCreateSpecDiskFileBackingSpec {
5259}
5260impl DataObjectTrait for VslmCreateSpecRawDiskMappingBackingSpec {
5261}
5262impl DataObjectTrait for DiskCryptoSpec {
5263}
5264impl DataObjectTrait for Id {
5265}
5266impl DataObjectTrait for VslmInfrastructureObjectPolicy {
5267}
5268impl DataObjectTrait for VslmInfrastructureObjectPolicySpec {
5269}
5270impl DataObjectTrait for VslmMigrateSpec {
5271}
5272impl DataObjectTrait for VslmCloneSpec {
5273}
5274impl DataObjectTrait for VslmRelocateSpec {
5275}
5276impl DataObjectTrait for VStorageObjectReconcileResult {
5277}
5278impl DataObjectTrait for VStorageObjectReconcileResultInvalidDiskPath {
5279}
5280impl DataObjectTrait for VStorageObjectReconcileResultReconcileDetail {
5281}
5282impl DataObjectTrait for VStorageObjectReconcileSpec {
5283}
5284impl DataObjectTrait for VStorageObjectStateInfo {
5285}
5286impl DataObjectTrait for VslmTagEntry {
5287}
5288impl DataObjectTrait for VslmVClockInfo {
5289}
5290impl DataObjectTrait for VStorageObject {
5291}
5292impl DataObjectTrait for VStorageObjectSnapshot {
5293}
5294impl DataObjectTrait for VStorageObjectSnapshotDetails {
5295}
5296impl DataObjectTrait for VStorageObjectSnapshotInfo {
5297}
5298impl DataObjectTrait for VStorageObjectSnapshotInfoVStorageObjectSnapshot {
5299}
5300impl DataObjectTrait for RetrieveVStorageObjSpec {
5301}
5302impl DataObjectTrait for VStorageObjectAssociations {
5303}
5304impl DataObjectTrait for VStorageObjectAssociationsVmDiskAssociations {
5305}
5306impl DataObjectTrait for DynamicArray {
5307}
5308impl DataObjectTrait for DynamicProperty {
5309}
5310impl DataObjectTrait for KeyAnyValue {
5311}
5312impl DataObjectTrait for LocalizableMessage {
5313}
5314impl DataObjectTrait for LocalizedMethodFault {
5315}
5316impl DataObjectTrait for PropertyChange {
5317}
5318impl DataObjectTrait for PropertyFilterSpec {
5319}
5320impl DataObjectTrait for PropertyFilterUpdate {
5321}
5322impl DataObjectTrait for MissingObject {
5323}
5324impl DataObjectTrait for MissingProperty {
5325}
5326impl DataObjectTrait for ObjectContent {
5327}
5328impl DataObjectTrait for ObjectSpec {
5329}
5330impl DataObjectTrait for ObjectUpdate {
5331}
5332impl DataObjectTrait for PropertySpec {
5333}
5334impl DataObjectTrait for RetrieveOptions {
5335}
5336impl DataObjectTrait for RetrieveResult {
5337}
5338impl DataObjectTrait for SelectionSpec {
5339}
5340impl DataObjectTrait for TraversalSpec {
5341}
5342impl DataObjectTrait for UpdateSet {
5343}
5344impl DataObjectTrait for WaitOptions {
5345}
5346impl DataObjectTrait for VslmAboutInfo {
5347}
5348impl DataObjectTrait for VslmQueryDatastoreInfoResult {
5349}
5350impl DataObjectTrait for VslmServiceInstanceContent {
5351}
5352impl DataObjectTrait for VslmTaskInfo {
5353}
5354impl DataObjectTrait for VslmTaskReason {
5355}
5356impl DataObjectTrait for VslmTaskReasonAlarm {
5357}
5358impl DataObjectTrait for VslmTaskReasonSchedule {
5359}
5360impl DataObjectTrait for VslmTaskReasonSystem {
5361}
5362impl DataObjectTrait for VslmTaskReasonUser {
5363}
5364impl DataObjectTrait for VslmDatastoreSyncStatus {
5365}
5366impl DataObjectTrait for VslmVsoVStorageObjectAssociations {
5367}
5368impl DataObjectTrait for VslmVsoVStorageObjectAssociationsVmDiskAssociation {
5369}
5370impl DataObjectTrait for VslmVsoVStorageObjectQueryResult {
5371}
5372impl DataObjectTrait for VslmVsoVStorageObjectQuerySpec {
5373}
5374impl DataObjectTrait for VslmVsoVStorageObjectResult {
5375}
5376impl DataObjectTrait for VslmVsoVStorageObjectSnapshotResult {
5377}
5378impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DataObjectTrait {
5379    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
5380        let data_type = from.data_type();
5381        match data_type {
5382            StructType::DataObject => Some(from.as_any_ref().downcast_ref::<DataObject>()?),
5383            StructType::AgencyConfigInfo => Some(from.as_any_ref().downcast_ref::<AgencyConfigInfo>()?),
5384            StructType::AgencyScope => Some(from.as_any_ref().downcast_ref::<AgencyScope>()?),
5385            StructType::AgencyComputeResourceScope => Some(from.as_any_ref().downcast_ref::<AgencyComputeResourceScope>()?),
5386            StructType::AgencyVmFolder => Some(from.as_any_ref().downcast_ref::<AgencyVmFolder>()?),
5387            StructType::AgencyVmResourcePool => Some(from.as_any_ref().downcast_ref::<AgencyVmResourcePool>()?),
5388            StructType::AgentConfigInfo => Some(from.as_any_ref().downcast_ref::<AgentConfigInfo>()?),
5389            StructType::AgentOvfEnvironmentInfo => Some(from.as_any_ref().downcast_ref::<AgentOvfEnvironmentInfo>()?),
5390            StructType::AgentOvfEnvironmentInfoOvfProperty => Some(from.as_any_ref().downcast_ref::<AgentOvfEnvironmentInfoOvfProperty>()?),
5391            StructType::AgentSslTrust => Some(from.as_any_ref().downcast_ref::<AgentSslTrust>()?),
5392            StructType::AgentAnyCertificate => Some(from.as_any_ref().downcast_ref::<AgentAnyCertificate>()?),
5393            StructType::AgentPinnedPemCertificate => Some(from.as_any_ref().downcast_ref::<AgentPinnedPemCertificate>()?),
5394            StructType::AgentStoragePolicy => Some(from.as_any_ref().downcast_ref::<AgentStoragePolicy>()?),
5395            StructType::AgentVsanStoragePolicy => Some(from.as_any_ref().downcast_ref::<AgentVsanStoragePolicy>()?),
5396            StructType::AgentVibMatchingRule => Some(from.as_any_ref().downcast_ref::<AgentVibMatchingRule>()?),
5397            StructType::AgentVmHook => Some(from.as_any_ref().downcast_ref::<AgentVmHook>()?),
5398            StructType::EamObjectRuntimeInfo => Some(from.as_any_ref().downcast_ref::<EamObjectRuntimeInfo>()?),
5399            StructType::AgentRuntimeInfo => Some(from.as_any_ref().downcast_ref::<AgentRuntimeInfo>()?),
5400            StructType::Issue => Some(from.as_any_ref().downcast_ref::<Issue>()?),
5401            StructType::AgencyIssue => Some(from.as_any_ref().downcast_ref::<AgencyIssue>()?),
5402            StructType::AgencyDisabled => Some(from.as_any_ref().downcast_ref::<AgencyDisabled>()?),
5403            StructType::AgentIssue => Some(from.as_any_ref().downcast_ref::<AgentIssue>()?),
5404            StructType::EamCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<EamCertificateNotTrusted>()?),
5405            StructType::HostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInPartialMaintenanceMode>()?),
5406            StructType::ManagedHostNotReachable => Some(from.as_any_ref().downcast_ref::<ManagedHostNotReachable>()?),
5407            StructType::MissingDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<MissingDvFilterSwitch>()?),
5408            StructType::OvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<OvfInvalidProperty>()?),
5409            StructType::TransitionFailed => Some(from.as_any_ref().downcast_ref::<TransitionFailed>()?),
5410            StructType::VibIssue => Some(from.as_any_ref().downcast_ref::<VibIssue>()?),
5411            StructType::ImmediateHostRebootRequired => Some(from.as_any_ref().downcast_ref::<ImmediateHostRebootRequired>()?),
5412            StructType::VibCannotPutHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostInMaintenanceMode>()?),
5413            StructType::VibCannotPutHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostOutOfMaintenanceMode>()?),
5414            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
5415            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
5416            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
5417            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
5418            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
5419            StructType::VibRequiresHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibRequiresHostInMaintenanceMode>()?),
5420            StructType::VibRequiresHostReboot => Some(from.as_any_ref().downcast_ref::<VibRequiresHostReboot>()?),
5421            StructType::VibRequiresManualInstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualInstallation>()?),
5422            StructType::VibRequiresManualUninstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualUninstallation>()?),
5423            StructType::VmIssue => Some(from.as_any_ref().downcast_ref::<VmIssue>()?),
5424            StructType::InvalidConfig => Some(from.as_any_ref().downcast_ref::<InvalidConfig>()?),
5425            StructType::VmCorrupted => Some(from.as_any_ref().downcast_ref::<VmCorrupted>()?),
5426            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
5427            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
5428            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
5429            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
5430            StructType::VmHookFailed => Some(from.as_any_ref().downcast_ref::<VmHookFailed>()?),
5431            StructType::VmHookTimedout => Some(from.as_any_ref().downcast_ref::<VmHookTimedout>()?),
5432            StructType::VmInaccessible => Some(from.as_any_ref().downcast_ref::<VmInaccessible>()?),
5433            StructType::VmMarkedAsTemplate => Some(from.as_any_ref().downcast_ref::<VmMarkedAsTemplate>()?),
5434            StructType::VmOrphaned => Some(from.as_any_ref().downcast_ref::<VmOrphaned>()?),
5435            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
5436            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
5437            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
5438            StructType::VmPoweredOn => Some(from.as_any_ref().downcast_ref::<VmPoweredOn>()?),
5439            StructType::VmProtected => Some(from.as_any_ref().downcast_ref::<VmProtected>()?),
5440            StructType::VmSuspended => Some(from.as_any_ref().downcast_ref::<VmSuspended>()?),
5441            StructType::VmWrongFolder => Some(from.as_any_ref().downcast_ref::<VmWrongFolder>()?),
5442            StructType::VmWrongResourcePool => Some(from.as_any_ref().downcast_ref::<VmWrongResourcePool>()?),
5443            StructType::VmNotDeployed => Some(from.as_any_ref().downcast_ref::<VmNotDeployed>()?),
5444            StructType::CannotAccessAgentOvf => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentOvf>()?),
5445            StructType::IncompatibleHostVersion => Some(from.as_any_ref().downcast_ref::<IncompatibleHostVersion>()?),
5446            StructType::InsufficientResources => Some(from.as_any_ref().downcast_ref::<InsufficientResources>()?),
5447            StructType::InsufficientSpace => Some(from.as_any_ref().downcast_ref::<InsufficientSpace>()?),
5448            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
5449            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
5450            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
5451            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
5452            StructType::NoDiscoverableAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmDatastore>()?),
5453            StructType::NoDiscoverableAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmNetwork>()?),
5454            StructType::OvfInvalidFormat => Some(from.as_any_ref().downcast_ref::<OvfInvalidFormat>()?),
5455            StructType::VmRequiresHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VmRequiresHostOutOfMaintenanceMode>()?),
5456            StructType::PersonalityAgentPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgentPmIssue>()?),
5457            StructType::PersonalityAgentAwaitingPmRemediation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentAwaitingPmRemediation>()?),
5458            StructType::PersonalityAgentBlockedByAgencyOperation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentBlockedByAgencyOperation>()?),
5459            StructType::OrphanedAgency => Some(from.as_any_ref().downcast_ref::<OrphanedAgency>()?),
5460            StructType::ClusterAgentAgentIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentAgentIssue>()?),
5461            StructType::ClusterAgentOvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<ClusterAgentOvfInvalidProperty>()?),
5462            StructType::ClusterAgentTransitionFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentTransitionFailed>()?),
5463            StructType::ClusterAgentVmIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmIssue>()?),
5464            StructType::ClusterAgentHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInMaintenanceMode>()?),
5465            StructType::ClusterAgentHostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInPartialMaintenanceMode>()?),
5466            StructType::ClusterAgentInvalidConfig => Some(from.as_any_ref().downcast_ref::<ClusterAgentInvalidConfig>()?),
5467            StructType::ClusterAgentVmHookFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookFailed>()?),
5468            StructType::ClusterAgentVmHookTimedout => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookTimedout>()?),
5469            StructType::ClusterAgentVmInaccessible => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmInaccessible>()?),
5470            StructType::ClusterAgentVmNotRemoved => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotRemoved>()?),
5471            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
5472            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
5473            StructType::ClusterAgentVmPoweredOn => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOn>()?),
5474            StructType::ClusterAgentVmProtected => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmProtected>()?),
5475            StructType::ClusterAgentVmSuspended => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmSuspended>()?),
5476            StructType::ClusterAgentVmNotDeployed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotDeployed>()?),
5477            StructType::ClusterAgentCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<ClusterAgentCertificateNotTrusted>()?),
5478            StructType::ClusterAgentInsufficientClusterSpace => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterSpace>()?),
5479            StructType::ClusterAgentMissingClusterVmDatastore => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmDatastore>()?),
5480            StructType::ClusterAgentMissingClusterVmNetwork => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmNetwork>()?),
5481            StructType::IntegrityAgencyVumIssue => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumIssue>()?),
5482            StructType::IntegrityAgencyCannotDeleteSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotDeleteSoftware>()?),
5483            StructType::IntegrityAgencyCannotStageSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotStageSoftware>()?),
5484            StructType::IntegrityAgencyVumUnavailable => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumUnavailable>()?),
5485            StructType::PersonalityAgencyPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmIssue>()?),
5486            StructType::PersonalityAgencyCannotConfigureSolutions => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotConfigureSolutions>()?),
5487            StructType::PersonalityAgencyDepotIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyDepotIssue>()?),
5488            StructType::PersonalityAgencyCannotUploadDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotUploadDepot>()?),
5489            StructType::PersonalityAgencyInaccessibleDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInaccessibleDepot>()?),
5490            StructType::PersonalityAgencyInvalidDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInvalidDepot>()?),
5491            StructType::PersonalityAgencyPmUnavailable => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmUnavailable>()?),
5492            StructType::ExtensibleIssue => Some(from.as_any_ref().downcast_ref::<ExtensibleIssue>()?),
5493            StructType::HostIssue => Some(from.as_any_ref().downcast_ref::<HostIssue>()?),
5494            StructType::OrphanedDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<OrphanedDvFilterSwitch>()?),
5495            StructType::UnknownAgentVm => Some(from.as_any_ref().downcast_ref::<UnknownAgentVm>()?),
5496            StructType::HooksHookListSpec => Some(from.as_any_ref().downcast_ref::<HooksHookListSpec>()?),
5497            StructType::HooksMarkAsProcessedSpec => Some(from.as_any_ref().downcast_ref::<HooksMarkAsProcessedSpec>()?),
5498            StructType::SolutionsApplySpec => Some(from.as_any_ref().downcast_ref::<SolutionsApplySpec>()?),
5499            StructType::SolutionsClusterSolutionComplianceResult => Some(from.as_any_ref().downcast_ref::<SolutionsClusterSolutionComplianceResult>()?),
5500            StructType::SolutionsComplianceResult => Some(from.as_any_ref().downcast_ref::<SolutionsComplianceResult>()?),
5501            StructType::SolutionsComplianceSpec => Some(from.as_any_ref().downcast_ref::<SolutionsComplianceSpec>()?),
5502            StructType::SolutionsDeploymentUnitComplianceResult => Some(from.as_any_ref().downcast_ref::<SolutionsDeploymentUnitComplianceResult>()?),
5503            StructType::SolutionsHookAcknowledgeConfig => Some(from.as_any_ref().downcast_ref::<SolutionsHookAcknowledgeConfig>()?),
5504            StructType::SolutionsInteractiveHookAcknowledgeConfig => Some(from.as_any_ref().downcast_ref::<SolutionsInteractiveHookAcknowledgeConfig>()?),
5505            StructType::SolutionsHookConfig => Some(from.as_any_ref().downcast_ref::<SolutionsHookConfig>()?),
5506            StructType::SolutionsHookInfo => Some(from.as_any_ref().downcast_ref::<SolutionsHookInfo>()?),
5507            StructType::SolutionsHostComplianceResult => Some(from.as_any_ref().downcast_ref::<SolutionsHostComplianceResult>()?),
5508            StructType::SolutionsOvfProperty => Some(from.as_any_ref().downcast_ref::<SolutionsOvfProperty>()?),
5509            StructType::SolutionsSolutionComplianceResult => Some(from.as_any_ref().downcast_ref::<SolutionsSolutionComplianceResult>()?),
5510            StructType::SolutionsSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsSolutionConfig>()?),
5511            StructType::SolutionsSolutionValidationResult => Some(from.as_any_ref().downcast_ref::<SolutionsSolutionValidationResult>()?),
5512            StructType::SolutionsStoragePolicy => Some(from.as_any_ref().downcast_ref::<SolutionsStoragePolicy>()?),
5513            StructType::SolutionsProfileIdStoragePolicy => Some(from.as_any_ref().downcast_ref::<SolutionsProfileIdStoragePolicy>()?),
5514            StructType::SolutionsTransitionSpec => Some(from.as_any_ref().downcast_ref::<SolutionsTransitionSpec>()?),
5515            StructType::SolutionsTypeSpecificSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsTypeSpecificSolutionConfig>()?),
5516            StructType::SolutionsClusterBoundSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsClusterBoundSolutionConfig>()?),
5517            StructType::SolutionsHostBoundSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsHostBoundSolutionConfig>()?),
5518            StructType::SolutionsVmNetworkMapping => Some(from.as_any_ref().downcast_ref::<SolutionsVmNetworkMapping>()?),
5519            StructType::SolutionsVmSource => Some(from.as_any_ref().downcast_ref::<SolutionsVmSource>()?),
5520            StructType::SolutionsUrlVmSource => Some(from.as_any_ref().downcast_ref::<SolutionsUrlVmSource>()?),
5521            StructType::SolutionsValidateSpec => Some(from.as_any_ref().downcast_ref::<SolutionsValidateSpec>()?),
5522            StructType::SolutionsValidationResult => Some(from.as_any_ref().downcast_ref::<SolutionsValidationResult>()?),
5523            StructType::SolutionsVmResourceSpec => Some(from.as_any_ref().downcast_ref::<SolutionsVmResourceSpec>()?),
5524            StructType::VibVibInfo => Some(from.as_any_ref().downcast_ref::<VibVibInfo>()?),
5525            StructType::VibVibInfoSoftwareTags => Some(from.as_any_ref().downcast_ref::<VibVibInfoSoftwareTags>()?),
5526            StructType::VibVibServicesSslTrust => Some(from.as_any_ref().downcast_ref::<VibVibServicesSslTrust>()?),
5527            StructType::VibVibServicesAnyCertificate => Some(from.as_any_ref().downcast_ref::<VibVibServicesAnyCertificate>()?),
5528            StructType::VibVibServicesPinnedPemCertificate => Some(from.as_any_ref().downcast_ref::<VibVibServicesPinnedPemCertificate>()?),
5529            StructType::PbmAboutInfo => Some(from.as_any_ref().downcast_ref::<PbmAboutInfo>()?),
5530            StructType::PbmExtendedElementDescription => Some(from.as_any_ref().downcast_ref::<PbmExtendedElementDescription>()?),
5531            StructType::PbmLoggingConfiguration => Some(from.as_any_ref().downcast_ref::<PbmLoggingConfiguration>()?),
5532            StructType::PbmServerObjectRef => Some(from.as_any_ref().downcast_ref::<PbmServerObjectRef>()?),
5533            StructType::PbmServiceInstanceContent => Some(from.as_any_ref().downcast_ref::<PbmServiceInstanceContent>()?),
5534            StructType::PbmCapabilityInstance => Some(from.as_any_ref().downcast_ref::<PbmCapabilityInstance>()?),
5535            StructType::PbmCapabilityMetadata => Some(from.as_any_ref().downcast_ref::<PbmCapabilityMetadata>()?),
5536            StructType::PbmCapabilityMetadataUniqueId => Some(from.as_any_ref().downcast_ref::<PbmCapabilityMetadataUniqueId>()?),
5537            StructType::PbmCapabilityConstraintInstance => Some(from.as_any_ref().downcast_ref::<PbmCapabilityConstraintInstance>()?),
5538            StructType::PbmCapabilityPropertyInstance => Some(from.as_any_ref().downcast_ref::<PbmCapabilityPropertyInstance>()?),
5539            StructType::PbmCapabilityPropertyMetadata => Some(from.as_any_ref().downcast_ref::<PbmCapabilityPropertyMetadata>()?),
5540            StructType::PbmCapabilityTypeInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityTypeInfo>()?),
5541            StructType::PbmCapabilityGenericTypeInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityGenericTypeInfo>()?),
5542            StructType::PbmCapabilityMetadataPerCategory => Some(from.as_any_ref().downcast_ref::<PbmCapabilityMetadataPerCategory>()?),
5543            StructType::PbmCapabilitySchema => Some(from.as_any_ref().downcast_ref::<PbmCapabilitySchema>()?),
5544            StructType::PbmCapabilityNamespaceInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityNamespaceInfo>()?),
5545            StructType::PbmCapabilitySchemaVendorInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilitySchemaVendorInfo>()?),
5546            StructType::PbmCapabilityVendorNamespaceInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityVendorNamespaceInfo>()?),
5547            StructType::PbmCapabilityVendorResourceTypeInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityVendorResourceTypeInfo>()?),
5548            StructType::PbmLineOfServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmLineOfServiceInfo>()?),
5549            StructType::PbmPersistenceBasedDataServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmPersistenceBasedDataServiceInfo>()?),
5550            StructType::PbmVaioDataServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmVaioDataServiceInfo>()?),
5551            StructType::PbmCapabilityDescription => Some(from.as_any_ref().downcast_ref::<PbmCapabilityDescription>()?),
5552            StructType::PbmCapabilityDiscreteSet => Some(from.as_any_ref().downcast_ref::<PbmCapabilityDiscreteSet>()?),
5553            StructType::PbmCapabilityRange => Some(from.as_any_ref().downcast_ref::<PbmCapabilityRange>()?),
5554            StructType::PbmCapabilityTimeSpan => Some(from.as_any_ref().downcast_ref::<PbmCapabilityTimeSpan>()?),
5555            StructType::PbmComplianceResult => Some(from.as_any_ref().downcast_ref::<PbmComplianceResult>()?),
5556            StructType::PbmFetchEntityHealthStatusSpec => Some(from.as_any_ref().downcast_ref::<PbmFetchEntityHealthStatusSpec>()?),
5557            StructType::PbmComplianceOperationalStatus => Some(from.as_any_ref().downcast_ref::<PbmComplianceOperationalStatus>()?),
5558            StructType::PbmCompliancePolicyStatus => Some(from.as_any_ref().downcast_ref::<PbmCompliancePolicyStatus>()?),
5559            StructType::PbmRollupComplianceResult => Some(from.as_any_ref().downcast_ref::<PbmRollupComplianceResult>()?),
5560            StructType::PbmFaultNoPermissionEntityPrivileges => Some(from.as_any_ref().downcast_ref::<PbmFaultNoPermissionEntityPrivileges>()?),
5561            StructType::PbmPlacementCompatibilityResult => Some(from.as_any_ref().downcast_ref::<PbmPlacementCompatibilityResult>()?),
5562            StructType::PbmPlacementMatchingResources => Some(from.as_any_ref().downcast_ref::<PbmPlacementMatchingResources>()?),
5563            StructType::PbmPlacementMatchingReplicationResources => Some(from.as_any_ref().downcast_ref::<PbmPlacementMatchingReplicationResources>()?),
5564            StructType::PbmPlacementHub => Some(from.as_any_ref().downcast_ref::<PbmPlacementHub>()?),
5565            StructType::PbmPlacementRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementRequirement>()?),
5566            StructType::PbmPlacementCapabilityConstraintsRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementCapabilityConstraintsRequirement>()?),
5567            StructType::PbmPlacementCapabilityProfileRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementCapabilityProfileRequirement>()?),
5568            StructType::PbmPlacementResourceUtilization => Some(from.as_any_ref().downcast_ref::<PbmPlacementResourceUtilization>()?),
5569            StructType::PbmCapabilityProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<PbmCapabilityProfileCreateSpec>()?),
5570            StructType::PbmCapabilityProfileUpdateSpec => Some(from.as_any_ref().downcast_ref::<PbmCapabilityProfileUpdateSpec>()?),
5571            StructType::PbmCapabilityConstraints => Some(from.as_any_ref().downcast_ref::<PbmCapabilityConstraints>()?),
5572            StructType::PbmCapabilitySubProfileConstraints => Some(from.as_any_ref().downcast_ref::<PbmCapabilitySubProfileConstraints>()?),
5573            StructType::PbmDataServiceToPoliciesMap => Some(from.as_any_ref().downcast_ref::<PbmDataServiceToPoliciesMap>()?),
5574            StructType::PbmDefaultProfileInfo => Some(from.as_any_ref().downcast_ref::<PbmDefaultProfileInfo>()?),
5575            StructType::PbmProfile => Some(from.as_any_ref().downcast_ref::<PbmProfile>()?),
5576            StructType::PbmCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmCapabilityProfile>()?),
5577            StructType::PbmDefaultCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmDefaultCapabilityProfile>()?),
5578            StructType::PbmProfileId => Some(from.as_any_ref().downcast_ref::<PbmProfileId>()?),
5579            StructType::PbmProfileOperationOutcome => Some(from.as_any_ref().downcast_ref::<PbmProfileOperationOutcome>()?),
5580            StructType::PbmProfileType => Some(from.as_any_ref().downcast_ref::<PbmProfileType>()?),
5581            StructType::PbmQueryProfileResult => Some(from.as_any_ref().downcast_ref::<PbmQueryProfileResult>()?),
5582            StructType::PbmProfileResourceType => Some(from.as_any_ref().downcast_ref::<PbmProfileResourceType>()?),
5583            StructType::PbmCapabilitySubProfile => Some(from.as_any_ref().downcast_ref::<PbmCapabilitySubProfile>()?),
5584            StructType::PbmDatastoreSpaceStatistics => Some(from.as_any_ref().downcast_ref::<PbmDatastoreSpaceStatistics>()?),
5585            StructType::PbmQueryReplicationGroupResult => Some(from.as_any_ref().downcast_ref::<PbmQueryReplicationGroupResult>()?),
5586            StructType::SmsAboutInfo => Some(from.as_any_ref().downcast_ref::<SmsAboutInfo>()?),
5587            StructType::EntityReference => Some(from.as_any_ref().downcast_ref::<EntityReference>()?),
5588            StructType::FaultDomainFilter => Some(from.as_any_ref().downcast_ref::<FaultDomainFilter>()?),
5589            StructType::ReplicationGroupFilter => Some(from.as_any_ref().downcast_ref::<ReplicationGroupFilter>()?),
5590            StructType::SmsTaskInfo => Some(from.as_any_ref().downcast_ref::<SmsTaskInfo>()?),
5591            StructType::AlarmFilter => Some(from.as_any_ref().downcast_ref::<AlarmFilter>()?),
5592            StructType::AlarmResult => Some(from.as_any_ref().downcast_ref::<AlarmResult>()?),
5593            StructType::SmsProviderInfo => Some(from.as_any_ref().downcast_ref::<SmsProviderInfo>()?),
5594            StructType::VasaProviderInfo => Some(from.as_any_ref().downcast_ref::<VasaProviderInfo>()?),
5595            StructType::SmsProviderSpec => Some(from.as_any_ref().downcast_ref::<SmsProviderSpec>()?),
5596            StructType::VasaProviderSpec => Some(from.as_any_ref().downcast_ref::<VasaProviderSpec>()?),
5597            StructType::VasaProviderUpgradeSpec => Some(from.as_any_ref().downcast_ref::<VasaProviderUpgradeSpec>()?),
5598            StructType::RelatedStorageArray => Some(from.as_any_ref().downcast_ref::<RelatedStorageArray>()?),
5599            StructType::SupportedVendorModelMapping => Some(from.as_any_ref().downcast_ref::<SupportedVendorModelMapping>()?),
5600            StructType::BackingConfig => Some(from.as_any_ref().downcast_ref::<BackingConfig>()?),
5601            StructType::BackingStoragePool => Some(from.as_any_ref().downcast_ref::<BackingStoragePool>()?),
5602            StructType::DatastoreBackingPoolMapping => Some(from.as_any_ref().downcast_ref::<DatastoreBackingPoolMapping>()?),
5603            StructType::DatastorePair => Some(from.as_any_ref().downcast_ref::<DatastorePair>()?),
5604            StructType::DrsMigrationCapabilityResult => Some(from.as_any_ref().downcast_ref::<DrsMigrationCapabilityResult>()?),
5605            StructType::FaultDomainProviderMapping => Some(from.as_any_ref().downcast_ref::<FaultDomainProviderMapping>()?),
5606            StructType::StorageFileSystemInfo => Some(from.as_any_ref().downcast_ref::<StorageFileSystemInfo>()?),
5607            StructType::LunHbaAssociation => Some(from.as_any_ref().downcast_ref::<LunHbaAssociation>()?),
5608            StructType::NameValuePair => Some(from.as_any_ref().downcast_ref::<NameValuePair>()?),
5609            StructType::StorageAlarm => Some(from.as_any_ref().downcast_ref::<StorageAlarm>()?),
5610            StructType::StorageArray => Some(from.as_any_ref().downcast_ref::<StorageArray>()?),
5611            StructType::StorageCapability => Some(from.as_any_ref().downcast_ref::<StorageCapability>()?),
5612            StructType::StorageContainer => Some(from.as_any_ref().downcast_ref::<StorageContainer>()?),
5613            StructType::StorageContainerResult => Some(from.as_any_ref().downcast_ref::<StorageContainerResult>()?),
5614            StructType::StorageContainerSpec => Some(from.as_any_ref().downcast_ref::<StorageContainerSpec>()?),
5615            StructType::StorageFileSystem => Some(from.as_any_ref().downcast_ref::<StorageFileSystem>()?),
5616            StructType::StorageLun => Some(from.as_any_ref().downcast_ref::<StorageLun>()?),
5617            StructType::StoragePort => Some(from.as_any_ref().downcast_ref::<StoragePort>()?),
5618            StructType::FcStoragePort => Some(from.as_any_ref().downcast_ref::<FcStoragePort>()?),
5619            StructType::FcoeStoragePort => Some(from.as_any_ref().downcast_ref::<FcoeStoragePort>()?),
5620            StructType::IscsiStoragePort => Some(from.as_any_ref().downcast_ref::<IscsiStoragePort>()?),
5621            StructType::StorageProcessor => Some(from.as_any_ref().downcast_ref::<StorageProcessor>()?),
5622            StructType::DeviceId => Some(from.as_any_ref().downcast_ref::<DeviceId>()?),
5623            StructType::VVolId => Some(from.as_any_ref().downcast_ref::<VVolId>()?),
5624            StructType::VasaVirtualDiskId => Some(from.as_any_ref().downcast_ref::<VasaVirtualDiskId>()?),
5625            StructType::VirtualDiskKey => Some(from.as_any_ref().downcast_ref::<VirtualDiskKey>()?),
5626            StructType::VirtualDiskMoId => Some(from.as_any_ref().downcast_ref::<VirtualDiskMoId>()?),
5627            StructType::VirtualMachineId => Some(from.as_any_ref().downcast_ref::<VirtualMachineId>()?),
5628            StructType::VirtualMachineFilePath => Some(from.as_any_ref().downcast_ref::<VirtualMachineFilePath>()?),
5629            StructType::VirtualMachineMoId => Some(from.as_any_ref().downcast_ref::<VirtualMachineMoId>()?),
5630            StructType::VirtualMachineUuid => Some(from.as_any_ref().downcast_ref::<VirtualMachineUuid>()?),
5631            StructType::FailoverParam => Some(from.as_any_ref().downcast_ref::<FailoverParam>()?),
5632            StructType::TestFailoverParam => Some(from.as_any_ref().downcast_ref::<TestFailoverParam>()?),
5633            StructType::PolicyAssociation => Some(from.as_any_ref().downcast_ref::<PolicyAssociation>()?),
5634            StructType::ReplicationGroupData => Some(from.as_any_ref().downcast_ref::<ReplicationGroupData>()?),
5635            StructType::RecoveredDevice => Some(from.as_any_ref().downcast_ref::<RecoveredDevice>()?),
5636            StructType::RecoveredDiskInfo => Some(from.as_any_ref().downcast_ref::<RecoveredDiskInfo>()?),
5637            StructType::GroupInfo => Some(from.as_any_ref().downcast_ref::<GroupInfo>()?),
5638            StructType::SourceGroupInfo => Some(from.as_any_ref().downcast_ref::<SourceGroupInfo>()?),
5639            StructType::TargetGroupInfo => Some(from.as_any_ref().downcast_ref::<TargetGroupInfo>()?),
5640            StructType::GroupOperationResult => Some(from.as_any_ref().downcast_ref::<GroupOperationResult>()?),
5641            StructType::FailoverSuccessResult => Some(from.as_any_ref().downcast_ref::<FailoverSuccessResult>()?),
5642            StructType::GroupErrorResult => Some(from.as_any_ref().downcast_ref::<GroupErrorResult>()?),
5643            StructType::QueryPointInTimeReplicaSuccessResult => Some(from.as_any_ref().downcast_ref::<QueryPointInTimeReplicaSuccessResult>()?),
5644            StructType::QueryPointInTimeReplicaSummaryResult => Some(from.as_any_ref().downcast_ref::<QueryPointInTimeReplicaSummaryResult>()?),
5645            StructType::QueryReplicationGroupSuccessResult => Some(from.as_any_ref().downcast_ref::<QueryReplicationGroupSuccessResult>()?),
5646            StructType::ReverseReplicationSuccessResult => Some(from.as_any_ref().downcast_ref::<ReverseReplicationSuccessResult>()?),
5647            StructType::SyncReplicationGroupSuccessResult => Some(from.as_any_ref().downcast_ref::<SyncReplicationGroupSuccessResult>()?),
5648            StructType::PointInTimeReplicaId => Some(from.as_any_ref().downcast_ref::<PointInTimeReplicaId>()?),
5649            StructType::PromoteParam => Some(from.as_any_ref().downcast_ref::<PromoteParam>()?),
5650            StructType::QueryPointInTimeReplicaParam => Some(from.as_any_ref().downcast_ref::<QueryPointInTimeReplicaParam>()?),
5651            StructType::ReplicaQueryIntervalParam => Some(from.as_any_ref().downcast_ref::<ReplicaQueryIntervalParam>()?),
5652            StructType::PointInTimeReplicaInfo => Some(from.as_any_ref().downcast_ref::<PointInTimeReplicaInfo>()?),
5653            StructType::ReplicaIntervalQueryResult => Some(from.as_any_ref().downcast_ref::<ReplicaIntervalQueryResult>()?),
5654            StructType::QueryReplicationPeerResult => Some(from.as_any_ref().downcast_ref::<QueryReplicationPeerResult>()?),
5655            StructType::ReplicaId => Some(from.as_any_ref().downcast_ref::<ReplicaId>()?),
5656            StructType::ReplicationTargetInfo => Some(from.as_any_ref().downcast_ref::<ReplicationTargetInfo>()?),
5657            StructType::SourceGroupMemberInfo => Some(from.as_any_ref().downcast_ref::<SourceGroupMemberInfo>()?),
5658            StructType::TargetDeviceId => Some(from.as_any_ref().downcast_ref::<TargetDeviceId>()?),
5659            StructType::TargetToSourceInfo => Some(from.as_any_ref().downcast_ref::<TargetToSourceInfo>()?),
5660            StructType::TargetGroupMemberInfo => Some(from.as_any_ref().downcast_ref::<TargetGroupMemberInfo>()?),
5661            StructType::RecoveredTargetGroupMemberInfo => Some(from.as_any_ref().downcast_ref::<RecoveredTargetGroupMemberInfo>()?),
5662            StructType::AboutInfo => Some(from.as_any_ref().downcast_ref::<AboutInfo>()?),
5663            StructType::AuthorizationDescription => Some(from.as_any_ref().downcast_ref::<AuthorizationDescription>()?),
5664            StructType::EntityPrivilege => Some(from.as_any_ref().downcast_ref::<EntityPrivilege>()?),
5665            StructType::Permission => Some(from.as_any_ref().downcast_ref::<Permission>()?),
5666            StructType::AuthorizationPrivilege => Some(from.as_any_ref().downcast_ref::<AuthorizationPrivilege>()?),
5667            StructType::PrivilegeAvailability => Some(from.as_any_ref().downcast_ref::<PrivilegeAvailability>()?),
5668            StructType::AuthorizationRole => Some(from.as_any_ref().downcast_ref::<AuthorizationRole>()?),
5669            StructType::UserPrivilegeResult => Some(from.as_any_ref().downcast_ref::<UserPrivilegeResult>()?),
5670            StructType::BatchResult => Some(from.as_any_ref().downcast_ref::<BatchResult>()?),
5671            StructType::Capability => Some(from.as_any_ref().downcast_ref::<Capability>()?),
5672            StructType::ClusterComputeResourceClusterConfigResult => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceClusterConfigResult>()?),
5673            StructType::ClusterComputeResourceCryptoModePolicy => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceCryptoModePolicy>()?),
5674            StructType::ClusterComputeResourceDvsSetting => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsSetting>()?),
5675            StructType::ClusterComputeResourceDvsSettingDvPortgroupToServiceMapping => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsSettingDvPortgroupToServiceMapping>()?),
5676            StructType::ClusterComputeResourceDvsProfile => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsProfile>()?),
5677            StructType::ClusterComputeResourceDvsProfileDvPortgroupSpecToServiceMapping => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsProfileDvPortgroupSpecToServiceMapping>()?),
5678            StructType::ClusterComputeResourceHciConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHciConfigInfo>()?),
5679            StructType::ClusterComputeResourceHciConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHciConfigSpec>()?),
5680            StructType::ClusterComputeResourceHostConfigurationInput => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostConfigurationInput>()?),
5681            StructType::ClusterComputeResourceHostConfigurationProfile => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostConfigurationProfile>()?),
5682            StructType::ClusterComputeResourceHostEvacuationInfo => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostEvacuationInfo>()?),
5683            StructType::ClusterComputeResourceHostVmkNicInfo => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostVmkNicInfo>()?),
5684            StructType::ClusterComputeResourceMaintenanceInfo => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceMaintenanceInfo>()?),
5685            StructType::ClusterComputeResourceVcProfile => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceVcProfile>()?),
5686            StructType::ClusterComputeResourceValidationResultBase => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceValidationResultBase>()?),
5687            StructType::ClusterComputeResourceDvsConfigurationValidation => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsConfigurationValidation>()?),
5688            StructType::ClusterComputeResourceHostConfigurationValidation => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostConfigurationValidation>()?),
5689            StructType::VsanClusterConfigPrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanClusterConfigPrecheckItem>()?),
5690            StructType::ClusterComputeResourceVcsSlots => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceVcsSlots>()?),
5691            StructType::ComputeResourceConfigInfo => Some(from.as_any_ref().downcast_ref::<ComputeResourceConfigInfo>()?),
5692            StructType::ClusterConfigInfoEx => Some(from.as_any_ref().downcast_ref::<ClusterConfigInfoEx>()?),
5693            StructType::ComputeResourceConfigSpec => Some(from.as_any_ref().downcast_ref::<ComputeResourceConfigSpec>()?),
5694            StructType::ClusterConfigSpecEx => Some(from.as_any_ref().downcast_ref::<ClusterConfigSpecEx>()?),
5695            StructType::ComputeResourceHostSpbmLicenseInfo => Some(from.as_any_ref().downcast_ref::<ComputeResourceHostSpbmLicenseInfo>()?),
5696            StructType::ComputeResourceHostSeedSpec => Some(from.as_any_ref().downcast_ref::<ComputeResourceHostSeedSpec>()?),
5697            StructType::ComputeResourceHostSeedSpecSingleHostSpec => Some(from.as_any_ref().downcast_ref::<ComputeResourceHostSeedSpecSingleHostSpec>()?),
5698            StructType::ComputeResourceSummary => Some(from.as_any_ref().downcast_ref::<ComputeResourceSummary>()?),
5699            StructType::ClusterComputeResourceSummary => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceSummary>()?),
5700            StructType::CustomFieldDef => Some(from.as_any_ref().downcast_ref::<CustomFieldDef>()?),
5701            StructType::CustomFieldValue => Some(from.as_any_ref().downcast_ref::<CustomFieldValue>()?),
5702            StructType::CustomFieldStringValue => Some(from.as_any_ref().downcast_ref::<CustomFieldStringValue>()?),
5703            StructType::CustomizationSpecInfo => Some(from.as_any_ref().downcast_ref::<CustomizationSpecInfo>()?),
5704            StructType::CustomizationSpecItem => Some(from.as_any_ref().downcast_ref::<CustomizationSpecItem>()?),
5705            StructType::DatacenterBasicConnectInfo => Some(from.as_any_ref().downcast_ref::<DatacenterBasicConnectInfo>()?),
5706            StructType::DatacenterConfigInfo => Some(from.as_any_ref().downcast_ref::<DatacenterConfigInfo>()?),
5707            StructType::DatacenterConfigSpec => Some(from.as_any_ref().downcast_ref::<DatacenterConfigSpec>()?),
5708            StructType::DatastoreCapability => Some(from.as_any_ref().downcast_ref::<DatastoreCapability>()?),
5709            StructType::DatastoreHostMount => Some(from.as_any_ref().downcast_ref::<DatastoreHostMount>()?),
5710            StructType::DatastoreInfo => Some(from.as_any_ref().downcast_ref::<DatastoreInfo>()?),
5711            StructType::LocalDatastoreInfo => Some(from.as_any_ref().downcast_ref::<LocalDatastoreInfo>()?),
5712            StructType::NasDatastoreInfo => Some(from.as_any_ref().downcast_ref::<NasDatastoreInfo>()?),
5713            StructType::PMemDatastoreInfo => Some(from.as_any_ref().downcast_ref::<PMemDatastoreInfo>()?),
5714            StructType::VmfsDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreInfo>()?),
5715            StructType::VsanDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VsanDatastoreInfo>()?),
5716            StructType::VvolDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VvolDatastoreInfo>()?),
5717            StructType::DatastoreMountPathDatastorePair => Some(from.as_any_ref().downcast_ref::<DatastoreMountPathDatastorePair>()?),
5718            StructType::DatastoreSummary => Some(from.as_any_ref().downcast_ref::<DatastoreSummary>()?),
5719            StructType::DatastoreVVolContainerFailoverPair => Some(from.as_any_ref().downcast_ref::<DatastoreVVolContainerFailoverPair>()?),
5720            StructType::DatastoreNamespaceManagerDirectoryInfo => Some(from.as_any_ref().downcast_ref::<DatastoreNamespaceManagerDirectoryInfo>()?),
5721            StructType::Description => Some(from.as_any_ref().downcast_ref::<Description>()?),
5722            StructType::ElementDescription => Some(from.as_any_ref().downcast_ref::<ElementDescription>()?),
5723            StructType::EvcMode => Some(from.as_any_ref().downcast_ref::<EvcMode>()?),
5724            StructType::ExtendedElementDescription => Some(from.as_any_ref().downcast_ref::<ExtendedElementDescription>()?),
5725            StructType::FeatureEvcMode => Some(from.as_any_ref().downcast_ref::<FeatureEvcMode>()?),
5726            StructType::OptionDef => Some(from.as_any_ref().downcast_ref::<OptionDef>()?),
5727            StructType::ExtendedDescription => Some(from.as_any_ref().downcast_ref::<ExtendedDescription>()?),
5728            StructType::MethodDescription => Some(from.as_any_ref().downcast_ref::<MethodDescription>()?),
5729            StructType::TypeDescription => Some(from.as_any_ref().downcast_ref::<TypeDescription>()?),
5730            StructType::ScheduledTaskDetail => Some(from.as_any_ref().downcast_ref::<ScheduledTaskDetail>()?),
5731            StructType::DesiredSoftwareSpec => Some(from.as_any_ref().downcast_ref::<DesiredSoftwareSpec>()?),
5732            StructType::DesiredSoftwareSpecBaseImageSpec => Some(from.as_any_ref().downcast_ref::<DesiredSoftwareSpecBaseImageSpec>()?),
5733            StructType::DesiredSoftwareSpecComponentSpec => Some(from.as_any_ref().downcast_ref::<DesiredSoftwareSpecComponentSpec>()?),
5734            StructType::DesiredSoftwareSpecVendorAddOnSpec => Some(from.as_any_ref().downcast_ref::<DesiredSoftwareSpecVendorAddOnSpec>()?),
5735            StructType::DiagnosticManagerAuditRecordResult => Some(from.as_any_ref().downcast_ref::<DiagnosticManagerAuditRecordResult>()?),
5736            StructType::DiagnosticManagerBundleInfo => Some(from.as_any_ref().downcast_ref::<DiagnosticManagerBundleInfo>()?),
5737            StructType::DiagnosticManagerLogDescriptor => Some(from.as_any_ref().downcast_ref::<DiagnosticManagerLogDescriptor>()?),
5738            StructType::DiagnosticManagerLogHeader => Some(from.as_any_ref().downcast_ref::<DiagnosticManagerLogHeader>()?),
5739            StructType::DirectPathProfileManagerCapacityQuerySpec => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQuerySpec>()?),
5740            StructType::DirectPathProfileManagerCapacityQueryByDeviceConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryByDeviceConfig>()?),
5741            StructType::DirectPathProfileManagerCapacityQueryById => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryById>()?),
5742            StructType::DirectPathProfileManagerCapacityQueryByName => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryByName>()?),
5743            StructType::DirectPathProfileManagerCapacityResult => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityResult>()?),
5744            StructType::DirectPathProfileManagerCapacityInfo => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityInfo>()?),
5745            StructType::DirectPathProfileManagerCapacityUnknown => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityUnknown>()?),
5746            StructType::DirectPathProfileManagerCreateSpec => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCreateSpec>()?),
5747            StructType::DirectPathProfileManagerDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDirectPathConfig>()?),
5748            StructType::DirectPathProfileManagerDvxDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDvxDirectPathConfig>()?),
5749            StructType::DirectPathProfileManagerDynamicDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDynamicDirectPathConfig>()?),
5750            StructType::DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig>()?),
5751            StructType::DirectPathProfileManagerVmiopDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerVmiopDirectPathConfig>()?),
5752            StructType::DirectPathProfileInfo => Some(from.as_any_ref().downcast_ref::<DirectPathProfileInfo>()?),
5753            StructType::DirectPathProfileManagerFilterSpec => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerFilterSpec>()?),
5754            StructType::DirectPathProfileManagerTargetEntity => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetEntity>()?),
5755            StructType::DirectPathProfileManagerTargetCluster => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetCluster>()?),
5756            StructType::DirectPathProfileManagerTargetHost => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetHost>()?),
5757            StructType::DirectPathProfileManagerUpdateSpec => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerUpdateSpec>()?),
5758            StructType::DvsBackupRestoreCapability => Some(from.as_any_ref().downcast_ref::<DvsBackupRestoreCapability>()?),
5759            StructType::DvsCapability => Some(from.as_any_ref().downcast_ref::<DvsCapability>()?),
5760            StructType::DvsConfigInfo => Some(from.as_any_ref().downcast_ref::<DvsConfigInfo>()?),
5761            StructType::VMwareDvsConfigInfo => Some(from.as_any_ref().downcast_ref::<VMwareDvsConfigInfo>()?),
5762            StructType::DvsConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsConfigSpec>()?),
5763            StructType::VMwareDvsConfigSpec => Some(from.as_any_ref().downcast_ref::<VMwareDvsConfigSpec>()?),
5764            StructType::DvsContactInfo => Some(from.as_any_ref().downcast_ref::<DvsContactInfo>()?),
5765            StructType::DvsCreateSpec => Some(from.as_any_ref().downcast_ref::<DvsCreateSpec>()?),
5766            StructType::DvsFeatureCapability => Some(from.as_any_ref().downcast_ref::<DvsFeatureCapability>()?),
5767            StructType::VMwareDvsFeatureCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsFeatureCapability>()?),
5768            StructType::DvsHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<DvsHealthCheckConfig>()?),
5769            StructType::VMwareDvsHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsHealthCheckConfig>()?),
5770            StructType::VMwareDvsTeamingHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsTeamingHealthCheckConfig>()?),
5771            StructType::VMwareDvsVlanMtuHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanMtuHealthCheckConfig>()?),
5772            StructType::DvsHealthCheckCapability => Some(from.as_any_ref().downcast_ref::<DvsHealthCheckCapability>()?),
5773            StructType::VMwareDvsHealthCheckCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsHealthCheckCapability>()?),
5774            StructType::DvsHostInfrastructureTrafficResource => Some(from.as_any_ref().downcast_ref::<DvsHostInfrastructureTrafficResource>()?),
5775            StructType::DvsHostInfrastructureTrafficResourceAllocation => Some(from.as_any_ref().downcast_ref::<DvsHostInfrastructureTrafficResourceAllocation>()?),
5776            StructType::DvsNetworkResourceManagementCapability => Some(from.as_any_ref().downcast_ref::<DvsNetworkResourceManagementCapability>()?),
5777            StructType::DvsResourceRuntimeInfo => Some(from.as_any_ref().downcast_ref::<DvsResourceRuntimeInfo>()?),
5778            StructType::DvsRollbackCapability => Some(from.as_any_ref().downcast_ref::<DvsRollbackCapability>()?),
5779            StructType::DvsRuntimeInfo => Some(from.as_any_ref().downcast_ref::<DvsRuntimeInfo>()?),
5780            StructType::DvsSummary => Some(from.as_any_ref().downcast_ref::<DvsSummary>()?),
5781            StructType::DvsPolicy => Some(from.as_any_ref().downcast_ref::<DvsPolicy>()?),
5782            StructType::DvsUplinkPortPolicy => Some(from.as_any_ref().downcast_ref::<DvsUplinkPortPolicy>()?),
5783            StructType::DvsNameArrayUplinkPortPolicy => Some(from.as_any_ref().downcast_ref::<DvsNameArrayUplinkPortPolicy>()?),
5784            StructType::EnumDescription => Some(from.as_any_ref().downcast_ref::<EnumDescription>()?),
5785            StructType::EnvironmentBrowserConfigOptionQuerySpec => Some(from.as_any_ref().downcast_ref::<EnvironmentBrowserConfigOptionQuerySpec>()?),
5786            StructType::Extension => Some(from.as_any_ref().downcast_ref::<Extension>()?),
5787            StructType::ExtensionClientInfo => Some(from.as_any_ref().downcast_ref::<ExtensionClientInfo>()?),
5788            StructType::ExtensionEventTypeInfo => Some(from.as_any_ref().downcast_ref::<ExtensionEventTypeInfo>()?),
5789            StructType::ExtensionFaultTypeInfo => Some(from.as_any_ref().downcast_ref::<ExtensionFaultTypeInfo>()?),
5790            StructType::ExtensionHealthInfo => Some(from.as_any_ref().downcast_ref::<ExtensionHealthInfo>()?),
5791            StructType::ExtensionOvfConsumerInfo => Some(from.as_any_ref().downcast_ref::<ExtensionOvfConsumerInfo>()?),
5792            StructType::ExtensionPrivilegeInfo => Some(from.as_any_ref().downcast_ref::<ExtensionPrivilegeInfo>()?),
5793            StructType::ExtensionResourceInfo => Some(from.as_any_ref().downcast_ref::<ExtensionResourceInfo>()?),
5794            StructType::ExtensionServerInfo => Some(from.as_any_ref().downcast_ref::<ExtensionServerInfo>()?),
5795            StructType::ExtensionTaskTypeInfo => Some(from.as_any_ref().downcast_ref::<ExtensionTaskTypeInfo>()?),
5796            StructType::ExtensionManagerIpAllocationUsage => Some(from.as_any_ref().downcast_ref::<ExtensionManagerIpAllocationUsage>()?),
5797            StructType::FaultsByHost => Some(from.as_any_ref().downcast_ref::<FaultsByHost>()?),
5798            StructType::FaultsByVm => Some(from.as_any_ref().downcast_ref::<FaultsByVm>()?),
5799            StructType::FileLockInfo => Some(from.as_any_ref().downcast_ref::<FileLockInfo>()?),
5800            StructType::FileLockInfoResult => Some(from.as_any_ref().downcast_ref::<FileLockInfoResult>()?),
5801            StructType::FolderBatchAddHostsToClusterResult => Some(from.as_any_ref().downcast_ref::<FolderBatchAddHostsToClusterResult>()?),
5802            StructType::FolderBatchAddStandaloneHostsResult => Some(from.as_any_ref().downcast_ref::<FolderBatchAddStandaloneHostsResult>()?),
5803            StructType::FolderExternallyManagedFolderInfo => Some(from.as_any_ref().downcast_ref::<FolderExternallyManagedFolderInfo>()?),
5804            StructType::FolderFailedHostResult => Some(from.as_any_ref().downcast_ref::<FolderFailedHostResult>()?),
5805            StructType::FolderNewHostSpec => Some(from.as_any_ref().downcast_ref::<FolderNewHostSpec>()?),
5806            StructType::HbrManagerReplicationVmInfo => Some(from.as_any_ref().downcast_ref::<HbrManagerReplicationVmInfo>()?),
5807            StructType::ReplicationVmProgressInfo => Some(from.as_any_ref().downcast_ref::<ReplicationVmProgressInfo>()?),
5808            StructType::HbrManagerVmReplicationCapability => Some(from.as_any_ref().downcast_ref::<HbrManagerVmReplicationCapability>()?),
5809            StructType::HbrReplicationTargetSpec => Some(from.as_any_ref().downcast_ref::<HbrReplicationTargetSpec>()?),
5810            StructType::HbrTargetSpecReplacement => Some(from.as_any_ref().downcast_ref::<HbrTargetSpecReplacement>()?),
5811            StructType::HbrTargetSpec => Some(from.as_any_ref().downcast_ref::<HbrTargetSpec>()?),
5812            StructType::HealthUpdate => Some(from.as_any_ref().downcast_ref::<HealthUpdate>()?),
5813            StructType::HealthUpdateInfo => Some(from.as_any_ref().downcast_ref::<HealthUpdateInfo>()?),
5814            StructType::PerfInterval => Some(from.as_any_ref().downcast_ref::<PerfInterval>()?),
5815            StructType::HostServiceTicket => Some(from.as_any_ref().downcast_ref::<HostServiceTicket>()?),
5816            StructType::HostSystemComplianceCheckState => Some(from.as_any_ref().downcast_ref::<HostSystemComplianceCheckState>()?),
5817            StructType::HostSystemReconnectSpec => Some(from.as_any_ref().downcast_ref::<HostSystemReconnectSpec>()?),
5818            StructType::HostSystemRemediationState => Some(from.as_any_ref().downcast_ref::<HostSystemRemediationState>()?),
5819            StructType::HttpNfcLeaseCapabilities => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseCapabilities>()?),
5820            StructType::HttpNfcLeaseDatastoreLeaseInfo => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseDatastoreLeaseInfo>()?),
5821            StructType::HttpNfcLeaseDeviceUrl => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseDeviceUrl>()?),
5822            StructType::HttpNfcLeaseHostInfo => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseHostInfo>()?),
5823            StructType::HttpNfcLeaseInfo => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseInfo>()?),
5824            StructType::HttpNfcLeaseManifestEntry => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseManifestEntry>()?),
5825            StructType::HttpNfcLeaseProbeResult => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseProbeResult>()?),
5826            StructType::HttpNfcLeaseSourceFile => Some(from.as_any_ref().downcast_ref::<HttpNfcLeaseSourceFile>()?),
5827            StructType::ImportSpec => Some(from.as_any_ref().downcast_ref::<ImportSpec>()?),
5828            StructType::VirtualAppImportSpec => Some(from.as_any_ref().downcast_ref::<VirtualAppImportSpec>()?),
5829            StructType::VirtualMachineImportSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineImportSpec>()?),
5830            StructType::InheritablePolicy => Some(from.as_any_ref().downcast_ref::<InheritablePolicy>()?),
5831            StructType::BoolPolicy => Some(from.as_any_ref().downcast_ref::<BoolPolicy>()?),
5832            StructType::IntPolicy => Some(from.as_any_ref().downcast_ref::<IntPolicy>()?),
5833            StructType::LongPolicy => Some(from.as_any_ref().downcast_ref::<LongPolicy>()?),
5834            StructType::StringPolicy => Some(from.as_any_ref().downcast_ref::<StringPolicy>()?),
5835            StructType::DvsFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsFilterConfig>()?),
5836            StructType::DvsFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterConfigSpec>()?),
5837            StructType::DvsTrafficFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfig>()?),
5838            StructType::DvsTrafficFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfigSpec>()?),
5839            StructType::DvsFilterPolicy => Some(from.as_any_ref().downcast_ref::<DvsFilterPolicy>()?),
5840            StructType::DvsTrafficShapingPolicy => Some(from.as_any_ref().downcast_ref::<DvsTrafficShapingPolicy>()?),
5841            StructType::DvsVendorSpecificConfig => Some(from.as_any_ref().downcast_ref::<DvsVendorSpecificConfig>()?),
5842            StructType::DvsFailureCriteria => Some(from.as_any_ref().downcast_ref::<DvsFailureCriteria>()?),
5843            StructType::DvsMacLearningPolicy => Some(from.as_any_ref().downcast_ref::<DvsMacLearningPolicy>()?),
5844            StructType::DvsMacManagementPolicy => Some(from.as_any_ref().downcast_ref::<DvsMacManagementPolicy>()?),
5845            StructType::DvsSecurityPolicy => Some(from.as_any_ref().downcast_ref::<DvsSecurityPolicy>()?),
5846            StructType::VMwareUplinkLacpPolicy => Some(from.as_any_ref().downcast_ref::<VMwareUplinkLacpPolicy>()?),
5847            StructType::VMwareUplinkPortOrderPolicy => Some(from.as_any_ref().downcast_ref::<VMwareUplinkPortOrderPolicy>()?),
5848            StructType::VmwareUplinkPortTeamingPolicy => Some(from.as_any_ref().downcast_ref::<VmwareUplinkPortTeamingPolicy>()?),
5849            StructType::VmwareDistributedVirtualSwitchVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanSpec>()?),
5850            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
5851            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
5852            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
5853            StructType::IoFilterInfo => Some(from.as_any_ref().downcast_ref::<IoFilterInfo>()?),
5854            StructType::ClusterIoFilterInfo => Some(from.as_any_ref().downcast_ref::<ClusterIoFilterInfo>()?),
5855            StructType::HostIoFilterInfo => Some(from.as_any_ref().downcast_ref::<HostIoFilterInfo>()?),
5856            StructType::IoFilterQueryIssueResult => Some(from.as_any_ref().downcast_ref::<IoFilterQueryIssueResult>()?),
5857            StructType::IoFilterHostIssue => Some(from.as_any_ref().downcast_ref::<IoFilterHostIssue>()?),
5858            StructType::IoFilterManagerSslTrust => Some(from.as_any_ref().downcast_ref::<IoFilterManagerSslTrust>()?),
5859            StructType::PinnedCertificate => Some(from.as_any_ref().downcast_ref::<PinnedCertificate>()?),
5860            StructType::UntrustedCertificate => Some(from.as_any_ref().downcast_ref::<UntrustedCertificate>()?),
5861            StructType::IpPoolManagerIpAllocation => Some(from.as_any_ref().downcast_ref::<IpPoolManagerIpAllocation>()?),
5862            StructType::KeyValue => Some(from.as_any_ref().downcast_ref::<KeyValue>()?),
5863            StructType::LatencySensitivity => Some(from.as_any_ref().downcast_ref::<LatencySensitivity>()?),
5864            StructType::LicenseAssignmentManagerLicenseAssignment => Some(from.as_any_ref().downcast_ref::<LicenseAssignmentManagerLicenseAssignment>()?),
5865            StructType::LicenseAvailabilityInfo => Some(from.as_any_ref().downcast_ref::<LicenseAvailabilityInfo>()?),
5866            StructType::LicenseDiagnostics => Some(from.as_any_ref().downcast_ref::<LicenseDiagnostics>()?),
5867            StructType::LicenseManagerEvaluationInfo => Some(from.as_any_ref().downcast_ref::<LicenseManagerEvaluationInfo>()?),
5868            StructType::LicenseFeatureInfo => Some(from.as_any_ref().downcast_ref::<LicenseFeatureInfo>()?),
5869            StructType::HostLicensableResourceInfo => Some(from.as_any_ref().downcast_ref::<HostLicensableResourceInfo>()?),
5870            StructType::LicenseManagerLicenseInfo => Some(from.as_any_ref().downcast_ref::<LicenseManagerLicenseInfo>()?),
5871            StructType::LicenseSource => Some(from.as_any_ref().downcast_ref::<LicenseSource>()?),
5872            StructType::EvaluationLicenseSource => Some(from.as_any_ref().downcast_ref::<EvaluationLicenseSource>()?),
5873            StructType::LicenseServerSource => Some(from.as_any_ref().downcast_ref::<LicenseServerSource>()?),
5874            StructType::LocalLicenseSource => Some(from.as_any_ref().downcast_ref::<LocalLicenseSource>()?),
5875            StructType::LicenseUsageInfo => Some(from.as_any_ref().downcast_ref::<LicenseUsageInfo>()?),
5876            StructType::LicenseReservationInfo => Some(from.as_any_ref().downcast_ref::<LicenseReservationInfo>()?),
5877            StructType::LocalizationManagerMessageCatalog => Some(from.as_any_ref().downcast_ref::<LocalizationManagerMessageCatalog>()?),
5878            StructType::NegatableExpression => Some(from.as_any_ref().downcast_ref::<NegatableExpression>()?),
5879            StructType::IntExpression => Some(from.as_any_ref().downcast_ref::<IntExpression>()?),
5880            StructType::IpAddress => Some(from.as_any_ref().downcast_ref::<IpAddress>()?),
5881            StructType::IpRange => Some(from.as_any_ref().downcast_ref::<IpRange>()?),
5882            StructType::SingleIp => Some(from.as_any_ref().downcast_ref::<SingleIp>()?),
5883            StructType::MacAddress => Some(from.as_any_ref().downcast_ref::<MacAddress>()?),
5884            StructType::MacRange => Some(from.as_any_ref().downcast_ref::<MacRange>()?),
5885            StructType::SingleMac => Some(from.as_any_ref().downcast_ref::<SingleMac>()?),
5886            StructType::StringExpression => Some(from.as_any_ref().downcast_ref::<StringExpression>()?),
5887            StructType::DvsIpPort => Some(from.as_any_ref().downcast_ref::<DvsIpPort>()?),
5888            StructType::DvsIpPortRange => Some(from.as_any_ref().downcast_ref::<DvsIpPortRange>()?),
5889            StructType::DvsSingleIpPort => Some(from.as_any_ref().downcast_ref::<DvsSingleIpPort>()?),
5890            StructType::NetworkSummary => Some(from.as_any_ref().downcast_ref::<NetworkSummary>()?),
5891            StructType::OpaqueNetworkSummary => Some(from.as_any_ref().downcast_ref::<OpaqueNetworkSummary>()?),
5892            StructType::NumericRange => Some(from.as_any_ref().downcast_ref::<NumericRange>()?),
5893            StructType::OpaqueNetworkCapability => Some(from.as_any_ref().downcast_ref::<OpaqueNetworkCapability>()?),
5894            StructType::OvfConsumerOstNode => Some(from.as_any_ref().downcast_ref::<OvfConsumerOstNode>()?),
5895            StructType::OvfConsumerOvfSection => Some(from.as_any_ref().downcast_ref::<OvfConsumerOvfSection>()?),
5896            StructType::OvfManagerCommonParams => Some(from.as_any_ref().downcast_ref::<OvfManagerCommonParams>()?),
5897            StructType::OvfCreateImportSpecParams => Some(from.as_any_ref().downcast_ref::<OvfCreateImportSpecParams>()?),
5898            StructType::OvfImportParams => Some(from.as_any_ref().downcast_ref::<OvfImportParams>()?),
5899            StructType::OvfParseDescriptorParams => Some(from.as_any_ref().downcast_ref::<OvfParseDescriptorParams>()?),
5900            StructType::OvfValidateHostParams => Some(from.as_any_ref().downcast_ref::<OvfValidateHostParams>()?),
5901            StructType::OvfCreateDescriptorParams => Some(from.as_any_ref().downcast_ref::<OvfCreateDescriptorParams>()?),
5902            StructType::OvfCreateDescriptorResult => Some(from.as_any_ref().downcast_ref::<OvfCreateDescriptorResult>()?),
5903            StructType::OvfCreateImportSpecResult => Some(from.as_any_ref().downcast_ref::<OvfCreateImportSpecResult>()?),
5904            StructType::OvfDatastoreMapping => Some(from.as_any_ref().downcast_ref::<OvfDatastoreMapping>()?),
5905            StructType::OvfDeploymentOption => Some(from.as_any_ref().downcast_ref::<OvfDeploymentOption>()?),
5906            StructType::OvfFileItem => Some(from.as_any_ref().downcast_ref::<OvfFileItem>()?),
5907            StructType::OvfNetworkInfo => Some(from.as_any_ref().downcast_ref::<OvfNetworkInfo>()?),
5908            StructType::OvfNetworkMapping => Some(from.as_any_ref().downcast_ref::<OvfNetworkMapping>()?),
5909            StructType::OvfFile => Some(from.as_any_ref().downcast_ref::<OvfFile>()?),
5910            StructType::OvfOptionInfo => Some(from.as_any_ref().downcast_ref::<OvfOptionInfo>()?),
5911            StructType::OvfParseDescriptorResult => Some(from.as_any_ref().downcast_ref::<OvfParseDescriptorResult>()?),
5912            StructType::OvfResourceMap => Some(from.as_any_ref().downcast_ref::<OvfResourceMap>()?),
5913            StructType::OvfStorageProfileMapping => Some(from.as_any_ref().downcast_ref::<OvfStorageProfileMapping>()?),
5914            StructType::OvfValidateHostResult => Some(from.as_any_ref().downcast_ref::<OvfValidateHostResult>()?),
5915            StructType::PasswordField => Some(from.as_any_ref().downcast_ref::<PasswordField>()?),
5916            StructType::PerformanceDescription => Some(from.as_any_ref().downcast_ref::<PerformanceDescription>()?),
5917            StructType::PerfCompositeMetric => Some(from.as_any_ref().downcast_ref::<PerfCompositeMetric>()?),
5918            StructType::PerfCounterInfo => Some(from.as_any_ref().downcast_ref::<PerfCounterInfo>()?),
5919            StructType::PerformanceManagerCounterLevelMapping => Some(from.as_any_ref().downcast_ref::<PerformanceManagerCounterLevelMapping>()?),
5920            StructType::PerfEntityMetricBase => Some(from.as_any_ref().downcast_ref::<PerfEntityMetricBase>()?),
5921            StructType::PerfEntityMetric => Some(from.as_any_ref().downcast_ref::<PerfEntityMetric>()?),
5922            StructType::PerfEntityMetricCsv => Some(from.as_any_ref().downcast_ref::<PerfEntityMetricCsv>()?),
5923            StructType::PerfMetricId => Some(from.as_any_ref().downcast_ref::<PerfMetricId>()?),
5924            StructType::PerfMetricSeries => Some(from.as_any_ref().downcast_ref::<PerfMetricSeries>()?),
5925            StructType::PerfMetricIntSeries => Some(from.as_any_ref().downcast_ref::<PerfMetricIntSeries>()?),
5926            StructType::PerfMetricSeriesCsv => Some(from.as_any_ref().downcast_ref::<PerfMetricSeriesCsv>()?),
5927            StructType::PerfProviderSummary => Some(from.as_any_ref().downcast_ref::<PerfProviderSummary>()?),
5928            StructType::PerfQuerySpec => Some(from.as_any_ref().downcast_ref::<PerfQuerySpec>()?),
5929            StructType::PerfSampleInfo => Some(from.as_any_ref().downcast_ref::<PerfSampleInfo>()?),
5930            StructType::PrivilegePolicyDef => Some(from.as_any_ref().downcast_ref::<PrivilegePolicyDef>()?),
5931            StructType::ResourceAllocationInfo => Some(from.as_any_ref().downcast_ref::<ResourceAllocationInfo>()?),
5932            StructType::ResourceAllocationOption => Some(from.as_any_ref().downcast_ref::<ResourceAllocationOption>()?),
5933            StructType::ResourceConfigOption => Some(from.as_any_ref().downcast_ref::<ResourceConfigOption>()?),
5934            StructType::ResourceConfigSpec => Some(from.as_any_ref().downcast_ref::<ResourceConfigSpec>()?),
5935            StructType::DatabaseSizeEstimate => Some(from.as_any_ref().downcast_ref::<DatabaseSizeEstimate>()?),
5936            StructType::DatabaseSizeParam => Some(from.as_any_ref().downcast_ref::<DatabaseSizeParam>()?),
5937            StructType::InventoryDescription => Some(from.as_any_ref().downcast_ref::<InventoryDescription>()?),
5938            StructType::PerformanceStatisticsDescription => Some(from.as_any_ref().downcast_ref::<PerformanceStatisticsDescription>()?),
5939            StructType::ResourcePoolResourceUsage => Some(from.as_any_ref().downcast_ref::<ResourcePoolResourceUsage>()?),
5940            StructType::ResourcePoolRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ResourcePoolRuntimeInfo>()?),
5941            StructType::ResourcePoolSummary => Some(from.as_any_ref().downcast_ref::<ResourcePoolSummary>()?),
5942            StructType::VirtualAppSummary => Some(from.as_any_ref().downcast_ref::<VirtualAppSummary>()?),
5943            StructType::ResourcePoolQuickStats => Some(from.as_any_ref().downcast_ref::<ResourcePoolQuickStats>()?),
5944            StructType::SddcBase => Some(from.as_any_ref().downcast_ref::<SddcBase>()?),
5945            StructType::VimVsanReconfigSpec => Some(from.as_any_ref().downcast_ref::<VimVsanReconfigSpec>()?),
5946            StructType::SelectionSet => Some(from.as_any_ref().downcast_ref::<SelectionSet>()?),
5947            StructType::DvPortgroupSelection => Some(from.as_any_ref().downcast_ref::<DvPortgroupSelection>()?),
5948            StructType::DvsSelection => Some(from.as_any_ref().downcast_ref::<DvsSelection>()?),
5949            StructType::HostVMotionCompatibility => Some(from.as_any_ref().downcast_ref::<HostVMotionCompatibility>()?),
5950            StructType::ProductComponentInfo => Some(from.as_any_ref().downcast_ref::<ProductComponentInfo>()?),
5951            StructType::ServiceContent => Some(from.as_any_ref().downcast_ref::<ServiceContent>()?),
5952            StructType::ServiceLocator => Some(from.as_any_ref().downcast_ref::<ServiceLocator>()?),
5953            StructType::ServiceLocatorCredential => Some(from.as_any_ref().downcast_ref::<ServiceLocatorCredential>()?),
5954            StructType::ServiceLocatorNamePassword => Some(from.as_any_ref().downcast_ref::<ServiceLocatorNamePassword>()?),
5955            StructType::ServiceLocatorSamlCredential => Some(from.as_any_ref().downcast_ref::<ServiceLocatorSamlCredential>()?),
5956            StructType::ServiceManagerServiceInfo => Some(from.as_any_ref().downcast_ref::<ServiceManagerServiceInfo>()?),
5957            StructType::SessionManagerGenericServiceTicket => Some(from.as_any_ref().downcast_ref::<SessionManagerGenericServiceTicket>()?),
5958            StructType::SessionManagerLocalTicket => Some(from.as_any_ref().downcast_ref::<SessionManagerLocalTicket>()?),
5959            StructType::SessionManagerServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerServiceRequestSpec>()?),
5960            StructType::SessionManagerHttpServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerHttpServiceRequestSpec>()?),
5961            StructType::SessionManagerVmomiServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerVmomiServiceRequestSpec>()?),
5962            StructType::SharesInfo => Some(from.as_any_ref().downcast_ref::<SharesInfo>()?),
5963            StructType::SharesOption => Some(from.as_any_ref().downcast_ref::<SharesOption>()?),
5964            StructType::SiteInfo => Some(from.as_any_ref().downcast_ref::<SiteInfo>()?),
5965            StructType::StoragePodSummary => Some(from.as_any_ref().downcast_ref::<StoragePodSummary>()?),
5966            StructType::StorageIoAllocationInfo => Some(from.as_any_ref().downcast_ref::<StorageIoAllocationInfo>()?),
5967            StructType::StorageIoAllocationOption => Some(from.as_any_ref().downcast_ref::<StorageIoAllocationOption>()?),
5968            StructType::StorageIormInfo => Some(from.as_any_ref().downcast_ref::<StorageIormInfo>()?),
5969            StructType::StorageIormConfigOption => Some(from.as_any_ref().downcast_ref::<StorageIormConfigOption>()?),
5970            StructType::StorageIormConfigSpec => Some(from.as_any_ref().downcast_ref::<StorageIormConfigSpec>()?),
5971            StructType::PodStorageDrsEntry => Some(from.as_any_ref().downcast_ref::<PodStorageDrsEntry>()?),
5972            StructType::StoragePerformanceSummary => Some(from.as_any_ref().downcast_ref::<StoragePerformanceSummary>()?),
5973            StructType::StorageResourceManagerStorageProfileStatistics => Some(from.as_any_ref().downcast_ref::<StorageResourceManagerStorageProfileStatistics>()?),
5974            StructType::Tag => Some(from.as_any_ref().downcast_ref::<Tag>()?),
5975            StructType::TaskDescription => Some(from.as_any_ref().downcast_ref::<TaskDescription>()?),
5976            StructType::TaskFilterSpec => Some(from.as_any_ref().downcast_ref::<TaskFilterSpec>()?),
5977            StructType::TaskFilterSpecByEntity => Some(from.as_any_ref().downcast_ref::<TaskFilterSpecByEntity>()?),
5978            StructType::TaskFilterSpecByTime => Some(from.as_any_ref().downcast_ref::<TaskFilterSpecByTime>()?),
5979            StructType::TaskFilterSpecByUsername => Some(from.as_any_ref().downcast_ref::<TaskFilterSpecByUsername>()?),
5980            StructType::TaskInfo => Some(from.as_any_ref().downcast_ref::<TaskInfo>()?),
5981            StructType::TaskInfoFilterSpec => Some(from.as_any_ref().downcast_ref::<TaskInfoFilterSpec>()?),
5982            StructType::TaskInfoFilterSpecFilterTaskResults => Some(from.as_any_ref().downcast_ref::<TaskInfoFilterSpecFilterTaskResults>()?),
5983            StructType::TaskManagerTaskViewSpec => Some(from.as_any_ref().downcast_ref::<TaskManagerTaskViewSpec>()?),
5984            StructType::TaskManagerViewByStartId => Some(from.as_any_ref().downcast_ref::<TaskManagerViewByStartId>()?),
5985            StructType::TaskReason => Some(from.as_any_ref().downcast_ref::<TaskReason>()?),
5986            StructType::TaskReasonAlarm => Some(from.as_any_ref().downcast_ref::<TaskReasonAlarm>()?),
5987            StructType::TaskReasonSchedule => Some(from.as_any_ref().downcast_ref::<TaskReasonSchedule>()?),
5988            StructType::TaskReasonSystem => Some(from.as_any_ref().downcast_ref::<TaskReasonSystem>()?),
5989            StructType::TaskReasonUser => Some(from.as_any_ref().downcast_ref::<TaskReasonUser>()?),
5990            StructType::UpdateVirtualMachineFilesResult => Some(from.as_any_ref().downcast_ref::<UpdateVirtualMachineFilesResult>()?),
5991            StructType::UpdateVirtualMachineFilesResultFailedVmFileInfo => Some(from.as_any_ref().downcast_ref::<UpdateVirtualMachineFilesResultFailedVmFileInfo>()?),
5992            StructType::UserSearchResult => Some(from.as_any_ref().downcast_ref::<UserSearchResult>()?),
5993            StructType::PosixUserSearchResult => Some(from.as_any_ref().downcast_ref::<PosixUserSearchResult>()?),
5994            StructType::UserSession => Some(from.as_any_ref().downcast_ref::<UserSession>()?),
5995            StructType::VVolVmConfigFileUpdateResult => Some(from.as_any_ref().downcast_ref::<VVolVmConfigFileUpdateResult>()?),
5996            StructType::VVolVmConfigFileUpdateResultFailedVmConfigFileInfo => Some(from.as_any_ref().downcast_ref::<VVolVmConfigFileUpdateResultFailedVmConfigFileInfo>()?),
5997            StructType::VasaStorageArray => Some(from.as_any_ref().downcast_ref::<VasaStorageArray>()?),
5998            StructType::VasaStorageArrayDiscoveryFcTransport => Some(from.as_any_ref().downcast_ref::<VasaStorageArrayDiscoveryFcTransport>()?),
5999            StructType::VasaStorageArrayDiscoveryIpTransport => Some(from.as_any_ref().downcast_ref::<VasaStorageArrayDiscoveryIpTransport>()?),
6000            StructType::VasaStorageArrayDiscoverySvcInfo => Some(from.as_any_ref().downcast_ref::<VasaStorageArrayDiscoverySvcInfo>()?),
6001            StructType::VasaProviderContainerSpec => Some(from.as_any_ref().downcast_ref::<VasaProviderContainerSpec>()?),
6002            StructType::VimVasaProvider => Some(from.as_any_ref().downcast_ref::<VimVasaProvider>()?),
6003            StructType::VimVasaProviderStatePerArray => Some(from.as_any_ref().downcast_ref::<VimVasaProviderStatePerArray>()?),
6004            StructType::VimVasaProviderVirtualHostConfig => Some(from.as_any_ref().downcast_ref::<VimVasaProviderVirtualHostConfig>()?),
6005            StructType::VimVasaProviderInfo => Some(from.as_any_ref().downcast_ref::<VimVasaProviderInfo>()?),
6006            StructType::VirtualAppLinkInfo => Some(from.as_any_ref().downcast_ref::<VirtualAppLinkInfo>()?),
6007            StructType::VirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskSpec>()?),
6008            StructType::DeviceBackedVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<DeviceBackedVirtualDiskSpec>()?),
6009            StructType::FileBackedVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<FileBackedVirtualDiskSpec>()?),
6010            StructType::SeSparseVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<SeSparseVirtualDiskSpec>()?),
6011            StructType::VirtualMachineConnection => Some(from.as_any_ref().downcast_ref::<VirtualMachineConnection>()?),
6012            StructType::VirtualMachineMksConnection => Some(from.as_any_ref().downcast_ref::<VirtualMachineMksConnection>()?),
6013            StructType::DiskChangeInfo => Some(from.as_any_ref().downcast_ref::<DiskChangeInfo>()?),
6014            StructType::DiskChangeExtent => Some(from.as_any_ref().downcast_ref::<DiskChangeExtent>()?),
6015            StructType::VirtualMachineDisplayTopology => Some(from.as_any_ref().downcast_ref::<VirtualMachineDisplayTopology>()?),
6016            StructType::VirtualMachineMksTicket => Some(from.as_any_ref().downcast_ref::<VirtualMachineMksTicket>()?),
6017            StructType::StorageRequirement => Some(from.as_any_ref().downcast_ref::<StorageRequirement>()?),
6018            StructType::VirtualMachineTicket => Some(from.as_any_ref().downcast_ref::<VirtualMachineTicket>()?),
6019            StructType::VirtualMachineWipeResult => Some(from.as_any_ref().downcast_ref::<VirtualMachineWipeResult>()?),
6020            StructType::VsanComparator => Some(from.as_any_ref().downcast_ref::<VsanComparator>()?),
6021            StructType::VsanJsonComparator => Some(from.as_any_ref().downcast_ref::<VsanJsonComparator>()?),
6022            StructType::VsanNestJsonComparator => Some(from.as_any_ref().downcast_ref::<VsanNestJsonComparator>()?),
6023            StructType::VsanDataObfuscationRule => Some(from.as_any_ref().downcast_ref::<VsanDataObfuscationRule>()?),
6024            StructType::VsanJsonFilterRule => Some(from.as_any_ref().downcast_ref::<VsanJsonFilterRule>()?),
6025            StructType::VsanMassCollectorPropertyParams => Some(from.as_any_ref().downcast_ref::<VsanMassCollectorPropertyParams>()?),
6026            StructType::VsanMassCollectorSpec => Some(from.as_any_ref().downcast_ref::<VsanMassCollectorSpec>()?),
6027            StructType::VsanObjectTypeRule => Some(from.as_any_ref().downcast_ref::<VsanObjectTypeRule>()?),
6028            StructType::VsanRegexBasedRule => Some(from.as_any_ref().downcast_ref::<VsanRegexBasedRule>()?),
6029            StructType::VsanResourceConstraint => Some(from.as_any_ref().downcast_ref::<VsanResourceConstraint>()?),
6030            StructType::VsanCompositeConstraint => Some(from.as_any_ref().downcast_ref::<VsanCompositeConstraint>()?),
6031            StructType::VsanPropertyConstraint => Some(from.as_any_ref().downcast_ref::<VsanPropertyConstraint>()?),
6032            StructType::VsanUpgradeSystemNetworkPartitionInfo => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemNetworkPartitionInfo>()?),
6033            StructType::VsanUpgradeSystemPreflightCheckIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemPreflightCheckIssue>()?),
6034            StructType::VsanUpgradeSystemApiBrokenIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemApiBrokenIssue>()?),
6035            StructType::VsanUpgradeSystemAutoClaimEnabledOnHostsIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemAutoClaimEnabledOnHostsIssue>()?),
6036            StructType::VsanUpgradeSystemHostsDisconnectedIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemHostsDisconnectedIssue>()?),
6037            StructType::VsanUpgradeSystemMissingHostsInClusterIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemMissingHostsInClusterIssue>()?),
6038            StructType::VsanUpgradeSystemNetworkPartitionIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemNetworkPartitionIssue>()?),
6039            StructType::VsanUpgradeSystemNotEnoughFreeCapacityIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemNotEnoughFreeCapacityIssue>()?),
6040            StructType::VsanUpgradeSystemRogueHostsInClusterIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemRogueHostsInClusterIssue>()?),
6041            StructType::VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue>()?),
6042            StructType::VsanUpgradeSystemWrongEsxVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemWrongEsxVersionIssue>()?),
6043            StructType::VsanBrokenDiskChainIssue => Some(from.as_any_ref().downcast_ref::<VsanBrokenDiskChainIssue>()?),
6044            StructType::VsanDisallowDataMovementIssue => Some(from.as_any_ref().downcast_ref::<VsanDisallowDataMovementIssue>()?),
6045            StructType::VsanDisallowEvacuateDataIssue => Some(from.as_any_ref().downcast_ref::<VsanDisallowEvacuateDataIssue>()?),
6046            StructType::VsanDiskUnhealthIssue => Some(from.as_any_ref().downcast_ref::<VsanDiskUnhealthIssue>()?),
6047            StructType::VsanHigherObjectsPresentDuringDowngradeIssue => Some(from.as_any_ref().downcast_ref::<VsanHigherObjectsPresentDuringDowngradeIssue>()?),
6048            StructType::VsanHostPropertyRetrieveIssue => Some(from.as_any_ref().downcast_ref::<VsanHostPropertyRetrieveIssue>()?),
6049            StructType::VsanHostWithHybridDiskgroupIssue => Some(from.as_any_ref().downcast_ref::<VsanHostWithHybridDiskgroupIssue>()?),
6050            StructType::VsanHostsCompressionOnlyNotSupported => Some(from.as_any_ref().downcast_ref::<VsanHostsCompressionOnlyNotSupported>()?),
6051            StructType::VsanMixedEsxVersionInClientIssue => Some(from.as_any_ref().downcast_ref::<VsanMixedEsxVersionInClientIssue>()?),
6052            StructType::VsanMixedEsxVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanMixedEsxVersionIssue>()?),
6053            StructType::VsanObjectInaccessibleIssue => Some(from.as_any_ref().downcast_ref::<VsanObjectInaccessibleIssue>()?),
6054            StructType::VsanObjectPolicyIssue => Some(from.as_any_ref().downcast_ref::<VsanObjectPolicyIssue>()?),
6055            StructType::VsanRemoteClusterNotCompatible => Some(from.as_any_ref().downcast_ref::<VsanRemoteClusterNotCompatible>()?),
6056            StructType::VsanUnknownScanIssue => Some(from.as_any_ref().downcast_ref::<VsanUnknownScanIssue>()?),
6057            StructType::VsanUnsupportedHighDiskVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanUnsupportedHighDiskVersionIssue>()?),
6058            StructType::VsanUpgradeSystemPreflightCheckResult => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemPreflightCheckResult>()?),
6059            StructType::VsanDiskFormatConversionCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskFormatConversionCheckResult>()?),
6060            StructType::VsanUpgradeSystemUpgradeHistoryItem => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryItem>()?),
6061            StructType::VsanUpgradeSystemUpgradeHistoryDiskGroupOp => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryDiskGroupOp>()?),
6062            StructType::VsanUpgradeSystemUpgradeHistoryPreflightFail => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryPreflightFail>()?),
6063            StructType::VsanUpgradeSystemUpgradeHistoryStoragePoolOp => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryStoragePoolOp>()?),
6064            StructType::VsanUpgradeSystemUpgradeStatus => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeStatus>()?),
6065            StructType::VsanUpgradeStatusEx => Some(from.as_any_ref().downcast_ref::<VsanUpgradeStatusEx>()?),
6066            StructType::Action => Some(from.as_any_ref().downcast_ref::<Action>()?),
6067            StructType::CreateTaskAction => Some(from.as_any_ref().downcast_ref::<CreateTaskAction>()?),
6068            StructType::MethodAction => Some(from.as_any_ref().downcast_ref::<MethodAction>()?),
6069            StructType::RunScriptAction => Some(from.as_any_ref().downcast_ref::<RunScriptAction>()?),
6070            StructType::SendEmailAction => Some(from.as_any_ref().downcast_ref::<SendEmailAction>()?),
6071            StructType::SendSnmpAction => Some(from.as_any_ref().downcast_ref::<SendSnmpAction>()?),
6072            StructType::MethodActionArgument => Some(from.as_any_ref().downcast_ref::<MethodActionArgument>()?),
6073            StructType::AlarmAction => Some(from.as_any_ref().downcast_ref::<AlarmAction>()?),
6074            StructType::AlarmTriggeringAction => Some(from.as_any_ref().downcast_ref::<AlarmTriggeringAction>()?),
6075            StructType::GroupAlarmAction => Some(from.as_any_ref().downcast_ref::<GroupAlarmAction>()?),
6076            StructType::AlarmDescription => Some(from.as_any_ref().downcast_ref::<AlarmDescription>()?),
6077            StructType::AlarmExpression => Some(from.as_any_ref().downcast_ref::<AlarmExpression>()?),
6078            StructType::AndAlarmExpression => Some(from.as_any_ref().downcast_ref::<AndAlarmExpression>()?),
6079            StructType::EventAlarmExpression => Some(from.as_any_ref().downcast_ref::<EventAlarmExpression>()?),
6080            StructType::MetricAlarmExpression => Some(from.as_any_ref().downcast_ref::<MetricAlarmExpression>()?),
6081            StructType::OrAlarmExpression => Some(from.as_any_ref().downcast_ref::<OrAlarmExpression>()?),
6082            StructType::StateAlarmExpression => Some(from.as_any_ref().downcast_ref::<StateAlarmExpression>()?),
6083            StructType::AlarmFilterSpec => Some(from.as_any_ref().downcast_ref::<AlarmFilterSpec>()?),
6084            StructType::AlarmSetting => Some(from.as_any_ref().downcast_ref::<AlarmSetting>()?),
6085            StructType::AlarmSpec => Some(from.as_any_ref().downcast_ref::<AlarmSpec>()?),
6086            StructType::AlarmInfo => Some(from.as_any_ref().downcast_ref::<AlarmInfo>()?),
6087            StructType::AlarmState => Some(from.as_any_ref().downcast_ref::<AlarmState>()?),
6088            StructType::AlarmTriggeringActionTransitionSpec => Some(from.as_any_ref().downcast_ref::<AlarmTriggeringActionTransitionSpec>()?),
6089            StructType::EventAlarmExpressionComparison => Some(from.as_any_ref().downcast_ref::<EventAlarmExpressionComparison>()?),
6090            StructType::ClusterAction => Some(from.as_any_ref().downcast_ref::<ClusterAction>()?),
6091            StructType::ClusterClusterInitialPlacementAction => Some(from.as_any_ref().downcast_ref::<ClusterClusterInitialPlacementAction>()?),
6092            StructType::ClusterHostInfraUpdateHaModeAction => Some(from.as_any_ref().downcast_ref::<ClusterHostInfraUpdateHaModeAction>()?),
6093            StructType::ClusterHostPowerAction => Some(from.as_any_ref().downcast_ref::<ClusterHostPowerAction>()?),
6094            StructType::ClusterInitialPlacementAction => Some(from.as_any_ref().downcast_ref::<ClusterInitialPlacementAction>()?),
6095            StructType::ClusterMigrationAction => Some(from.as_any_ref().downcast_ref::<ClusterMigrationAction>()?),
6096            StructType::PlacementAction => Some(from.as_any_ref().downcast_ref::<PlacementAction>()?),
6097            StructType::HbrDiskMigrationAction => Some(from.as_any_ref().downcast_ref::<HbrDiskMigrationAction>()?),
6098            StructType::StorageMigrationAction => Some(from.as_any_ref().downcast_ref::<StorageMigrationAction>()?),
6099            StructType::StoragePlacementAction => Some(from.as_any_ref().downcast_ref::<StoragePlacementAction>()?),
6100            StructType::ClusterActionHistory => Some(from.as_any_ref().downcast_ref::<ClusterActionHistory>()?),
6101            StructType::ClusterAttemptedVmInfo => Some(from.as_any_ref().downcast_ref::<ClusterAttemptedVmInfo>()?),
6102            StructType::ClusterPowerContext => Some(from.as_any_ref().downcast_ref::<ClusterPowerContext>()?),
6103            StructType::ClusterConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterConfigInfo>()?),
6104            StructType::ClusterConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterConfigSpec>()?),
6105            StructType::ClusterCryptoConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterCryptoConfigInfo>()?),
6106            StructType::ClusterDasAamNodeState => Some(from.as_any_ref().downcast_ref::<ClusterDasAamNodeState>()?),
6107            StructType::ClusterDasAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAdmissionControlInfo>()?),
6108            StructType::ClusterFailoverHostAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverHostAdmissionControlInfo>()?),
6109            StructType::ClusterFailoverLevelAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverLevelAdmissionControlInfo>()?),
6110            StructType::ClusterFailoverResourcesAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverResourcesAdmissionControlInfo>()?),
6111            StructType::ClusterDasAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterDasAdmissionControlPolicy>()?),
6112            StructType::ClusterFailoverHostAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverHostAdmissionControlPolicy>()?),
6113            StructType::ClusterFailoverLevelAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverLevelAdmissionControlPolicy>()?),
6114            StructType::ClusterFailoverResourcesAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverResourcesAdmissionControlPolicy>()?),
6115            StructType::ClusterDasAdvancedRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAdvancedRuntimeInfo>()?),
6116            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasFailoverLevelAdvancedRuntimeInfo>()?),
6117            StructType::DasHeartbeatDatastoreInfo => Some(from.as_any_ref().downcast_ref::<DasHeartbeatDatastoreInfo>()?),
6118            StructType::ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo>()?),
6119            StructType::ClusterDasConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasConfigInfo>()?),
6120            StructType::ClusterDasData => Some(from.as_any_ref().downcast_ref::<ClusterDasData>()?),
6121            StructType::ClusterDasDataSummary => Some(from.as_any_ref().downcast_ref::<ClusterDasDataSummary>()?),
6122            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots => Some(from.as_any_ref().downcast_ref::<ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots>()?),
6123            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo>()?),
6124            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots => Some(from.as_any_ref().downcast_ref::<ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots>()?),
6125            StructType::ClusterDasFdmHostState => Some(from.as_any_ref().downcast_ref::<ClusterDasFdmHostState>()?),
6126            StructType::ClusterDasHostInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasHostInfo>()?),
6127            StructType::ClusterDasAamHostInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAamHostInfo>()?),
6128            StructType::ClusterDasHostRecommendation => Some(from.as_any_ref().downcast_ref::<ClusterDasHostRecommendation>()?),
6129            StructType::ClusterDasVmConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasVmConfigInfo>()?),
6130            StructType::ClusterDasVmSettings => Some(from.as_any_ref().downcast_ref::<ClusterDasVmSettings>()?),
6131            StructType::ClusterDpmConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDpmConfigInfo>()?),
6132            StructType::ClusterDpmHostConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDpmHostConfigInfo>()?),
6133            StructType::ClusterDrsConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDrsConfigInfo>()?),
6134            StructType::ClusterDrsFaults => Some(from.as_any_ref().downcast_ref::<ClusterDrsFaults>()?),
6135            StructType::ClusterDrsFaultsFaultsByVm => Some(from.as_any_ref().downcast_ref::<ClusterDrsFaultsFaultsByVm>()?),
6136            StructType::ClusterDrsFaultsFaultsByVirtualDisk => Some(from.as_any_ref().downcast_ref::<ClusterDrsFaultsFaultsByVirtualDisk>()?),
6137            StructType::ClusterDrsMigration => Some(from.as_any_ref().downcast_ref::<ClusterDrsMigration>()?),
6138            StructType::ClusterDrsRecommendation => Some(from.as_any_ref().downcast_ref::<ClusterDrsRecommendation>()?),
6139            StructType::ClusterDrsVmConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterDrsVmConfigInfo>()?),
6140            StructType::ClusterEvcManagerCheckResult => Some(from.as_any_ref().downcast_ref::<ClusterEvcManagerCheckResult>()?),
6141            StructType::ClusterEvcManagerEvcState => Some(from.as_any_ref().downcast_ref::<ClusterEvcManagerEvcState>()?),
6142            StructType::ClusterEnterMaintenanceResult => Some(from.as_any_ref().downcast_ref::<ClusterEnterMaintenanceResult>()?),
6143            StructType::ClusterFailoverHostAdmissionControlInfoHostStatus => Some(from.as_any_ref().downcast_ref::<ClusterFailoverHostAdmissionControlInfoHostStatus>()?),
6144            StructType::ClusterGroupInfo => Some(from.as_any_ref().downcast_ref::<ClusterGroupInfo>()?),
6145            StructType::ClusterHostGroup => Some(from.as_any_ref().downcast_ref::<ClusterHostGroup>()?),
6146            StructType::ClusterVmGroup => Some(from.as_any_ref().downcast_ref::<ClusterVmGroup>()?),
6147            StructType::ClusterHostRecommendation => Some(from.as_any_ref().downcast_ref::<ClusterHostRecommendation>()?),
6148            StructType::ClusterInfraUpdateHaConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterInfraUpdateHaConfigInfo>()?),
6149            StructType::ClusterNotAttemptedVmInfo => Some(from.as_any_ref().downcast_ref::<ClusterNotAttemptedVmInfo>()?),
6150            StructType::ClusterOrchestrationInfo => Some(from.as_any_ref().downcast_ref::<ClusterOrchestrationInfo>()?),
6151            StructType::PerformClusterPowerActionSpec => Some(from.as_any_ref().downcast_ref::<PerformClusterPowerActionSpec>()?),
6152            StructType::PlacementResult => Some(from.as_any_ref().downcast_ref::<PlacementResult>()?),
6153            StructType::PlacementSpec => Some(from.as_any_ref().downcast_ref::<PlacementSpec>()?),
6154            StructType::ClusterPowerOnVmResult => Some(from.as_any_ref().downcast_ref::<ClusterPowerOnVmResult>()?),
6155            StructType::ClusterPreemptibleVmPairInfo => Some(from.as_any_ref().downcast_ref::<ClusterPreemptibleVmPairInfo>()?),
6156            StructType::ClusterProactiveDrsConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterProactiveDrsConfigInfo>()?),
6157            StructType::QueryVsanManagedStorageSpaceUsageSpec => Some(from.as_any_ref().downcast_ref::<QueryVsanManagedStorageSpaceUsageSpec>()?),
6158            StructType::ClusterRecommendation => Some(from.as_any_ref().downcast_ref::<ClusterRecommendation>()?),
6159            StructType::ClusterResourceUsageSummary => Some(from.as_any_ref().downcast_ref::<ClusterResourceUsageSummary>()?),
6160            StructType::ClusterRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterRuleInfo>()?),
6161            StructType::ClusterAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterAffinityRuleSpec>()?),
6162            StructType::ClusterAntiAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterAntiAffinityRuleSpec>()?),
6163            StructType::ClusterDependencyRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterDependencyRuleInfo>()?),
6164            StructType::ClusterFtVmHostRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterFtVmHostRuleInfo>()?),
6165            StructType::ClusterVmHostRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterVmHostRuleInfo>()?),
6166            StructType::VirtualDiskAntiAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskAntiAffinityRuleSpec>()?),
6167            StructType::VirtualDiskRuleSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskRuleSpec>()?),
6168            StructType::VsanSiteFaultDomain => Some(from.as_any_ref().downcast_ref::<VsanSiteFaultDomain>()?),
6169            StructType::VsanSiteFaultDomainConfig => Some(from.as_any_ref().downcast_ref::<VsanSiteFaultDomainConfig>()?),
6170            StructType::ClusterSlotPolicy => Some(from.as_any_ref().downcast_ref::<ClusterSlotPolicy>()?),
6171            StructType::ClusterFixedSizeSlotPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFixedSizeSlotPolicy>()?),
6172            StructType::VsanStorageComplianceResult => Some(from.as_any_ref().downcast_ref::<VsanStorageComplianceResult>()?),
6173            StructType::VsanStorageOperationalStatus => Some(from.as_any_ref().downcast_ref::<VsanStorageOperationalStatus>()?),
6174            StructType::VsanStoragePolicyStatus => Some(from.as_any_ref().downcast_ref::<VsanStoragePolicyStatus>()?),
6175            StructType::ClusterSystemVMsConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterSystemVMsConfigInfo>()?),
6176            StructType::ClusterSystemVMsConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterSystemVMsConfigSpec>()?),
6177            StructType::ClusterUsageSummary => Some(from.as_any_ref().downcast_ref::<ClusterUsageSummary>()?),
6178            StructType::VimClusterVsanPreferredFaultDomainInfo => Some(from.as_any_ref().downcast_ref::<VimClusterVsanPreferredFaultDomainInfo>()?),
6179            StructType::VimClusterVsanStretchedClusterCapability => Some(from.as_any_ref().downcast_ref::<VimClusterVsanStretchedClusterCapability>()?),
6180            StructType::VimClusterVsanStretchedClusterFaultDomainConfig => Some(from.as_any_ref().downcast_ref::<VimClusterVsanStretchedClusterFaultDomainConfig>()?),
6181            StructType::VsanStretchedClusterHostVirtualApplianceStatus => Some(from.as_any_ref().downcast_ref::<VsanStretchedClusterHostVirtualApplianceStatus>()?),
6182            StructType::VimClusterVsanWitnessHostInfo => Some(from.as_any_ref().downcast_ref::<VimClusterVsanWitnessHostInfo>()?),
6183            StructType::ClusterVmComponentProtectionSettings => Some(from.as_any_ref().downcast_ref::<ClusterVmComponentProtectionSettings>()?),
6184            StructType::ClusterVmOrchestrationInfo => Some(from.as_any_ref().downcast_ref::<ClusterVmOrchestrationInfo>()?),
6185            StructType::ClusterVmReadiness => Some(from.as_any_ref().downcast_ref::<ClusterVmReadiness>()?),
6186            StructType::ClusterVmToolsMonitoringSettings => Some(from.as_any_ref().downcast_ref::<ClusterVmToolsMonitoringSettings>()?),
6187            StructType::VsanAttachToSrOperation => Some(from.as_any_ref().downcast_ref::<VsanAttachToSrOperation>()?),
6188            StructType::VsanCapability => Some(from.as_any_ref().downcast_ref::<VsanCapability>()?),
6189            StructType::VsanClusterAdvCfgSyncHostResult => Some(from.as_any_ref().downcast_ref::<VsanClusterAdvCfgSyncHostResult>()?),
6190            StructType::VsanClusterAdvCfgSyncResult => Some(from.as_any_ref().downcast_ref::<VsanClusterAdvCfgSyncResult>()?),
6191            StructType::VsanClusterBalancePerDiskInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterBalancePerDiskInfo>()?),
6192            StructType::VsanClusterBalanceSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterBalanceSummary>()?),
6193            StructType::VsanClusterClomdLivenessResult => Some(from.as_any_ref().downcast_ref::<VsanClusterClomdLivenessResult>()?),
6194            StructType::VsanClusterConfig => Some(from.as_any_ref().downcast_ref::<VsanClusterConfig>()?),
6195            StructType::VsanClusterCreateVmHealthTestResult => Some(from.as_any_ref().downcast_ref::<VsanClusterCreateVmHealthTestResult>()?),
6196            StructType::VsanClusterDitEncryptionHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterDitEncryptionHealthSummary>()?),
6197            StructType::VsanClusterEncryptionHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterEncryptionHealthSummary>()?),
6198            StructType::VsanClusterFileServiceHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterFileServiceHealthSummary>()?),
6199            StructType::VsanClusterGlobalDedupHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterGlobalDedupHealthSummary>()?),
6200            StructType::VsanClusterHclInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterHclInfo>()?),
6201            StructType::VsanClusterHealthAction => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthAction>()?),
6202            StructType::VsanClusterHealthCheckInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthCheckInfo>()?),
6203            StructType::VsanClusterHealthConfigs => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthConfigs>()?),
6204            StructType::VsanClusterHealthGroup => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthGroup>()?),
6205            StructType::VsanClusterHealthLinkBase => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthLinkBase>()?),
6206            StructType::VsanClusterHealthLink => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthLink>()?),
6207            StructType::VsanClusterHealthQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthQuerySpec>()?),
6208            StructType::VsanClusterHealthResultBase => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultBase>()?),
6209            StructType::VsanClusterHealthResultTable => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultTable>()?),
6210            StructType::VsanClusterHealthResultWithRemediation => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultWithRemediation>()?),
6211            StructType::VsanClusterHealthResultColumnInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultColumnInfo>()?),
6212            StructType::VsanClusterHealthResultKeyValuePair => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultKeyValuePair>()?),
6213            StructType::VsanClusterHealthResultRow => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultRow>()?),
6214            StructType::VsanClusterHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthSummary>()?),
6215            StructType::VsanClusterHealthSystemObjectsRepairResult => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthSystemObjectsRepairResult>()?),
6216            StructType::VsanClusterHealthSystemStatusResult => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthSystemStatusResult>()?),
6217            StructType::VsanClusterHealthSystemVersionResult => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthSystemVersionResult>()?),
6218            StructType::VsanClusterHealthTest => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthTest>()?),
6219            StructType::VsanClusterHostVmknicMapping => Some(from.as_any_ref().downcast_ref::<VsanClusterHostVmknicMapping>()?),
6220            StructType::VsanClusterLimitHealthResult => Some(from.as_any_ref().downcast_ref::<VsanClusterLimitHealthResult>()?),
6221            StructType::VsanClusterNetworkHealthResult => Some(from.as_any_ref().downcast_ref::<VsanClusterNetworkHealthResult>()?),
6222            StructType::VsanClusterNetworkLoadTestResult => Some(from.as_any_ref().downcast_ref::<VsanClusterNetworkLoadTestResult>()?),
6223            StructType::VsanClusterNetworkPartitionInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterNetworkPartitionInfo>()?),
6224            StructType::VsanClusterNetworkPerfTaskSpec => Some(from.as_any_ref().downcast_ref::<VsanClusterNetworkPerfTaskSpec>()?),
6225            StructType::VsanClusterProactiveTestResult => Some(from.as_any_ref().downcast_ref::<VsanClusterProactiveTestResult>()?),
6226            StructType::VsanClusterTelemetryProxyConfig => Some(from.as_any_ref().downcast_ref::<VsanClusterTelemetryProxyConfig>()?),
6227            StructType::VsanClusterVMsHealthOverallResult => Some(from.as_any_ref().downcast_ref::<VsanClusterVMsHealthOverallResult>()?),
6228            StructType::VsanClusterVMsHealthSummaryResult => Some(from.as_any_ref().downcast_ref::<VsanClusterVMsHealthSummaryResult>()?),
6229            StructType::VsanClusterVmdkLoadTestResult => Some(from.as_any_ref().downcast_ref::<VsanClusterVmdkLoadTestResult>()?),
6230            StructType::VsanClusterWhatifHostFailuresResult => Some(from.as_any_ref().downcast_ref::<VsanClusterWhatifHostFailuresResult>()?),
6231            StructType::VsanConfigGeneration => Some(from.as_any_ref().downcast_ref::<VsanConfigGeneration>()?),
6232            StructType::VsanDataDrivenApiAction => Some(from.as_any_ref().downcast_ref::<VsanDataDrivenApiAction>()?),
6233            StructType::VsanDiagnosticsThreshold => Some(from.as_any_ref().downcast_ref::<VsanDiagnosticsThreshold>()?),
6234            StructType::VsanDiskFormatConversionSpec => Some(from.as_any_ref().downcast_ref::<VsanDiskFormatConversionSpec>()?),
6235            StructType::VimClusterVsanDiskMappingsConfigSpec => Some(from.as_any_ref().downcast_ref::<VimClusterVsanDiskMappingsConfigSpec>()?),
6236            StructType::VsanEntitySpaceUsage => Some(from.as_any_ref().downcast_ref::<VsanEntitySpaceUsage>()?),
6237            StructType::VimClusterVsanFaultDomainSpec => Some(from.as_any_ref().downcast_ref::<VimClusterVsanFaultDomainSpec>()?),
6238            StructType::VsanFaultDomainDestroySpec => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainDestroySpec>()?),
6239            StructType::VsanFaultDomainUpdateSpec => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainUpdateSpec>()?),
6240            StructType::VimClusterVsanFaultDomainsConfigSpec => Some(from.as_any_ref().downcast_ref::<VimClusterVsanFaultDomainsConfigSpec>()?),
6241            StructType::VsanHealthActionBase => Some(from.as_any_ref().downcast_ref::<VsanHealthActionBase>()?),
6242            StructType::VsanHealthActionSteps => Some(from.as_any_ref().downcast_ref::<VsanHealthActionSteps>()?),
6243            StructType::VsanHealthApiBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthApiBasedAction>()?),
6244            StructType::VsanHealthCmdBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthCmdBasedAction>()?),
6245            StructType::VsanHealthDataDrivenAction => Some(from.as_any_ref().downcast_ref::<VsanHealthDataDrivenAction>()?),
6246            StructType::VsanHealthTxtBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthTxtBasedAction>()?),
6247            StructType::VsanHealthConfirmationDialog => Some(from.as_any_ref().downcast_ref::<VsanHealthConfirmationDialog>()?),
6248            StructType::VsanHealthCorrelation => Some(from.as_any_ref().downcast_ref::<VsanHealthCorrelation>()?),
6249            StructType::VsanHealthExtMgmtPreCheckResult => Some(from.as_any_ref().downcast_ref::<VsanHealthExtMgmtPreCheckResult>()?),
6250            StructType::VsanHealthTroubleshooting => Some(from.as_any_ref().downcast_ref::<VsanHealthTroubleshooting>()?),
6251            StructType::VsanHistoricalHealthQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanHistoricalHealthQuerySpec>()?),
6252            StructType::VsanHistoricalHealthTest => Some(from.as_any_ref().downcast_ref::<VsanHistoricalHealthTest>()?),
6253            StructType::VsanHostClomdLivenessResult => Some(from.as_any_ref().downcast_ref::<VsanHostClomdLivenessResult>()?),
6254            StructType::VsanHostCreateVmHealthTestResult => Some(from.as_any_ref().downcast_ref::<VsanHostCreateVmHealthTestResult>()?),
6255            StructType::VimClusterVsanHostDiskMapping => Some(from.as_any_ref().downcast_ref::<VimClusterVsanHostDiskMapping>()?),
6256            StructType::VsanHostHealthSystemVersionResult => Some(from.as_any_ref().downcast_ref::<VsanHostHealthSystemVersionResult>()?),
6257            StructType::VsanIoInsightInstance => Some(from.as_any_ref().downcast_ref::<VsanIoInsightInstance>()?),
6258            StructType::VsanIoInsightInstanceQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanIoInsightInstanceQuerySpec>()?),
6259            StructType::VsanIscsiHomeObjectSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiHomeObjectSpec>()?),
6260            StructType::VsanIscsiInitiatorGroup => Some(from.as_any_ref().downcast_ref::<VsanIscsiInitiatorGroup>()?),
6261            StructType::VsanIscsiLunCommonInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiLunCommonInfo>()?),
6262            StructType::VsanIscsiLun => Some(from.as_any_ref().downcast_ref::<VsanIscsiLun>()?),
6263            StructType::VsanIscsiLunSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiLunSpec>()?),
6264            StructType::VsanIscsiTargetAuthSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetAuthSpec>()?),
6265            StructType::VsanIscsiTargetBasicInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetBasicInfo>()?),
6266            StructType::VsanIscsiTargetCommonInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetCommonInfo>()?),
6267            StructType::VsanIscsiTarget => Some(from.as_any_ref().downcast_ref::<VsanIscsiTarget>()?),
6268            StructType::VsanIscsiTargetSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetSpec>()?),
6269            StructType::VsanIscsiTargetServiceConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetServiceConfig>()?),
6270            StructType::VsanIscsiTargetServiceSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetServiceSpec>()?),
6271            StructType::VsanIscsiTargetServiceDefaultConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetServiceDefaultConfigSpec>()?),
6272            StructType::VsanNetworkDiagnostics => Some(from.as_any_ref().downcast_ref::<VsanNetworkDiagnostics>()?),
6273            StructType::VsanObjIdentityQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanObjIdentityQuerySpec>()?),
6274            StructType::VsanClusterObjectExtAttrs => Some(from.as_any_ref().downcast_ref::<VsanClusterObjectExtAttrs>()?),
6275            StructType::VsanObjectExtraAttributes => Some(from.as_any_ref().downcast_ref::<VsanObjectExtraAttributes>()?),
6276            StructType::VsanObjectIdentity => Some(from.as_any_ref().downcast_ref::<VsanObjectIdentity>()?),
6277            StructType::VsanObjectIdentityAndHealth => Some(from.as_any_ref().downcast_ref::<VsanObjectIdentityAndHealth>()?),
6278            StructType::VsanObjectInformation => Some(from.as_any_ref().downcast_ref::<VsanObjectInformation>()?),
6279            StructType::VsanObjectQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanObjectQuerySpec>()?),
6280            StructType::VsanObjectSpaceSummary => Some(from.as_any_ref().downcast_ref::<VsanObjectSpaceSummary>()?),
6281            StructType::VsanPerfDiagnoseQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanPerfDiagnoseQuerySpec>()?),
6282            StructType::VsanPerfDiagnosticException => Some(from.as_any_ref().downcast_ref::<VsanPerfDiagnosticException>()?),
6283            StructType::VsanPerfDiagnosticResult => Some(from.as_any_ref().downcast_ref::<VsanPerfDiagnosticResult>()?),
6284            StructType::VsanPerfEntityMetricCsv => Some(from.as_any_ref().downcast_ref::<VsanPerfEntityMetricCsv>()?),
6285            StructType::VsanPerfEntityType => Some(from.as_any_ref().downcast_ref::<VsanPerfEntityType>()?),
6286            StructType::VsanPerfGraph => Some(from.as_any_ref().downcast_ref::<VsanPerfGraph>()?),
6287            StructType::VsanPerfHotspotEntitiesMetrics => Some(from.as_any_ref().downcast_ref::<VsanPerfHotspotEntitiesMetrics>()?),
6288            StructType::VsanPerfHotspotQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanPerfHotspotQuerySpec>()?),
6289            StructType::VsanPerfMasterInformation => Some(from.as_any_ref().downcast_ref::<VsanPerfMasterInformation>()?),
6290            StructType::VsanPerfMemberInfo => Some(from.as_any_ref().downcast_ref::<VsanPerfMemberInfo>()?),
6291            StructType::VsanPerfMetricId => Some(from.as_any_ref().downcast_ref::<VsanPerfMetricId>()?),
6292            StructType::VsanPerfMetricSeriesCsv => Some(from.as_any_ref().downcast_ref::<VsanPerfMetricSeriesCsv>()?),
6293            StructType::VsanPerfNodeInformation => Some(from.as_any_ref().downcast_ref::<VsanPerfNodeInformation>()?),
6294            StructType::VsanPerfQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanPerfQuerySpec>()?),
6295            StructType::VsanPerfThreshold => Some(from.as_any_ref().downcast_ref::<VsanPerfThreshold>()?),
6296            StructType::VsanPerfTimeRange => Some(from.as_any_ref().downcast_ref::<VsanPerfTimeRange>()?),
6297            StructType::VsanPerfTimeRangeQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanPerfTimeRangeQuerySpec>()?),
6298            StructType::VsanPerfTopEntities => Some(from.as_any_ref().downcast_ref::<VsanPerfTopEntities>()?),
6299            StructType::VsanPerfTopEntity => Some(from.as_any_ref().downcast_ref::<VsanPerfTopEntity>()?),
6300            StructType::VsanPerfTopQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanPerfTopQuerySpec>()?),
6301            StructType::VsanPerfsvcConfig => Some(from.as_any_ref().downcast_ref::<VsanPerfsvcConfig>()?),
6302            StructType::VsanRemoteClusterQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanRemoteClusterQuerySpec>()?),
6303            StructType::VsanSpaceQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanSpaceQuerySpec>()?),
6304            StructType::VsanSpaceUsage => Some(from.as_any_ref().downcast_ref::<VsanSpaceUsage>()?),
6305            StructType::VsanSpaceUsageDetailResult => Some(from.as_any_ref().downcast_ref::<VsanSpaceUsageDetailResult>()?),
6306            StructType::VsanSpaceUsageWithDatastoreType => Some(from.as_any_ref().downcast_ref::<VsanSpaceUsageWithDatastoreType>()?),
6307            StructType::VsanStorageWorkloadType => Some(from.as_any_ref().downcast_ref::<VsanStorageWorkloadType>()?),
6308            StructType::VsanStretchedClusterConfig => Some(from.as_any_ref().downcast_ref::<VsanStretchedClusterConfig>()?),
6309            StructType::VsanSyncingObjectFilter => Some(from.as_any_ref().downcast_ref::<VsanSyncingObjectFilter>()?),
6310            StructType::VsanUnicastAddressInfo => Some(from.as_any_ref().downcast_ref::<VsanUnicastAddressInfo>()?),
6311            StructType::VsanVcKmipServersHealth => Some(from.as_any_ref().downcast_ref::<VsanVcKmipServersHealth>()?),
6312            StructType::VsanVcLifecycleCheckResult => Some(from.as_any_ref().downcast_ref::<VsanVcLifecycleCheckResult>()?),
6313            StructType::VsanVcLifecycleCheckSpec => Some(from.as_any_ref().downcast_ref::<VsanVcLifecycleCheckSpec>()?),
6314            StructType::VsanVsanClusterPcapGroup => Some(from.as_any_ref().downcast_ref::<VsanVsanClusterPcapGroup>()?),
6315            StructType::VsanVsanClusterPcapResult => Some(from.as_any_ref().downcast_ref::<VsanVsanClusterPcapResult>()?),
6316            StructType::VsanVumSystemConfig => Some(from.as_any_ref().downcast_ref::<VsanVumSystemConfig>()?),
6317            StructType::VsanWhatifCapacity => Some(from.as_any_ref().downcast_ref::<VsanWhatifCapacity>()?),
6318            StructType::VimClusterVsanWitnessSpec => Some(from.as_any_ref().downcast_ref::<VimClusterVsanWitnessSpec>()?),
6319            StructType::CnsAccessControlSpec => Some(from.as_any_ref().downcast_ref::<CnsAccessControlSpec>()?),
6320            StructType::CnsNfsAccessControlSpec => Some(from.as_any_ref().downcast_ref::<CnsNfsAccessControlSpec>()?),
6321            StructType::CnsBackingObjectDetails => Some(from.as_any_ref().downcast_ref::<CnsBackingObjectDetails>()?),
6322            StructType::CnsBlockBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsBlockBackingDetails>()?),
6323            StructType::CnsFileBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsFileBackingDetails>()?),
6324            StructType::CnsVsanFileShareBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsVsanFileShareBackingDetails>()?),
6325            StructType::CnsBaseCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsBaseCreateSpec>()?),
6326            StructType::CnsFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsFileCreateSpec>()?),
6327            StructType::CnsVsanFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsVsanFileCreateSpec>()?),
6328            StructType::CnsContainerCluster => Some(from.as_any_ref().downcast_ref::<CnsContainerCluster>()?),
6329            StructType::CnsCursor => Some(from.as_any_ref().downcast_ref::<CnsCursor>()?),
6330            StructType::CnsEntityMetadata => Some(from.as_any_ref().downcast_ref::<CnsEntityMetadata>()?),
6331            StructType::CnsKubernetesEntityMetadata => Some(from.as_any_ref().downcast_ref::<CnsKubernetesEntityMetadata>()?),
6332            StructType::CnsKubernetesEntityReference => Some(from.as_any_ref().downcast_ref::<CnsKubernetesEntityReference>()?),
6333            StructType::CnsPlacementResult => Some(from.as_any_ref().downcast_ref::<CnsPlacementResult>()?),
6334            StructType::CnsQueryFilter => Some(from.as_any_ref().downcast_ref::<CnsQueryFilter>()?),
6335            StructType::CnsKubernetesQueryFilter => Some(from.as_any_ref().downcast_ref::<CnsKubernetesQueryFilter>()?),
6336            StructType::CnsQueryResult => Some(from.as_any_ref().downcast_ref::<CnsQueryResult>()?),
6337            StructType::CnsQuerySelection => Some(from.as_any_ref().downcast_ref::<CnsQuerySelection>()?),
6338            StructType::CnsSnapshotCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsSnapshotCreateSpec>()?),
6339            StructType::CnsSnapshotDeleteSpec => Some(from.as_any_ref().downcast_ref::<CnsSnapshotDeleteSpec>()?),
6340            StructType::CnsSnapshotId => Some(from.as_any_ref().downcast_ref::<CnsSnapshotId>()?),
6341            StructType::CnsVolume => Some(from.as_any_ref().downcast_ref::<CnsVolume>()?),
6342            StructType::CnsVolumeAclConfigureSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeAclConfigureSpec>()?),
6343            StructType::CnsVolumeAttachDetachSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeAttachDetachSpec>()?),
6344            StructType::CnsVolumeCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeCreateSpec>()?),
6345            StructType::CnsVolumeExtendSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeExtendSpec>()?),
6346            StructType::CnsVolumeId => Some(from.as_any_ref().downcast_ref::<CnsVolumeId>()?),
6347            StructType::CnsVolumeMetadata => Some(from.as_any_ref().downcast_ref::<CnsVolumeMetadata>()?),
6348            StructType::CnsVolumeMetadataUpdateSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeMetadataUpdateSpec>()?),
6349            StructType::CnsVolumeOperationBatchResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeOperationBatchResult>()?),
6350            StructType::CnsVolumeOperationResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeOperationResult>()?),
6351            StructType::CnsAsyncQueryResult => Some(from.as_any_ref().downcast_ref::<CnsAsyncQueryResult>()?),
6352            StructType::CnsVolumeAttachResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeAttachResult>()?),
6353            StructType::CnsVolumeCreateResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeCreateResult>()?),
6354            StructType::CnsVolumePolicyReconfigSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumePolicyReconfigSpec>()?),
6355            StructType::CnsVolumeRelocateSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeRelocateSpec>()?),
6356            StructType::CnsBlockVolumeRelocateSpec => Some(from.as_any_ref().downcast_ref::<CnsBlockVolumeRelocateSpec>()?),
6357            StructType::CnsVolumeSource => Some(from.as_any_ref().downcast_ref::<CnsVolumeSource>()?),
6358            StructType::CnsSnapshotVolumeSource => Some(from.as_any_ref().downcast_ref::<CnsSnapshotVolumeSource>()?),
6359            StructType::DistributedVirtualPort => Some(from.as_any_ref().downcast_ref::<DistributedVirtualPort>()?),
6360            StructType::DvPortConfigInfo => Some(from.as_any_ref().downcast_ref::<DvPortConfigInfo>()?),
6361            StructType::DvPortConfigSpec => Some(from.as_any_ref().downcast_ref::<DvPortConfigSpec>()?),
6362            StructType::DvsFilterParameter => Some(from.as_any_ref().downcast_ref::<DvsFilterParameter>()?),
6363            StructType::DvsHostLocalPortInfo => Some(from.as_any_ref().downcast_ref::<DvsHostLocalPortInfo>()?),
6364            StructType::DvPortStatus => Some(from.as_any_ref().downcast_ref::<DvPortStatus>()?),
6365            StructType::DvPortSetting => Some(from.as_any_ref().downcast_ref::<DvPortSetting>()?),
6366            StructType::VMwareDvsPortSetting => Some(from.as_any_ref().downcast_ref::<VMwareDvsPortSetting>()?),
6367            StructType::DvPortState => Some(from.as_any_ref().downcast_ref::<DvPortState>()?),
6368            StructType::DvPortgroupConfigInfo => Some(from.as_any_ref().downcast_ref::<DvPortgroupConfigInfo>()?),
6369            StructType::DvPortgroupConfigSpec => Some(from.as_any_ref().downcast_ref::<DvPortgroupConfigSpec>()?),
6370            StructType::DistributedVirtualPortgroupNsxPortgroupOperationResult => Some(from.as_any_ref().downcast_ref::<DistributedVirtualPortgroupNsxPortgroupOperationResult>()?),
6371            StructType::DvPortgroupPolicy => Some(from.as_any_ref().downcast_ref::<DvPortgroupPolicy>()?),
6372            StructType::VMwareDvsPortgroupPolicy => Some(from.as_any_ref().downcast_ref::<VMwareDvsPortgroupPolicy>()?),
6373            StructType::DistributedVirtualPortgroupProblem => Some(from.as_any_ref().downcast_ref::<DistributedVirtualPortgroupProblem>()?),
6374            StructType::DistributedVirtualPortgroupInfo => Some(from.as_any_ref().downcast_ref::<DistributedVirtualPortgroupInfo>()?),
6375            StructType::DistributedVirtualSwitchInfo => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchInfo>()?),
6376            StructType::DistributedVirtualSwitchManagerCompatibilityResult => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerCompatibilityResult>()?),
6377            StructType::DvsManagerDvsConfigTarget => Some(from.as_any_ref().downcast_ref::<DvsManagerDvsConfigTarget>()?),
6378            StructType::DistributedVirtualSwitchManagerDvsProductSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerDvsProductSpec>()?),
6379            StructType::DistributedVirtualSwitchManagerHostContainer => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostContainer>()?),
6380            StructType::DistributedVirtualSwitchManagerHostDvsFilterSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostDvsFilterSpec>()?),
6381            StructType::DistributedVirtualSwitchManagerHostArrayFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostArrayFilter>()?),
6382            StructType::DistributedVirtualSwitchManagerHostContainerFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostContainerFilter>()?),
6383            StructType::DistributedVirtualSwitchManagerHostDvsMembershipFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostDvsMembershipFilter>()?),
6384            StructType::DistributedVirtualSwitchManagerImportResult => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerImportResult>()?),
6385            StructType::DvsManagerPhysicalNicsList => Some(from.as_any_ref().downcast_ref::<DvsManagerPhysicalNicsList>()?),
6386            StructType::EntityBackup => Some(from.as_any_ref().downcast_ref::<EntityBackup>()?),
6387            StructType::EntityBackupConfig => Some(from.as_any_ref().downcast_ref::<EntityBackupConfig>()?),
6388            StructType::DvsFilterSpecConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecConnecteeSpec>()?),
6389            StructType::DvsFilterSpecPnicConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecPnicConnecteeSpec>()?),
6390            StructType::DvsFilterSpecVmConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVmConnecteeSpec>()?),
6391            StructType::DvsFilterSpecVmknicConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVmknicConnecteeSpec>()?),
6392            StructType::DvsFilterSpecVlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVlanSpec>()?),
6393            StructType::DvsFilterSpecPvlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecPvlanSpec>()?),
6394            StructType::DvsFilterSpecTrunkVlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecTrunkVlanSpec>()?),
6395            StructType::DvsFilterSpecVlanIdSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVlanIdSpec>()?),
6396            StructType::DistributedVirtualSwitchHostMember => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMember>()?),
6397            StructType::DistributedVirtualSwitchHostMemberBacking => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberBacking>()?),
6398            StructType::DistributedVirtualSwitchHostMemberPnicBacking => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberPnicBacking>()?),
6399            StructType::DistributedVirtualSwitchHostMemberConfigInfo => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberConfigInfo>()?),
6400            StructType::DistributedVirtualSwitchHostMemberConfigSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberConfigSpec>()?),
6401            StructType::HostMemberHealthCheckResult => Some(from.as_any_ref().downcast_ref::<HostMemberHealthCheckResult>()?),
6402            StructType::HostMemberUplinkHealthCheckResult => Some(from.as_any_ref().downcast_ref::<HostMemberUplinkHealthCheckResult>()?),
6403            StructType::VMwareDvsMtuHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsMtuHealthCheckResult>()?),
6404            StructType::VMwareDvsVlanHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanHealthCheckResult>()?),
6405            StructType::VMwareDvsTeamingHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsTeamingHealthCheckResult>()?),
6406            StructType::DistributedVirtualSwitchHostMemberHostUplinkState => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberHostUplinkState>()?),
6407            StructType::DistributedVirtualSwitchHostMemberPnicSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberPnicSpec>()?),
6408            StructType::HostMemberRuntimeInfo => Some(from.as_any_ref().downcast_ref::<HostMemberRuntimeInfo>()?),
6409            StructType::DistributedVirtualSwitchHostMemberRuntimeState => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberRuntimeState>()?),
6410            StructType::DistributedVirtualSwitchHostMemberTransportZoneInfo => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberTransportZoneInfo>()?),
6411            StructType::DistributedVirtualSwitchHostProductSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostProductSpec>()?),
6412            StructType::DistributedVirtualSwitchKeyedOpaqueBlob => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchKeyedOpaqueBlob>()?),
6413            StructType::DistributedVirtualSwitchNetworkOffloadSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchNetworkOffloadSpec>()?),
6414            StructType::DvsNetworkResourcePool => Some(from.as_any_ref().downcast_ref::<DvsNetworkResourcePool>()?),
6415            StructType::DvsNetworkResourcePoolAllocationInfo => Some(from.as_any_ref().downcast_ref::<DvsNetworkResourcePoolAllocationInfo>()?),
6416            StructType::DvsNetworkResourcePoolConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsNetworkResourcePoolConfigSpec>()?),
6417            StructType::DistributedVirtualSwitchPortConnectee => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchPortConnectee>()?),
6418            StructType::DistributedVirtualSwitchPortConnection => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchPortConnection>()?),
6419            StructType::DistributedVirtualSwitchPortCriteria => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchPortCriteria>()?),
6420            StructType::DistributedVirtualSwitchPortStatistics => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchPortStatistics>()?),
6421            StructType::DistributedVirtualSwitchProductSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchProductSpec>()?),
6422            StructType::DvsTrafficRule => Some(from.as_any_ref().downcast_ref::<DvsTrafficRule>()?),
6423            StructType::DvsNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsNetworkRuleAction>()?),
6424            StructType::DvsAcceptNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsAcceptNetworkRuleAction>()?),
6425            StructType::DvsCopyNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsCopyNetworkRuleAction>()?),
6426            StructType::DvsDropNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsDropNetworkRuleAction>()?),
6427            StructType::DvsGreEncapNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsGreEncapNetworkRuleAction>()?),
6428            StructType::DvsLogNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsLogNetworkRuleAction>()?),
6429            StructType::DvsMacRewriteNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsMacRewriteNetworkRuleAction>()?),
6430            StructType::DvsPuntNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsPuntNetworkRuleAction>()?),
6431            StructType::DvsRateLimitNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsRateLimitNetworkRuleAction>()?),
6432            StructType::DvsUpdateTagNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsUpdateTagNetworkRuleAction>()?),
6433            StructType::DvsNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsNetworkRuleQualifier>()?),
6434            StructType::DvsIpNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsIpNetworkRuleQualifier>()?),
6435            StructType::DvsMacNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsMacNetworkRuleQualifier>()?),
6436            StructType::DvsSystemTrafficNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsSystemTrafficNetworkRuleQualifier>()?),
6437            StructType::DvsTrafficRuleset => Some(from.as_any_ref().downcast_ref::<DvsTrafficRuleset>()?),
6438            StructType::DvsVmVnicNetworkResourcePool => Some(from.as_any_ref().downcast_ref::<DvsVmVnicNetworkResourcePool>()?),
6439            StructType::DvsVmVnicResourcePoolConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsVmVnicResourcePoolConfigSpec>()?),
6440            StructType::DvsVmVnicResourceAllocation => Some(from.as_any_ref().downcast_ref::<DvsVmVnicResourceAllocation>()?),
6441            StructType::DvsVmVnicNetworkResourcePoolRuntimeInfo => Some(from.as_any_ref().downcast_ref::<DvsVmVnicNetworkResourcePoolRuntimeInfo>()?),
6442            StructType::DvsVnicAllocatedResource => Some(from.as_any_ref().downcast_ref::<DvsVnicAllocatedResource>()?),
6443            StructType::VmwareDistributedVirtualSwitchDpuFailoverPolicy => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchDpuFailoverPolicy>()?),
6444            StructType::VMwareDvsDpuCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsDpuCapability>()?),
6445            StructType::VMwareIpfixConfig => Some(from.as_any_ref().downcast_ref::<VMwareIpfixConfig>()?),
6446            StructType::VMwareDvsIpfixCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsIpfixCapability>()?),
6447            StructType::VMwareDvsLacpCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsLacpCapability>()?),
6448            StructType::VMwareDvsLacpGroupConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsLacpGroupConfig>()?),
6449            StructType::VMwareDvsLacpGroupSpec => Some(from.as_any_ref().downcast_ref::<VMwareDvsLacpGroupSpec>()?),
6450            StructType::VMwareDvsLagIpfixConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsLagIpfixConfig>()?),
6451            StructType::VMwareDvsLagVlanConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsLagVlanConfig>()?),
6452            StructType::VMwareDvsMtuCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsMtuCapability>()?),
6453            StructType::VmwareDistributedVirtualSwitchNetworkOffloadConfig => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchNetworkOffloadConfig>()?),
6454            StructType::VMwareDvsPvlanConfigSpec => Some(from.as_any_ref().downcast_ref::<VMwareDvsPvlanConfigSpec>()?),
6455            StructType::VMwareDvsPvlanMapEntry => Some(from.as_any_ref().downcast_ref::<VMwareDvsPvlanMapEntry>()?),
6456            StructType::VmwareDistributedVirtualSwitchRealTimeConfig => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchRealTimeConfig>()?),
6457            StructType::VmwareDistributedVirtualSwitchRealTimeLanAnnotation => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchRealTimeLanAnnotation>()?),
6458            StructType::VMwareDvsVspanConfigSpec => Some(from.as_any_ref().downcast_ref::<VMwareDvsVspanConfigSpec>()?),
6459            StructType::VMwareDvsVspanCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsVspanCapability>()?),
6460            StructType::VMwareVspanPort => Some(from.as_any_ref().downcast_ref::<VMwareVspanPort>()?),
6461            StructType::VMwareVspanSession => Some(from.as_any_ref().downcast_ref::<VMwareVspanSession>()?),
6462            StructType::CryptoKeyId => Some(from.as_any_ref().downcast_ref::<CryptoKeyId>()?),
6463            StructType::CryptoKeyPlain => Some(from.as_any_ref().downcast_ref::<CryptoKeyPlain>()?),
6464            StructType::CryptoKeyResult => Some(from.as_any_ref().downcast_ref::<CryptoKeyResult>()?),
6465            StructType::CryptoManagerHostKeyStatus => Some(from.as_any_ref().downcast_ref::<CryptoManagerHostKeyStatus>()?),
6466            StructType::CryptoManagerKmipCertSignRequest => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCertSignRequest>()?),
6467            StructType::CryptoManagerKmipCertificateInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCertificateInfo>()?),
6468            StructType::CryptoManagerKmipClusterStatus => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipClusterStatus>()?),
6469            StructType::CryptoManagerKmipCryptoKeyStatus => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatus>()?),
6470            StructType::CryptoManagerKmipCryptoKeyStatusKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusKeyInfo>()?),
6471            StructType::CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo>()?),
6472            StructType::CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo>()?),
6473            StructType::CryptoManagerKmipCustomAttributeSpec => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCustomAttributeSpec>()?),
6474            StructType::CryptoManagerKmipGenerateKeySpec => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipGenerateKeySpec>()?),
6475            StructType::CryptoManagerKmipServerCertInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipServerCertInfo>()?),
6476            StructType::CryptoManagerKmipServerStatus => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipServerStatus>()?),
6477            StructType::CryptoSpec => Some(from.as_any_ref().downcast_ref::<CryptoSpec>()?),
6478            StructType::CryptoSpecDecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecDecrypt>()?),
6479            StructType::CryptoSpecDeepRecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecDeepRecrypt>()?),
6480            StructType::CryptoSpecEncrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecEncrypt>()?),
6481            StructType::CryptoSpecNoOp => Some(from.as_any_ref().downcast_ref::<CryptoSpecNoOp>()?),
6482            StructType::CryptoSpecRegister => Some(from.as_any_ref().downcast_ref::<CryptoSpecRegister>()?),
6483            StructType::CryptoSpecShallowRecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecShallowRecrypt>()?),
6484            StructType::KeyProviderId => Some(from.as_any_ref().downcast_ref::<KeyProviderId>()?),
6485            StructType::KmipClusterInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfo>()?),
6486            StructType::KmipClusterInfoKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoKeyInfo>()?),
6487            StructType::KmipClusterInfoWrappingKeyIdKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoWrappingKeyIdKeyInfo>()?),
6488            StructType::KmipClusterInfoWrappingRotationIntervalKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoWrappingRotationIntervalKeyInfo>()?),
6489            StructType::KmipServerInfo => Some(from.as_any_ref().downcast_ref::<KmipServerInfo>()?),
6490            StructType::KmipServerSpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpec>()?),
6491            StructType::KmipServerSpecKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecKeySpec>()?),
6492            StructType::KmipServerSpecWrappingKeyIdKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecWrappingKeyIdKeySpec>()?),
6493            StructType::KmipServerSpecWrappingRotationIntervalKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecWrappingRotationIntervalKeySpec>()?),
6494            StructType::KmipServerStatus => Some(from.as_any_ref().downcast_ref::<KmipServerStatus>()?),
6495            StructType::ChangesInfoEventArgument => Some(from.as_any_ref().downcast_ref::<ChangesInfoEventArgument>()?),
6496            StructType::DvsOutOfSyncHostArgument => Some(from.as_any_ref().downcast_ref::<DvsOutOfSyncHostArgument>()?),
6497            StructType::Event => Some(from.as_any_ref().downcast_ref::<Event>()?),
6498            StructType::EventArgument => Some(from.as_any_ref().downcast_ref::<EventArgument>()?),
6499            StructType::EntityEventArgument => Some(from.as_any_ref().downcast_ref::<EntityEventArgument>()?),
6500            StructType::AlarmEventArgument => Some(from.as_any_ref().downcast_ref::<AlarmEventArgument>()?),
6501            StructType::ComputeResourceEventArgument => Some(from.as_any_ref().downcast_ref::<ComputeResourceEventArgument>()?),
6502            StructType::DatacenterEventArgument => Some(from.as_any_ref().downcast_ref::<DatacenterEventArgument>()?),
6503            StructType::DatastoreEventArgument => Some(from.as_any_ref().downcast_ref::<DatastoreEventArgument>()?),
6504            StructType::DvsEventArgument => Some(from.as_any_ref().downcast_ref::<DvsEventArgument>()?),
6505            StructType::FolderEventArgument => Some(from.as_any_ref().downcast_ref::<FolderEventArgument>()?),
6506            StructType::HostEventArgument => Some(from.as_any_ref().downcast_ref::<HostEventArgument>()?),
6507            StructType::ManagedEntityEventArgument => Some(from.as_any_ref().downcast_ref::<ManagedEntityEventArgument>()?),
6508            StructType::NetworkEventArgument => Some(from.as_any_ref().downcast_ref::<NetworkEventArgument>()?),
6509            StructType::ResourcePoolEventArgument => Some(from.as_any_ref().downcast_ref::<ResourcePoolEventArgument>()?),
6510            StructType::ScheduledTaskEventArgument => Some(from.as_any_ref().downcast_ref::<ScheduledTaskEventArgument>()?),
6511            StructType::VmEventArgument => Some(from.as_any_ref().downcast_ref::<VmEventArgument>()?),
6512            StructType::ProfileEventArgument => Some(from.as_any_ref().downcast_ref::<ProfileEventArgument>()?),
6513            StructType::RoleEventArgument => Some(from.as_any_ref().downcast_ref::<RoleEventArgument>()?),
6514            StructType::EventDescription => Some(from.as_any_ref().downcast_ref::<EventDescription>()?),
6515            StructType::EventArgDesc => Some(from.as_any_ref().downcast_ref::<EventArgDesc>()?),
6516            StructType::EventDescriptionEventDetail => Some(from.as_any_ref().downcast_ref::<EventDescriptionEventDetail>()?),
6517            StructType::EventFilterSpec => Some(from.as_any_ref().downcast_ref::<EventFilterSpec>()?),
6518            StructType::EventFilterSpecByEntity => Some(from.as_any_ref().downcast_ref::<EventFilterSpecByEntity>()?),
6519            StructType::EventFilterSpecByTime => Some(from.as_any_ref().downcast_ref::<EventFilterSpecByTime>()?),
6520            StructType::EventFilterSpecByUsername => Some(from.as_any_ref().downcast_ref::<EventFilterSpecByUsername>()?),
6521            StructType::EventManagerEventViewSpec => Some(from.as_any_ref().downcast_ref::<EventManagerEventViewSpec>()?),
6522            StructType::EventManagerViewByStartId => Some(from.as_any_ref().downcast_ref::<EventManagerViewByStartId>()?),
6523            StructType::ExtendedEventPair => Some(from.as_any_ref().downcast_ref::<ExtendedEventPair>()?),
6524            StructType::VnicPortArgument => Some(from.as_any_ref().downcast_ref::<VnicPortArgument>()?),
6525            StructType::ExtExtendedProductInfo => Some(from.as_any_ref().downcast_ref::<ExtExtendedProductInfo>()?),
6526            StructType::ManagedByInfo => Some(from.as_any_ref().downcast_ref::<ManagedByInfo>()?),
6527            StructType::ExtManagedEntityInfo => Some(from.as_any_ref().downcast_ref::<ExtManagedEntityInfo>()?),
6528            StructType::ExtSolutionManagerInfo => Some(from.as_any_ref().downcast_ref::<ExtSolutionManagerInfo>()?),
6529            StructType::ExtSolutionManagerInfoTabInfo => Some(from.as_any_ref().downcast_ref::<ExtSolutionManagerInfoTabInfo>()?),
6530            StructType::AnswerFileUpdateFailure => Some(from.as_any_ref().downcast_ref::<AnswerFileUpdateFailure>()?),
6531            StructType::ConflictingConfigurationConfig => Some(from.as_any_ref().downcast_ref::<ConflictingConfigurationConfig>()?),
6532            StructType::DatacenterMismatchArgument => Some(from.as_any_ref().downcast_ref::<DatacenterMismatchArgument>()?),
6533            StructType::DvsApplyOperationFaultFaultOnObject => Some(from.as_any_ref().downcast_ref::<DvsApplyOperationFaultFaultOnObject>()?),
6534            StructType::DvsOperationBulkFaultFaultOnHost => Some(from.as_any_ref().downcast_ref::<DvsOperationBulkFaultFaultOnHost>()?),
6535            StructType::ImportOperationBulkFaultFaultOnImport => Some(from.as_any_ref().downcast_ref::<ImportOperationBulkFaultFaultOnImport>()?),
6536            StructType::MultipleCertificatesVerifyFaultThumbprintData => Some(from.as_any_ref().downcast_ref::<MultipleCertificatesVerifyFaultThumbprintData>()?),
6537            StructType::NoPermissionEntityPrivileges => Some(from.as_any_ref().downcast_ref::<NoPermissionEntityPrivileges>()?),
6538            StructType::ProfileUpdateFailedUpdateFailure => Some(from.as_any_ref().downcast_ref::<ProfileUpdateFailedUpdateFailure>()?),
6539            StructType::HostActiveDirectory => Some(from.as_any_ref().downcast_ref::<HostActiveDirectory>()?),
6540            StructType::HostActiveDirectorySpec => Some(from.as_any_ref().downcast_ref::<HostActiveDirectorySpec>()?),
6541            StructType::HostAssignableHardwareBinding => Some(from.as_any_ref().downcast_ref::<HostAssignableHardwareBinding>()?),
6542            StructType::HostAssignableHardwareConfig => Some(from.as_any_ref().downcast_ref::<HostAssignableHardwareConfig>()?),
6543            StructType::HostAssignableHardwareConfigAttributeOverride => Some(from.as_any_ref().downcast_ref::<HostAssignableHardwareConfigAttributeOverride>()?),
6544            StructType::HostAuthenticationInfo => Some(from.as_any_ref().downcast_ref::<HostAuthenticationInfo>()?),
6545            StructType::HostAuthenticationManagerInfo => Some(from.as_any_ref().downcast_ref::<HostAuthenticationManagerInfo>()?),
6546            StructType::HostAuthenticationStoreInfo => Some(from.as_any_ref().downcast_ref::<HostAuthenticationStoreInfo>()?),
6547            StructType::HostDirectoryStoreInfo => Some(from.as_any_ref().downcast_ref::<HostDirectoryStoreInfo>()?),
6548            StructType::HostActiveDirectoryInfo => Some(from.as_any_ref().downcast_ref::<HostActiveDirectoryInfo>()?),
6549            StructType::HostLocalAuthenticationInfo => Some(from.as_any_ref().downcast_ref::<HostLocalAuthenticationInfo>()?),
6550            StructType::AutoStartPowerInfo => Some(from.as_any_ref().downcast_ref::<AutoStartPowerInfo>()?),
6551            StructType::HostAutoStartManagerConfig => Some(from.as_any_ref().downcast_ref::<HostAutoStartManagerConfig>()?),
6552            StructType::AutoStartDefaults => Some(from.as_any_ref().downcast_ref::<AutoStartDefaults>()?),
6553            StructType::HostBiosInfo => Some(from.as_any_ref().downcast_ref::<HostBiosInfo>()?),
6554            StructType::HostBootDeviceInfo => Some(from.as_any_ref().downcast_ref::<HostBootDeviceInfo>()?),
6555            StructType::HostBootDevice => Some(from.as_any_ref().downcast_ref::<HostBootDevice>()?),
6556            StructType::HostCacheConfigurationInfo => Some(from.as_any_ref().downcast_ref::<HostCacheConfigurationInfo>()?),
6557            StructType::HostCacheConfigurationSpec => Some(from.as_any_ref().downcast_ref::<HostCacheConfigurationSpec>()?),
6558            StructType::HostCapability => Some(from.as_any_ref().downcast_ref::<HostCapability>()?),
6559            StructType::HostCertificateManagerCertificateInfo => Some(from.as_any_ref().downcast_ref::<HostCertificateManagerCertificateInfo>()?),
6560            StructType::HostCertificateManagerCertificateSpec => Some(from.as_any_ref().downcast_ref::<HostCertificateManagerCertificateSpec>()?),
6561            StructType::HostConfigChange => Some(from.as_any_ref().downcast_ref::<HostConfigChange>()?),
6562            StructType::HostConfigInfo => Some(from.as_any_ref().downcast_ref::<HostConfigInfo>()?),
6563            StructType::HostConfigManager => Some(from.as_any_ref().downcast_ref::<HostConfigManager>()?),
6564            StructType::HostConfigSpec => Some(from.as_any_ref().downcast_ref::<HostConfigSpec>()?),
6565            StructType::HostConnectInfo => Some(from.as_any_ref().downcast_ref::<HostConnectInfo>()?),
6566            StructType::HostDatastoreConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreConnectInfo>()?),
6567            StructType::HostDatastoreExistsConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreExistsConnectInfo>()?),
6568            StructType::HostDatastoreNameConflictConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreNameConflictConnectInfo>()?),
6569            StructType::HostLicenseConnectInfo => Some(from.as_any_ref().downcast_ref::<HostLicenseConnectInfo>()?),
6570            StructType::HostConnectInfoNetworkInfo => Some(from.as_any_ref().downcast_ref::<HostConnectInfoNetworkInfo>()?),
6571            StructType::HostNewNetworkConnectInfo => Some(from.as_any_ref().downcast_ref::<HostNewNetworkConnectInfo>()?),
6572            StructType::HostConnectSpec => Some(from.as_any_ref().downcast_ref::<HostConnectSpec>()?),
6573            StructType::HostCpuIdInfo => Some(from.as_any_ref().downcast_ref::<HostCpuIdInfo>()?),
6574            StructType::HostCpuInfo => Some(from.as_any_ref().downcast_ref::<HostCpuInfo>()?),
6575            StructType::HostCpuPackage => Some(from.as_any_ref().downcast_ref::<HostCpuPackage>()?),
6576            StructType::HostCpuPowerManagementInfo => Some(from.as_any_ref().downcast_ref::<HostCpuPowerManagementInfo>()?),
6577            StructType::HostCpuSchedulerInfo => Some(from.as_any_ref().downcast_ref::<HostCpuSchedulerInfo>()?),
6578            StructType::HostHyperThreadScheduleInfo => Some(from.as_any_ref().downcast_ref::<HostHyperThreadScheduleInfo>()?),
6579            StructType::HostDataTransportConnectionInfo => Some(from.as_any_ref().downcast_ref::<HostDataTransportConnectionInfo>()?),
6580            StructType::HostNfcConnectionInfo => Some(from.as_any_ref().downcast_ref::<HostNfcConnectionInfo>()?),
6581            StructType::FileInfo => Some(from.as_any_ref().downcast_ref::<FileInfo>()?),
6582            StructType::FloppyImageFileInfo => Some(from.as_any_ref().downcast_ref::<FloppyImageFileInfo>()?),
6583            StructType::FolderFileInfo => Some(from.as_any_ref().downcast_ref::<FolderFileInfo>()?),
6584            StructType::IsoImageFileInfo => Some(from.as_any_ref().downcast_ref::<IsoImageFileInfo>()?),
6585            StructType::VmConfigFileInfo => Some(from.as_any_ref().downcast_ref::<VmConfigFileInfo>()?),
6586            StructType::TemplateConfigFileInfo => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileInfo>()?),
6587            StructType::VmDiskFileInfo => Some(from.as_any_ref().downcast_ref::<VmDiskFileInfo>()?),
6588            StructType::VmLogFileInfo => Some(from.as_any_ref().downcast_ref::<VmLogFileInfo>()?),
6589            StructType::VmNvramFileInfo => Some(from.as_any_ref().downcast_ref::<VmNvramFileInfo>()?),
6590            StructType::VmSnapshotFileInfo => Some(from.as_any_ref().downcast_ref::<VmSnapshotFileInfo>()?),
6591            StructType::FileQueryFlags => Some(from.as_any_ref().downcast_ref::<FileQueryFlags>()?),
6592            StructType::FileQuery => Some(from.as_any_ref().downcast_ref::<FileQuery>()?),
6593            StructType::FloppyImageFileQuery => Some(from.as_any_ref().downcast_ref::<FloppyImageFileQuery>()?),
6594            StructType::FolderFileQuery => Some(from.as_any_ref().downcast_ref::<FolderFileQuery>()?),
6595            StructType::IsoImageFileQuery => Some(from.as_any_ref().downcast_ref::<IsoImageFileQuery>()?),
6596            StructType::VmConfigFileQuery => Some(from.as_any_ref().downcast_ref::<VmConfigFileQuery>()?),
6597            StructType::TemplateConfigFileQuery => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileQuery>()?),
6598            StructType::VmDiskFileQuery => Some(from.as_any_ref().downcast_ref::<VmDiskFileQuery>()?),
6599            StructType::VmLogFileQuery => Some(from.as_any_ref().downcast_ref::<VmLogFileQuery>()?),
6600            StructType::VmNvramFileQuery => Some(from.as_any_ref().downcast_ref::<VmNvramFileQuery>()?),
6601            StructType::VmSnapshotFileQuery => Some(from.as_any_ref().downcast_ref::<VmSnapshotFileQuery>()?),
6602            StructType::HostDatastoreBrowserSearchResults => Some(from.as_any_ref().downcast_ref::<HostDatastoreBrowserSearchResults>()?),
6603            StructType::HostDatastoreBrowserSearchSpec => Some(from.as_any_ref().downcast_ref::<HostDatastoreBrowserSearchSpec>()?),
6604            StructType::VmConfigFileEncryptionInfo => Some(from.as_any_ref().downcast_ref::<VmConfigFileEncryptionInfo>()?),
6605            StructType::VmConfigFileQueryFlags => Some(from.as_any_ref().downcast_ref::<VmConfigFileQueryFlags>()?),
6606            StructType::VmConfigFileQueryFilter => Some(from.as_any_ref().downcast_ref::<VmConfigFileQueryFilter>()?),
6607            StructType::VmDiskFileEncryptionInfo => Some(from.as_any_ref().downcast_ref::<VmDiskFileEncryptionInfo>()?),
6608            StructType::VmDiskFileQueryFlags => Some(from.as_any_ref().downcast_ref::<VmDiskFileQueryFlags>()?),
6609            StructType::VmDiskFileQueryFilter => Some(from.as_any_ref().downcast_ref::<VmDiskFileQueryFilter>()?),
6610            StructType::HostDatastoreSystemCapabilities => Some(from.as_any_ref().downcast_ref::<HostDatastoreSystemCapabilities>()?),
6611            StructType::HostDatastoreSystemDatastoreResult => Some(from.as_any_ref().downcast_ref::<HostDatastoreSystemDatastoreResult>()?),
6612            StructType::HostDatastoreSystemVvolDatastoreSpec => Some(from.as_any_ref().downcast_ref::<HostDatastoreSystemVvolDatastoreSpec>()?),
6613            StructType::HostDateTimeConfig => Some(from.as_any_ref().downcast_ref::<HostDateTimeConfig>()?),
6614            StructType::HostDateTimeInfo => Some(from.as_any_ref().downcast_ref::<HostDateTimeInfo>()?),
6615            StructType::HostDateTimeSystemServiceTestResult => Some(from.as_any_ref().downcast_ref::<HostDateTimeSystemServiceTestResult>()?),
6616            StructType::HostDateTimeSystemTimeZone => Some(from.as_any_ref().downcast_ref::<HostDateTimeSystemTimeZone>()?),
6617            StructType::HostDeploymentInfo => Some(from.as_any_ref().downcast_ref::<HostDeploymentInfo>()?),
6618            StructType::HostDevice => Some(from.as_any_ref().downcast_ref::<HostDevice>()?),
6619            StructType::ScsiLun => Some(from.as_any_ref().downcast_ref::<ScsiLun>()?),
6620            StructType::HostScsiDisk => Some(from.as_any_ref().downcast_ref::<HostScsiDisk>()?),
6621            StructType::DevicePciId => Some(from.as_any_ref().downcast_ref::<DevicePciId>()?),
6622            StructType::HostDhcpService => Some(from.as_any_ref().downcast_ref::<HostDhcpService>()?),
6623            StructType::HostDhcpServiceConfig => Some(from.as_any_ref().downcast_ref::<HostDhcpServiceConfig>()?),
6624            StructType::HostDhcpServiceSpec => Some(from.as_any_ref().downcast_ref::<HostDhcpServiceSpec>()?),
6625            StructType::HostDiagnosticPartition => Some(from.as_any_ref().downcast_ref::<HostDiagnosticPartition>()?),
6626            StructType::HostDiagnosticPartitionCreateDescription => Some(from.as_any_ref().downcast_ref::<HostDiagnosticPartitionCreateDescription>()?),
6627            StructType::HostDiagnosticPartitionCreateOption => Some(from.as_any_ref().downcast_ref::<HostDiagnosticPartitionCreateOption>()?),
6628            StructType::HostDiagnosticPartitionCreateSpec => Some(from.as_any_ref().downcast_ref::<HostDiagnosticPartitionCreateSpec>()?),
6629            StructType::HostDigestInfo => Some(from.as_any_ref().downcast_ref::<HostDigestInfo>()?),
6630            StructType::HostTpmDigestInfo => Some(from.as_any_ref().downcast_ref::<HostTpmDigestInfo>()?),
6631            StructType::HostDiskConfigurationResult => Some(from.as_any_ref().downcast_ref::<HostDiskConfigurationResult>()?),
6632            StructType::HostDiskDimensions => Some(from.as_any_ref().downcast_ref::<HostDiskDimensions>()?),
6633            StructType::HostDiskDimensionsChs => Some(from.as_any_ref().downcast_ref::<HostDiskDimensionsChs>()?),
6634            StructType::HostDiskDimensionsLba => Some(from.as_any_ref().downcast_ref::<HostDiskDimensionsLba>()?),
6635            StructType::HostDiskPartitionInfo => Some(from.as_any_ref().downcast_ref::<HostDiskPartitionInfo>()?),
6636            StructType::HostDiskPartitionBlockRange => Some(from.as_any_ref().downcast_ref::<HostDiskPartitionBlockRange>()?),
6637            StructType::HostDiskPartitionLayout => Some(from.as_any_ref().downcast_ref::<HostDiskPartitionLayout>()?),
6638            StructType::HostDiskPartitionAttributes => Some(from.as_any_ref().downcast_ref::<HostDiskPartitionAttributes>()?),
6639            StructType::HostDiskPartitionSpec => Some(from.as_any_ref().downcast_ref::<HostDiskPartitionSpec>()?),
6640            StructType::HostDnsConfig => Some(from.as_any_ref().downcast_ref::<HostDnsConfig>()?),
6641            StructType::HostDnsConfigSpec => Some(from.as_any_ref().downcast_ref::<HostDnsConfigSpec>()?),
6642            StructType::HostDvxClass => Some(from.as_any_ref().downcast_ref::<HostDvxClass>()?),
6643            StructType::HostEnterMaintenanceResult => Some(from.as_any_ref().downcast_ref::<HostEnterMaintenanceResult>()?),
6644            StructType::HostEsxAgentHostManagerConfigInfo => Some(from.as_any_ref().downcast_ref::<HostEsxAgentHostManagerConfigInfo>()?),
6645            StructType::HostFaultToleranceManagerComponentHealthInfo => Some(from.as_any_ref().downcast_ref::<HostFaultToleranceManagerComponentHealthInfo>()?),
6646            StructType::FcoeConfig => Some(from.as_any_ref().downcast_ref::<FcoeConfig>()?),
6647            StructType::FcoeConfigFcoeCapabilities => Some(from.as_any_ref().downcast_ref::<FcoeConfigFcoeCapabilities>()?),
6648            StructType::FcoeConfigFcoeSpecification => Some(from.as_any_ref().downcast_ref::<FcoeConfigFcoeSpecification>()?),
6649            StructType::FcoeConfigVlanRange => Some(from.as_any_ref().downcast_ref::<FcoeConfigVlanRange>()?),
6650            StructType::HostFeatureCapability => Some(from.as_any_ref().downcast_ref::<HostFeatureCapability>()?),
6651            StructType::HostFeatureMask => Some(from.as_any_ref().downcast_ref::<HostFeatureMask>()?),
6652            StructType::HostFeatureVersionInfo => Some(from.as_any_ref().downcast_ref::<HostFeatureVersionInfo>()?),
6653            StructType::HostFibreChannelOverEthernetHbaLinkInfo => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetHbaLinkInfo>()?),
6654            StructType::HostFileAccess => Some(from.as_any_ref().downcast_ref::<HostFileAccess>()?),
6655            StructType::ModeInfo => Some(from.as_any_ref().downcast_ref::<ModeInfo>()?),
6656            StructType::HostFileSystemMountInfo => Some(from.as_any_ref().downcast_ref::<HostFileSystemMountInfo>()?),
6657            StructType::HostFileSystemVolume => Some(from.as_any_ref().downcast_ref::<HostFileSystemVolume>()?),
6658            StructType::HostLocalFileSystemVolume => Some(from.as_any_ref().downcast_ref::<HostLocalFileSystemVolume>()?),
6659            StructType::HostNasVolume => Some(from.as_any_ref().downcast_ref::<HostNasVolume>()?),
6660            StructType::HostPMemVolume => Some(from.as_any_ref().downcast_ref::<HostPMemVolume>()?),
6661            StructType::HostVfatVolume => Some(from.as_any_ref().downcast_ref::<HostVfatVolume>()?),
6662            StructType::HostVffsVolume => Some(from.as_any_ref().downcast_ref::<HostVffsVolume>()?),
6663            StructType::HostVmfsVolume => Some(from.as_any_ref().downcast_ref::<HostVmfsVolume>()?),
6664            StructType::HostVvolVolume => Some(from.as_any_ref().downcast_ref::<HostVvolVolume>()?),
6665            StructType::HostFileSystemVolumeInfo => Some(from.as_any_ref().downcast_ref::<HostFileSystemVolumeInfo>()?),
6666            StructType::HostFirewallConfig => Some(from.as_any_ref().downcast_ref::<HostFirewallConfig>()?),
6667            StructType::HostFirewallConfigRuleSetConfig => Some(from.as_any_ref().downcast_ref::<HostFirewallConfigRuleSetConfig>()?),
6668            StructType::HostFirewallInfo => Some(from.as_any_ref().downcast_ref::<HostFirewallInfo>()?),
6669            StructType::HostFirewallDefaultPolicy => Some(from.as_any_ref().downcast_ref::<HostFirewallDefaultPolicy>()?),
6670            StructType::HostFlagInfo => Some(from.as_any_ref().downcast_ref::<HostFlagInfo>()?),
6671            StructType::HostForceMountedInfo => Some(from.as_any_ref().downcast_ref::<HostForceMountedInfo>()?),
6672            StructType::HostFru => Some(from.as_any_ref().downcast_ref::<HostFru>()?),
6673            StructType::HostGatewaySpec => Some(from.as_any_ref().downcast_ref::<HostGatewaySpec>()?),
6674            StructType::HostGraphicsConfig => Some(from.as_any_ref().downcast_ref::<HostGraphicsConfig>()?),
6675            StructType::HostGraphicsConfigDeviceType => Some(from.as_any_ref().downcast_ref::<HostGraphicsConfigDeviceType>()?),
6676            StructType::HostGraphicsInfo => Some(from.as_any_ref().downcast_ref::<HostGraphicsInfo>()?),
6677            StructType::HostHardwareInfo => Some(from.as_any_ref().downcast_ref::<HostHardwareInfo>()?),
6678            StructType::HostHardwareStatusInfo => Some(from.as_any_ref().downcast_ref::<HostHardwareStatusInfo>()?),
6679            StructType::DpuStatusInfoOperationalInfo => Some(from.as_any_ref().downcast_ref::<DpuStatusInfoOperationalInfo>()?),
6680            StructType::HostHardwareElementInfo => Some(from.as_any_ref().downcast_ref::<HostHardwareElementInfo>()?),
6681            StructType::DpuStatusInfo => Some(from.as_any_ref().downcast_ref::<DpuStatusInfo>()?),
6682            StructType::HostStorageElementInfo => Some(from.as_any_ref().downcast_ref::<HostStorageElementInfo>()?),
6683            StructType::HostStorageOperationalInfo => Some(from.as_any_ref().downcast_ref::<HostStorageOperationalInfo>()?),
6684            StructType::HostHbaCreateSpec => Some(from.as_any_ref().downcast_ref::<HostHbaCreateSpec>()?),
6685            StructType::HostTcpHbaCreateSpec => Some(from.as_any_ref().downcast_ref::<HostTcpHbaCreateSpec>()?),
6686            StructType::HealthSystemRuntime => Some(from.as_any_ref().downcast_ref::<HealthSystemRuntime>()?),
6687            StructType::HostAccessControlEntry => Some(from.as_any_ref().downcast_ref::<HostAccessControlEntry>()?),
6688            StructType::HostHostBusAdapter => Some(from.as_any_ref().downcast_ref::<HostHostBusAdapter>()?),
6689            StructType::HostBlockHba => Some(from.as_any_ref().downcast_ref::<HostBlockHba>()?),
6690            StructType::HostFibreChannelHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelHba>()?),
6691            StructType::HostFibreChannelOverEthernetHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetHba>()?),
6692            StructType::HostInternetScsiHba => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHba>()?),
6693            StructType::HostParallelScsiHba => Some(from.as_any_ref().downcast_ref::<HostParallelScsiHba>()?),
6694            StructType::HostPcieHba => Some(from.as_any_ref().downcast_ref::<HostPcieHba>()?),
6695            StructType::HostRdmaHba => Some(from.as_any_ref().downcast_ref::<HostRdmaHba>()?),
6696            StructType::HostSerialAttachedHba => Some(from.as_any_ref().downcast_ref::<HostSerialAttachedHba>()?),
6697            StructType::HostTcpHba => Some(from.as_any_ref().downcast_ref::<HostTcpHba>()?),
6698            StructType::HostProxySwitch => Some(from.as_any_ref().downcast_ref::<HostProxySwitch>()?),
6699            StructType::HostProxySwitchConfig => Some(from.as_any_ref().downcast_ref::<HostProxySwitchConfig>()?),
6700            StructType::HostProxySwitchEnsInfo => Some(from.as_any_ref().downcast_ref::<HostProxySwitchEnsInfo>()?),
6701            StructType::HostProxySwitchHostLagConfig => Some(from.as_any_ref().downcast_ref::<HostProxySwitchHostLagConfig>()?),
6702            StructType::HostProxySwitchSpec => Some(from.as_any_ref().downcast_ref::<HostProxySwitchSpec>()?),
6703            StructType::HostSpbmDatastoreInfo => Some(from.as_any_ref().downcast_ref::<HostSpbmDatastoreInfo>()?),
6704            StructType::HostSpbmHashInfo => Some(from.as_any_ref().downcast_ref::<HostSpbmHashInfo>()?),
6705            StructType::HostSpbmPolicyBlobInfo => Some(from.as_any_ref().downcast_ref::<HostSpbmPolicyBlobInfo>()?),
6706            StructType::HostSpbmPolicyInfo => Some(from.as_any_ref().downcast_ref::<HostSpbmPolicyInfo>()?),
6707            StructType::HostImageProfileSummary => Some(from.as_any_ref().downcast_ref::<HostImageProfileSummary>()?),
6708            StructType::HostInternetScsiHbaAuthenticationCapabilities => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaAuthenticationCapabilities>()?),
6709            StructType::HostInternetScsiHbaAuthenticationProperties => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaAuthenticationProperties>()?),
6710            StructType::HostInternetScsiHbaDigestCapabilities => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaDigestCapabilities>()?),
6711            StructType::HostInternetScsiHbaDigestProperties => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaDigestProperties>()?),
6712            StructType::HostInternetScsiHbaDiscoveryCapabilities => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaDiscoveryCapabilities>()?),
6713            StructType::HostInternetScsiHbaDiscoveryProperties => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaDiscoveryProperties>()?),
6714            StructType::HostInternetScsiHbaIpCapabilities => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaIpCapabilities>()?),
6715            StructType::HostInternetScsiHbaIpProperties => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaIpProperties>()?),
6716            StructType::HostInternetScsiHbaIPv6Properties => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaIPv6Properties>()?),
6717            StructType::HostInternetScsiHbaIscsiIpv6Address => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaIscsiIpv6Address>()?),
6718            StructType::HostInternetScsiHbaSendTarget => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaSendTarget>()?),
6719            StructType::HostInternetScsiHbaStaticTarget => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaStaticTarget>()?),
6720            StructType::HostInternetScsiHbaTargetSet => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaTargetSet>()?),
6721            StructType::HostIpConfig => Some(from.as_any_ref().downcast_ref::<HostIpConfig>()?),
6722            StructType::VsanFileServiceIpConfig => Some(from.as_any_ref().downcast_ref::<VsanFileServiceIpConfig>()?),
6723            StructType::HostIpConfigIpV6Address => Some(from.as_any_ref().downcast_ref::<HostIpConfigIpV6Address>()?),
6724            StructType::HostIpConfigIpV6AddressConfiguration => Some(from.as_any_ref().downcast_ref::<HostIpConfigIpV6AddressConfiguration>()?),
6725            StructType::HostIpRouteConfig => Some(from.as_any_ref().downcast_ref::<HostIpRouteConfig>()?),
6726            StructType::HostIpRouteConfigSpec => Some(from.as_any_ref().downcast_ref::<HostIpRouteConfigSpec>()?),
6727            StructType::HostIpRouteEntry => Some(from.as_any_ref().downcast_ref::<HostIpRouteEntry>()?),
6728            StructType::HostIpRouteOp => Some(from.as_any_ref().downcast_ref::<HostIpRouteOp>()?),
6729            StructType::HostIpRouteTableConfig => Some(from.as_any_ref().downcast_ref::<HostIpRouteTableConfig>()?),
6730            StructType::HostIpRouteTableInfo => Some(from.as_any_ref().downcast_ref::<HostIpRouteTableInfo>()?),
6731            StructType::HostIpmiInfo => Some(from.as_any_ref().downcast_ref::<HostIpmiInfo>()?),
6732            StructType::IscsiDependencyEntity => Some(from.as_any_ref().downcast_ref::<IscsiDependencyEntity>()?),
6733            StructType::IscsiMigrationDependency => Some(from.as_any_ref().downcast_ref::<IscsiMigrationDependency>()?),
6734            StructType::IscsiPortInfo => Some(from.as_any_ref().downcast_ref::<IscsiPortInfo>()?),
6735            StructType::IscsiStatus => Some(from.as_any_ref().downcast_ref::<IscsiStatus>()?),
6736            StructType::KernelModuleInfo => Some(from.as_any_ref().downcast_ref::<KernelModuleInfo>()?),
6737            StructType::KernelModuleSectionInfo => Some(from.as_any_ref().downcast_ref::<KernelModuleSectionInfo>()?),
6738            StructType::LacpInfo => Some(from.as_any_ref().downcast_ref::<LacpInfo>()?),
6739            StructType::LagInfo => Some(from.as_any_ref().downcast_ref::<LagInfo>()?),
6740            StructType::LagUplinkInfo => Some(from.as_any_ref().downcast_ref::<LagUplinkInfo>()?),
6741            StructType::HostLicenseSpec => Some(from.as_any_ref().downcast_ref::<HostLicenseSpec>()?),
6742            StructType::LinkDiscoveryProtocolConfig => Some(from.as_any_ref().downcast_ref::<LinkDiscoveryProtocolConfig>()?),
6743            StructType::HostAccountSpec => Some(from.as_any_ref().downcast_ref::<HostAccountSpec>()?),
6744            StructType::HostPosixAccountSpec => Some(from.as_any_ref().downcast_ref::<HostPosixAccountSpec>()?),
6745            StructType::HostLocalFileSystemVolumeSpec => Some(from.as_any_ref().downcast_ref::<HostLocalFileSystemVolumeSpec>()?),
6746            StructType::HostLowLevelProvisioningManagerDiskLayoutSpec => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerDiskLayoutSpec>()?),
6747            StructType::HostLowLevelProvisioningManagerFileDeleteResult => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerFileDeleteResult>()?),
6748            StructType::HostLowLevelProvisioningManagerFileDeleteSpec => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerFileDeleteSpec>()?),
6749            StructType::HostLowLevelProvisioningManagerFileReserveResult => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerFileReserveResult>()?),
6750            StructType::HostLowLevelProvisioningManagerFileReserveSpec => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerFileReserveSpec>()?),
6751            StructType::HostLowLevelProvisioningManagerSnapshotLayoutSpec => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerSnapshotLayoutSpec>()?),
6752            StructType::HostLowLevelProvisioningManagerVmMigrationStatus => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerVmMigrationStatus>()?),
6753            StructType::HostLowLevelProvisioningManagerVmRecoveryInfo => Some(from.as_any_ref().downcast_ref::<HostLowLevelProvisioningManagerVmRecoveryInfo>()?),
6754            StructType::HostMaintenanceSpec => Some(from.as_any_ref().downcast_ref::<HostMaintenanceSpec>()?),
6755            StructType::ServiceConsoleReservationInfo => Some(from.as_any_ref().downcast_ref::<ServiceConsoleReservationInfo>()?),
6756            StructType::VirtualMachineMemoryReservationInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineMemoryReservationInfo>()?),
6757            StructType::VirtualMachineMemoryReservationSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineMemoryReservationSpec>()?),
6758            StructType::HostMemorySpec => Some(from.as_any_ref().downcast_ref::<HostMemorySpec>()?),
6759            StructType::HostMemoryTierInfo => Some(from.as_any_ref().downcast_ref::<HostMemoryTierInfo>()?),
6760            StructType::HostMountInfo => Some(from.as_any_ref().downcast_ref::<HostMountInfo>()?),
6761            StructType::HostMultipathInfo => Some(from.as_any_ref().downcast_ref::<HostMultipathInfo>()?),
6762            StructType::HostMultipathInfoLogicalUnit => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoLogicalUnit>()?),
6763            StructType::HostMultipathInfoLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoLogicalUnitPolicy>()?),
6764            StructType::HostMultipathInfoFixedLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoFixedLogicalUnitPolicy>()?),
6765            StructType::HostMultipathInfoHppLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoHppLogicalUnitPolicy>()?),
6766            StructType::HostMultipathInfoLogicalUnitStorageArrayTypePolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoLogicalUnitStorageArrayTypePolicy>()?),
6767            StructType::HostMultipathInfoPath => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoPath>()?),
6768            StructType::HostMultipathStateInfo => Some(from.as_any_ref().downcast_ref::<HostMultipathStateInfo>()?),
6769            StructType::HostMultipathStateInfoPath => Some(from.as_any_ref().downcast_ref::<HostMultipathStateInfoPath>()?),
6770            StructType::HostNasVolumeConfig => Some(from.as_any_ref().downcast_ref::<HostNasVolumeConfig>()?),
6771            StructType::HostNasVolumeSpec => Some(from.as_any_ref().downcast_ref::<HostNasVolumeSpec>()?),
6772            StructType::HostNasVolumeUserInfo => Some(from.as_any_ref().downcast_ref::<HostNasVolumeUserInfo>()?),
6773            StructType::HostNatService => Some(from.as_any_ref().downcast_ref::<HostNatService>()?),
6774            StructType::HostNatServiceConfig => Some(from.as_any_ref().downcast_ref::<HostNatServiceConfig>()?),
6775            StructType::HostNatServiceNameServiceSpec => Some(from.as_any_ref().downcast_ref::<HostNatServiceNameServiceSpec>()?),
6776            StructType::HostNatServicePortForwardSpec => Some(from.as_any_ref().downcast_ref::<HostNatServicePortForwardSpec>()?),
6777            StructType::HostNatServiceSpec => Some(from.as_any_ref().downcast_ref::<HostNatServiceSpec>()?),
6778            StructType::HostNetCapabilities => Some(from.as_any_ref().downcast_ref::<HostNetCapabilities>()?),
6779            StructType::HostNetOffloadCapabilities => Some(from.as_any_ref().downcast_ref::<HostNetOffloadCapabilities>()?),
6780            StructType::HostNetStackInstance => Some(from.as_any_ref().downcast_ref::<HostNetStackInstance>()?),
6781            StructType::HostNetworkConfig => Some(from.as_any_ref().downcast_ref::<HostNetworkConfig>()?),
6782            StructType::HostNetworkConfigNetStackSpec => Some(from.as_any_ref().downcast_ref::<HostNetworkConfigNetStackSpec>()?),
6783            StructType::HostNetworkConfigResult => Some(from.as_any_ref().downcast_ref::<HostNetworkConfigResult>()?),
6784            StructType::HostNetworkInfo => Some(from.as_any_ref().downcast_ref::<HostNetworkInfo>()?),
6785            StructType::HostNetworkPolicy => Some(from.as_any_ref().downcast_ref::<HostNetworkPolicy>()?),
6786            StructType::HostNicFailureCriteria => Some(from.as_any_ref().downcast_ref::<HostNicFailureCriteria>()?),
6787            StructType::HostNicOrderPolicy => Some(from.as_any_ref().downcast_ref::<HostNicOrderPolicy>()?),
6788            StructType::HostNicTeamingPolicy => Some(from.as_any_ref().downcast_ref::<HostNicTeamingPolicy>()?),
6789            StructType::HostNetworkSecurityPolicy => Some(from.as_any_ref().downcast_ref::<HostNetworkSecurityPolicy>()?),
6790            StructType::HostNetworkTrafficShapingPolicy => Some(from.as_any_ref().downcast_ref::<HostNetworkTrafficShapingPolicy>()?),
6791            StructType::HostNtpConfig => Some(from.as_any_ref().downcast_ref::<HostNtpConfig>()?),
6792            StructType::HostNumaInfo => Some(from.as_any_ref().downcast_ref::<HostNumaInfo>()?),
6793            StructType::HostNumaNode => Some(from.as_any_ref().downcast_ref::<HostNumaNode>()?),
6794            StructType::HostNumericSensorInfo => Some(from.as_any_ref().downcast_ref::<HostNumericSensorInfo>()?),
6795            StructType::NvdimmDimmInfo => Some(from.as_any_ref().downcast_ref::<NvdimmDimmInfo>()?),
6796            StructType::NvdimmGuid => Some(from.as_any_ref().downcast_ref::<NvdimmGuid>()?),
6797            StructType::NvdimmHealthInfo => Some(from.as_any_ref().downcast_ref::<NvdimmHealthInfo>()?),
6798            StructType::NvdimmInterleaveSetInfo => Some(from.as_any_ref().downcast_ref::<NvdimmInterleaveSetInfo>()?),
6799            StructType::NvdimmNamespaceCreateSpec => Some(from.as_any_ref().downcast_ref::<NvdimmNamespaceCreateSpec>()?),
6800            StructType::NvdimmNamespaceDeleteSpec => Some(from.as_any_ref().downcast_ref::<NvdimmNamespaceDeleteSpec>()?),
6801            StructType::NvdimmNamespaceDetails => Some(from.as_any_ref().downcast_ref::<NvdimmNamespaceDetails>()?),
6802            StructType::NvdimmNamespaceInfo => Some(from.as_any_ref().downcast_ref::<NvdimmNamespaceInfo>()?),
6803            StructType::NvdimmSystemInfo => Some(from.as_any_ref().downcast_ref::<NvdimmSystemInfo>()?),
6804            StructType::NvdimmPMemNamespaceCreateSpec => Some(from.as_any_ref().downcast_ref::<NvdimmPMemNamespaceCreateSpec>()?),
6805            StructType::NvdimmRegionInfo => Some(from.as_any_ref().downcast_ref::<NvdimmRegionInfo>()?),
6806            StructType::NvdimmSummary => Some(from.as_any_ref().downcast_ref::<NvdimmSummary>()?),
6807            StructType::HostNvmeController => Some(from.as_any_ref().downcast_ref::<HostNvmeController>()?),
6808            StructType::HostNvmeDisconnectSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeDisconnectSpec>()?),
6809            StructType::HostNvmeDiscoveryLog => Some(from.as_any_ref().downcast_ref::<HostNvmeDiscoveryLog>()?),
6810            StructType::HostNvmeDiscoveryLogEntry => Some(from.as_any_ref().downcast_ref::<HostNvmeDiscoveryLogEntry>()?),
6811            StructType::HostNvmeNamespace => Some(from.as_any_ref().downcast_ref::<HostNvmeNamespace>()?),
6812            StructType::HostNvmeSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeSpec>()?),
6813            StructType::HostNvmeConnectSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeConnectSpec>()?),
6814            StructType::HostNvmeDiscoverSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeDiscoverSpec>()?),
6815            StructType::HostNvmeTopology => Some(from.as_any_ref().downcast_ref::<HostNvmeTopology>()?),
6816            StructType::HostNvmeTopologyInterface => Some(from.as_any_ref().downcast_ref::<HostNvmeTopologyInterface>()?),
6817            StructType::HostNvmeTransportParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeTransportParameters>()?),
6818            StructType::HostNvmeOpaqueTransportParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOpaqueTransportParameters>()?),
6819            StructType::HostNvmeOverFibreChannelParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverFibreChannelParameters>()?),
6820            StructType::HostNvmeOverRdmaParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverRdmaParameters>()?),
6821            StructType::HostNvmeOverTcpParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverTcpParameters>()?),
6822            StructType::HostOpaqueNetworkInfo => Some(from.as_any_ref().downcast_ref::<HostOpaqueNetworkInfo>()?),
6823            StructType::HostOpaqueSwitch => Some(from.as_any_ref().downcast_ref::<HostOpaqueSwitch>()?),
6824            StructType::HostOpaqueSwitchPhysicalNicZone => Some(from.as_any_ref().downcast_ref::<HostOpaqueSwitchPhysicalNicZone>()?),
6825            StructType::HostPartialMaintenanceModeRuntimeInfo => Some(from.as_any_ref().downcast_ref::<HostPartialMaintenanceModeRuntimeInfo>()?),
6826            StructType::HostPatchManagerLocator => Some(from.as_any_ref().downcast_ref::<HostPatchManagerLocator>()?),
6827            StructType::HostPatchManagerPatchManagerOperationSpec => Some(from.as_any_ref().downcast_ref::<HostPatchManagerPatchManagerOperationSpec>()?),
6828            StructType::HostPatchManagerResult => Some(from.as_any_ref().downcast_ref::<HostPatchManagerResult>()?),
6829            StructType::HostPatchManagerStatus => Some(from.as_any_ref().downcast_ref::<HostPatchManagerStatus>()?),
6830            StructType::HostPatchManagerStatusPrerequisitePatch => Some(from.as_any_ref().downcast_ref::<HostPatchManagerStatusPrerequisitePatch>()?),
6831            StructType::HostPathSelectionPolicyOption => Some(from.as_any_ref().downcast_ref::<HostPathSelectionPolicyOption>()?),
6832            StructType::HostPciDevice => Some(from.as_any_ref().downcast_ref::<HostPciDevice>()?),
6833            StructType::HostPciPassthruConfig => Some(from.as_any_ref().downcast_ref::<HostPciPassthruConfig>()?),
6834            StructType::HostSriovConfig => Some(from.as_any_ref().downcast_ref::<HostSriovConfig>()?),
6835            StructType::HostPciPassthruInfo => Some(from.as_any_ref().downcast_ref::<HostPciPassthruInfo>()?),
6836            StructType::HostSriovInfo => Some(from.as_any_ref().downcast_ref::<HostSriovInfo>()?),
6837            StructType::HostPersistentMemoryInfo => Some(from.as_any_ref().downcast_ref::<HostPersistentMemoryInfo>()?),
6838            StructType::PhysicalNic => Some(from.as_any_ref().downcast_ref::<PhysicalNic>()?),
6839            StructType::PhysicalNicCdpDeviceCapability => Some(from.as_any_ref().downcast_ref::<PhysicalNicCdpDeviceCapability>()?),
6840            StructType::PhysicalNicCdpInfo => Some(from.as_any_ref().downcast_ref::<PhysicalNicCdpInfo>()?),
6841            StructType::PhysicalNicConfig => Some(from.as_any_ref().downcast_ref::<PhysicalNicConfig>()?),
6842            StructType::PhysicalNicLinkInfo => Some(from.as_any_ref().downcast_ref::<PhysicalNicLinkInfo>()?),
6843            StructType::LinkLayerDiscoveryProtocolInfo => Some(from.as_any_ref().downcast_ref::<LinkLayerDiscoveryProtocolInfo>()?),
6844            StructType::PhysicalNicHintInfo => Some(from.as_any_ref().downcast_ref::<PhysicalNicHintInfo>()?),
6845            StructType::PhysicalNicHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicHint>()?),
6846            StructType::PhysicalNicIpHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicIpHint>()?),
6847            StructType::PhysicalNicNameHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicNameHint>()?),
6848            StructType::PhysicalNicSpec => Some(from.as_any_ref().downcast_ref::<PhysicalNicSpec>()?),
6849            StructType::HostPlugStoreTopology => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopology>()?),
6850            StructType::HostPlugStoreTopologyAdapter => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopologyAdapter>()?),
6851            StructType::HostPlugStoreTopologyDevice => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopologyDevice>()?),
6852            StructType::HostPlugStoreTopologyPath => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopologyPath>()?),
6853            StructType::HostPlugStoreTopologyPlugin => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopologyPlugin>()?),
6854            StructType::HostPlugStoreTopologyTarget => Some(from.as_any_ref().downcast_ref::<HostPlugStoreTopologyTarget>()?),
6855            StructType::PnicTsoInfo => Some(from.as_any_ref().downcast_ref::<PnicTsoInfo>()?),
6856            StructType::HostPortGroup => Some(from.as_any_ref().downcast_ref::<HostPortGroup>()?),
6857            StructType::HostPortGroupConfig => Some(from.as_any_ref().downcast_ref::<HostPortGroupConfig>()?),
6858            StructType::HostPortGroupPort => Some(from.as_any_ref().downcast_ref::<HostPortGroupPort>()?),
6859            StructType::HostPortGroupSpec => Some(from.as_any_ref().downcast_ref::<HostPortGroupSpec>()?),
6860            StructType::PowerSystemCapability => Some(from.as_any_ref().downcast_ref::<PowerSystemCapability>()?),
6861            StructType::PowerSystemInfo => Some(from.as_any_ref().downcast_ref::<PowerSystemInfo>()?),
6862            StructType::HostPowerPolicy => Some(from.as_any_ref().downcast_ref::<HostPowerPolicy>()?),
6863            StructType::HostProtocolEndpoint => Some(from.as_any_ref().downcast_ref::<HostProtocolEndpoint>()?),
6864            StructType::HostPtpConfig => Some(from.as_any_ref().downcast_ref::<HostPtpConfig>()?),
6865            StructType::HostPtpConfigPtpPort => Some(from.as_any_ref().downcast_ref::<HostPtpConfigPtpPort>()?),
6866            StructType::HostQualifiedName => Some(from.as_any_ref().downcast_ref::<HostQualifiedName>()?),
6867            StructType::HostRdmaDevice => Some(from.as_any_ref().downcast_ref::<HostRdmaDevice>()?),
6868            StructType::HostRdmaDeviceBacking => Some(from.as_any_ref().downcast_ref::<HostRdmaDeviceBacking>()?),
6869            StructType::HostRdmaDevicePnicBacking => Some(from.as_any_ref().downcast_ref::<HostRdmaDevicePnicBacking>()?),
6870            StructType::HostRdmaDeviceCapability => Some(from.as_any_ref().downcast_ref::<HostRdmaDeviceCapability>()?),
6871            StructType::HostRdmaDeviceConnectionInfo => Some(from.as_any_ref().downcast_ref::<HostRdmaDeviceConnectionInfo>()?),
6872            StructType::HostReliableMemoryInfo => Some(from.as_any_ref().downcast_ref::<HostReliableMemoryInfo>()?),
6873            StructType::HostResignatureRescanResult => Some(from.as_any_ref().downcast_ref::<HostResignatureRescanResult>()?),
6874            StructType::HostFirewallRuleset => Some(from.as_any_ref().downcast_ref::<HostFirewallRuleset>()?),
6875            StructType::HostFirewallRulesetIpList => Some(from.as_any_ref().downcast_ref::<HostFirewallRulesetIpList>()?),
6876            StructType::HostFirewallRulesetIpNetwork => Some(from.as_any_ref().downcast_ref::<HostFirewallRulesetIpNetwork>()?),
6877            StructType::HostFirewallRule => Some(from.as_any_ref().downcast_ref::<HostFirewallRule>()?),
6878            StructType::HostFirewallRulesetRulesetSpec => Some(from.as_any_ref().downcast_ref::<HostFirewallRulesetRulesetSpec>()?),
6879            StructType::HostRuntimeInfo => Some(from.as_any_ref().downcast_ref::<HostRuntimeInfo>()?),
6880            StructType::HostRuntimeInfoNetStackInstanceRuntimeInfo => Some(from.as_any_ref().downcast_ref::<HostRuntimeInfoNetStackInstanceRuntimeInfo>()?),
6881            StructType::HostNetworkResourceRuntime => Some(from.as_any_ref().downcast_ref::<HostNetworkResourceRuntime>()?),
6882            StructType::HostRuntimeInfoNetworkRuntimeInfo => Some(from.as_any_ref().downcast_ref::<HostRuntimeInfoNetworkRuntimeInfo>()?),
6883            StructType::HostPlacedVirtualNicIdentifier => Some(from.as_any_ref().downcast_ref::<HostPlacedVirtualNicIdentifier>()?),
6884            StructType::HostPnicNetworkResourceInfo => Some(from.as_any_ref().downcast_ref::<HostPnicNetworkResourceInfo>()?),
6885            StructType::HostRuntimeInfoStateEncryptionInfo => Some(from.as_any_ref().downcast_ref::<HostRuntimeInfoStateEncryptionInfo>()?),
6886            StructType::HostScsiDiskPartition => Some(from.as_any_ref().downcast_ref::<HostScsiDiskPartition>()?),
6887            StructType::ScsiLunCapabilities => Some(from.as_any_ref().downcast_ref::<ScsiLunCapabilities>()?),
6888            StructType::ScsiLunDescriptor => Some(from.as_any_ref().downcast_ref::<ScsiLunDescriptor>()?),
6889            StructType::ScsiLunDurableName => Some(from.as_any_ref().downcast_ref::<ScsiLunDurableName>()?),
6890            StructType::HostScsiTopology => Some(from.as_any_ref().downcast_ref::<HostScsiTopology>()?),
6891            StructType::HostScsiTopologyInterface => Some(from.as_any_ref().downcast_ref::<HostScsiTopologyInterface>()?),
6892            StructType::HostScsiTopologyLun => Some(from.as_any_ref().downcast_ref::<HostScsiTopologyLun>()?),
6893            StructType::HostScsiTopologyTarget => Some(from.as_any_ref().downcast_ref::<HostScsiTopologyTarget>()?),
6894            StructType::HostSecuritySpec => Some(from.as_any_ref().downcast_ref::<HostSecuritySpec>()?),
6895            StructType::HostService => Some(from.as_any_ref().downcast_ref::<HostService>()?),
6896            StructType::HostServiceSourcePackage => Some(from.as_any_ref().downcast_ref::<HostServiceSourcePackage>()?),
6897            StructType::HostServiceConfig => Some(from.as_any_ref().downcast_ref::<HostServiceConfig>()?),
6898            StructType::HostServiceInfo => Some(from.as_any_ref().downcast_ref::<HostServiceInfo>()?),
6899            StructType::HostSevInfo => Some(from.as_any_ref().downcast_ref::<HostSevInfo>()?),
6900            StructType::HostSgxInfo => Some(from.as_any_ref().downcast_ref::<HostSgxInfo>()?),
6901            StructType::HostSgxRegistrationInfo => Some(from.as_any_ref().downcast_ref::<HostSgxRegistrationInfo>()?),
6902            StructType::HostSharedGpuCapabilities => Some(from.as_any_ref().downcast_ref::<HostSharedGpuCapabilities>()?),
6903            StructType::HostSnmpSystemAgentLimits => Some(from.as_any_ref().downcast_ref::<HostSnmpSystemAgentLimits>()?),
6904            StructType::HostSnmpConfigSpec => Some(from.as_any_ref().downcast_ref::<HostSnmpConfigSpec>()?),
6905            StructType::HostSnmpDestination => Some(from.as_any_ref().downcast_ref::<HostSnmpDestination>()?),
6906            StructType::SoftwarePackage => Some(from.as_any_ref().downcast_ref::<SoftwarePackage>()?),
6907            StructType::SoftwarePackageCapability => Some(from.as_any_ref().downcast_ref::<SoftwarePackageCapability>()?),
6908            StructType::Relation => Some(from.as_any_ref().downcast_ref::<Relation>()?),
6909            StructType::HostSriovDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<HostSriovDevicePoolInfo>()?),
6910            StructType::HostSriovNetworkDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<HostSriovNetworkDevicePoolInfo>()?),
6911            StructType::HostSslThumbprintInfo => Some(from.as_any_ref().downcast_ref::<HostSslThumbprintInfo>()?),
6912            StructType::HostStorageArrayTypePolicyOption => Some(from.as_any_ref().downcast_ref::<HostStorageArrayTypePolicyOption>()?),
6913            StructType::HostStorageDeviceInfo => Some(from.as_any_ref().downcast_ref::<HostStorageDeviceInfo>()?),
6914            StructType::HostStorageSystemDiskLocatorLedResult => Some(from.as_any_ref().downcast_ref::<HostStorageSystemDiskLocatorLedResult>()?),
6915            StructType::HostStorageSystemScsiLunResult => Some(from.as_any_ref().downcast_ref::<HostStorageSystemScsiLunResult>()?),
6916            StructType::HostStorageSystemVmfsVolumeResult => Some(from.as_any_ref().downcast_ref::<HostStorageSystemVmfsVolumeResult>()?),
6917            StructType::HostListSummary => Some(from.as_any_ref().downcast_ref::<HostListSummary>()?),
6918            StructType::HostConfigSummary => Some(from.as_any_ref().downcast_ref::<HostConfigSummary>()?),
6919            StructType::HostListSummaryGatewaySummary => Some(from.as_any_ref().downcast_ref::<HostListSummaryGatewaySummary>()?),
6920            StructType::HostHardwareSummary => Some(from.as_any_ref().downcast_ref::<HostHardwareSummary>()?),
6921            StructType::HostListSummaryQuickStats => Some(from.as_any_ref().downcast_ref::<HostListSummaryQuickStats>()?),
6922            StructType::SystemEventInfo => Some(from.as_any_ref().downcast_ref::<SystemEventInfo>()?),
6923            StructType::HostSystemHealthInfo => Some(from.as_any_ref().downcast_ref::<HostSystemHealthInfo>()?),
6924            StructType::HostSystemIdentificationInfo => Some(from.as_any_ref().downcast_ref::<HostSystemIdentificationInfo>()?),
6925            StructType::HostSystemInfo => Some(from.as_any_ref().downcast_ref::<HostSystemInfo>()?),
6926            StructType::HostSystemResourceInfo => Some(from.as_any_ref().downcast_ref::<HostSystemResourceInfo>()?),
6927            StructType::HostSystemSwapConfiguration => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfiguration>()?),
6928            StructType::HostSystemSwapConfigurationSystemSwapOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationSystemSwapOption>()?),
6929            StructType::HostSystemSwapConfigurationDatastoreOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationDatastoreOption>()?),
6930            StructType::HostSystemSwapConfigurationDisabledOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationDisabledOption>()?),
6931            StructType::HostSystemSwapConfigurationHostCacheOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationHostCacheOption>()?),
6932            StructType::HostSystemSwapConfigurationHostLocalSwapOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationHostLocalSwapOption>()?),
6933            StructType::HostTargetTransport => Some(from.as_any_ref().downcast_ref::<HostTargetTransport>()?),
6934            StructType::HostBlockAdapterTargetTransport => Some(from.as_any_ref().downcast_ref::<HostBlockAdapterTargetTransport>()?),
6935            StructType::HostFibreChannelTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelTargetTransport>()?),
6936            StructType::HostFibreChannelOverEthernetTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetTargetTransport>()?),
6937            StructType::HostInternetScsiTargetTransport => Some(from.as_any_ref().downcast_ref::<HostInternetScsiTargetTransport>()?),
6938            StructType::HostParallelScsiTargetTransport => Some(from.as_any_ref().downcast_ref::<HostParallelScsiTargetTransport>()?),
6939            StructType::HostPcieTargetTransport => Some(from.as_any_ref().downcast_ref::<HostPcieTargetTransport>()?),
6940            StructType::HostRdmaTargetTransport => Some(from.as_any_ref().downcast_ref::<HostRdmaTargetTransport>()?),
6941            StructType::HostSerialAttachedTargetTransport => Some(from.as_any_ref().downcast_ref::<HostSerialAttachedTargetTransport>()?),
6942            StructType::HostTcpTargetTransport => Some(from.as_any_ref().downcast_ref::<HostTcpTargetTransport>()?),
6943            StructType::HostTdxInfo => Some(from.as_any_ref().downcast_ref::<HostTdxInfo>()?),
6944            StructType::HostTpmAttestationInfo => Some(from.as_any_ref().downcast_ref::<HostTpmAttestationInfo>()?),
6945            StructType::HostTpmAttestationReport => Some(from.as_any_ref().downcast_ref::<HostTpmAttestationReport>()?),
6946            StructType::HostTpmEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmEventDetails>()?),
6947            StructType::HostTpmBootCompleteEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmBootCompleteEventDetails>()?),
6948            StructType::HostTpmBootSecurityOptionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmBootSecurityOptionEventDetails>()?),
6949            StructType::HostTpmNvTagEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmNvTagEventDetails>()?),
6950            StructType::HostTpmSignerEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmSignerEventDetails>()?),
6951            StructType::HostTpmCommandEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmCommandEventDetails>()?),
6952            StructType::HostTpmOptionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmOptionEventDetails>()?),
6953            StructType::HostTpmSoftwareComponentEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmSoftwareComponentEventDetails>()?),
6954            StructType::HostTpmVersionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmVersionEventDetails>()?),
6955            StructType::HostTpmEventLogEntry => Some(from.as_any_ref().downcast_ref::<HostTpmEventLogEntry>()?),
6956            StructType::HostTrustAuthorityAttestationInfo => Some(from.as_any_ref().downcast_ref::<HostTrustAuthorityAttestationInfo>()?),
6957            StructType::HostUnresolvedVmfsExtent => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsExtent>()?),
6958            StructType::HostUnresolvedVmfsResignatureSpec => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsResignatureSpec>()?),
6959            StructType::HostUnresolvedVmfsResolutionResult => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsResolutionResult>()?),
6960            StructType::HostUnresolvedVmfsResolutionSpec => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsResolutionSpec>()?),
6961            StructType::HostUnresolvedVmfsVolume => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsVolume>()?),
6962            StructType::HostUnresolvedVmfsVolumeResolveStatus => Some(from.as_any_ref().downcast_ref::<HostUnresolvedVmfsVolumeResolveStatus>()?),
6963            StructType::HostVFlashManagerVFlashCacheConfigInfo => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashCacheConfigInfo>()?),
6964            StructType::HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption>()?),
6965            StructType::HostVFlashManagerVFlashCacheConfigSpec => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashCacheConfigSpec>()?),
6966            StructType::HostVFlashManagerVFlashConfigInfo => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashConfigInfo>()?),
6967            StructType::HostVFlashManagerVFlashResourceConfigInfo => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashResourceConfigInfo>()?),
6968            StructType::HostVFlashManagerVFlashResourceConfigSpec => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashResourceConfigSpec>()?),
6969            StructType::HostVFlashManagerVFlashResourceRunTimeInfo => Some(from.as_any_ref().downcast_ref::<HostVFlashManagerVFlashResourceRunTimeInfo>()?),
6970            StructType::HostVFlashResourceConfigurationResult => Some(from.as_any_ref().downcast_ref::<HostVFlashResourceConfigurationResult>()?),
6971            StructType::HostVMotionConfig => Some(from.as_any_ref().downcast_ref::<HostVMotionConfig>()?),
6972            StructType::HostVMotionInfo => Some(from.as_any_ref().downcast_ref::<HostVMotionInfo>()?),
6973            StructType::HostVMotionManagerDstInstantCloneResult => Some(from.as_any_ref().downcast_ref::<HostVMotionManagerDstInstantCloneResult>()?),
6974            StructType::HostVMotionManagerSrcInstantCloneResult => Some(from.as_any_ref().downcast_ref::<HostVMotionManagerSrcInstantCloneResult>()?),
6975            StructType::HostVMotionNetConfig => Some(from.as_any_ref().downcast_ref::<HostVMotionNetConfig>()?),
6976            StructType::VimHostVsanStretchedClusterHostCapability => Some(from.as_any_ref().downcast_ref::<VimHostVsanStretchedClusterHostCapability>()?),
6977            StructType::HostVffsSpec => Some(from.as_any_ref().downcast_ref::<HostVffsSpec>()?),
6978            StructType::HostVirtualNic => Some(from.as_any_ref().downcast_ref::<HostVirtualNic>()?),
6979            StructType::HostVirtualNicConfig => Some(from.as_any_ref().downcast_ref::<HostVirtualNicConfig>()?),
6980            StructType::HostVirtualNicIpRouteSpec => Some(from.as_any_ref().downcast_ref::<HostVirtualNicIpRouteSpec>()?),
6981            StructType::HostVirtualNicOpaqueNetworkSpec => Some(from.as_any_ref().downcast_ref::<HostVirtualNicOpaqueNetworkSpec>()?),
6982            StructType::HostVirtualNicSpec => Some(from.as_any_ref().downcast_ref::<HostVirtualNicSpec>()?),
6983            StructType::HostVirtualNicConnection => Some(from.as_any_ref().downcast_ref::<HostVirtualNicConnection>()?),
6984            StructType::VirtualNicManagerNetConfig => Some(from.as_any_ref().downcast_ref::<VirtualNicManagerNetConfig>()?),
6985            StructType::HostVirtualNicManagerNicTypeSelection => Some(from.as_any_ref().downcast_ref::<HostVirtualNicManagerNicTypeSelection>()?),
6986            StructType::HostVirtualNicManagerInfo => Some(from.as_any_ref().downcast_ref::<HostVirtualNicManagerInfo>()?),
6987            StructType::HostVirtualSwitch => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitch>()?),
6988            StructType::HostVirtualSwitchBeaconConfig => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchBeaconConfig>()?),
6989            StructType::HostVirtualSwitchBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchBridge>()?),
6990            StructType::HostVirtualSwitchAutoBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchAutoBridge>()?),
6991            StructType::HostVirtualSwitchBondBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchBondBridge>()?),
6992            StructType::HostVirtualSwitchSimpleBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchSimpleBridge>()?),
6993            StructType::HostVirtualSwitchConfig => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchConfig>()?),
6994            StructType::HostVirtualSwitchSpec => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchSpec>()?),
6995            StructType::HostVmciAccessManagerAccessSpec => Some(from.as_any_ref().downcast_ref::<HostVmciAccessManagerAccessSpec>()?),
6996            StructType::VmfsDatastoreOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreOption>()?),
6997            StructType::VmfsDatastoreBaseOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreBaseOption>()?),
6998            StructType::VmfsDatastoreMultipleExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreMultipleExtentOption>()?),
6999            StructType::VmfsDatastoreSingleExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreSingleExtentOption>()?),
7000            StructType::VmfsDatastoreAllExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreAllExtentOption>()?),
7001            StructType::VmfsDatastoreSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreSpec>()?),
7002            StructType::VmfsDatastoreCreateSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreCreateSpec>()?),
7003            StructType::VmfsDatastoreExpandSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreExpandSpec>()?),
7004            StructType::VmfsDatastoreExtendSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreExtendSpec>()?),
7005            StructType::HostVmfsRescanResult => Some(from.as_any_ref().downcast_ref::<HostVmfsRescanResult>()?),
7006            StructType::VmfsConfigOption => Some(from.as_any_ref().downcast_ref::<VmfsConfigOption>()?),
7007            StructType::HostVmfsSpec => Some(from.as_any_ref().downcast_ref::<HostVmfsSpec>()?),
7008            StructType::VmfsUnmapBandwidthSpec => Some(from.as_any_ref().downcast_ref::<VmfsUnmapBandwidthSpec>()?),
7009            StructType::VsanBasicDeviceInfo => Some(from.as_any_ref().downcast_ref::<VsanBasicDeviceInfo>()?),
7010            StructType::VsanClusterMembershipInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterMembershipInfo>()?),
7011            StructType::VsanDaemonHealth => Some(from.as_any_ref().downcast_ref::<VsanDaemonHealth>()?),
7012            StructType::VsanDiskEncryptionHealth => Some(from.as_any_ref().downcast_ref::<VsanDiskEncryptionHealth>()?),
7013            StructType::VsanDiskRebalanceResult => Some(from.as_any_ref().downcast_ref::<VsanDiskRebalanceResult>()?),
7014            StructType::VsanDitEncryptionHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanDitEncryptionHealthSummary>()?),
7015            StructType::VsanEncryptionHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanEncryptionHealthSummary>()?),
7016            StructType::VsanFailedRepairObjectResult => Some(from.as_any_ref().downcast_ref::<VsanFailedRepairObjectResult>()?),
7017            StructType::VsanFileServerHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanFileServerHealthSummary>()?),
7018            StructType::VsanFileServiceBalanceHealth => Some(from.as_any_ref().downcast_ref::<VsanFileServiceBalanceHealth>()?),
7019            StructType::VsanFileServiceHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanFileServiceHealthSummary>()?),
7020            StructType::VsanFileServiceRootFsHealth => Some(from.as_any_ref().downcast_ref::<VsanFileServiceRootFsHealth>()?),
7021            StructType::VsanFileServiceShareHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanFileServiceShareHealthSummary>()?),
7022            StructType::VsanHclCommonDeviceInfo => Some(from.as_any_ref().downcast_ref::<VsanHclCommonDeviceInfo>()?),
7023            StructType::VsanHclNicInfo => Some(from.as_any_ref().downcast_ref::<VsanHclNicInfo>()?),
7024            StructType::VsanHclComputeResource => Some(from.as_any_ref().downcast_ref::<VsanHclComputeResource>()?),
7025            StructType::VsanHclControllerInfo => Some(from.as_any_ref().downcast_ref::<VsanHclControllerInfo>()?),
7026            StructType::VsanHclDiskInfo => Some(from.as_any_ref().downcast_ref::<VsanHclDiskInfo>()?),
7027            StructType::VsanHclFirmwareFile => Some(from.as_any_ref().downcast_ref::<VsanHclFirmwareFile>()?),
7028            StructType::VsanHclFirmwareUpdateSpec => Some(from.as_any_ref().downcast_ref::<VsanHclFirmwareUpdateSpec>()?),
7029            StructType::VsanHclMemInfo => Some(from.as_any_ref().downcast_ref::<VsanHclMemInfo>()?),
7030            StructType::VsanHealthQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanHealthQuerySpec>()?),
7031            StructType::VsanHostCimProviderInfo => Some(from.as_any_ref().downcast_ref::<VsanHostCimProviderInfo>()?),
7032            StructType::VsanHostEmmSummary => Some(from.as_any_ref().downcast_ref::<VsanHostEmmSummary>()?),
7033            StructType::VsanHostFwComponent => Some(from.as_any_ref().downcast_ref::<VsanHostFwComponent>()?),
7034            StructType::VsanHostGlobalDedupConfigHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanHostGlobalDedupConfigHealthSummary>()?),
7035            StructType::VsanHostHclInfo => Some(from.as_any_ref().downcast_ref::<VsanHostHclInfo>()?),
7036            StructType::VsanHostHealthSystemStatusResult => Some(from.as_any_ref().downcast_ref::<VsanHostHealthSystemStatusResult>()?),
7037            StructType::VsanHostHwDeviceId => Some(from.as_any_ref().downcast_ref::<VsanHostHwDeviceId>()?),
7038            StructType::VsanHostIoInsightInfo => Some(from.as_any_ref().downcast_ref::<VsanHostIoInsightInfo>()?),
7039            StructType::VsanHostQueryCheckLimitsSpec => Some(from.as_any_ref().downcast_ref::<VsanHostQueryCheckLimitsSpec>()?),
7040            StructType::VsanHostReference => Some(from.as_any_ref().downcast_ref::<VsanHostReference>()?),
7041            StructType::VsanHostVirtualApplianceInfo => Some(from.as_any_ref().downcast_ref::<VsanHostVirtualApplianceInfo>()?),
7042            StructType::VsanHostVmdkLoadTestResult => Some(from.as_any_ref().downcast_ref::<VsanHostVmdkLoadTestResult>()?),
7043            StructType::VsanHwToVcgInfoMapping => Some(from.as_any_ref().downcast_ref::<VsanHwToVcgInfoMapping>()?),
7044            StructType::HostVsanInternalSystemCmmdsQuery => Some(from.as_any_ref().downcast_ref::<HostVsanInternalSystemCmmdsQuery>()?),
7045            StructType::HostVsanInternalSystemDeleteVsanObjectsResult => Some(from.as_any_ref().downcast_ref::<HostVsanInternalSystemDeleteVsanObjectsResult>()?),
7046            StructType::VsanNewPolicyBatch => Some(from.as_any_ref().downcast_ref::<VsanNewPolicyBatch>()?),
7047            StructType::VsanPolicyChangeBatch => Some(from.as_any_ref().downcast_ref::<VsanPolicyChangeBatch>()?),
7048            StructType::VsanPolicyCost => Some(from.as_any_ref().downcast_ref::<VsanPolicyCost>()?),
7049            StructType::VsanPolicySatisfiability => Some(from.as_any_ref().downcast_ref::<VsanPolicySatisfiability>()?),
7050            StructType::HostVsanInternalSystemVsanObjectOperationResult => Some(from.as_any_ref().downcast_ref::<HostVsanInternalSystemVsanObjectOperationResult>()?),
7051            StructType::HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult => Some(from.as_any_ref().downcast_ref::<HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult>()?),
7052            StructType::VsanIoInsightInfo => Some(from.as_any_ref().downcast_ref::<VsanIoInsightInfo>()?),
7053            StructType::VsanIperfClientSpec => Some(from.as_any_ref().downcast_ref::<VsanIperfClientSpec>()?),
7054            StructType::VsanKmsHealth => Some(from.as_any_ref().downcast_ref::<VsanKmsHealth>()?),
7055            StructType::VsanLimitHealthResult => Some(from.as_any_ref().downcast_ref::<VsanLimitHealthResult>()?),
7056            StructType::VsanNetworkDiagnosticsHealthInfo => Some(from.as_any_ref().downcast_ref::<VsanNetworkDiagnosticsHealthInfo>()?),
7057            StructType::VsanNetworkHealthResult => Some(from.as_any_ref().downcast_ref::<VsanNetworkHealthResult>()?),
7058            StructType::VsanNetworkLoadTestResult => Some(from.as_any_ref().downcast_ref::<VsanNetworkLoadTestResult>()?),
7059            StructType::VsanNetworkPeerHealthResult => Some(from.as_any_ref().downcast_ref::<VsanNetworkPeerHealthResult>()?),
7060            StructType::VsanNicRdmaInfo => Some(from.as_any_ref().downcast_ref::<VsanNicRdmaInfo>()?),
7061            StructType::VsanObjectHealth => Some(from.as_any_ref().downcast_ref::<VsanObjectHealth>()?),
7062            StructType::VsanObjectOverallHealth => Some(from.as_any_ref().downcast_ref::<VsanObjectOverallHealth>()?),
7063            StructType::VsanPhysicalDiskHealth => Some(from.as_any_ref().downcast_ref::<VsanPhysicalDiskHealth>()?),
7064            StructType::VsanPhysicalDiskHealthSummary => Some(from.as_any_ref().downcast_ref::<VsanPhysicalDiskHealthSummary>()?),
7065            StructType::VsanProactiveRebalanceInfoEx => Some(from.as_any_ref().downcast_ref::<VsanProactiveRebalanceInfoEx>()?),
7066            StructType::VsanQueryResultHostInfo => Some(from.as_any_ref().downcast_ref::<VsanQueryResultHostInfo>()?),
7067            StructType::VsanRepairObjectsResult => Some(from.as_any_ref().downcast_ref::<VsanRepairObjectsResult>()?),
7068            StructType::VsanResourceHealth => Some(from.as_any_ref().downcast_ref::<VsanResourceHealth>()?),
7069            StructType::VsanServerClusterInfo => Some(from.as_any_ref().downcast_ref::<VsanServerClusterInfo>()?),
7070            StructType::VsanSmartDiskStats => Some(from.as_any_ref().downcast_ref::<VsanSmartDiskStats>()?),
7071            StructType::VsanSmartParameter => Some(from.as_any_ref().downcast_ref::<VsanSmartParameter>()?),
7072            StructType::VsanSmartStatsHostSummary => Some(from.as_any_ref().downcast_ref::<VsanSmartStatsHostSummary>()?),
7073            StructType::VsanVcgDeviceInfo => Some(from.as_any_ref().downcast_ref::<VsanVcgDeviceInfo>()?),
7074            StructType::VsanVmdkIoLoadSpec => Some(from.as_any_ref().downcast_ref::<VsanVmdkIoLoadSpec>()?),
7075            StructType::VsanVmdkLoadTestResult => Some(from.as_any_ref().downcast_ref::<VsanVmdkLoadTestResult>()?),
7076            StructType::VsanVmdkLoadTestSpec => Some(from.as_any_ref().downcast_ref::<VsanVmdkLoadTestSpec>()?),
7077            StructType::VsanVsanPcapResult => Some(from.as_any_ref().downcast_ref::<VsanVsanPcapResult>()?),
7078            StructType::HostVvolNqn => Some(from.as_any_ref().downcast_ref::<HostVvolNqn>()?),
7079            StructType::VVolHostPe => Some(from.as_any_ref().downcast_ref::<VVolHostPe>()?),
7080            StructType::HostVvolVolumeHostVvolNqn => Some(from.as_any_ref().downcast_ref::<HostVvolVolumeHostVvolNqn>()?),
7081            StructType::HostVvolVolumeSpecification => Some(from.as_any_ref().downcast_ref::<HostVvolVolumeSpecification>()?),
7082            StructType::NetDhcpConfigInfo => Some(from.as_any_ref().downcast_ref::<NetDhcpConfigInfo>()?),
7083            StructType::NetDhcpConfigInfoDhcpOptions => Some(from.as_any_ref().downcast_ref::<NetDhcpConfigInfoDhcpOptions>()?),
7084            StructType::NetDhcpConfigSpec => Some(from.as_any_ref().downcast_ref::<NetDhcpConfigSpec>()?),
7085            StructType::NetDhcpConfigSpecDhcpOptionsSpec => Some(from.as_any_ref().downcast_ref::<NetDhcpConfigSpecDhcpOptionsSpec>()?),
7086            StructType::NetDnsConfigInfo => Some(from.as_any_ref().downcast_ref::<NetDnsConfigInfo>()?),
7087            StructType::NetDnsConfigSpec => Some(from.as_any_ref().downcast_ref::<NetDnsConfigSpec>()?),
7088            StructType::NetIpConfigInfo => Some(from.as_any_ref().downcast_ref::<NetIpConfigInfo>()?),
7089            StructType::NetIpConfigInfoIpAddress => Some(from.as_any_ref().downcast_ref::<NetIpConfigInfoIpAddress>()?),
7090            StructType::NetIpConfigSpec => Some(from.as_any_ref().downcast_ref::<NetIpConfigSpec>()?),
7091            StructType::NetIpConfigSpecIpAddressSpec => Some(from.as_any_ref().downcast_ref::<NetIpConfigSpecIpAddressSpec>()?),
7092            StructType::NetIpRouteConfigInfo => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigInfo>()?),
7093            StructType::NetIpRouteConfigInfoGateway => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigInfoGateway>()?),
7094            StructType::NetIpRouteConfigInfoIpRoute => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigInfoIpRoute>()?),
7095            StructType::NetIpRouteConfigSpec => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigSpec>()?),
7096            StructType::NetIpRouteConfigSpecGatewaySpec => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigSpecGatewaySpec>()?),
7097            StructType::NetIpRouteConfigSpecIpRouteSpec => Some(from.as_any_ref().downcast_ref::<NetIpRouteConfigSpecIpRouteSpec>()?),
7098            StructType::NetIpStackInfo => Some(from.as_any_ref().downcast_ref::<NetIpStackInfo>()?),
7099            StructType::NetIpStackInfoDefaultRouter => Some(from.as_any_ref().downcast_ref::<NetIpStackInfoDefaultRouter>()?),
7100            StructType::NetIpStackInfoNetToMedia => Some(from.as_any_ref().downcast_ref::<NetIpStackInfoNetToMedia>()?),
7101            StructType::NetBiosConfigInfo => Some(from.as_any_ref().downcast_ref::<NetBiosConfigInfo>()?),
7102            StructType::WinNetBiosConfigInfo => Some(from.as_any_ref().downcast_ref::<WinNetBiosConfigInfo>()?),
7103            StructType::ArrayUpdateSpec => Some(from.as_any_ref().downcast_ref::<ArrayUpdateSpec>()?),
7104            StructType::ClusterDasVmConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDasVmConfigSpec>()?),
7105            StructType::ClusterDatastoreUpdateSpec => Some(from.as_any_ref().downcast_ref::<ClusterDatastoreUpdateSpec>()?),
7106            StructType::ClusterDpmHostConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDpmHostConfigSpec>()?),
7107            StructType::ClusterDrsVmConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDrsVmConfigSpec>()?),
7108            StructType::ClusterGroupSpec => Some(from.as_any_ref().downcast_ref::<ClusterGroupSpec>()?),
7109            StructType::ClusterPreemptibleVmPairSpec => Some(from.as_any_ref().downcast_ref::<ClusterPreemptibleVmPairSpec>()?),
7110            StructType::ClusterRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterRuleSpec>()?),
7111            StructType::ClusterTagCategoryUpdateSpec => Some(from.as_any_ref().downcast_ref::<ClusterTagCategoryUpdateSpec>()?),
7112            StructType::ClusterVmOrchestrationSpec => Some(from.as_any_ref().downcast_ref::<ClusterVmOrchestrationSpec>()?),
7113            StructType::StorageDrsOptionSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsOptionSpec>()?),
7114            StructType::StorageDrsVmConfigSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsVmConfigSpec>()?),
7115            StructType::VAppOvfSectionSpec => Some(from.as_any_ref().downcast_ref::<VAppOvfSectionSpec>()?),
7116            StructType::VAppProductSpec => Some(from.as_any_ref().downcast_ref::<VAppProductSpec>()?),
7117            StructType::VAppPropertySpec => Some(from.as_any_ref().downcast_ref::<VAppPropertySpec>()?),
7118            StructType::VirtualMachineCpuIdInfoSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineCpuIdInfoSpec>()?),
7119            StructType::OptionType => Some(from.as_any_ref().downcast_ref::<OptionType>()?),
7120            StructType::BoolOption => Some(from.as_any_ref().downcast_ref::<BoolOption>()?),
7121            StructType::ChoiceOption => Some(from.as_any_ref().downcast_ref::<ChoiceOption>()?),
7122            StructType::FloatOption => Some(from.as_any_ref().downcast_ref::<FloatOption>()?),
7123            StructType::IntOption => Some(from.as_any_ref().downcast_ref::<IntOption>()?),
7124            StructType::LongOption => Some(from.as_any_ref().downcast_ref::<LongOption>()?),
7125            StructType::StringOption => Some(from.as_any_ref().downcast_ref::<StringOption>()?),
7126            StructType::OptionValue => Some(from.as_any_ref().downcast_ref::<OptionValue>()?),
7127            StructType::HostInternetScsiHbaParamValue => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaParamValue>()?),
7128            StructType::ApplyProfile => Some(from.as_any_ref().downcast_ref::<ApplyProfile>()?),
7129            StructType::ProfileApplyProfileElement => Some(from.as_any_ref().downcast_ref::<ProfileApplyProfileElement>()?),
7130            StructType::ActiveDirectoryProfile => Some(from.as_any_ref().downcast_ref::<ActiveDirectoryProfile>()?),
7131            StructType::AuthenticationProfile => Some(from.as_any_ref().downcast_ref::<AuthenticationProfile>()?),
7132            StructType::DateTimeProfile => Some(from.as_any_ref().downcast_ref::<DateTimeProfile>()?),
7133            StructType::DvsProfile => Some(from.as_any_ref().downcast_ref::<DvsProfile>()?),
7134            StructType::DvsVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsVNicProfile>()?),
7135            StructType::DvsHostVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsHostVNicProfile>()?),
7136            StructType::DvsServiceConsoleVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsServiceConsoleVNicProfile>()?),
7137            StructType::FirewallProfile => Some(from.as_any_ref().downcast_ref::<FirewallProfile>()?),
7138            StructType::FirewallProfileRulesetProfile => Some(from.as_any_ref().downcast_ref::<FirewallProfileRulesetProfile>()?),
7139            StructType::HostApplyProfile => Some(from.as_any_ref().downcast_ref::<HostApplyProfile>()?),
7140            StructType::HostMemoryProfile => Some(from.as_any_ref().downcast_ref::<HostMemoryProfile>()?),
7141            StructType::IpAddressProfile => Some(from.as_any_ref().downcast_ref::<IpAddressProfile>()?),
7142            StructType::IpRouteProfile => Some(from.as_any_ref().downcast_ref::<IpRouteProfile>()?),
7143            StructType::NasStorageProfile => Some(from.as_any_ref().downcast_ref::<NasStorageProfile>()?),
7144            StructType::NetStackInstanceProfile => Some(from.as_any_ref().downcast_ref::<NetStackInstanceProfile>()?),
7145            StructType::NetworkPolicyProfile => Some(from.as_any_ref().downcast_ref::<NetworkPolicyProfile>()?),
7146            StructType::NetworkProfile => Some(from.as_any_ref().downcast_ref::<NetworkProfile>()?),
7147            StructType::NetworkProfileDnsConfigProfile => Some(from.as_any_ref().downcast_ref::<NetworkProfileDnsConfigProfile>()?),
7148            StructType::NsxHostVNicProfile => Some(from.as_any_ref().downcast_ref::<NsxHostVNicProfile>()?),
7149            StructType::OpaqueSwitchProfile => Some(from.as_any_ref().downcast_ref::<OpaqueSwitchProfile>()?),
7150            StructType::OptionProfile => Some(from.as_any_ref().downcast_ref::<OptionProfile>()?),
7151            StructType::PermissionProfile => Some(from.as_any_ref().downcast_ref::<PermissionProfile>()?),
7152            StructType::PhysicalNicProfile => Some(from.as_any_ref().downcast_ref::<PhysicalNicProfile>()?),
7153            StructType::PnicUplinkProfile => Some(from.as_any_ref().downcast_ref::<PnicUplinkProfile>()?),
7154            StructType::PortGroupProfile => Some(from.as_any_ref().downcast_ref::<PortGroupProfile>()?),
7155            StructType::HostPortGroupProfile => Some(from.as_any_ref().downcast_ref::<HostPortGroupProfile>()?),
7156            StructType::ServiceConsolePortGroupProfile => Some(from.as_any_ref().downcast_ref::<ServiceConsolePortGroupProfile>()?),
7157            StructType::VmPortGroupProfile => Some(from.as_any_ref().downcast_ref::<VmPortGroupProfile>()?),
7158            StructType::VirtualSwitchSelectionProfile => Some(from.as_any_ref().downcast_ref::<VirtualSwitchSelectionProfile>()?),
7159            StructType::VlanProfile => Some(from.as_any_ref().downcast_ref::<VlanProfile>()?),
7160            StructType::SecurityProfile => Some(from.as_any_ref().downcast_ref::<SecurityProfile>()?),
7161            StructType::ServiceProfile => Some(from.as_any_ref().downcast_ref::<ServiceProfile>()?),
7162            StructType::StaticRouteProfile => Some(from.as_any_ref().downcast_ref::<StaticRouteProfile>()?),
7163            StructType::StorageProfile => Some(from.as_any_ref().downcast_ref::<StorageProfile>()?),
7164            StructType::UserGroupProfile => Some(from.as_any_ref().downcast_ref::<UserGroupProfile>()?),
7165            StructType::UserProfile => Some(from.as_any_ref().downcast_ref::<UserProfile>()?),
7166            StructType::VirtualSwitchProfile => Some(from.as_any_ref().downcast_ref::<VirtualSwitchProfile>()?),
7167            StructType::LinkProfile => Some(from.as_any_ref().downcast_ref::<LinkProfile>()?),
7168            StructType::NumPortsProfile => Some(from.as_any_ref().downcast_ref::<NumPortsProfile>()?),
7169            StructType::ProfileApplyProfileProperty => Some(from.as_any_ref().downcast_ref::<ProfileApplyProfileProperty>()?),
7170            StructType::ComplianceLocator => Some(from.as_any_ref().downcast_ref::<ComplianceLocator>()?),
7171            StructType::ComplianceProfile => Some(from.as_any_ref().downcast_ref::<ComplianceProfile>()?),
7172            StructType::ComplianceResult => Some(from.as_any_ref().downcast_ref::<ComplianceResult>()?),
7173            StructType::ComplianceFailure => Some(from.as_any_ref().downcast_ref::<ComplianceFailure>()?),
7174            StructType::ComplianceFailureComplianceFailureValues => Some(from.as_any_ref().downcast_ref::<ComplianceFailureComplianceFailureValues>()?),
7175            StructType::ProfileDeferredPolicyOptionParameter => Some(from.as_any_ref().downcast_ref::<ProfileDeferredPolicyOptionParameter>()?),
7176            StructType::ProfileExpression => Some(from.as_any_ref().downcast_ref::<ProfileExpression>()?),
7177            StructType::ProfileCompositeExpression => Some(from.as_any_ref().downcast_ref::<ProfileCompositeExpression>()?),
7178            StructType::ProfileSimpleExpression => Some(from.as_any_ref().downcast_ref::<ProfileSimpleExpression>()?),
7179            StructType::ProfileExpressionMetadata => Some(from.as_any_ref().downcast_ref::<ProfileExpressionMetadata>()?),
7180            StructType::ProfileParameterMetadata => Some(from.as_any_ref().downcast_ref::<ProfileParameterMetadata>()?),
7181            StructType::ProfileParameterMetadataParameterRelationMetadata => Some(from.as_any_ref().downcast_ref::<ProfileParameterMetadataParameterRelationMetadata>()?),
7182            StructType::ProfilePolicy => Some(from.as_any_ref().downcast_ref::<ProfilePolicy>()?),
7183            StructType::ProfilePolicyMetadata => Some(from.as_any_ref().downcast_ref::<ProfilePolicyMetadata>()?),
7184            StructType::PolicyOption => Some(from.as_any_ref().downcast_ref::<PolicyOption>()?),
7185            StructType::CompositePolicyOption => Some(from.as_any_ref().downcast_ref::<CompositePolicyOption>()?),
7186            StructType::ProfilePolicyOptionMetadata => Some(from.as_any_ref().downcast_ref::<ProfilePolicyOptionMetadata>()?),
7187            StructType::ProfileCompositePolicyOptionMetadata => Some(from.as_any_ref().downcast_ref::<ProfileCompositePolicyOptionMetadata>()?),
7188            StructType::UserInputRequiredParameterMetadata => Some(from.as_any_ref().downcast_ref::<UserInputRequiredParameterMetadata>()?),
7189            StructType::ProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<ProfileConfigInfo>()?),
7190            StructType::ClusterProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigInfo>()?),
7191            StructType::HostProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<HostProfileConfigInfo>()?),
7192            StructType::ProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<ProfileCreateSpec>()?),
7193            StructType::ProfileSerializedCreateSpec => Some(from.as_any_ref().downcast_ref::<ProfileSerializedCreateSpec>()?),
7194            StructType::HostProfileSerializedHostProfileSpec => Some(from.as_any_ref().downcast_ref::<HostProfileSerializedHostProfileSpec>()?),
7195            StructType::ClusterProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCreateSpec>()?),
7196            StructType::ClusterProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigSpec>()?),
7197            StructType::ClusterProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCompleteConfigSpec>()?),
7198            StructType::ClusterProfileConfigServiceCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigServiceCreateSpec>()?),
7199            StructType::HostProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileConfigSpec>()?),
7200            StructType::HostProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileCompleteConfigSpec>()?),
7201            StructType::HostProfileHostBasedConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileHostBasedConfigSpec>()?),
7202            StructType::ProfileDescription => Some(from.as_any_ref().downcast_ref::<ProfileDescription>()?),
7203            StructType::ProfileDescriptionSection => Some(from.as_any_ref().downcast_ref::<ProfileDescriptionSection>()?),
7204            StructType::ProfileMetadata => Some(from.as_any_ref().downcast_ref::<ProfileMetadata>()?),
7205            StructType::ProfileMetadataProfileOperationMessage => Some(from.as_any_ref().downcast_ref::<ProfileMetadataProfileOperationMessage>()?),
7206            StructType::ProfileMetadataProfileSortSpec => Some(from.as_any_ref().downcast_ref::<ProfileMetadataProfileSortSpec>()?),
7207            StructType::ProfilePropertyPath => Some(from.as_any_ref().downcast_ref::<ProfilePropertyPath>()?),
7208            StructType::ProfileProfileStructure => Some(from.as_any_ref().downcast_ref::<ProfileProfileStructure>()?),
7209            StructType::ProfileProfileStructureProperty => Some(from.as_any_ref().downcast_ref::<ProfileProfileStructureProperty>()?),
7210            StructType::AnswerFile => Some(from.as_any_ref().downcast_ref::<AnswerFile>()?),
7211            StructType::AnswerFileStatusResult => Some(from.as_any_ref().downcast_ref::<AnswerFileStatusResult>()?),
7212            StructType::AnswerFileStatusError => Some(from.as_any_ref().downcast_ref::<AnswerFileStatusError>()?),
7213            StructType::ProfileExecuteResult => Some(from.as_any_ref().downcast_ref::<ProfileExecuteResult>()?),
7214            StructType::ApplyHostProfileConfigurationSpec => Some(from.as_any_ref().downcast_ref::<ApplyHostProfileConfigurationSpec>()?),
7215            StructType::ProfileExecuteError => Some(from.as_any_ref().downcast_ref::<ProfileExecuteError>()?),
7216            StructType::HostProfileValidationFailureInfo => Some(from.as_any_ref().downcast_ref::<HostProfileValidationFailureInfo>()?),
7217            StructType::HostSpecification => Some(from.as_any_ref().downcast_ref::<HostSpecification>()?),
7218            StructType::HostSubSpecification => Some(from.as_any_ref().downcast_ref::<HostSubSpecification>()?),
7219            StructType::AnswerFileCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileCreateSpec>()?),
7220            StructType::AnswerFileOptionsCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileOptionsCreateSpec>()?),
7221            StructType::AnswerFileSerializedCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileSerializedCreateSpec>()?),
7222            StructType::ApplyHostProfileConfigurationResult => Some(from.as_any_ref().downcast_ref::<ApplyHostProfileConfigurationResult>()?),
7223            StructType::HostProfileManagerCompositionResult => Some(from.as_any_ref().downcast_ref::<HostProfileManagerCompositionResult>()?),
7224            StructType::HostProfileManagerCompositionResultResultElement => Some(from.as_any_ref().downcast_ref::<HostProfileManagerCompositionResultResultElement>()?),
7225            StructType::HostProfileManagerCompositionValidationResult => Some(from.as_any_ref().downcast_ref::<HostProfileManagerCompositionValidationResult>()?),
7226            StructType::HostProfileManagerCompositionValidationResultResultElement => Some(from.as_any_ref().downcast_ref::<HostProfileManagerCompositionValidationResultResultElement>()?),
7227            StructType::HostProfileManagerConfigTaskList => Some(from.as_any_ref().downcast_ref::<HostProfileManagerConfigTaskList>()?),
7228            StructType::HostProfilesEntityCustomizations => Some(from.as_any_ref().downcast_ref::<HostProfilesEntityCustomizations>()?),
7229            StructType::StructuredCustomizations => Some(from.as_any_ref().downcast_ref::<StructuredCustomizations>()?),
7230            StructType::HostProfileManagerHostToConfigSpecMap => Some(from.as_any_ref().downcast_ref::<HostProfileManagerHostToConfigSpecMap>()?),
7231            StructType::ScheduledTaskDescription => Some(from.as_any_ref().downcast_ref::<ScheduledTaskDescription>()?),
7232            StructType::ScheduledTaskSpec => Some(from.as_any_ref().downcast_ref::<ScheduledTaskSpec>()?),
7233            StructType::ScheduledTaskInfo => Some(from.as_any_ref().downcast_ref::<ScheduledTaskInfo>()?),
7234            StructType::TaskScheduler => Some(from.as_any_ref().downcast_ref::<TaskScheduler>()?),
7235            StructType::AfterStartupTaskScheduler => Some(from.as_any_ref().downcast_ref::<AfterStartupTaskScheduler>()?),
7236            StructType::OnceTaskScheduler => Some(from.as_any_ref().downcast_ref::<OnceTaskScheduler>()?),
7237            StructType::RecurrentTaskScheduler => Some(from.as_any_ref().downcast_ref::<RecurrentTaskScheduler>()?),
7238            StructType::HourlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<HourlyTaskScheduler>()?),
7239            StructType::DailyTaskScheduler => Some(from.as_any_ref().downcast_ref::<DailyTaskScheduler>()?),
7240            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
7241            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
7242            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
7243            StructType::WeeklyTaskScheduler => Some(from.as_any_ref().downcast_ref::<WeeklyTaskScheduler>()?),
7244            StructType::ApplyStorageRecommendationResult => Some(from.as_any_ref().downcast_ref::<ApplyStorageRecommendationResult>()?),
7245            StructType::StorageDrsAutomationConfig => Some(from.as_any_ref().downcast_ref::<StorageDrsAutomationConfig>()?),
7246            StructType::StorageDrsConfigInfo => Some(from.as_any_ref().downcast_ref::<StorageDrsConfigInfo>()?),
7247            StructType::StorageDrsConfigSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsConfigSpec>()?),
7248            StructType::StorageDrsIoLoadBalanceConfig => Some(from.as_any_ref().downcast_ref::<StorageDrsIoLoadBalanceConfig>()?),
7249            StructType::PlacementAffinityRule => Some(from.as_any_ref().downcast_ref::<PlacementAffinityRule>()?),
7250            StructType::PlacementRankResult => Some(from.as_any_ref().downcast_ref::<PlacementRankResult>()?),
7251            StructType::PlacementRankSpec => Some(from.as_any_ref().downcast_ref::<PlacementRankSpec>()?),
7252            StructType::StorageDrsPlacementRankVmSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsPlacementRankVmSpec>()?),
7253            StructType::StorageDrsPodConfigInfo => Some(from.as_any_ref().downcast_ref::<StorageDrsPodConfigInfo>()?),
7254            StructType::StorageDrsPodConfigSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsPodConfigSpec>()?),
7255            StructType::StorageDrsPodSelectionSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsPodSelectionSpec>()?),
7256            StructType::PodDiskLocator => Some(from.as_any_ref().downcast_ref::<PodDiskLocator>()?),
7257            StructType::VmPodConfigForPlacement => Some(from.as_any_ref().downcast_ref::<VmPodConfigForPlacement>()?),
7258            StructType::StorageDrsSpaceLoadBalanceConfig => Some(from.as_any_ref().downcast_ref::<StorageDrsSpaceLoadBalanceConfig>()?),
7259            StructType::StoragePlacementResult => Some(from.as_any_ref().downcast_ref::<StoragePlacementResult>()?),
7260            StructType::StoragePlacementSpec => Some(from.as_any_ref().downcast_ref::<StoragePlacementSpec>()?),
7261            StructType::StorageDrsVmConfigInfo => Some(from.as_any_ref().downcast_ref::<StorageDrsVmConfigInfo>()?),
7262            StructType::VAppCloneSpec => Some(from.as_any_ref().downcast_ref::<VAppCloneSpec>()?),
7263            StructType::VAppCloneSpecNetworkMappingPair => Some(from.as_any_ref().downcast_ref::<VAppCloneSpecNetworkMappingPair>()?),
7264            StructType::VAppCloneSpecResourceMap => Some(from.as_any_ref().downcast_ref::<VAppCloneSpecResourceMap>()?),
7265            StructType::VAppEntityConfigInfo => Some(from.as_any_ref().downcast_ref::<VAppEntityConfigInfo>()?),
7266            StructType::VAppIpAssignmentInfo => Some(from.as_any_ref().downcast_ref::<VAppIpAssignmentInfo>()?),
7267            StructType::IpPool => Some(from.as_any_ref().downcast_ref::<IpPool>()?),
7268            StructType::IpPoolAssociation => Some(from.as_any_ref().downcast_ref::<IpPoolAssociation>()?),
7269            StructType::IpPoolIpPoolConfigInfo => Some(from.as_any_ref().downcast_ref::<IpPoolIpPoolConfigInfo>()?),
7270            StructType::VAppOvfSectionInfo => Some(from.as_any_ref().downcast_ref::<VAppOvfSectionInfo>()?),
7271            StructType::VAppProductInfo => Some(from.as_any_ref().downcast_ref::<VAppProductInfo>()?),
7272            StructType::VAppPropertyInfo => Some(from.as_any_ref().downcast_ref::<VAppPropertyInfo>()?),
7273            StructType::VmConfigInfo => Some(from.as_any_ref().downcast_ref::<VmConfigInfo>()?),
7274            StructType::VAppConfigInfo => Some(from.as_any_ref().downcast_ref::<VAppConfigInfo>()?),
7275            StructType::VmConfigSpec => Some(from.as_any_ref().downcast_ref::<VmConfigSpec>()?),
7276            StructType::VAppConfigSpec => Some(from.as_any_ref().downcast_ref::<VAppConfigSpec>()?),
7277            StructType::ClusterNetworkConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterNetworkConfigSpec>()?),
7278            StructType::FailoverNodeInfo => Some(from.as_any_ref().downcast_ref::<FailoverNodeInfo>()?),
7279            StructType::NodeDeploymentSpec => Some(from.as_any_ref().downcast_ref::<NodeDeploymentSpec>()?),
7280            StructType::PassiveNodeDeploymentSpec => Some(from.as_any_ref().downcast_ref::<PassiveNodeDeploymentSpec>()?),
7281            StructType::NodeNetworkSpec => Some(from.as_any_ref().downcast_ref::<NodeNetworkSpec>()?),
7282            StructType::PassiveNodeNetworkSpec => Some(from.as_any_ref().downcast_ref::<PassiveNodeNetworkSpec>()?),
7283            StructType::SourceNodeSpec => Some(from.as_any_ref().downcast_ref::<SourceNodeSpec>()?),
7284            StructType::VchaClusterConfigInfo => Some(from.as_any_ref().downcast_ref::<VchaClusterConfigInfo>()?),
7285            StructType::VchaClusterConfigSpec => Some(from.as_any_ref().downcast_ref::<VchaClusterConfigSpec>()?),
7286            StructType::VchaClusterDeploymentSpec => Some(from.as_any_ref().downcast_ref::<VchaClusterDeploymentSpec>()?),
7287            StructType::VchaClusterNetworkSpec => Some(from.as_any_ref().downcast_ref::<VchaClusterNetworkSpec>()?),
7288            StructType::WitnessNodeInfo => Some(from.as_any_ref().downcast_ref::<WitnessNodeInfo>()?),
7289            StructType::VchaClusterHealth => Some(from.as_any_ref().downcast_ref::<VchaClusterHealth>()?),
7290            StructType::VchaClusterRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VchaClusterRuntimeInfo>()?),
7291            StructType::VchaNodeRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VchaNodeRuntimeInfo>()?),
7292            StructType::VirtualMachineAffinityInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineAffinityInfo>()?),
7293            StructType::VirtualMachineBaseIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineBaseIndependentFilterSpec>()?),
7294            StructType::VirtualMachineEmptyIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineEmptyIndependentFilterSpec>()?),
7295            StructType::VirtualMachineIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineIndependentFilterSpec>()?),
7296            StructType::VirtualMachineBootOptions => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptions>()?),
7297            StructType::VirtualMachineBootOptionsBootableDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableDevice>()?),
7298            StructType::VirtualMachineBootOptionsBootableCdromDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableCdromDevice>()?),
7299            StructType::VirtualMachineBootOptionsBootableDiskDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableDiskDevice>()?),
7300            StructType::VirtualMachineBootOptionsBootableEthernetDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableEthernetDevice>()?),
7301            StructType::VirtualMachineBootOptionsBootableFloppyDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableFloppyDevice>()?),
7302            StructType::VirtualMachineCapability => Some(from.as_any_ref().downcast_ref::<VirtualMachineCapability>()?),
7303            StructType::VirtualMachineCertThumbprint => Some(from.as_any_ref().downcast_ref::<VirtualMachineCertThumbprint>()?),
7304            StructType::VirtualMachineCloneSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineCloneSpec>()?),
7305            StructType::VirtualMachineConfigInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigInfo>()?),
7306            StructType::VirtualMachineConfigInfoDatastoreUrlPair => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigInfoDatastoreUrlPair>()?),
7307            StructType::VirtualMachineConfigInfoOverheadInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigInfoOverheadInfo>()?),
7308            StructType::VirtualMachineConfigOption => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigOption>()?),
7309            StructType::VirtualMachineConfigOptionDescriptor => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigOptionDescriptor>()?),
7310            StructType::VirtualMachineConfigSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigSpec>()?),
7311            StructType::ConfigTarget => Some(from.as_any_ref().downcast_ref::<ConfigTarget>()?),
7312            StructType::VirtualMachineConsolePreferences => Some(from.as_any_ref().downcast_ref::<VirtualMachineConsolePreferences>()?),
7313            StructType::VirtualMachineContentLibraryItemInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineContentLibraryItemInfo>()?),
7314            StructType::DatastoreOption => Some(from.as_any_ref().downcast_ref::<DatastoreOption>()?),
7315            StructType::VirtualMachineDatastoreVolumeOption => Some(from.as_any_ref().downcast_ref::<VirtualMachineDatastoreVolumeOption>()?),
7316            StructType::VirtualMachineDefaultPowerOpInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDefaultPowerOpInfo>()?),
7317            StructType::VirtualMachineDeviceRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDeviceRuntimeInfo>()?),
7318            StructType::VirtualMachineDeviceRuntimeInfoDeviceRuntimeState => Some(from.as_any_ref().downcast_ref::<VirtualMachineDeviceRuntimeInfoDeviceRuntimeState>()?),
7319            StructType::VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState => Some(from.as_any_ref().downcast_ref::<VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState>()?),
7320            StructType::VirtualMachineDvxClassInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDvxClassInfo>()?),
7321            StructType::FaultToleranceConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultToleranceConfigInfo>()?),
7322            StructType::FaultTolerancePrimaryConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultTolerancePrimaryConfigInfo>()?),
7323            StructType::FaultToleranceSecondaryConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultToleranceSecondaryConfigInfo>()?),
7324            StructType::FaultToleranceConfigSpec => Some(from.as_any_ref().downcast_ref::<FaultToleranceConfigSpec>()?),
7325            StructType::FaultToleranceMetaSpec => Some(from.as_any_ref().downcast_ref::<FaultToleranceMetaSpec>()?),
7326            StructType::FaultToleranceSecondaryOpResult => Some(from.as_any_ref().downcast_ref::<FaultToleranceSecondaryOpResult>()?),
7327            StructType::FaultToleranceVmConfigSpec => Some(from.as_any_ref().downcast_ref::<FaultToleranceVmConfigSpec>()?),
7328            StructType::FaultToleranceDiskSpec => Some(from.as_any_ref().downcast_ref::<FaultToleranceDiskSpec>()?),
7329            StructType::VirtualMachineFeatureRequirement => Some(from.as_any_ref().downcast_ref::<VirtualMachineFeatureRequirement>()?),
7330            StructType::VirtualMachineFileInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileInfo>()?),
7331            StructType::VirtualMachineFileLayout => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayout>()?),
7332            StructType::VirtualMachineFileLayoutDiskLayout => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutDiskLayout>()?),
7333            StructType::VirtualMachineFileLayoutSnapshotLayout => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutSnapshotLayout>()?),
7334            StructType::VirtualMachineFileLayoutEx => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutEx>()?),
7335            StructType::VirtualMachineFileLayoutExDiskLayout => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutExDiskLayout>()?),
7336            StructType::VirtualMachineFileLayoutExDiskUnit => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutExDiskUnit>()?),
7337            StructType::VirtualMachineFileLayoutExFileInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutExFileInfo>()?),
7338            StructType::VirtualMachineFileLayoutExSnapshotLayout => Some(from.as_any_ref().downcast_ref::<VirtualMachineFileLayoutExSnapshotLayout>()?),
7339            StructType::VirtualMachineFlagInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineFlagInfo>()?),
7340            StructType::VirtualMachineForkConfigInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineForkConfigInfo>()?),
7341            StructType::GuestInfo => Some(from.as_any_ref().downcast_ref::<GuestInfo>()?),
7342            StructType::GuestInfoCustomizationInfo => Some(from.as_any_ref().downcast_ref::<GuestInfoCustomizationInfo>()?),
7343            StructType::GuestDiskInfo => Some(from.as_any_ref().downcast_ref::<GuestDiskInfo>()?),
7344            StructType::GuestInfoNamespaceGenerationInfo => Some(from.as_any_ref().downcast_ref::<GuestInfoNamespaceGenerationInfo>()?),
7345            StructType::GuestNicInfo => Some(from.as_any_ref().downcast_ref::<GuestNicInfo>()?),
7346            StructType::GuestScreenInfo => Some(from.as_any_ref().downcast_ref::<GuestScreenInfo>()?),
7347            StructType::GuestStackInfo => Some(from.as_any_ref().downcast_ref::<GuestStackInfo>()?),
7348            StructType::GuestInfoVirtualDiskMapping => Some(from.as_any_ref().downcast_ref::<GuestInfoVirtualDiskMapping>()?),
7349            StructType::VirtualMachineGuestIntegrityInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineGuestIntegrityInfo>()?),
7350            StructType::VirtualMachineGuestMonitoringModeInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineGuestMonitoringModeInfo>()?),
7351            StructType::GuestOsDescriptor => Some(from.as_any_ref().downcast_ref::<GuestOsDescriptor>()?),
7352            StructType::VirtualMachineGuestQuiesceSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineGuestQuiesceSpec>()?),
7353            StructType::VirtualMachineWindowsQuiesceSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineWindowsQuiesceSpec>()?),
7354            StructType::VirtualMachineIdeDiskDevicePartitionInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineIdeDiskDevicePartitionInfo>()?),
7355            StructType::VirtualMachineInstantCloneSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineInstantCloneSpec>()?),
7356            StructType::VirtualMachineLegacyNetworkSwitchInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineLegacyNetworkSwitchInfo>()?),
7357            StructType::VirtualMachineMessage => Some(from.as_any_ref().downcast_ref::<VirtualMachineMessage>()?),
7358            StructType::VirtualMachineMetadataManagerVmMetadata => Some(from.as_any_ref().downcast_ref::<VirtualMachineMetadataManagerVmMetadata>()?),
7359            StructType::VirtualMachineMetadataManagerVmMetadataInput => Some(from.as_any_ref().downcast_ref::<VirtualMachineMetadataManagerVmMetadataInput>()?),
7360            StructType::VirtualMachineMetadataManagerVmMetadataOwner => Some(from.as_any_ref().downcast_ref::<VirtualMachineMetadataManagerVmMetadataOwner>()?),
7361            StructType::VirtualMachineMetadataManagerVmMetadataResult => Some(from.as_any_ref().downcast_ref::<VirtualMachineMetadataManagerVmMetadataResult>()?),
7362            StructType::VirtualMachineNetworkShaperInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineNetworkShaperInfo>()?),
7363            StructType::VirtualMachineProfileDetails => Some(from.as_any_ref().downcast_ref::<VirtualMachineProfileDetails>()?),
7364            StructType::VirtualMachineProfileDetailsDiskProfileDetails => Some(from.as_any_ref().downcast_ref::<VirtualMachineProfileDetailsDiskProfileDetails>()?),
7365            StructType::VirtualMachineProfileRawData => Some(from.as_any_ref().downcast_ref::<VirtualMachineProfileRawData>()?),
7366            StructType::VirtualMachineProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineProfileSpec>()?),
7367            StructType::VirtualMachineDefaultProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineDefaultProfileSpec>()?),
7368            StructType::VirtualMachineDefinedProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineDefinedProfileSpec>()?),
7369            StructType::VirtualMachineEmptyProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineEmptyProfileSpec>()?),
7370            StructType::VirtualMachinePropertyRelation => Some(from.as_any_ref().downcast_ref::<VirtualMachinePropertyRelation>()?),
7371            StructType::VirtualMachineQuestionInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineQuestionInfo>()?),
7372            StructType::VirtualMachineRelocateSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineRelocateSpec>()?),
7373            StructType::VirtualMachineRelocateSpecDiskLocator => Some(from.as_any_ref().downcast_ref::<VirtualMachineRelocateSpecDiskLocator>()?),
7374            StructType::VirtualMachineRelocateSpecDiskLocatorBackingSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineRelocateSpecDiskLocatorBackingSpec>()?),
7375            StructType::ReplicationConfigSpec => Some(from.as_any_ref().downcast_ref::<ReplicationConfigSpec>()?),
7376            StructType::ReplicationInfoDiskSettings => Some(from.as_any_ref().downcast_ref::<ReplicationInfoDiskSettings>()?),
7377            StructType::VirtualMachineRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineRuntimeInfo>()?),
7378            StructType::VirtualMachineRuntimeInfoDasProtectionState => Some(from.as_any_ref().downcast_ref::<VirtualMachineRuntimeInfoDasProtectionState>()?),
7379            StructType::ScheduledHardwareUpgradeInfo => Some(from.as_any_ref().downcast_ref::<ScheduledHardwareUpgradeInfo>()?),
7380            StructType::VirtualMachineSgxInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSgxInfo>()?),
7381            StructType::VirtualMachineSnapshotInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSnapshotInfo>()?),
7382            StructType::SnapshotSelectionSpec => Some(from.as_any_ref().downcast_ref::<SnapshotSelectionSpec>()?),
7383            StructType::VirtualMachineSnapshotTree => Some(from.as_any_ref().downcast_ref::<VirtualMachineSnapshotTree>()?),
7384            StructType::VirtualMachineSriovDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovDevicePoolInfo>()?),
7385            StructType::VirtualMachineSriovNetworkDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovNetworkDevicePoolInfo>()?),
7386            StructType::VirtualMachineStorageInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineStorageInfo>()?),
7387            StructType::VirtualMachineUsageOnDatastore => Some(from.as_any_ref().downcast_ref::<VirtualMachineUsageOnDatastore>()?),
7388            StructType::SubnetInfoFolderInfo => Some(from.as_any_ref().downcast_ref::<SubnetInfoFolderInfo>()?),
7389            StructType::VirtualMachineSummary => Some(from.as_any_ref().downcast_ref::<VirtualMachineSummary>()?),
7390            StructType::VirtualMachineConfigSummary => Some(from.as_any_ref().downcast_ref::<VirtualMachineConfigSummary>()?),
7391            StructType::VirtualMachineGuestSummary => Some(from.as_any_ref().downcast_ref::<VirtualMachineGuestSummary>()?),
7392            StructType::VirtualMachineQuickStats => Some(from.as_any_ref().downcast_ref::<VirtualMachineQuickStats>()?),
7393            StructType::VirtualMachineQuickStatsMemoryTierStats => Some(from.as_any_ref().downcast_ref::<VirtualMachineQuickStatsMemoryTierStats>()?),
7394            StructType::VirtualMachineStorageSummary => Some(from.as_any_ref().downcast_ref::<VirtualMachineStorageSummary>()?),
7395            StructType::VirtualMachineTargetInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineTargetInfo>()?),
7396            StructType::VirtualMachineCdromInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineCdromInfo>()?),
7397            StructType::VirtualMachineDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDatastoreInfo>()?),
7398            StructType::VirtualMachineDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDiskDeviceInfo>()?),
7399            StructType::VirtualMachineIdeDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineIdeDiskDeviceInfo>()?),
7400            StructType::VirtualMachineScsiDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineScsiDiskDeviceInfo>()?),
7401            StructType::VirtualMachineDynamicPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDynamicPassthroughInfo>()?),
7402            StructType::VirtualMachineFloppyInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineFloppyInfo>()?),
7403            StructType::VirtualMachineNetworkInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineNetworkInfo>()?),
7404            StructType::OpaqueNetworkTargetInfo => Some(from.as_any_ref().downcast_ref::<OpaqueNetworkTargetInfo>()?),
7405            StructType::VirtualMachineParallelInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineParallelInfo>()?),
7406            StructType::VirtualMachinePciPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePciPassthroughInfo>()?),
7407            StructType::VirtualMachineSriovInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovInfo>()?),
7408            StructType::VirtualMachinePciSharedGpuPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePciSharedGpuPassthroughInfo>()?),
7409            StructType::VirtualMachinePrecisionClockInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePrecisionClockInfo>()?),
7410            StructType::VirtualMachineScsiPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineScsiPassthroughInfo>()?),
7411            StructType::VirtualMachineSerialInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSerialInfo>()?),
7412            StructType::VirtualMachineSgxTargetInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSgxTargetInfo>()?),
7413            StructType::VirtualMachineSoundInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSoundInfo>()?),
7414            StructType::SubnetInfo => Some(from.as_any_ref().downcast_ref::<SubnetInfo>()?),
7415            StructType::VirtualMachineUsbInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineUsbInfo>()?),
7416            StructType::VirtualMachineVFlashModuleInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVFlashModuleInfo>()?),
7417            StructType::VirtualMachineVMotionStunTimeInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVMotionStunTimeInfo>()?),
7418            StructType::VirtualMachineVendorDeviceGroupInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVendorDeviceGroupInfo>()?),
7419            StructType::VirtualMachineVgpuDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVgpuDeviceInfo>()?),
7420            StructType::VirtualMachineVgpuProfileInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVgpuProfileInfo>()?),
7421            StructType::ToolsConfigInfo => Some(from.as_any_ref().downcast_ref::<ToolsConfigInfo>()?),
7422            StructType::ToolsConfigInfoToolsLastInstallInfo => Some(from.as_any_ref().downcast_ref::<ToolsConfigInfoToolsLastInstallInfo>()?),
7423            StructType::UsbScanCodeSpec => Some(from.as_any_ref().downcast_ref::<UsbScanCodeSpec>()?),
7424            StructType::UsbScanCodeSpecKeyEvent => Some(from.as_any_ref().downcast_ref::<UsbScanCodeSpecKeyEvent>()?),
7425            StructType::UsbScanCodeSpecModifierType => Some(from.as_any_ref().downcast_ref::<UsbScanCodeSpecModifierType>()?),
7426            StructType::VirtualMachineVcpuConfig => Some(from.as_any_ref().downcast_ref::<VirtualMachineVcpuConfig>()?),
7427            StructType::VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo>()?),
7428            StructType::VirtualMachineVirtualDeviceGroups => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceGroups>()?),
7429            StructType::VirtualMachineVirtualDeviceGroupsDeviceGroup => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceGroupsDeviceGroup>()?),
7430            StructType::VirtualMachineVirtualDeviceGroupsVendorDeviceGroup => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceGroupsVendorDeviceGroup>()?),
7431            StructType::VirtualMachineVirtualDeviceSwap => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceSwap>()?),
7432            StructType::VirtualMachineVirtualDeviceSwapDeviceSwapInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceSwapDeviceSwapInfo>()?),
7433            StructType::VirtualHardware => Some(from.as_any_ref().downcast_ref::<VirtualHardware>()?),
7434            StructType::VirtualHardwareOption => Some(from.as_any_ref().downcast_ref::<VirtualHardwareOption>()?),
7435            StructType::VirtualMachineVirtualNuma => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualNuma>()?),
7436            StructType::VirtualMachineVirtualNumaInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualNumaInfo>()?),
7437            StructType::VirtualMachineVirtualPMem => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualPMem>()?),
7438            StructType::CheckResult => Some(from.as_any_ref().downcast_ref::<CheckResult>()?),
7439            StructType::CustomizationAdapterMapping => Some(from.as_any_ref().downcast_ref::<CustomizationAdapterMapping>()?),
7440            StructType::CustomizationGlobalIpSettings => Some(from.as_any_ref().downcast_ref::<CustomizationGlobalIpSettings>()?),
7441            StructType::CustomizationGuiRunOnce => Some(from.as_any_ref().downcast_ref::<CustomizationGuiRunOnce>()?),
7442            StructType::CustomizationGuiUnattended => Some(from.as_any_ref().downcast_ref::<CustomizationGuiUnattended>()?),
7443            StructType::CustomizationIpSettings => Some(from.as_any_ref().downcast_ref::<CustomizationIpSettings>()?),
7444            StructType::CustomizationIpSettingsIpV6AddressSpec => Some(from.as_any_ref().downcast_ref::<CustomizationIpSettingsIpV6AddressSpec>()?),
7445            StructType::CustomizationIdentification => Some(from.as_any_ref().downcast_ref::<CustomizationIdentification>()?),
7446            StructType::CustomizationIdentitySettings => Some(from.as_any_ref().downcast_ref::<CustomizationIdentitySettings>()?),
7447            StructType::CustomizationCloudinitPrep => Some(from.as_any_ref().downcast_ref::<CustomizationCloudinitPrep>()?),
7448            StructType::CustomizationLinuxPrep => Some(from.as_any_ref().downcast_ref::<CustomizationLinuxPrep>()?),
7449            StructType::CustomizationSysprep => Some(from.as_any_ref().downcast_ref::<CustomizationSysprep>()?),
7450            StructType::CustomizationSysprepText => Some(from.as_any_ref().downcast_ref::<CustomizationSysprepText>()?),
7451            StructType::CustomizationIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationIpGenerator>()?),
7452            StructType::CustomizationCustomIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationCustomIpGenerator>()?),
7453            StructType::CustomizationDhcpIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationDhcpIpGenerator>()?),
7454            StructType::CustomizationFixedIp => Some(from.as_any_ref().downcast_ref::<CustomizationFixedIp>()?),
7455            StructType::CustomizationUnknownIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownIpGenerator>()?),
7456            StructType::CustomizationIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationIpV6Generator>()?),
7457            StructType::CustomizationAutoIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationAutoIpV6Generator>()?),
7458            StructType::CustomizationCustomIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationCustomIpV6Generator>()?),
7459            StructType::CustomizationDhcpIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationDhcpIpV6Generator>()?),
7460            StructType::CustomizationFixedIpV6 => Some(from.as_any_ref().downcast_ref::<CustomizationFixedIpV6>()?),
7461            StructType::CustomizationStatelessIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationStatelessIpV6Generator>()?),
7462            StructType::CustomizationUnknownIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownIpV6Generator>()?),
7463            StructType::CustomizationLicenseFilePrintData => Some(from.as_any_ref().downcast_ref::<CustomizationLicenseFilePrintData>()?),
7464            StructType::CustomizationName => Some(from.as_any_ref().downcast_ref::<CustomizationName>()?),
7465            StructType::CustomizationCustomName => Some(from.as_any_ref().downcast_ref::<CustomizationCustomName>()?),
7466            StructType::CustomizationFixedName => Some(from.as_any_ref().downcast_ref::<CustomizationFixedName>()?),
7467            StructType::CustomizationPrefixName => Some(from.as_any_ref().downcast_ref::<CustomizationPrefixName>()?),
7468            StructType::CustomizationUnknownName => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownName>()?),
7469            StructType::CustomizationVirtualMachineName => Some(from.as_any_ref().downcast_ref::<CustomizationVirtualMachineName>()?),
7470            StructType::CustomizationOptions => Some(from.as_any_ref().downcast_ref::<CustomizationOptions>()?),
7471            StructType::CustomizationLinuxOptions => Some(from.as_any_ref().downcast_ref::<CustomizationLinuxOptions>()?),
7472            StructType::CustomizationWinOptions => Some(from.as_any_ref().downcast_ref::<CustomizationWinOptions>()?),
7473            StructType::CustomizationPassword => Some(from.as_any_ref().downcast_ref::<CustomizationPassword>()?),
7474            StructType::CustomizationSpec => Some(from.as_any_ref().downcast_ref::<CustomizationSpec>()?),
7475            StructType::CustomizationUserData => Some(from.as_any_ref().downcast_ref::<CustomizationUserData>()?),
7476            StructType::HostDiskMappingInfo => Some(from.as_any_ref().downcast_ref::<HostDiskMappingInfo>()?),
7477            StructType::HostDiskMappingPartitionInfo => Some(from.as_any_ref().downcast_ref::<HostDiskMappingPartitionInfo>()?),
7478            StructType::HostDiskMappingOption => Some(from.as_any_ref().downcast_ref::<HostDiskMappingOption>()?),
7479            StructType::HostDiskMappingPartitionOption => Some(from.as_any_ref().downcast_ref::<HostDiskMappingPartitionOption>()?),
7480            StructType::VirtualDevice => Some(from.as_any_ref().downcast_ref::<VirtualDevice>()?),
7481            StructType::VirtualCdrom => Some(from.as_any_ref().downcast_ref::<VirtualCdrom>()?),
7482            StructType::VirtualController => Some(from.as_any_ref().downcast_ref::<VirtualController>()?),
7483            StructType::VirtualIdeController => Some(from.as_any_ref().downcast_ref::<VirtualIdeController>()?),
7484            StructType::VirtualNvdimmController => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmController>()?),
7485            StructType::VirtualNvmeController => Some(from.as_any_ref().downcast_ref::<VirtualNvmeController>()?),
7486            StructType::VirtualPciController => Some(from.as_any_ref().downcast_ref::<VirtualPciController>()?),
7487            StructType::VirtualPs2Controller => Some(from.as_any_ref().downcast_ref::<VirtualPs2Controller>()?),
7488            StructType::VirtualSataController => Some(from.as_any_ref().downcast_ref::<VirtualSataController>()?),
7489            StructType::VirtualAhciController => Some(from.as_any_ref().downcast_ref::<VirtualAhciController>()?),
7490            StructType::VirtualScsiController => Some(from.as_any_ref().downcast_ref::<VirtualScsiController>()?),
7491            StructType::ParaVirtualScsiController => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiController>()?),
7492            StructType::VirtualBusLogicController => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicController>()?),
7493            StructType::VirtualLsiLogicController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicController>()?),
7494            StructType::VirtualLsiLogicSasController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasController>()?),
7495            StructType::VirtualSioController => Some(from.as_any_ref().downcast_ref::<VirtualSioController>()?),
7496            StructType::VirtualUsbController => Some(from.as_any_ref().downcast_ref::<VirtualUsbController>()?),
7497            StructType::VirtualUsbxhciController => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciController>()?),
7498            StructType::VirtualDisk => Some(from.as_any_ref().downcast_ref::<VirtualDisk>()?),
7499            StructType::VirtualEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCard>()?),
7500            StructType::VirtualE1000 => Some(from.as_any_ref().downcast_ref::<VirtualE1000>()?),
7501            StructType::VirtualE1000E => Some(from.as_any_ref().downcast_ref::<VirtualE1000E>()?),
7502            StructType::VirtualPcNet32 => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32>()?),
7503            StructType::VirtualSriovEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCard>()?),
7504            StructType::VirtualVmxnet => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet>()?),
7505            StructType::VirtualVmxnet2 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2>()?),
7506            StructType::VirtualVmxnet3 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3>()?),
7507            StructType::VirtualVmxnet3Vrdma => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Vrdma>()?),
7508            StructType::VirtualFloppy => Some(from.as_any_ref().downcast_ref::<VirtualFloppy>()?),
7509            StructType::VirtualKeyboard => Some(from.as_any_ref().downcast_ref::<VirtualKeyboard>()?),
7510            StructType::VirtualNvdimm => Some(from.as_any_ref().downcast_ref::<VirtualNvdimm>()?),
7511            StructType::VirtualPciPassthrough => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthrough>()?),
7512            StructType::VirtualParallelPort => Some(from.as_any_ref().downcast_ref::<VirtualParallelPort>()?),
7513            StructType::VirtualPointingDevice => Some(from.as_any_ref().downcast_ref::<VirtualPointingDevice>()?),
7514            StructType::VirtualPrecisionClock => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClock>()?),
7515            StructType::VirtualScsiPassthrough => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthrough>()?),
7516            StructType::VirtualSerialPort => Some(from.as_any_ref().downcast_ref::<VirtualSerialPort>()?),
7517            StructType::VirtualSoundCard => Some(from.as_any_ref().downcast_ref::<VirtualSoundCard>()?),
7518            StructType::VirtualEnsoniq1371 => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371>()?),
7519            StructType::VirtualHdAudioCard => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCard>()?),
7520            StructType::VirtualSoundBlaster16 => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16>()?),
7521            StructType::VirtualTpm => Some(from.as_any_ref().downcast_ref::<VirtualTpm>()?),
7522            StructType::VirtualUsb => Some(from.as_any_ref().downcast_ref::<VirtualUsb>()?),
7523            StructType::VirtualMachineVmciDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDevice>()?),
7524            StructType::VirtualMachineVmirom => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmirom>()?),
7525            StructType::VirtualMachineVideoCard => Some(from.as_any_ref().downcast_ref::<VirtualMachineVideoCard>()?),
7526            StructType::VirtualWdt => Some(from.as_any_ref().downcast_ref::<VirtualWdt>()?),
7527            StructType::VirtualDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBackingInfo>()?),
7528            StructType::VirtualDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingInfo>()?),
7529            StructType::VirtualCdromAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingInfo>()?),
7530            StructType::VirtualCdromPassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingInfo>()?),
7531            StructType::VirtualDiskRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingInfo>()?),
7532            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
7533            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
7534            StructType::VirtualEthernetCardNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingInfo>()?),
7535            StructType::VirtualFloppyDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingInfo>()?),
7536            StructType::VirtualPciPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingInfo>()?),
7537            StructType::VirtualPciPassthroughDynamicBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingInfo>()?),
7538            StructType::VirtualParallelPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingInfo>()?),
7539            StructType::VirtualPointingDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceDeviceBackingInfo>()?),
7540            StructType::VirtualScsiPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingInfo>()?),
7541            StructType::VirtualSerialPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingInfo>()?),
7542            StructType::VirtualSoundCardDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingInfo>()?),
7543            StructType::VirtualUsbRemoteHostBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingInfo>()?),
7544            StructType::VirtualUsbusbBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingInfo>()?),
7545            StructType::VirtualDeviceFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingInfo>()?),
7546            StructType::VirtualCdromIsoBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingInfo>()?),
7547            StructType::VirtualDiskFlatVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingInfo>()?),
7548            StructType::VirtualDiskFlatVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingInfo>()?),
7549            StructType::VirtualDiskLocalPMemBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingInfo>()?),
7550            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
7551            StructType::VirtualDiskSeSparseBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingInfo>()?),
7552            StructType::VirtualDiskSparseVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingInfo>()?),
7553            StructType::VirtualDiskSparseVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingInfo>()?),
7554            StructType::VirtualFloppyImageBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingInfo>()?),
7555            StructType::VirtualNvdimmBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmBackingInfo>()?),
7556            StructType::VirtualParallelPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingInfo>()?),
7557            StructType::VirtualSerialPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingInfo>()?),
7558            StructType::VirtualDevicePipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingInfo>()?),
7559            StructType::VirtualSerialPortPipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingInfo>()?),
7560            StructType::VirtualDeviceRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingInfo>()?),
7561            StructType::VirtualCdromRemoteAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingInfo>()?),
7562            StructType::VirtualCdromRemotePassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingInfo>()?),
7563            StructType::VirtualFloppyRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingInfo>()?),
7564            StructType::VirtualUsbRemoteClientBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingInfo>()?),
7565            StructType::VirtualDeviceUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingInfo>()?),
7566            StructType::VirtualSerialPortUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingInfo>()?),
7567            StructType::VirtualEthernetCardDistributedVirtualPortBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardDistributedVirtualPortBackingInfo>()?),
7568            StructType::VirtualEthernetCardOpaqueNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOpaqueNetworkBackingInfo>()?),
7569            StructType::VirtualPciPassthroughDvxBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDvxBackingInfo>()?),
7570            StructType::VirtualPciPassthroughPluginBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingInfo>()?),
7571            StructType::VirtualPciPassthroughVmiopBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingInfo>()?),
7572            StructType::VirtualPrecisionClockSystemClockBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockSystemClockBackingInfo>()?),
7573            StructType::VirtualSerialPortThinPrintBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortThinPrintBackingInfo>()?),
7574            StructType::VirtualSriovEthernetCardSriovBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardSriovBackingInfo>()?),
7575            StructType::VirtualDeviceBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBusSlotInfo>()?),
7576            StructType::VirtualDevicePciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePciBusSlotInfo>()?),
7577            StructType::VirtualUsbControllerPciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerPciBusSlotInfo>()?),
7578            StructType::VirtualDeviceConnectInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceConnectInfo>()?),
7579            StructType::VirtualDeviceDeviceGroupInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceGroupInfo>()?),
7580            StructType::VirtualDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceOption>()?),
7581            StructType::VirtualCdromOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromOption>()?),
7582            StructType::VirtualControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualControllerOption>()?),
7583            StructType::VirtualIdeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualIdeControllerOption>()?),
7584            StructType::VirtualNvdimmControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmControllerOption>()?),
7585            StructType::VirtualNvmeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvmeControllerOption>()?),
7586            StructType::VirtualPciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPciControllerOption>()?),
7587            StructType::VirtualPs2ControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPs2ControllerOption>()?),
7588            StructType::VirtualSataControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSataControllerOption>()?),
7589            StructType::VirtualAhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualAhciControllerOption>()?),
7590            StructType::VirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiControllerOption>()?),
7591            StructType::ParaVirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiControllerOption>()?),
7592            StructType::VirtualBusLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicControllerOption>()?),
7593            StructType::VirtualLsiLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicControllerOption>()?),
7594            StructType::VirtualLsiLogicSasControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasControllerOption>()?),
7595            StructType::VirtualSioControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSioControllerOption>()?),
7596            StructType::VirtualUsbControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerOption>()?),
7597            StructType::VirtualUsbxhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciControllerOption>()?),
7598            StructType::VirtualDiskOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskOption>()?),
7599            StructType::VirtualEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOption>()?),
7600            StructType::VirtualE1000Option => Some(from.as_any_ref().downcast_ref::<VirtualE1000Option>()?),
7601            StructType::VirtualE1000EOption => Some(from.as_any_ref().downcast_ref::<VirtualE1000EOption>()?),
7602            StructType::VirtualPcNet32Option => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32Option>()?),
7603            StructType::VirtualSriovEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardOption>()?),
7604            StructType::VirtualVmxnetOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnetOption>()?),
7605            StructType::VirtualVmxnet2Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2Option>()?),
7606            StructType::VirtualVmxnet3Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Option>()?),
7607            StructType::VirtualVmxnet3VrdmaOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3VrdmaOption>()?),
7608            StructType::VirtualFloppyOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyOption>()?),
7609            StructType::VirtualKeyboardOption => Some(from.as_any_ref().downcast_ref::<VirtualKeyboardOption>()?),
7610            StructType::VirtualNvdimmOption => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmOption>()?),
7611            StructType::VirtualPciPassthroughOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughOption>()?),
7612            StructType::VirtualParallelPortOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortOption>()?),
7613            StructType::VirtualPointingDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceOption>()?),
7614            StructType::VirtualPrecisionClockOption => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockOption>()?),
7615            StructType::VirtualScsiPassthroughOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughOption>()?),
7616            StructType::VirtualSerialPortOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortOption>()?),
7617            StructType::VirtualSoundCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardOption>()?),
7618            StructType::VirtualEnsoniq1371Option => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371Option>()?),
7619            StructType::VirtualHdAudioCardOption => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCardOption>()?),
7620            StructType::VirtualSoundBlaster16Option => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16Option>()?),
7621            StructType::VirtualTpmOption => Some(from.as_any_ref().downcast_ref::<VirtualTpmOption>()?),
7622            StructType::VirtualUsbOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbOption>()?),
7623            StructType::VirtualMachineVmciDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDeviceOption>()?),
7624            StructType::VirtualVmiromOption => Some(from.as_any_ref().downcast_ref::<VirtualVmiromOption>()?),
7625            StructType::VirtualVideoCardOption => Some(from.as_any_ref().downcast_ref::<VirtualVideoCardOption>()?),
7626            StructType::VirtualWdtOption => Some(from.as_any_ref().downcast_ref::<VirtualWdtOption>()?),
7627            StructType::VirtualDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBackingOption>()?),
7628            StructType::VirtualDeviceDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingOption>()?),
7629            StructType::VirtualCdromAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingOption>()?),
7630            StructType::VirtualCdromPassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingOption>()?),
7631            StructType::VirtualCdromRemoteAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingOption>()?),
7632            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
7633            StructType::VirtualDiskRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingOption>()?),
7634            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
7635            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
7636            StructType::VirtualEthernetCardNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingOption>()?),
7637            StructType::VirtualFloppyDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingOption>()?),
7638            StructType::VirtualPciPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingOption>()?),
7639            StructType::VirtualPciPassthroughDynamicBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingOption>()?),
7640            StructType::VirtualParallelPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingOption>()?),
7641            StructType::VirtualPointingDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceBackingOption>()?),
7642            StructType::VirtualScsiPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingOption>()?),
7643            StructType::VirtualSerialPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingOption>()?),
7644            StructType::VirtualSoundCardDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingOption>()?),
7645            StructType::VirtualUsbRemoteHostBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingOption>()?),
7646            StructType::VirtualUsbusbBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingOption>()?),
7647            StructType::VirtualDeviceFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingOption>()?),
7648            StructType::VirtualCdromIsoBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingOption>()?),
7649            StructType::VirtualDiskFlatVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingOption>()?),
7650            StructType::VirtualDiskFlatVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingOption>()?),
7651            StructType::VirtualDiskLocalPMemBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingOption>()?),
7652            StructType::VirtualDiskSeSparseBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingOption>()?),
7653            StructType::VirtualDiskSparseVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingOption>()?),
7654            StructType::VirtualDiskSparseVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingOption>()?),
7655            StructType::VirtualFloppyImageBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingOption>()?),
7656            StructType::VirtualParallelPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingOption>()?),
7657            StructType::VirtualSerialPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingOption>()?),
7658            StructType::VirtualDevicePipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingOption>()?),
7659            StructType::VirtualSerialPortPipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingOption>()?),
7660            StructType::VirtualDeviceRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingOption>()?),
7661            StructType::VirtualCdromRemotePassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingOption>()?),
7662            StructType::VirtualFloppyRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingOption>()?),
7663            StructType::VirtualUsbRemoteClientBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingOption>()?),
7664            StructType::VirtualDeviceUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingOption>()?),
7665            StructType::VirtualSerialPortUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingOption>()?),
7666            StructType::VirtualEthernetCardDvPortBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardDvPortBackingOption>()?),
7667            StructType::VirtualEthernetCardOpaqueNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOpaqueNetworkBackingOption>()?),
7668            StructType::VirtualPciPassthroughDvxBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDvxBackingOption>()?),
7669            StructType::VirtualPciPassthroughPluginBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingOption>()?),
7670            StructType::VirtualPciPassthroughVmiopBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingOption>()?),
7671            StructType::VirtualPrecisionClockSystemClockBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockSystemClockBackingOption>()?),
7672            StructType::VirtualSerialPortThinPrintBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortThinPrintBackingOption>()?),
7673            StructType::VirtualSriovEthernetCardSriovBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardSriovBackingOption>()?),
7674            StructType::VirtualDeviceBusSlotOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBusSlotOption>()?),
7675            StructType::VirtualDeviceConnectOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceConnectOption>()?),
7676            StructType::VirtualDeviceConfigSpec => Some(from.as_any_ref().downcast_ref::<VirtualDeviceConfigSpec>()?),
7677            StructType::VirtualDiskConfigSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskConfigSpec>()?),
7678            StructType::VirtualDeviceConfigSpecBackingSpec => Some(from.as_any_ref().downcast_ref::<VirtualDeviceConfigSpecBackingSpec>()?),
7679            StructType::VirtualDiskVFlashCacheConfigInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskVFlashCacheConfigInfo>()?),
7680            StructType::VirtualDiskId => Some(from.as_any_ref().downcast_ref::<VirtualDiskId>()?),
7681            StructType::VirtualDiskDeltaDiskFormatsSupported => Some(from.as_any_ref().downcast_ref::<VirtualDiskDeltaDiskFormatsSupported>()?),
7682            StructType::VirtualDiskOptionVFlashCacheConfigOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskOptionVFlashCacheConfigOption>()?),
7683            StructType::VirtualEthernetCardResourceAllocation => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardResourceAllocation>()?),
7684            StructType::VirtualPciPassthroughAllowedDevice => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughAllowedDevice>()?),
7685            StructType::VirtualMachineVmciDeviceFilterInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDeviceFilterInfo>()?),
7686            StructType::VirtualMachineVmciDeviceFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDeviceFilterSpec>()?),
7687            StructType::VirtualMachineVmciDeviceOptionFilterSpecOption => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDeviceOptionFilterSpecOption>()?),
7688            StructType::VirtualVmxnet3StrictLatencyConfig => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3StrictLatencyConfig>()?),
7689            StructType::VirtualVmxnet3OptionStrictLatencyConfigOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3OptionStrictLatencyConfigOption>()?),
7690            StructType::GuestAliases => Some(from.as_any_ref().downcast_ref::<GuestAliases>()?),
7691            StructType::GuestAuthAliasInfo => Some(from.as_any_ref().downcast_ref::<GuestAuthAliasInfo>()?),
7692            StructType::GuestAuthSubject => Some(from.as_any_ref().downcast_ref::<GuestAuthSubject>()?),
7693            StructType::GuestAuthAnySubject => Some(from.as_any_ref().downcast_ref::<GuestAuthAnySubject>()?),
7694            StructType::GuestAuthNamedSubject => Some(from.as_any_ref().downcast_ref::<GuestAuthNamedSubject>()?),
7695            StructType::GuestMappedAliases => Some(from.as_any_ref().downcast_ref::<GuestMappedAliases>()?),
7696            StructType::GuestFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestFileAttributes>()?),
7697            StructType::GuestPosixFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestPosixFileAttributes>()?),
7698            StructType::GuestWindowsFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestWindowsFileAttributes>()?),
7699            StructType::GuestFileInfo => Some(from.as_any_ref().downcast_ref::<GuestFileInfo>()?),
7700            StructType::FileTransferInformation => Some(from.as_any_ref().downcast_ref::<FileTransferInformation>()?),
7701            StructType::GuestListFileInfo => Some(from.as_any_ref().downcast_ref::<GuestListFileInfo>()?),
7702            StructType::GuestAuthentication => Some(from.as_any_ref().downcast_ref::<GuestAuthentication>()?),
7703            StructType::NamePasswordAuthentication => Some(from.as_any_ref().downcast_ref::<NamePasswordAuthentication>()?),
7704            StructType::SamlTokenAuthentication => Some(from.as_any_ref().downcast_ref::<SamlTokenAuthentication>()?),
7705            StructType::SspiAuthentication => Some(from.as_any_ref().downcast_ref::<SspiAuthentication>()?),
7706            StructType::TicketedSessionAuthentication => Some(from.as_any_ref().downcast_ref::<TicketedSessionAuthentication>()?),
7707            StructType::GuestProcessInfo => Some(from.as_any_ref().downcast_ref::<GuestProcessInfo>()?),
7708            StructType::GuestProgramSpec => Some(from.as_any_ref().downcast_ref::<GuestProgramSpec>()?),
7709            StructType::GuestWindowsProgramSpec => Some(from.as_any_ref().downcast_ref::<GuestWindowsProgramSpec>()?),
7710            StructType::GuestRegKeySpec => Some(from.as_any_ref().downcast_ref::<GuestRegKeySpec>()?),
7711            StructType::GuestRegKeyNameSpec => Some(from.as_any_ref().downcast_ref::<GuestRegKeyNameSpec>()?),
7712            StructType::GuestRegKeyRecordSpec => Some(from.as_any_ref().downcast_ref::<GuestRegKeyRecordSpec>()?),
7713            StructType::GuestRegValueSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueSpec>()?),
7714            StructType::GuestRegValueDataSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueDataSpec>()?),
7715            StructType::GuestRegValueBinarySpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueBinarySpec>()?),
7716            StructType::GuestRegValueDwordSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueDwordSpec>()?),
7717            StructType::GuestRegValueExpandStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueExpandStringSpec>()?),
7718            StructType::GuestRegValueMultiStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueMultiStringSpec>()?),
7719            StructType::GuestRegValueQwordSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueQwordSpec>()?),
7720            StructType::GuestRegValueStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueStringSpec>()?),
7721            StructType::GuestRegValueNameSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueNameSpec>()?),
7722            StructType::DeviceGroupId => Some(from.as_any_ref().downcast_ref::<DeviceGroupId>()?),
7723            StructType::FaultDomainId => Some(from.as_any_ref().downcast_ref::<FaultDomainId>()?),
7724            StructType::FaultDomainInfo => Some(from.as_any_ref().downcast_ref::<FaultDomainInfo>()?),
7725            StructType::ReplicationGroupId => Some(from.as_any_ref().downcast_ref::<ReplicationGroupId>()?),
7726            StructType::ReplicationSpec => Some(from.as_any_ref().downcast_ref::<ReplicationSpec>()?),
7727            StructType::VsanCapacityReservationInfo => Some(from.as_any_ref().downcast_ref::<VsanCapacityReservationInfo>()?),
7728            StructType::ClusterRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ClusterRuntimeInfo>()?),
7729            StructType::VsanCompatibilityCheckResult => Some(from.as_any_ref().downcast_ref::<VsanCompatibilityCheckResult>()?),
7730            StructType::VimVsanDataEfficiencyCapacityState => Some(from.as_any_ref().downcast_ref::<VimVsanDataEfficiencyCapacityState>()?),
7731            StructType::VsanDataEfficiencyConfig => Some(from.as_any_ref().downcast_ref::<VsanDataEfficiencyConfig>()?),
7732            StructType::VsanDataEfficiencyConfigEx => Some(from.as_any_ref().downcast_ref::<VsanDataEfficiencyConfigEx>()?),
7733            StructType::VsanDataEncryptionConfig => Some(from.as_any_ref().downcast_ref::<VsanDataEncryptionConfig>()?),
7734            StructType::VsanDataInTransitEncryptionConfig => Some(from.as_any_ref().downcast_ref::<VsanDataInTransitEncryptionConfig>()?),
7735            StructType::VsanDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanDatastoreConfig>()?),
7736            StructType::VsanAdvancedDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanAdvancedDatastoreConfig>()?),
7737            StructType::VsanDatastoreSpec => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSpec>()?),
7738            StructType::VsanClientDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanClientDatastoreConfig>()?),
7739            StructType::VsanXvcClientConfig => Some(from.as_any_ref().downcast_ref::<VsanXvcClientConfig>()?),
7740            StructType::DefaultDatastorePolicySelectionInfo => Some(from.as_any_ref().downcast_ref::<DefaultDatastorePolicySelectionInfo>()?),
7741            StructType::VsanDirectoryServerConfig => Some(from.as_any_ref().downcast_ref::<VsanDirectoryServerConfig>()?),
7742            StructType::ActiveVsanDirectoryServerConfig => Some(from.as_any_ref().downcast_ref::<ActiveVsanDirectoryServerConfig>()?),
7743            StructType::DiskClaimConfiguration => Some(from.as_any_ref().downcast_ref::<DiskClaimConfiguration>()?),
7744            StructType::VsanEntityCompatibilityResult => Some(from.as_any_ref().downcast_ref::<VsanEntityCompatibilityResult>()?),
7745            StructType::EntityResourceCheckDetails => Some(from.as_any_ref().downcast_ref::<EntityResourceCheckDetails>()?),
7746            StructType::VsanDiskGroupResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskGroupResourceCheckResult>()?),
7747            StructType::VsanDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskResourceCheckResult>()?),
7748            StructType::VsanStoragePoolDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolDiskResourceCheckResult>()?),
7749            StructType::VsanFaultDomainResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainResourceCheckResult>()?),
7750            StructType::VsanHostResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanHostResourceCheckResult>()?),
7751            StructType::VsanResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckResult>()?),
7752            StructType::VsanResourceCheckComponentResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckComponentResult>()?),
7753            StructType::VsanResourceCheckDataPersistenceResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckDataPersistenceResult>()?),
7754            StructType::VsanResourceCheckVsanResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckVsanResult>()?),
7755            StructType::VsanStoragePoolResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolResourceCheckResult>()?),
7756            StructType::VsanFileServiceConfig => Some(from.as_any_ref().downcast_ref::<VsanFileServiceConfig>()?),
7757            StructType::VsanFileServiceDomain => Some(from.as_any_ref().downcast_ref::<VsanFileServiceDomain>()?),
7758            StructType::VsanFileServiceDomainConfig => Some(from.as_any_ref().downcast_ref::<VsanFileServiceDomainConfig>()?),
7759            StructType::VsanFileServiceDomainQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanFileServiceDomainQuerySpec>()?),
7760            StructType::VsanFileShare => Some(from.as_any_ref().downcast_ref::<VsanFileShare>()?),
7761            StructType::VsanFileShareConfig => Some(from.as_any_ref().downcast_ref::<VsanFileShareConfig>()?),
7762            StructType::VsanFileShareNetPermission => Some(from.as_any_ref().downcast_ref::<VsanFileShareNetPermission>()?),
7763            StructType::VsanFileShareQueryProperties => Some(from.as_any_ref().downcast_ref::<VsanFileShareQueryProperties>()?),
7764            StructType::FileShareQueryResult => Some(from.as_any_ref().downcast_ref::<FileShareQueryResult>()?),
7765            StructType::VsanFileShareQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanFileShareQuerySpec>()?),
7766            StructType::VsanFileShareRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VsanFileShareRuntimeInfo>()?),
7767            StructType::VsanFileShareSmbOptions => Some(from.as_any_ref().downcast_ref::<VsanFileShareSmbOptions>()?),
7768            StructType::VsanFileShareSnapshot => Some(from.as_any_ref().downcast_ref::<VsanFileShareSnapshot>()?),
7769            StructType::VsanFileShareSnapshotConfig => Some(from.as_any_ref().downcast_ref::<VsanFileShareSnapshotConfig>()?),
7770            StructType::VsanFileShareSnapshotQueryResult => Some(from.as_any_ref().downcast_ref::<VsanFileShareSnapshotQueryResult>()?),
7771            StructType::VsanFileShareSnapshotQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanFileShareSnapshotQuerySpec>()?),
7772            StructType::VsanHciMeshDatastoreSource => Some(from.as_any_ref().downcast_ref::<VsanHciMeshDatastoreSource>()?),
7773            StructType::VsanIoDiagnosticsFailedCheck => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsFailedCheck>()?),
7774            StructType::VsanIoDiagnosticsInstance => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsInstance>()?),
7775            StructType::VsanIoDiagnosticsInstanceEvent => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsInstanceEvent>()?),
7776            StructType::VsanIoDiagnosticsInstanceQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsInstanceQuerySpec>()?),
7777            StructType::VsanIoDiagnosticsObjectLayout => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsObjectLayout>()?),
7778            StructType::VsanIoDiagnosticsPrecheckResult => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsPrecheckResult>()?),
7779            StructType::VsanIoDiagnosticsStats => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsStats>()?),
7780            StructType::VsanIoDiagnosticsTarget => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsTarget>()?),
7781            StructType::VsanIoDiagnosticsTargetStats => Some(from.as_any_ref().downcast_ref::<VsanIoDiagnosticsTargetStats>()?),
7782            StructType::VsanIoLatency => Some(from.as_any_ref().downcast_ref::<VsanIoLatency>()?),
7783            StructType::VsanIoLatencyMetrics => Some(from.as_any_ref().downcast_ref::<VsanIoLatencyMetrics>()?),
7784            StructType::LifecycleConfigDetails => Some(from.as_any_ref().downcast_ref::<LifecycleConfigDetails>()?),
7785            StructType::LifecycleFaultDomainDetails => Some(from.as_any_ref().downcast_ref::<LifecycleFaultDomainDetails>()?),
7786            StructType::LifecyclePreCheckResult => Some(from.as_any_ref().downcast_ref::<LifecyclePreCheckResult>()?),
7787            StructType::LifecycleWitnessDetails => Some(from.as_any_ref().downcast_ref::<LifecycleWitnessDetails>()?),
7788            StructType::VsanMetricProfile => Some(from.as_any_ref().downcast_ref::<VsanMetricProfile>()?),
7789            StructType::VsanMetricsConfig => Some(from.as_any_ref().downcast_ref::<VsanMetricsConfig>()?),
7790            StructType::VsanMountPrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckItem>()?),
7791            StructType::VsanDatastoreSourcePrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSourcePrecheckItem>()?),
7792            StructType::VsanMountPrecheckNetworkConnectivityResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkConnectivityResult>()?),
7793            StructType::VsanMountPrecheckNetworkLatencyResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkLatencyResult>()?),
7794            StructType::VsanMountPrecheckNetworkConnectivity => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkConnectivity>()?),
7795            StructType::VsanMountPrecheckNetworkConnectivityDetail => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkConnectivityDetail>()?),
7796            StructType::VsanMountPrecheckNetworkLatency => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkLatency>()?),
7797            StructType::VsanMountPrecheckNetworkLatencyDetail => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkLatencyDetail>()?),
7798            StructType::VsanMountPrecheckResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckResult>()?),
7799            StructType::VsanDatastoreSourcePrecheckResult => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSourcePrecheckResult>()?),
7800            StructType::VsanObjectHealthTelemetrySummary => Some(from.as_any_ref().downcast_ref::<VsanObjectHealthTelemetrySummary>()?),
7801            StructType::VsanObjectIoStats => Some(from.as_any_ref().downcast_ref::<VsanObjectIoStats>()?),
7802            StructType::VsanProactiveRebalanceInfo => Some(from.as_any_ref().downcast_ref::<VsanProactiveRebalanceInfo>()?),
7803            StructType::VsanRdmaConfig => Some(from.as_any_ref().downcast_ref::<VsanRdmaConfig>()?),
7804            StructType::VsanRemoteVcInfo => Some(from.as_any_ref().downcast_ref::<VsanRemoteVcInfo>()?),
7805            StructType::VsanRemoteVcInfoStandalone => Some(from.as_any_ref().downcast_ref::<VsanRemoteVcInfoStandalone>()?),
7806            StructType::RemoteVsanSite => Some(from.as_any_ref().downcast_ref::<RemoteVsanSite>()?),
7807            StructType::RemoteVsanSiteAffinity => Some(from.as_any_ref().downcast_ref::<RemoteVsanSiteAffinity>()?),
7808            StructType::RepairTimerInfo => Some(from.as_any_ref().downcast_ref::<RepairTimerInfo>()?),
7809            StructType::VsanResourceCheckSpec => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckSpec>()?),
7810            StructType::VsanResourceCheckStatus => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckStatus>()?),
7811            StructType::VsanResourceCheckTaskDetails => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckTaskDetails>()?),
7812            StructType::VsanDiskDataEvacuationResourceCheckTaskDetails => Some(from.as_any_ref().downcast_ref::<VsanDiskDataEvacuationResourceCheckTaskDetails>()?),
7813            StructType::ResyncIopsInfo => Some(from.as_any_ref().downcast_ref::<ResyncIopsInfo>()?),
7814            StructType::VsanRuntimeStatsHostMap => Some(from.as_any_ref().downcast_ref::<VsanRuntimeStatsHostMap>()?),
7815            StructType::SsdEnduranceThresholdSpec => Some(from.as_any_ref().downcast_ref::<SsdEnduranceThresholdSpec>()?),
7816            StructType::VsanServerHostUnicastInfo => Some(from.as_any_ref().downcast_ref::<VsanServerHostUnicastInfo>()?),
7817            StructType::VsanSharedWitnessCompatibilityResult => Some(from.as_any_ref().downcast_ref::<VsanSharedWitnessCompatibilityResult>()?),
7818            StructType::VsanSnapServiceConfig => Some(from.as_any_ref().downcast_ref::<VsanSnapServiceConfig>()?),
7819            StructType::VcRemoteVsanServerClusterConfig => Some(from.as_any_ref().downcast_ref::<VcRemoteVsanServerClusterConfig>()?),
7820            StructType::VcRemoteVsanServerClusterInfo => Some(from.as_any_ref().downcast_ref::<VcRemoteVsanServerClusterInfo>()?),
7821            StructType::VsanIscsiVipConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipConfigSpec>()?),
7822            StructType::VsanIscsiVipConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipConfig>()?),
7823            StructType::VsanIscsiVipDVswitchConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipDVswitchConfig>()?),
7824            StructType::VsanVipNetworkConfig => Some(from.as_any_ref().downcast_ref::<VsanVipNetworkConfig>()?),
7825            StructType::VsanIscsiVipVswitchConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipVswitchConfig>()?),
7826            StructType::VsanBurnInTest => Some(from.as_any_ref().downcast_ref::<VsanBurnInTest>()?),
7827            StructType::VsanBurnInTestCheckResult => Some(from.as_any_ref().downcast_ref::<VsanBurnInTestCheckResult>()?),
7828            StructType::VsanCloudHealthStatus => Some(from.as_any_ref().downcast_ref::<VsanCloudHealthStatus>()?),
7829            StructType::VsanClusterBurnInTestResultList => Some(from.as_any_ref().downcast_ref::<VsanClusterBurnInTestResultList>()?),
7830            StructType::VsanCompliantDriver => Some(from.as_any_ref().downcast_ref::<VsanCompliantDriver>()?),
7831            StructType::VsanCompliantFirmware => Some(from.as_any_ref().downcast_ref::<VsanCompliantFirmware>()?),
7832            StructType::VsanConfigBaseIssue => Some(from.as_any_ref().downcast_ref::<VsanConfigBaseIssue>()?),
7833            StructType::VsanConfigNotAllDisksClaimedIssue => Some(from.as_any_ref().downcast_ref::<VsanConfigNotAllDisksClaimedIssue>()?),
7834            StructType::VsanConfigCheckResult => Some(from.as_any_ref().downcast_ref::<VsanConfigCheckResult>()?),
7835            StructType::VsanDatastoreDefaultPolicySelectionConfig => Some(from.as_any_ref().downcast_ref::<VsanDatastoreDefaultPolicySelectionConfig>()?),
7836            StructType::VsanDeconvergedNetConfig => Some(from.as_any_ref().downcast_ref::<VsanDeconvergedNetConfig>()?),
7837            StructType::VsanDiskModelInfo => Some(from.as_any_ref().downcast_ref::<VsanDiskModelInfo>()?),
7838            StructType::VsanDownloadItem => Some(from.as_any_ref().downcast_ref::<VsanDownloadItem>()?),
7839            StructType::VsanEsaConfig => Some(from.as_any_ref().downcast_ref::<VsanEsaConfig>()?),
7840            StructType::VsanEsaConfigInfo => Some(from.as_any_ref().downcast_ref::<VsanEsaConfigInfo>()?),
7841            StructType::VsanEsaDiskConfiguration => Some(from.as_any_ref().downcast_ref::<VsanEsaDiskConfiguration>()?),
7842            StructType::VsanExtendedConfig => Some(from.as_any_ref().downcast_ref::<VsanExtendedConfig>()?),
7843            StructType::VsanFileServiceOvfSpec => Some(from.as_any_ref().downcast_ref::<VsanFileServiceOvfSpec>()?),
7844            StructType::VsanFileServicePreflightCheckResult => Some(from.as_any_ref().downcast_ref::<VsanFileServicePreflightCheckResult>()?),
7845            StructType::VsanGenericClusterBaseIssue => Some(from.as_any_ref().downcast_ref::<VsanGenericClusterBaseIssue>()?),
7846            StructType::VsanGenericClusterBestPracticeHealth => Some(from.as_any_ref().downcast_ref::<VsanGenericClusterBestPracticeHealth>()?),
7847            StructType::VsanHclDeviceConstraint => Some(from.as_any_ref().downcast_ref::<VsanHclDeviceConstraint>()?),
7848            StructType::VsanHclDiskConstraint => Some(from.as_any_ref().downcast_ref::<VsanHclDiskConstraint>()?),
7849            StructType::VsanHclDriverInfo => Some(from.as_any_ref().downcast_ref::<VsanHclDriverInfo>()?),
7850            StructType::VsanHclMinFwConstraint => Some(from.as_any_ref().downcast_ref::<VsanHclMinFwConstraint>()?),
7851            StructType::VsanHclQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanHclQuerySpec>()?),
7852            StructType::VsanHclReleaseConstraint => Some(from.as_any_ref().downcast_ref::<VsanHclReleaseConstraint>()?),
7853            StructType::VsanHealthConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanHealthConfigSpec>()?),
7854            StructType::VsanHealthCustomizationSpec => Some(from.as_any_ref().downcast_ref::<VsanHealthCustomizationSpec>()?),
7855            StructType::VsanHealthThreshold => Some(from.as_any_ref().downcast_ref::<VsanHealthThreshold>()?),
7856            StructType::VsanHistoricalHealthConfig => Some(from.as_any_ref().downcast_ref::<VsanHistoricalHealthConfig>()?),
7857            StructType::VsanHostDeviceInfo => Some(from.as_any_ref().downcast_ref::<VsanHostDeviceInfo>()?),
7858            StructType::VsanHwToVcgInfoMappingSpec => Some(from.as_any_ref().downcast_ref::<VsanHwToVcgInfoMappingSpec>()?),
7859            StructType::VsanIoTripAnalyzerConfig => Some(from.as_any_ref().downcast_ref::<VsanIoTripAnalyzerConfig>()?),
7860            StructType::VsanIoTripAnalyzerRecurrence => Some(from.as_any_ref().downcast_ref::<VsanIoTripAnalyzerRecurrence>()?),
7861            StructType::VsanInternalExtendedConfig => Some(from.as_any_ref().downcast_ref::<VsanInternalExtendedConfig>()?),
7862            StructType::VsanNetworkConfigBaseIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigBaseIssue>()?),
7863            StructType::VsanNetworkConfigPnicSpeedInconsistencyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigPnicSpeedInconsistencyIssue>()?),
7864            StructType::VsanNetworkConfigPortgroupWithNoRedundancyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigPortgroupWithNoRedundancyIssue>()?),
7865            StructType::VsanNetworkConfigVdsScopeIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVdsScopeIssue>()?),
7866            StructType::VsanNetworkConfigVsanNotOnVdsIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVsanNotOnVdsIssue>()?),
7867            StructType::VsanNetworkConfigVswitchWithNoRedundancyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVswitchWithNoRedundancyIssue>()?),
7868            StructType::VsanNetworkVMotionVmknicNotFountIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkVMotionVmknicNotFountIssue>()?),
7869            StructType::VsanNetworkConfigBestPracticeHealth => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigBestPracticeHealth>()?),
7870            StructType::VsanObjSnapParams => Some(from.as_any_ref().downcast_ref::<VsanObjSnapParams>()?),
7871            StructType::VsanObjectDetail => Some(from.as_any_ref().downcast_ref::<VsanObjectDetail>()?),
7872            StructType::VsanObjectSnapshotId => Some(from.as_any_ref().downcast_ref::<VsanObjectSnapshotId>()?),
7873            StructType::VimVsanVsanPMemConfig => Some(from.as_any_ref().downcast_ref::<VimVsanVsanPMemConfig>()?),
7874            StructType::VsanPerfsvcHealthResult => Some(from.as_any_ref().downcast_ref::<VsanPerfsvcHealthResult>()?),
7875            StructType::VsanPrepareVsanForVcsaSpec => Some(from.as_any_ref().downcast_ref::<VsanPrepareVsanForVcsaSpec>()?),
7876            StructType::VsanSnapshotDetail => Some(from.as_any_ref().downcast_ref::<VsanSnapshotDetail>()?),
7877            StructType::VsanSnapshotQueryResult => Some(from.as_any_ref().downcast_ref::<VsanSnapshotQueryResult>()?),
7878            StructType::VsanSnapshotQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanSnapshotQuerySpec>()?),
7879            StructType::VsanSpaceEfficiencyMetadataSize => Some(from.as_any_ref().downcast_ref::<VsanSpaceEfficiencyMetadataSize>()?),
7880            StructType::VsanSpaceEfficiencyRatio => Some(from.as_any_ref().downcast_ref::<VsanSpaceEfficiencyRatio>()?),
7881            StructType::VsanUnmapConfig => Some(from.as_any_ref().downcast_ref::<VsanUnmapConfig>()?),
7882            StructType::VsanUpdateItem => Some(from.as_any_ref().downcast_ref::<VsanUpdateItem>()?),
7883            StructType::VsanVcPostDeployConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanVcPostDeployConfigSpec>()?),
7884            StructType::VsanVcStretchedClusterConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanVcStretchedClusterConfigSpec>()?),
7885            StructType::VsanVcsaDeploymentProgress => Some(from.as_any_ref().downcast_ref::<VsanVcsaDeploymentProgress>()?),
7886            StructType::VsanVdsMigrationPlan => Some(from.as_any_ref().downcast_ref::<VsanVdsMigrationPlan>()?),
7887            StructType::VsanVdsPgMigrationHostInfo => Some(from.as_any_ref().downcast_ref::<VsanVdsPgMigrationHostInfo>()?),
7888            StructType::VsanVdsPgMigrationSpec => Some(from.as_any_ref().downcast_ref::<VsanVdsPgMigrationSpec>()?),
7889            StructType::VsanVdsPgMigrationVmInfo => Some(from.as_any_ref().downcast_ref::<VsanVdsPgMigrationVmInfo>()?),
7890            StructType::VsanVibInstallPreflightStatus => Some(from.as_any_ref().downcast_ref::<VsanVibInstallPreflightStatus>()?),
7891            StructType::VsanVibScanResult => Some(from.as_any_ref().downcast_ref::<VsanVibScanResult>()?),
7892            StructType::VsanVibSpec => Some(from.as_any_ref().downcast_ref::<VsanVibSpec>()?),
7893            StructType::VsanVmVdsMigrationSpec => Some(from.as_any_ref().downcast_ref::<VsanVmVdsMigrationSpec>()?),
7894            StructType::VsanVnicVdsMigrationSpec => Some(from.as_any_ref().downcast_ref::<VsanVnicVdsMigrationSpec>()?),
7895            StructType::VsanVumConfig => Some(from.as_any_ref().downcast_ref::<VsanVumConfig>()?),
7896            StructType::VsanWitnessHostConfig => Some(from.as_any_ref().downcast_ref::<VsanWitnessHostConfig>()?),
7897            StructType::VsanXvcClientInfo => Some(from.as_any_ref().downcast_ref::<VsanXvcClientInfo>()?),
7898            StructType::VsanXvcDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanXvcDatastoreConfig>()?),
7899            StructType::VsanXvcDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VsanXvcDatastoreInfo>()?),
7900            StructType::VsanXvcClientInfoSpec => Some(from.as_any_ref().downcast_ref::<VsanXvcClientInfoSpec>()?),
7901            StructType::VsanXvcQueryCriteria => Some(from.as_any_ref().downcast_ref::<VsanXvcQueryCriteria>()?),
7902            StructType::VsanXvcQueryFilter => Some(from.as_any_ref().downcast_ref::<VsanXvcQueryFilter>()?),
7903            StructType::VsanXvcQueryPropertyValue => Some(from.as_any_ref().downcast_ref::<VsanXvcQueryPropertyValue>()?),
7904            StructType::VsanXvcQueryResultSet => Some(from.as_any_ref().downcast_ref::<VsanXvcQueryResultSet>()?),
7905            StructType::VsanXvcQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanXvcQuerySpec>()?),
7906            StructType::VsanXvcResultItem => Some(from.as_any_ref().downcast_ref::<VsanXvcResultItem>()?),
7907            StructType::VsanClusterConfigInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterConfigInfo>()?),
7908            StructType::VsanConfigInfoEx => Some(from.as_any_ref().downcast_ref::<VsanConfigInfoEx>()?),
7909            StructType::VsanClusterConfigInfoHostDefaultInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterConfigInfoHostDefaultInfo>()?),
7910            StructType::VsanClusterCoreConfig => Some(from.as_any_ref().downcast_ref::<VsanClusterCoreConfig>()?),
7911            StructType::VsanClusterCoreConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanClusterCoreConfigSpec>()?),
7912            StructType::VsanHostAbortWipeDiskStatus => Some(from.as_any_ref().downcast_ref::<VsanHostAbortWipeDiskStatus>()?),
7913            StructType::VsanHostAboutInfoEx => Some(from.as_any_ref().downcast_ref::<VsanHostAboutInfoEx>()?),
7914            StructType::VsanAddStoragePoolDiskSpec => Some(from.as_any_ref().downcast_ref::<VsanAddStoragePoolDiskSpec>()?),
7915            StructType::VsanHostClusterStatus => Some(from.as_any_ref().downcast_ref::<VsanHostClusterStatus>()?),
7916            StructType::VsanHostClusterStatusState => Some(from.as_any_ref().downcast_ref::<VsanHostClusterStatusState>()?),
7917            StructType::VsanHostClusterStatusStateCompletionEstimate => Some(from.as_any_ref().downcast_ref::<VsanHostClusterStatusStateCompletionEstimate>()?),
7918            StructType::VsanComplianceDetail => Some(from.as_any_ref().downcast_ref::<VsanComplianceDetail>()?),
7919            StructType::VsanComplianceResult => Some(from.as_any_ref().downcast_ref::<VsanComplianceResult>()?),
7920            StructType::VsanHostConfigInfo => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfo>()?),
7921            StructType::VsanHostConfigInfoEx => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoEx>()?),
7922            StructType::VsanHostConfigInfoClusterInfo => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoClusterInfo>()?),
7923            StructType::VsanHostFaultDomainInfo => Some(from.as_any_ref().downcast_ref::<VsanHostFaultDomainInfo>()?),
7924            StructType::VsanHostConfigInfoNetworkInfo => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoNetworkInfo>()?),
7925            StructType::VsanHostConfigInfoNetworkInfoPortConfig => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoNetworkInfoPortConfig>()?),
7926            StructType::VsanHostPortConfigEx => Some(from.as_any_ref().downcast_ref::<VsanHostPortConfigEx>()?),
7927            StructType::VsanHostConfigInfoStorageInfo => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoStorageInfo>()?),
7928            StructType::VsanHostCreateNativeKeyProviderSpec => Some(from.as_any_ref().downcast_ref::<VsanHostCreateNativeKeyProviderSpec>()?),
7929            StructType::VsanInTransitEncryptionInfo => Some(from.as_any_ref().downcast_ref::<VsanInTransitEncryptionInfo>()?),
7930            StructType::VsanHostDecommissionMode => Some(from.as_any_ref().downcast_ref::<VsanHostDecommissionMode>()?),
7931            StructType::VsanDeleteStoragePoolDiskSpec => Some(from.as_any_ref().downcast_ref::<VsanDeleteStoragePoolDiskSpec>()?),
7932            StructType::VsanHostDiskMapInfo => Some(from.as_any_ref().downcast_ref::<VsanHostDiskMapInfo>()?),
7933            StructType::VimVsanHostDiskMapInfoEx => Some(from.as_any_ref().downcast_ref::<VimVsanHostDiskMapInfoEx>()?),
7934            StructType::VsanHostDiskMapResult => Some(from.as_any_ref().downcast_ref::<VsanHostDiskMapResult>()?),
7935            StructType::VsanHostDiskMapping => Some(from.as_any_ref().downcast_ref::<VsanHostDiskMapping>()?),
7936            StructType::VimVsanHostDiskMappingCreationSpec => Some(from.as_any_ref().downcast_ref::<VimVsanHostDiskMappingCreationSpec>()?),
7937            StructType::VsanHostDiskResult => Some(from.as_any_ref().downcast_ref::<VsanHostDiskResult>()?),
7938            StructType::VimVsanHostDiskResultEx => Some(from.as_any_ref().downcast_ref::<VimVsanHostDiskResultEx>()?),
7939            StructType::VsanHostDrsStats => Some(from.as_any_ref().downcast_ref::<VsanHostDrsStats>()?),
7940            StructType::VsanHostEncryptionInfo => Some(from.as_any_ref().downcast_ref::<VsanHostEncryptionInfo>()?),
7941            StructType::VsanHostIpConfig => Some(from.as_any_ref().downcast_ref::<VsanHostIpConfig>()?),
7942            StructType::VsanHostIpConfigEx => Some(from.as_any_ref().downcast_ref::<VsanHostIpConfigEx>()?),
7943            StructType::VsanHostMembershipInfo => Some(from.as_any_ref().downcast_ref::<VsanHostMembershipInfo>()?),
7944            StructType::VsanPolicyStatus => Some(from.as_any_ref().downcast_ref::<VsanPolicyStatus>()?),
7945            StructType::VimVsanHostQueryVsanDisksSpec => Some(from.as_any_ref().downcast_ref::<VimVsanHostQueryVsanDisksSpec>()?),
7946            StructType::RemoteVsanServerClusterConfig => Some(from.as_any_ref().downcast_ref::<RemoteVsanServerClusterConfig>()?),
7947            StructType::VsanHostRuntimeStats => Some(from.as_any_ref().downcast_ref::<VsanHostRuntimeStats>()?),
7948            StructType::VsanHostServerClusterUnicastConfig => Some(from.as_any_ref().downcast_ref::<VsanHostServerClusterUnicastConfig>()?),
7949            StructType::VsanHostServerClusterUnicastInfo => Some(from.as_any_ref().downcast_ref::<VsanHostServerClusterUnicastInfo>()?),
7950            StructType::SiteAffinityInfo => Some(from.as_any_ref().downcast_ref::<SiteAffinityInfo>()?),
7951            StructType::VsanStoragePoolDisk => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolDisk>()?),
7952            StructType::VimVsanHostStoragePoolDiskInfo => Some(from.as_any_ref().downcast_ref::<VimVsanHostStoragePoolDiskInfo>()?),
7953            StructType::VimVsanHostStoragePoolInfo => Some(from.as_any_ref().downcast_ref::<VimVsanHostStoragePoolInfo>()?),
7954            StructType::VimVsanHostTrimDiskEntry => Some(from.as_any_ref().downcast_ref::<VimVsanHostTrimDiskEntry>()?),
7955            StructType::VimVsanHostTrimDiskSpec => Some(from.as_any_ref().downcast_ref::<VimVsanHostTrimDiskSpec>()?),
7956            StructType::VimVsanHostUpdateStoragePoolDiskSpec => Some(from.as_any_ref().downcast_ref::<VimVsanHostUpdateStoragePoolDiskSpec>()?),
7957            StructType::VsanHostAssociatedObjects => Some(from.as_any_ref().downcast_ref::<VsanHostAssociatedObjects>()?),
7958            StructType::VsanHostAssociatedObjectsResult => Some(from.as_any_ref().downcast_ref::<VsanHostAssociatedObjectsResult>()?),
7959            StructType::VsanComplianceQuerySpec => Some(from.as_any_ref().downcast_ref::<VsanComplianceQuerySpec>()?),
7960            StructType::VsanHostComponentSyncState => Some(from.as_any_ref().downcast_ref::<VsanHostComponentSyncState>()?),
7961            StructType::VimVsanHostVsanDirectStorage => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanDirectStorage>()?),
7962            StructType::VsanHostVsanDiskInfo => Some(from.as_any_ref().downcast_ref::<VsanHostVsanDiskInfo>()?),
7963            StructType::VimVsanHostVsanDiskManagementSystemCapability => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanDiskManagementSystemCapability>()?),
7964            StructType::VimVsanHostVsanHostCapability => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanHostCapability>()?),
7965            StructType::VimVsanHostVsanManagedDisksInfo => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanManagedDisksInfo>()?),
7966            StructType::VimVsanHostVsanManagedPMemInfo => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanManagedPMemInfo>()?),
7967            StructType::VsanObjectProfileInfo => Some(from.as_any_ref().downcast_ref::<VsanObjectProfileInfo>()?),
7968            StructType::VsanHostVsanObjectSyncState => Some(from.as_any_ref().downcast_ref::<VsanHostVsanObjectSyncState>()?),
7969            StructType::VsanHostRuntimeInfo => Some(from.as_any_ref().downcast_ref::<VsanHostRuntimeInfo>()?),
7970            StructType::VsanHostRuntimeInfoDiskIssue => Some(from.as_any_ref().downcast_ref::<VsanHostRuntimeInfoDiskIssue>()?),
7971            StructType::VimVsanHostVsanScsiDisk => Some(from.as_any_ref().downcast_ref::<VimVsanHostVsanScsiDisk>()?),
7972            StructType::VsanHostVsanObjectSyncQueryResult => Some(from.as_any_ref().downcast_ref::<VsanHostVsanObjectSyncQueryResult>()?),
7973            StructType::VsanSyncingObjectRecoveryDetails => Some(from.as_any_ref().downcast_ref::<VsanSyncingObjectRecoveryDetails>()?),
7974            StructType::VsanWhatIfEvacDetail => Some(from.as_any_ref().downcast_ref::<VsanWhatIfEvacDetail>()?),
7975            StructType::VsanWhatIfEvacResult => Some(from.as_any_ref().downcast_ref::<VsanWhatIfEvacResult>()?),
7976            StructType::VsanHostWipeDiskStatus => Some(from.as_any_ref().downcast_ref::<VsanHostWipeDiskStatus>()?),
7977            StructType::BaseConfigInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfo>()?),
7978            StructType::VStorageObjectConfigInfo => Some(from.as_any_ref().downcast_ref::<VStorageObjectConfigInfo>()?),
7979            StructType::BaseConfigInfoBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoBackingInfo>()?),
7980            StructType::BaseConfigInfoFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoFileBackingInfo>()?),
7981            StructType::BaseConfigInfoDiskFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoDiskFileBackingInfo>()?),
7982            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
7983            StructType::VslmCreateSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpec>()?),
7984            StructType::VslmCreateSpecBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecBackingSpec>()?),
7985            StructType::VslmCreateSpecDiskFileBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecDiskFileBackingSpec>()?),
7986            StructType::VslmCreateSpecRawDiskMappingBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecRawDiskMappingBackingSpec>()?),
7987            StructType::DiskCryptoSpec => Some(from.as_any_ref().downcast_ref::<DiskCryptoSpec>()?),
7988            StructType::Id => Some(from.as_any_ref().downcast_ref::<Id>()?),
7989            StructType::VslmInfrastructureObjectPolicy => Some(from.as_any_ref().downcast_ref::<VslmInfrastructureObjectPolicy>()?),
7990            StructType::VslmInfrastructureObjectPolicySpec => Some(from.as_any_ref().downcast_ref::<VslmInfrastructureObjectPolicySpec>()?),
7991            StructType::VslmMigrateSpec => Some(from.as_any_ref().downcast_ref::<VslmMigrateSpec>()?),
7992            StructType::VslmCloneSpec => Some(from.as_any_ref().downcast_ref::<VslmCloneSpec>()?),
7993            StructType::VslmRelocateSpec => Some(from.as_any_ref().downcast_ref::<VslmRelocateSpec>()?),
7994            StructType::VStorageObjectReconcileResult => Some(from.as_any_ref().downcast_ref::<VStorageObjectReconcileResult>()?),
7995            StructType::VStorageObjectReconcileResultInvalidDiskPath => Some(from.as_any_ref().downcast_ref::<VStorageObjectReconcileResultInvalidDiskPath>()?),
7996            StructType::VStorageObjectReconcileResultReconcileDetail => Some(from.as_any_ref().downcast_ref::<VStorageObjectReconcileResultReconcileDetail>()?),
7997            StructType::VStorageObjectReconcileSpec => Some(from.as_any_ref().downcast_ref::<VStorageObjectReconcileSpec>()?),
7998            StructType::VStorageObjectStateInfo => Some(from.as_any_ref().downcast_ref::<VStorageObjectStateInfo>()?),
7999            StructType::VslmTagEntry => Some(from.as_any_ref().downcast_ref::<VslmTagEntry>()?),
8000            StructType::VslmVClockInfo => Some(from.as_any_ref().downcast_ref::<VslmVClockInfo>()?),
8001            StructType::VStorageObject => Some(from.as_any_ref().downcast_ref::<VStorageObject>()?),
8002            StructType::VStorageObjectSnapshot => Some(from.as_any_ref().downcast_ref::<VStorageObjectSnapshot>()?),
8003            StructType::VStorageObjectSnapshotDetails => Some(from.as_any_ref().downcast_ref::<VStorageObjectSnapshotDetails>()?),
8004            StructType::VStorageObjectSnapshotInfo => Some(from.as_any_ref().downcast_ref::<VStorageObjectSnapshotInfo>()?),
8005            StructType::VStorageObjectSnapshotInfoVStorageObjectSnapshot => Some(from.as_any_ref().downcast_ref::<VStorageObjectSnapshotInfoVStorageObjectSnapshot>()?),
8006            StructType::RetrieveVStorageObjSpec => Some(from.as_any_ref().downcast_ref::<RetrieveVStorageObjSpec>()?),
8007            StructType::VStorageObjectAssociations => Some(from.as_any_ref().downcast_ref::<VStorageObjectAssociations>()?),
8008            StructType::VStorageObjectAssociationsVmDiskAssociations => Some(from.as_any_ref().downcast_ref::<VStorageObjectAssociationsVmDiskAssociations>()?),
8009            StructType::DynamicArray => Some(from.as_any_ref().downcast_ref::<DynamicArray>()?),
8010            StructType::DynamicProperty => Some(from.as_any_ref().downcast_ref::<DynamicProperty>()?),
8011            StructType::KeyAnyValue => Some(from.as_any_ref().downcast_ref::<KeyAnyValue>()?),
8012            StructType::LocalizableMessage => Some(from.as_any_ref().downcast_ref::<LocalizableMessage>()?),
8013            StructType::LocalizedMethodFault => Some(from.as_any_ref().downcast_ref::<LocalizedMethodFault>()?),
8014            StructType::PropertyChange => Some(from.as_any_ref().downcast_ref::<PropertyChange>()?),
8015            StructType::PropertyFilterSpec => Some(from.as_any_ref().downcast_ref::<PropertyFilterSpec>()?),
8016            StructType::PropertyFilterUpdate => Some(from.as_any_ref().downcast_ref::<PropertyFilterUpdate>()?),
8017            StructType::MissingObject => Some(from.as_any_ref().downcast_ref::<MissingObject>()?),
8018            StructType::MissingProperty => Some(from.as_any_ref().downcast_ref::<MissingProperty>()?),
8019            StructType::ObjectContent => Some(from.as_any_ref().downcast_ref::<ObjectContent>()?),
8020            StructType::ObjectSpec => Some(from.as_any_ref().downcast_ref::<ObjectSpec>()?),
8021            StructType::ObjectUpdate => Some(from.as_any_ref().downcast_ref::<ObjectUpdate>()?),
8022            StructType::PropertySpec => Some(from.as_any_ref().downcast_ref::<PropertySpec>()?),
8023            StructType::RetrieveOptions => Some(from.as_any_ref().downcast_ref::<RetrieveOptions>()?),
8024            StructType::RetrieveResult => Some(from.as_any_ref().downcast_ref::<RetrieveResult>()?),
8025            StructType::SelectionSpec => Some(from.as_any_ref().downcast_ref::<SelectionSpec>()?),
8026            StructType::TraversalSpec => Some(from.as_any_ref().downcast_ref::<TraversalSpec>()?),
8027            StructType::UpdateSet => Some(from.as_any_ref().downcast_ref::<UpdateSet>()?),
8028            StructType::WaitOptions => Some(from.as_any_ref().downcast_ref::<WaitOptions>()?),
8029            StructType::VslmAboutInfo => Some(from.as_any_ref().downcast_ref::<VslmAboutInfo>()?),
8030            StructType::VslmQueryDatastoreInfoResult => Some(from.as_any_ref().downcast_ref::<VslmQueryDatastoreInfoResult>()?),
8031            StructType::VslmServiceInstanceContent => Some(from.as_any_ref().downcast_ref::<VslmServiceInstanceContent>()?),
8032            StructType::VslmTaskInfo => Some(from.as_any_ref().downcast_ref::<VslmTaskInfo>()?),
8033            StructType::VslmTaskReason => Some(from.as_any_ref().downcast_ref::<VslmTaskReason>()?),
8034            StructType::VslmTaskReasonAlarm => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonAlarm>()?),
8035            StructType::VslmTaskReasonSchedule => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonSchedule>()?),
8036            StructType::VslmTaskReasonSystem => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonSystem>()?),
8037            StructType::VslmTaskReasonUser => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonUser>()?),
8038            StructType::VslmDatastoreSyncStatus => Some(from.as_any_ref().downcast_ref::<VslmDatastoreSyncStatus>()?),
8039            StructType::VslmVsoVStorageObjectAssociations => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectAssociations>()?),
8040            StructType::VslmVsoVStorageObjectAssociationsVmDiskAssociation => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectAssociationsVmDiskAssociation>()?),
8041            StructType::VslmVsoVStorageObjectQueryResult => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectQueryResult>()?),
8042            StructType::VslmVsoVStorageObjectQuerySpec => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectQuerySpec>()?),
8043            StructType::VslmVsoVStorageObjectResult => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectResult>()?),
8044            StructType::VslmVsoVStorageObjectSnapshotResult => Some(from.as_any_ref().downcast_ref::<VslmVsoVStorageObjectSnapshotResult>()?),
8045            _ => None,
8046        }
8047    }
8048    
8049    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
8050        let data_type = from.data_type();
8051        match data_type {
8052            StructType::DataObject => Ok(from.as_any_box().downcast::<DataObject>()?),
8053            StructType::AgencyConfigInfo => Ok(from.as_any_box().downcast::<AgencyConfigInfo>()?),
8054            StructType::AgencyScope => Ok(from.as_any_box().downcast::<AgencyScope>()?),
8055            StructType::AgencyComputeResourceScope => Ok(from.as_any_box().downcast::<AgencyComputeResourceScope>()?),
8056            StructType::AgencyVmFolder => Ok(from.as_any_box().downcast::<AgencyVmFolder>()?),
8057            StructType::AgencyVmResourcePool => Ok(from.as_any_box().downcast::<AgencyVmResourcePool>()?),
8058            StructType::AgentConfigInfo => Ok(from.as_any_box().downcast::<AgentConfigInfo>()?),
8059            StructType::AgentOvfEnvironmentInfo => Ok(from.as_any_box().downcast::<AgentOvfEnvironmentInfo>()?),
8060            StructType::AgentOvfEnvironmentInfoOvfProperty => Ok(from.as_any_box().downcast::<AgentOvfEnvironmentInfoOvfProperty>()?),
8061            StructType::AgentSslTrust => Ok(from.as_any_box().downcast::<AgentSslTrust>()?),
8062            StructType::AgentAnyCertificate => Ok(from.as_any_box().downcast::<AgentAnyCertificate>()?),
8063            StructType::AgentPinnedPemCertificate => Ok(from.as_any_box().downcast::<AgentPinnedPemCertificate>()?),
8064            StructType::AgentStoragePolicy => Ok(from.as_any_box().downcast::<AgentStoragePolicy>()?),
8065            StructType::AgentVsanStoragePolicy => Ok(from.as_any_box().downcast::<AgentVsanStoragePolicy>()?),
8066            StructType::AgentVibMatchingRule => Ok(from.as_any_box().downcast::<AgentVibMatchingRule>()?),
8067            StructType::AgentVmHook => Ok(from.as_any_box().downcast::<AgentVmHook>()?),
8068            StructType::EamObjectRuntimeInfo => Ok(from.as_any_box().downcast::<EamObjectRuntimeInfo>()?),
8069            StructType::AgentRuntimeInfo => Ok(from.as_any_box().downcast::<AgentRuntimeInfo>()?),
8070            StructType::Issue => Ok(from.as_any_box().downcast::<Issue>()?),
8071            StructType::AgencyIssue => Ok(from.as_any_box().downcast::<AgencyIssue>()?),
8072            StructType::AgencyDisabled => Ok(from.as_any_box().downcast::<AgencyDisabled>()?),
8073            StructType::AgentIssue => Ok(from.as_any_box().downcast::<AgentIssue>()?),
8074            StructType::EamCertificateNotTrusted => Ok(from.as_any_box().downcast::<EamCertificateNotTrusted>()?),
8075            StructType::HostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<HostInPartialMaintenanceMode>()?),
8076            StructType::ManagedHostNotReachable => Ok(from.as_any_box().downcast::<ManagedHostNotReachable>()?),
8077            StructType::MissingDvFilterSwitch => Ok(from.as_any_box().downcast::<MissingDvFilterSwitch>()?),
8078            StructType::OvfInvalidProperty => Ok(from.as_any_box().downcast::<OvfInvalidProperty>()?),
8079            StructType::TransitionFailed => Ok(from.as_any_box().downcast::<TransitionFailed>()?),
8080            StructType::VibIssue => Ok(from.as_any_box().downcast::<VibIssue>()?),
8081            StructType::ImmediateHostRebootRequired => Ok(from.as_any_box().downcast::<ImmediateHostRebootRequired>()?),
8082            StructType::VibCannotPutHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostInMaintenanceMode>()?),
8083            StructType::VibCannotPutHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostOutOfMaintenanceMode>()?),
8084            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
8085            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
8086            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
8087            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
8088            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
8089            StructType::VibRequiresHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibRequiresHostInMaintenanceMode>()?),
8090            StructType::VibRequiresHostReboot => Ok(from.as_any_box().downcast::<VibRequiresHostReboot>()?),
8091            StructType::VibRequiresManualInstallation => Ok(from.as_any_box().downcast::<VibRequiresManualInstallation>()?),
8092            StructType::VibRequiresManualUninstallation => Ok(from.as_any_box().downcast::<VibRequiresManualUninstallation>()?),
8093            StructType::VmIssue => Ok(from.as_any_box().downcast::<VmIssue>()?),
8094            StructType::InvalidConfig => Ok(from.as_any_box().downcast::<InvalidConfig>()?),
8095            StructType::VmCorrupted => Ok(from.as_any_box().downcast::<VmCorrupted>()?),
8096            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
8097            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
8098            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
8099            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
8100            StructType::VmHookFailed => Ok(from.as_any_box().downcast::<VmHookFailed>()?),
8101            StructType::VmHookTimedout => Ok(from.as_any_box().downcast::<VmHookTimedout>()?),
8102            StructType::VmInaccessible => Ok(from.as_any_box().downcast::<VmInaccessible>()?),
8103            StructType::VmMarkedAsTemplate => Ok(from.as_any_box().downcast::<VmMarkedAsTemplate>()?),
8104            StructType::VmOrphaned => Ok(from.as_any_box().downcast::<VmOrphaned>()?),
8105            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
8106            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
8107            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
8108            StructType::VmPoweredOn => Ok(from.as_any_box().downcast::<VmPoweredOn>()?),
8109            StructType::VmProtected => Ok(from.as_any_box().downcast::<VmProtected>()?),
8110            StructType::VmSuspended => Ok(from.as_any_box().downcast::<VmSuspended>()?),
8111            StructType::VmWrongFolder => Ok(from.as_any_box().downcast::<VmWrongFolder>()?),
8112            StructType::VmWrongResourcePool => Ok(from.as_any_box().downcast::<VmWrongResourcePool>()?),
8113            StructType::VmNotDeployed => Ok(from.as_any_box().downcast::<VmNotDeployed>()?),
8114            StructType::CannotAccessAgentOvf => Ok(from.as_any_box().downcast::<CannotAccessAgentOvf>()?),
8115            StructType::IncompatibleHostVersion => Ok(from.as_any_box().downcast::<IncompatibleHostVersion>()?),
8116            StructType::InsufficientResources => Ok(from.as_any_box().downcast::<InsufficientResources>()?),
8117            StructType::InsufficientSpace => Ok(from.as_any_box().downcast::<InsufficientSpace>()?),
8118            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
8119            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
8120            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
8121            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
8122            StructType::NoDiscoverableAgentVmDatastore => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmDatastore>()?),
8123            StructType::NoDiscoverableAgentVmNetwork => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmNetwork>()?),
8124            StructType::OvfInvalidFormat => Ok(from.as_any_box().downcast::<OvfInvalidFormat>()?),
8125            StructType::VmRequiresHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VmRequiresHostOutOfMaintenanceMode>()?),
8126            StructType::PersonalityAgentPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgentPmIssue>()?),
8127            StructType::PersonalityAgentAwaitingPmRemediation => Ok(from.as_any_box().downcast::<PersonalityAgentAwaitingPmRemediation>()?),
8128            StructType::PersonalityAgentBlockedByAgencyOperation => Ok(from.as_any_box().downcast::<PersonalityAgentBlockedByAgencyOperation>()?),
8129            StructType::OrphanedAgency => Ok(from.as_any_box().downcast::<OrphanedAgency>()?),
8130            StructType::ClusterAgentAgentIssue => Ok(from.as_any_box().downcast::<ClusterAgentAgentIssue>()?),
8131            StructType::ClusterAgentOvfInvalidProperty => Ok(from.as_any_box().downcast::<ClusterAgentOvfInvalidProperty>()?),
8132            StructType::ClusterAgentTransitionFailed => Ok(from.as_any_box().downcast::<ClusterAgentTransitionFailed>()?),
8133            StructType::ClusterAgentVmIssue => Ok(from.as_any_box().downcast::<ClusterAgentVmIssue>()?),
8134            StructType::ClusterAgentHostInMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInMaintenanceMode>()?),
8135            StructType::ClusterAgentHostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInPartialMaintenanceMode>()?),
8136            StructType::ClusterAgentInvalidConfig => Ok(from.as_any_box().downcast::<ClusterAgentInvalidConfig>()?),
8137            StructType::ClusterAgentVmHookFailed => Ok(from.as_any_box().downcast::<ClusterAgentVmHookFailed>()?),
8138            StructType::ClusterAgentVmHookTimedout => Ok(from.as_any_box().downcast::<ClusterAgentVmHookTimedout>()?),
8139            StructType::ClusterAgentVmInaccessible => Ok(from.as_any_box().downcast::<ClusterAgentVmInaccessible>()?),
8140            StructType::ClusterAgentVmNotRemoved => Ok(from.as_any_box().downcast::<ClusterAgentVmNotRemoved>()?),
8141            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
8142            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
8143            StructType::ClusterAgentVmPoweredOn => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOn>()?),
8144            StructType::ClusterAgentVmProtected => Ok(from.as_any_box().downcast::<ClusterAgentVmProtected>()?),
8145            StructType::ClusterAgentVmSuspended => Ok(from.as_any_box().downcast::<ClusterAgentVmSuspended>()?),
8146            StructType::ClusterAgentVmNotDeployed => Ok(from.as_any_box().downcast::<ClusterAgentVmNotDeployed>()?),
8147            StructType::ClusterAgentCertificateNotTrusted => Ok(from.as_any_box().downcast::<ClusterAgentCertificateNotTrusted>()?),
8148            StructType::ClusterAgentInsufficientClusterSpace => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterSpace>()?),
8149            StructType::ClusterAgentMissingClusterVmDatastore => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmDatastore>()?),
8150            StructType::ClusterAgentMissingClusterVmNetwork => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmNetwork>()?),
8151            StructType::IntegrityAgencyVumIssue => Ok(from.as_any_box().downcast::<IntegrityAgencyVumIssue>()?),
8152            StructType::IntegrityAgencyCannotDeleteSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotDeleteSoftware>()?),
8153            StructType::IntegrityAgencyCannotStageSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotStageSoftware>()?),
8154            StructType::IntegrityAgencyVumUnavailable => Ok(from.as_any_box().downcast::<IntegrityAgencyVumUnavailable>()?),
8155            StructType::PersonalityAgencyPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyPmIssue>()?),
8156            StructType::PersonalityAgencyCannotConfigureSolutions => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotConfigureSolutions>()?),
8157            StructType::PersonalityAgencyDepotIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyDepotIssue>()?),
8158            StructType::PersonalityAgencyCannotUploadDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotUploadDepot>()?),
8159            StructType::PersonalityAgencyInaccessibleDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInaccessibleDepot>()?),
8160            StructType::PersonalityAgencyInvalidDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInvalidDepot>()?),
8161            StructType::PersonalityAgencyPmUnavailable => Ok(from.as_any_box().downcast::<PersonalityAgencyPmUnavailable>()?),
8162            StructType::ExtensibleIssue => Ok(from.as_any_box().downcast::<ExtensibleIssue>()?),
8163            StructType::HostIssue => Ok(from.as_any_box().downcast::<HostIssue>()?),
8164            StructType::OrphanedDvFilterSwitch => Ok(from.as_any_box().downcast::<OrphanedDvFilterSwitch>()?),
8165            StructType::UnknownAgentVm => Ok(from.as_any_box().downcast::<UnknownAgentVm>()?),
8166            StructType::HooksHookListSpec => Ok(from.as_any_box().downcast::<HooksHookListSpec>()?),
8167            StructType::HooksMarkAsProcessedSpec => Ok(from.as_any_box().downcast::<HooksMarkAsProcessedSpec>()?),
8168            StructType::SolutionsApplySpec => Ok(from.as_any_box().downcast::<SolutionsApplySpec>()?),
8169            StructType::SolutionsClusterSolutionComplianceResult => Ok(from.as_any_box().downcast::<SolutionsClusterSolutionComplianceResult>()?),
8170            StructType::SolutionsComplianceResult => Ok(from.as_any_box().downcast::<SolutionsComplianceResult>()?),
8171            StructType::SolutionsComplianceSpec => Ok(from.as_any_box().downcast::<SolutionsComplianceSpec>()?),
8172            StructType::SolutionsDeploymentUnitComplianceResult => Ok(from.as_any_box().downcast::<SolutionsDeploymentUnitComplianceResult>()?),
8173            StructType::SolutionsHookAcknowledgeConfig => Ok(from.as_any_box().downcast::<SolutionsHookAcknowledgeConfig>()?),
8174            StructType::SolutionsInteractiveHookAcknowledgeConfig => Ok(from.as_any_box().downcast::<SolutionsInteractiveHookAcknowledgeConfig>()?),
8175            StructType::SolutionsHookConfig => Ok(from.as_any_box().downcast::<SolutionsHookConfig>()?),
8176            StructType::SolutionsHookInfo => Ok(from.as_any_box().downcast::<SolutionsHookInfo>()?),
8177            StructType::SolutionsHostComplianceResult => Ok(from.as_any_box().downcast::<SolutionsHostComplianceResult>()?),
8178            StructType::SolutionsOvfProperty => Ok(from.as_any_box().downcast::<SolutionsOvfProperty>()?),
8179            StructType::SolutionsSolutionComplianceResult => Ok(from.as_any_box().downcast::<SolutionsSolutionComplianceResult>()?),
8180            StructType::SolutionsSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsSolutionConfig>()?),
8181            StructType::SolutionsSolutionValidationResult => Ok(from.as_any_box().downcast::<SolutionsSolutionValidationResult>()?),
8182            StructType::SolutionsStoragePolicy => Ok(from.as_any_box().downcast::<SolutionsStoragePolicy>()?),
8183            StructType::SolutionsProfileIdStoragePolicy => Ok(from.as_any_box().downcast::<SolutionsProfileIdStoragePolicy>()?),
8184            StructType::SolutionsTransitionSpec => Ok(from.as_any_box().downcast::<SolutionsTransitionSpec>()?),
8185            StructType::SolutionsTypeSpecificSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsTypeSpecificSolutionConfig>()?),
8186            StructType::SolutionsClusterBoundSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsClusterBoundSolutionConfig>()?),
8187            StructType::SolutionsHostBoundSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsHostBoundSolutionConfig>()?),
8188            StructType::SolutionsVmNetworkMapping => Ok(from.as_any_box().downcast::<SolutionsVmNetworkMapping>()?),
8189            StructType::SolutionsVmSource => Ok(from.as_any_box().downcast::<SolutionsVmSource>()?),
8190            StructType::SolutionsUrlVmSource => Ok(from.as_any_box().downcast::<SolutionsUrlVmSource>()?),
8191            StructType::SolutionsValidateSpec => Ok(from.as_any_box().downcast::<SolutionsValidateSpec>()?),
8192            StructType::SolutionsValidationResult => Ok(from.as_any_box().downcast::<SolutionsValidationResult>()?),
8193            StructType::SolutionsVmResourceSpec => Ok(from.as_any_box().downcast::<SolutionsVmResourceSpec>()?),
8194            StructType::VibVibInfo => Ok(from.as_any_box().downcast::<VibVibInfo>()?),
8195            StructType::VibVibInfoSoftwareTags => Ok(from.as_any_box().downcast::<VibVibInfoSoftwareTags>()?),
8196            StructType::VibVibServicesSslTrust => Ok(from.as_any_box().downcast::<VibVibServicesSslTrust>()?),
8197            StructType::VibVibServicesAnyCertificate => Ok(from.as_any_box().downcast::<VibVibServicesAnyCertificate>()?),
8198            StructType::VibVibServicesPinnedPemCertificate => Ok(from.as_any_box().downcast::<VibVibServicesPinnedPemCertificate>()?),
8199            StructType::PbmAboutInfo => Ok(from.as_any_box().downcast::<PbmAboutInfo>()?),
8200            StructType::PbmExtendedElementDescription => Ok(from.as_any_box().downcast::<PbmExtendedElementDescription>()?),
8201            StructType::PbmLoggingConfiguration => Ok(from.as_any_box().downcast::<PbmLoggingConfiguration>()?),
8202            StructType::PbmServerObjectRef => Ok(from.as_any_box().downcast::<PbmServerObjectRef>()?),
8203            StructType::PbmServiceInstanceContent => Ok(from.as_any_box().downcast::<PbmServiceInstanceContent>()?),
8204            StructType::PbmCapabilityInstance => Ok(from.as_any_box().downcast::<PbmCapabilityInstance>()?),
8205            StructType::PbmCapabilityMetadata => Ok(from.as_any_box().downcast::<PbmCapabilityMetadata>()?),
8206            StructType::PbmCapabilityMetadataUniqueId => Ok(from.as_any_box().downcast::<PbmCapabilityMetadataUniqueId>()?),
8207            StructType::PbmCapabilityConstraintInstance => Ok(from.as_any_box().downcast::<PbmCapabilityConstraintInstance>()?),
8208            StructType::PbmCapabilityPropertyInstance => Ok(from.as_any_box().downcast::<PbmCapabilityPropertyInstance>()?),
8209            StructType::PbmCapabilityPropertyMetadata => Ok(from.as_any_box().downcast::<PbmCapabilityPropertyMetadata>()?),
8210            StructType::PbmCapabilityTypeInfo => Ok(from.as_any_box().downcast::<PbmCapabilityTypeInfo>()?),
8211            StructType::PbmCapabilityGenericTypeInfo => Ok(from.as_any_box().downcast::<PbmCapabilityGenericTypeInfo>()?),
8212            StructType::PbmCapabilityMetadataPerCategory => Ok(from.as_any_box().downcast::<PbmCapabilityMetadataPerCategory>()?),
8213            StructType::PbmCapabilitySchema => Ok(from.as_any_box().downcast::<PbmCapabilitySchema>()?),
8214            StructType::PbmCapabilityNamespaceInfo => Ok(from.as_any_box().downcast::<PbmCapabilityNamespaceInfo>()?),
8215            StructType::PbmCapabilitySchemaVendorInfo => Ok(from.as_any_box().downcast::<PbmCapabilitySchemaVendorInfo>()?),
8216            StructType::PbmCapabilityVendorNamespaceInfo => Ok(from.as_any_box().downcast::<PbmCapabilityVendorNamespaceInfo>()?),
8217            StructType::PbmCapabilityVendorResourceTypeInfo => Ok(from.as_any_box().downcast::<PbmCapabilityVendorResourceTypeInfo>()?),
8218            StructType::PbmLineOfServiceInfo => Ok(from.as_any_box().downcast::<PbmLineOfServiceInfo>()?),
8219            StructType::PbmPersistenceBasedDataServiceInfo => Ok(from.as_any_box().downcast::<PbmPersistenceBasedDataServiceInfo>()?),
8220            StructType::PbmVaioDataServiceInfo => Ok(from.as_any_box().downcast::<PbmVaioDataServiceInfo>()?),
8221            StructType::PbmCapabilityDescription => Ok(from.as_any_box().downcast::<PbmCapabilityDescription>()?),
8222            StructType::PbmCapabilityDiscreteSet => Ok(from.as_any_box().downcast::<PbmCapabilityDiscreteSet>()?),
8223            StructType::PbmCapabilityRange => Ok(from.as_any_box().downcast::<PbmCapabilityRange>()?),
8224            StructType::PbmCapabilityTimeSpan => Ok(from.as_any_box().downcast::<PbmCapabilityTimeSpan>()?),
8225            StructType::PbmComplianceResult => Ok(from.as_any_box().downcast::<PbmComplianceResult>()?),
8226            StructType::PbmFetchEntityHealthStatusSpec => Ok(from.as_any_box().downcast::<PbmFetchEntityHealthStatusSpec>()?),
8227            StructType::PbmComplianceOperationalStatus => Ok(from.as_any_box().downcast::<PbmComplianceOperationalStatus>()?),
8228            StructType::PbmCompliancePolicyStatus => Ok(from.as_any_box().downcast::<PbmCompliancePolicyStatus>()?),
8229            StructType::PbmRollupComplianceResult => Ok(from.as_any_box().downcast::<PbmRollupComplianceResult>()?),
8230            StructType::PbmFaultNoPermissionEntityPrivileges => Ok(from.as_any_box().downcast::<PbmFaultNoPermissionEntityPrivileges>()?),
8231            StructType::PbmPlacementCompatibilityResult => Ok(from.as_any_box().downcast::<PbmPlacementCompatibilityResult>()?),
8232            StructType::PbmPlacementMatchingResources => Ok(from.as_any_box().downcast::<PbmPlacementMatchingResources>()?),
8233            StructType::PbmPlacementMatchingReplicationResources => Ok(from.as_any_box().downcast::<PbmPlacementMatchingReplicationResources>()?),
8234            StructType::PbmPlacementHub => Ok(from.as_any_box().downcast::<PbmPlacementHub>()?),
8235            StructType::PbmPlacementRequirement => Ok(from.as_any_box().downcast::<PbmPlacementRequirement>()?),
8236            StructType::PbmPlacementCapabilityConstraintsRequirement => Ok(from.as_any_box().downcast::<PbmPlacementCapabilityConstraintsRequirement>()?),
8237            StructType::PbmPlacementCapabilityProfileRequirement => Ok(from.as_any_box().downcast::<PbmPlacementCapabilityProfileRequirement>()?),
8238            StructType::PbmPlacementResourceUtilization => Ok(from.as_any_box().downcast::<PbmPlacementResourceUtilization>()?),
8239            StructType::PbmCapabilityProfileCreateSpec => Ok(from.as_any_box().downcast::<PbmCapabilityProfileCreateSpec>()?),
8240            StructType::PbmCapabilityProfileUpdateSpec => Ok(from.as_any_box().downcast::<PbmCapabilityProfileUpdateSpec>()?),
8241            StructType::PbmCapabilityConstraints => Ok(from.as_any_box().downcast::<PbmCapabilityConstraints>()?),
8242            StructType::PbmCapabilitySubProfileConstraints => Ok(from.as_any_box().downcast::<PbmCapabilitySubProfileConstraints>()?),
8243            StructType::PbmDataServiceToPoliciesMap => Ok(from.as_any_box().downcast::<PbmDataServiceToPoliciesMap>()?),
8244            StructType::PbmDefaultProfileInfo => Ok(from.as_any_box().downcast::<PbmDefaultProfileInfo>()?),
8245            StructType::PbmProfile => Ok(from.as_any_box().downcast::<PbmProfile>()?),
8246            StructType::PbmCapabilityProfile => Ok(from.as_any_box().downcast::<PbmCapabilityProfile>()?),
8247            StructType::PbmDefaultCapabilityProfile => Ok(from.as_any_box().downcast::<PbmDefaultCapabilityProfile>()?),
8248            StructType::PbmProfileId => Ok(from.as_any_box().downcast::<PbmProfileId>()?),
8249            StructType::PbmProfileOperationOutcome => Ok(from.as_any_box().downcast::<PbmProfileOperationOutcome>()?),
8250            StructType::PbmProfileType => Ok(from.as_any_box().downcast::<PbmProfileType>()?),
8251            StructType::PbmQueryProfileResult => Ok(from.as_any_box().downcast::<PbmQueryProfileResult>()?),
8252            StructType::PbmProfileResourceType => Ok(from.as_any_box().downcast::<PbmProfileResourceType>()?),
8253            StructType::PbmCapabilitySubProfile => Ok(from.as_any_box().downcast::<PbmCapabilitySubProfile>()?),
8254            StructType::PbmDatastoreSpaceStatistics => Ok(from.as_any_box().downcast::<PbmDatastoreSpaceStatistics>()?),
8255            StructType::PbmQueryReplicationGroupResult => Ok(from.as_any_box().downcast::<PbmQueryReplicationGroupResult>()?),
8256            StructType::SmsAboutInfo => Ok(from.as_any_box().downcast::<SmsAboutInfo>()?),
8257            StructType::EntityReference => Ok(from.as_any_box().downcast::<EntityReference>()?),
8258            StructType::FaultDomainFilter => Ok(from.as_any_box().downcast::<FaultDomainFilter>()?),
8259            StructType::ReplicationGroupFilter => Ok(from.as_any_box().downcast::<ReplicationGroupFilter>()?),
8260            StructType::SmsTaskInfo => Ok(from.as_any_box().downcast::<SmsTaskInfo>()?),
8261            StructType::AlarmFilter => Ok(from.as_any_box().downcast::<AlarmFilter>()?),
8262            StructType::AlarmResult => Ok(from.as_any_box().downcast::<AlarmResult>()?),
8263            StructType::SmsProviderInfo => Ok(from.as_any_box().downcast::<SmsProviderInfo>()?),
8264            StructType::VasaProviderInfo => Ok(from.as_any_box().downcast::<VasaProviderInfo>()?),
8265            StructType::SmsProviderSpec => Ok(from.as_any_box().downcast::<SmsProviderSpec>()?),
8266            StructType::VasaProviderSpec => Ok(from.as_any_box().downcast::<VasaProviderSpec>()?),
8267            StructType::VasaProviderUpgradeSpec => Ok(from.as_any_box().downcast::<VasaProviderUpgradeSpec>()?),
8268            StructType::RelatedStorageArray => Ok(from.as_any_box().downcast::<RelatedStorageArray>()?),
8269            StructType::SupportedVendorModelMapping => Ok(from.as_any_box().downcast::<SupportedVendorModelMapping>()?),
8270            StructType::BackingConfig => Ok(from.as_any_box().downcast::<BackingConfig>()?),
8271            StructType::BackingStoragePool => Ok(from.as_any_box().downcast::<BackingStoragePool>()?),
8272            StructType::DatastoreBackingPoolMapping => Ok(from.as_any_box().downcast::<DatastoreBackingPoolMapping>()?),
8273            StructType::DatastorePair => Ok(from.as_any_box().downcast::<DatastorePair>()?),
8274            StructType::DrsMigrationCapabilityResult => Ok(from.as_any_box().downcast::<DrsMigrationCapabilityResult>()?),
8275            StructType::FaultDomainProviderMapping => Ok(from.as_any_box().downcast::<FaultDomainProviderMapping>()?),
8276            StructType::StorageFileSystemInfo => Ok(from.as_any_box().downcast::<StorageFileSystemInfo>()?),
8277            StructType::LunHbaAssociation => Ok(from.as_any_box().downcast::<LunHbaAssociation>()?),
8278            StructType::NameValuePair => Ok(from.as_any_box().downcast::<NameValuePair>()?),
8279            StructType::StorageAlarm => Ok(from.as_any_box().downcast::<StorageAlarm>()?),
8280            StructType::StorageArray => Ok(from.as_any_box().downcast::<StorageArray>()?),
8281            StructType::StorageCapability => Ok(from.as_any_box().downcast::<StorageCapability>()?),
8282            StructType::StorageContainer => Ok(from.as_any_box().downcast::<StorageContainer>()?),
8283            StructType::StorageContainerResult => Ok(from.as_any_box().downcast::<StorageContainerResult>()?),
8284            StructType::StorageContainerSpec => Ok(from.as_any_box().downcast::<StorageContainerSpec>()?),
8285            StructType::StorageFileSystem => Ok(from.as_any_box().downcast::<StorageFileSystem>()?),
8286            StructType::StorageLun => Ok(from.as_any_box().downcast::<StorageLun>()?),
8287            StructType::StoragePort => Ok(from.as_any_box().downcast::<StoragePort>()?),
8288            StructType::FcStoragePort => Ok(from.as_any_box().downcast::<FcStoragePort>()?),
8289            StructType::FcoeStoragePort => Ok(from.as_any_box().downcast::<FcoeStoragePort>()?),
8290            StructType::IscsiStoragePort => Ok(from.as_any_box().downcast::<IscsiStoragePort>()?),
8291            StructType::StorageProcessor => Ok(from.as_any_box().downcast::<StorageProcessor>()?),
8292            StructType::DeviceId => Ok(from.as_any_box().downcast::<DeviceId>()?),
8293            StructType::VVolId => Ok(from.as_any_box().downcast::<VVolId>()?),
8294            StructType::VasaVirtualDiskId => Ok(from.as_any_box().downcast::<VasaVirtualDiskId>()?),
8295            StructType::VirtualDiskKey => Ok(from.as_any_box().downcast::<VirtualDiskKey>()?),
8296            StructType::VirtualDiskMoId => Ok(from.as_any_box().downcast::<VirtualDiskMoId>()?),
8297            StructType::VirtualMachineId => Ok(from.as_any_box().downcast::<VirtualMachineId>()?),
8298            StructType::VirtualMachineFilePath => Ok(from.as_any_box().downcast::<VirtualMachineFilePath>()?),
8299            StructType::VirtualMachineMoId => Ok(from.as_any_box().downcast::<VirtualMachineMoId>()?),
8300            StructType::VirtualMachineUuid => Ok(from.as_any_box().downcast::<VirtualMachineUuid>()?),
8301            StructType::FailoverParam => Ok(from.as_any_box().downcast::<FailoverParam>()?),
8302            StructType::TestFailoverParam => Ok(from.as_any_box().downcast::<TestFailoverParam>()?),
8303            StructType::PolicyAssociation => Ok(from.as_any_box().downcast::<PolicyAssociation>()?),
8304            StructType::ReplicationGroupData => Ok(from.as_any_box().downcast::<ReplicationGroupData>()?),
8305            StructType::RecoveredDevice => Ok(from.as_any_box().downcast::<RecoveredDevice>()?),
8306            StructType::RecoveredDiskInfo => Ok(from.as_any_box().downcast::<RecoveredDiskInfo>()?),
8307            StructType::GroupInfo => Ok(from.as_any_box().downcast::<GroupInfo>()?),
8308            StructType::SourceGroupInfo => Ok(from.as_any_box().downcast::<SourceGroupInfo>()?),
8309            StructType::TargetGroupInfo => Ok(from.as_any_box().downcast::<TargetGroupInfo>()?),
8310            StructType::GroupOperationResult => Ok(from.as_any_box().downcast::<GroupOperationResult>()?),
8311            StructType::FailoverSuccessResult => Ok(from.as_any_box().downcast::<FailoverSuccessResult>()?),
8312            StructType::GroupErrorResult => Ok(from.as_any_box().downcast::<GroupErrorResult>()?),
8313            StructType::QueryPointInTimeReplicaSuccessResult => Ok(from.as_any_box().downcast::<QueryPointInTimeReplicaSuccessResult>()?),
8314            StructType::QueryPointInTimeReplicaSummaryResult => Ok(from.as_any_box().downcast::<QueryPointInTimeReplicaSummaryResult>()?),
8315            StructType::QueryReplicationGroupSuccessResult => Ok(from.as_any_box().downcast::<QueryReplicationGroupSuccessResult>()?),
8316            StructType::ReverseReplicationSuccessResult => Ok(from.as_any_box().downcast::<ReverseReplicationSuccessResult>()?),
8317            StructType::SyncReplicationGroupSuccessResult => Ok(from.as_any_box().downcast::<SyncReplicationGroupSuccessResult>()?),
8318            StructType::PointInTimeReplicaId => Ok(from.as_any_box().downcast::<PointInTimeReplicaId>()?),
8319            StructType::PromoteParam => Ok(from.as_any_box().downcast::<PromoteParam>()?),
8320            StructType::QueryPointInTimeReplicaParam => Ok(from.as_any_box().downcast::<QueryPointInTimeReplicaParam>()?),
8321            StructType::ReplicaQueryIntervalParam => Ok(from.as_any_box().downcast::<ReplicaQueryIntervalParam>()?),
8322            StructType::PointInTimeReplicaInfo => Ok(from.as_any_box().downcast::<PointInTimeReplicaInfo>()?),
8323            StructType::ReplicaIntervalQueryResult => Ok(from.as_any_box().downcast::<ReplicaIntervalQueryResult>()?),
8324            StructType::QueryReplicationPeerResult => Ok(from.as_any_box().downcast::<QueryReplicationPeerResult>()?),
8325            StructType::ReplicaId => Ok(from.as_any_box().downcast::<ReplicaId>()?),
8326            StructType::ReplicationTargetInfo => Ok(from.as_any_box().downcast::<ReplicationTargetInfo>()?),
8327            StructType::SourceGroupMemberInfo => Ok(from.as_any_box().downcast::<SourceGroupMemberInfo>()?),
8328            StructType::TargetDeviceId => Ok(from.as_any_box().downcast::<TargetDeviceId>()?),
8329            StructType::TargetToSourceInfo => Ok(from.as_any_box().downcast::<TargetToSourceInfo>()?),
8330            StructType::TargetGroupMemberInfo => Ok(from.as_any_box().downcast::<TargetGroupMemberInfo>()?),
8331            StructType::RecoveredTargetGroupMemberInfo => Ok(from.as_any_box().downcast::<RecoveredTargetGroupMemberInfo>()?),
8332            StructType::AboutInfo => Ok(from.as_any_box().downcast::<AboutInfo>()?),
8333            StructType::AuthorizationDescription => Ok(from.as_any_box().downcast::<AuthorizationDescription>()?),
8334            StructType::EntityPrivilege => Ok(from.as_any_box().downcast::<EntityPrivilege>()?),
8335            StructType::Permission => Ok(from.as_any_box().downcast::<Permission>()?),
8336            StructType::AuthorizationPrivilege => Ok(from.as_any_box().downcast::<AuthorizationPrivilege>()?),
8337            StructType::PrivilegeAvailability => Ok(from.as_any_box().downcast::<PrivilegeAvailability>()?),
8338            StructType::AuthorizationRole => Ok(from.as_any_box().downcast::<AuthorizationRole>()?),
8339            StructType::UserPrivilegeResult => Ok(from.as_any_box().downcast::<UserPrivilegeResult>()?),
8340            StructType::BatchResult => Ok(from.as_any_box().downcast::<BatchResult>()?),
8341            StructType::Capability => Ok(from.as_any_box().downcast::<Capability>()?),
8342            StructType::ClusterComputeResourceClusterConfigResult => Ok(from.as_any_box().downcast::<ClusterComputeResourceClusterConfigResult>()?),
8343            StructType::ClusterComputeResourceCryptoModePolicy => Ok(from.as_any_box().downcast::<ClusterComputeResourceCryptoModePolicy>()?),
8344            StructType::ClusterComputeResourceDvsSetting => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsSetting>()?),
8345            StructType::ClusterComputeResourceDvsSettingDvPortgroupToServiceMapping => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsSettingDvPortgroupToServiceMapping>()?),
8346            StructType::ClusterComputeResourceDvsProfile => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsProfile>()?),
8347            StructType::ClusterComputeResourceDvsProfileDvPortgroupSpecToServiceMapping => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsProfileDvPortgroupSpecToServiceMapping>()?),
8348            StructType::ClusterComputeResourceHciConfigInfo => Ok(from.as_any_box().downcast::<ClusterComputeResourceHciConfigInfo>()?),
8349            StructType::ClusterComputeResourceHciConfigSpec => Ok(from.as_any_box().downcast::<ClusterComputeResourceHciConfigSpec>()?),
8350            StructType::ClusterComputeResourceHostConfigurationInput => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostConfigurationInput>()?),
8351            StructType::ClusterComputeResourceHostConfigurationProfile => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostConfigurationProfile>()?),
8352            StructType::ClusterComputeResourceHostEvacuationInfo => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostEvacuationInfo>()?),
8353            StructType::ClusterComputeResourceHostVmkNicInfo => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostVmkNicInfo>()?),
8354            StructType::ClusterComputeResourceMaintenanceInfo => Ok(from.as_any_box().downcast::<ClusterComputeResourceMaintenanceInfo>()?),
8355            StructType::ClusterComputeResourceVcProfile => Ok(from.as_any_box().downcast::<ClusterComputeResourceVcProfile>()?),
8356            StructType::ClusterComputeResourceValidationResultBase => Ok(from.as_any_box().downcast::<ClusterComputeResourceValidationResultBase>()?),
8357            StructType::ClusterComputeResourceDvsConfigurationValidation => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsConfigurationValidation>()?),
8358            StructType::ClusterComputeResourceHostConfigurationValidation => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostConfigurationValidation>()?),
8359            StructType::VsanClusterConfigPrecheckItem => Ok(from.as_any_box().downcast::<VsanClusterConfigPrecheckItem>()?),
8360            StructType::ClusterComputeResourceVcsSlots => Ok(from.as_any_box().downcast::<ClusterComputeResourceVcsSlots>()?),
8361            StructType::ComputeResourceConfigInfo => Ok(from.as_any_box().downcast::<ComputeResourceConfigInfo>()?),
8362            StructType::ClusterConfigInfoEx => Ok(from.as_any_box().downcast::<ClusterConfigInfoEx>()?),
8363            StructType::ComputeResourceConfigSpec => Ok(from.as_any_box().downcast::<ComputeResourceConfigSpec>()?),
8364            StructType::ClusterConfigSpecEx => Ok(from.as_any_box().downcast::<ClusterConfigSpecEx>()?),
8365            StructType::ComputeResourceHostSpbmLicenseInfo => Ok(from.as_any_box().downcast::<ComputeResourceHostSpbmLicenseInfo>()?),
8366            StructType::ComputeResourceHostSeedSpec => Ok(from.as_any_box().downcast::<ComputeResourceHostSeedSpec>()?),
8367            StructType::ComputeResourceHostSeedSpecSingleHostSpec => Ok(from.as_any_box().downcast::<ComputeResourceHostSeedSpecSingleHostSpec>()?),
8368            StructType::ComputeResourceSummary => Ok(from.as_any_box().downcast::<ComputeResourceSummary>()?),
8369            StructType::ClusterComputeResourceSummary => Ok(from.as_any_box().downcast::<ClusterComputeResourceSummary>()?),
8370            StructType::CustomFieldDef => Ok(from.as_any_box().downcast::<CustomFieldDef>()?),
8371            StructType::CustomFieldValue => Ok(from.as_any_box().downcast::<CustomFieldValue>()?),
8372            StructType::CustomFieldStringValue => Ok(from.as_any_box().downcast::<CustomFieldStringValue>()?),
8373            StructType::CustomizationSpecInfo => Ok(from.as_any_box().downcast::<CustomizationSpecInfo>()?),
8374            StructType::CustomizationSpecItem => Ok(from.as_any_box().downcast::<CustomizationSpecItem>()?),
8375            StructType::DatacenterBasicConnectInfo => Ok(from.as_any_box().downcast::<DatacenterBasicConnectInfo>()?),
8376            StructType::DatacenterConfigInfo => Ok(from.as_any_box().downcast::<DatacenterConfigInfo>()?),
8377            StructType::DatacenterConfigSpec => Ok(from.as_any_box().downcast::<DatacenterConfigSpec>()?),
8378            StructType::DatastoreCapability => Ok(from.as_any_box().downcast::<DatastoreCapability>()?),
8379            StructType::DatastoreHostMount => Ok(from.as_any_box().downcast::<DatastoreHostMount>()?),
8380            StructType::DatastoreInfo => Ok(from.as_any_box().downcast::<DatastoreInfo>()?),
8381            StructType::LocalDatastoreInfo => Ok(from.as_any_box().downcast::<LocalDatastoreInfo>()?),
8382            StructType::NasDatastoreInfo => Ok(from.as_any_box().downcast::<NasDatastoreInfo>()?),
8383            StructType::PMemDatastoreInfo => Ok(from.as_any_box().downcast::<PMemDatastoreInfo>()?),
8384            StructType::VmfsDatastoreInfo => Ok(from.as_any_box().downcast::<VmfsDatastoreInfo>()?),
8385            StructType::VsanDatastoreInfo => Ok(from.as_any_box().downcast::<VsanDatastoreInfo>()?),
8386            StructType::VvolDatastoreInfo => Ok(from.as_any_box().downcast::<VvolDatastoreInfo>()?),
8387            StructType::DatastoreMountPathDatastorePair => Ok(from.as_any_box().downcast::<DatastoreMountPathDatastorePair>()?),
8388            StructType::DatastoreSummary => Ok(from.as_any_box().downcast::<DatastoreSummary>()?),
8389            StructType::DatastoreVVolContainerFailoverPair => Ok(from.as_any_box().downcast::<DatastoreVVolContainerFailoverPair>()?),
8390            StructType::DatastoreNamespaceManagerDirectoryInfo => Ok(from.as_any_box().downcast::<DatastoreNamespaceManagerDirectoryInfo>()?),
8391            StructType::Description => Ok(from.as_any_box().downcast::<Description>()?),
8392            StructType::ElementDescription => Ok(from.as_any_box().downcast::<ElementDescription>()?),
8393            StructType::EvcMode => Ok(from.as_any_box().downcast::<EvcMode>()?),
8394            StructType::ExtendedElementDescription => Ok(from.as_any_box().downcast::<ExtendedElementDescription>()?),
8395            StructType::FeatureEvcMode => Ok(from.as_any_box().downcast::<FeatureEvcMode>()?),
8396            StructType::OptionDef => Ok(from.as_any_box().downcast::<OptionDef>()?),
8397            StructType::ExtendedDescription => Ok(from.as_any_box().downcast::<ExtendedDescription>()?),
8398            StructType::MethodDescription => Ok(from.as_any_box().downcast::<MethodDescription>()?),
8399            StructType::TypeDescription => Ok(from.as_any_box().downcast::<TypeDescription>()?),
8400            StructType::ScheduledTaskDetail => Ok(from.as_any_box().downcast::<ScheduledTaskDetail>()?),
8401            StructType::DesiredSoftwareSpec => Ok(from.as_any_box().downcast::<DesiredSoftwareSpec>()?),
8402            StructType::DesiredSoftwareSpecBaseImageSpec => Ok(from.as_any_box().downcast::<DesiredSoftwareSpecBaseImageSpec>()?),
8403            StructType::DesiredSoftwareSpecComponentSpec => Ok(from.as_any_box().downcast::<DesiredSoftwareSpecComponentSpec>()?),
8404            StructType::DesiredSoftwareSpecVendorAddOnSpec => Ok(from.as_any_box().downcast::<DesiredSoftwareSpecVendorAddOnSpec>()?),
8405            StructType::DiagnosticManagerAuditRecordResult => Ok(from.as_any_box().downcast::<DiagnosticManagerAuditRecordResult>()?),
8406            StructType::DiagnosticManagerBundleInfo => Ok(from.as_any_box().downcast::<DiagnosticManagerBundleInfo>()?),
8407            StructType::DiagnosticManagerLogDescriptor => Ok(from.as_any_box().downcast::<DiagnosticManagerLogDescriptor>()?),
8408            StructType::DiagnosticManagerLogHeader => Ok(from.as_any_box().downcast::<DiagnosticManagerLogHeader>()?),
8409            StructType::DirectPathProfileManagerCapacityQuerySpec => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQuerySpec>()?),
8410            StructType::DirectPathProfileManagerCapacityQueryByDeviceConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryByDeviceConfig>()?),
8411            StructType::DirectPathProfileManagerCapacityQueryById => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryById>()?),
8412            StructType::DirectPathProfileManagerCapacityQueryByName => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryByName>()?),
8413            StructType::DirectPathProfileManagerCapacityResult => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityResult>()?),
8414            StructType::DirectPathProfileManagerCapacityInfo => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityInfo>()?),
8415            StructType::DirectPathProfileManagerCapacityUnknown => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityUnknown>()?),
8416            StructType::DirectPathProfileManagerCreateSpec => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCreateSpec>()?),
8417            StructType::DirectPathProfileManagerDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDirectPathConfig>()?),
8418            StructType::DirectPathProfileManagerDvxDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDvxDirectPathConfig>()?),
8419            StructType::DirectPathProfileManagerDynamicDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDynamicDirectPathConfig>()?),
8420            StructType::DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig>()?),
8421            StructType::DirectPathProfileManagerVmiopDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerVmiopDirectPathConfig>()?),
8422            StructType::DirectPathProfileInfo => Ok(from.as_any_box().downcast::<DirectPathProfileInfo>()?),
8423            StructType::DirectPathProfileManagerFilterSpec => Ok(from.as_any_box().downcast::<DirectPathProfileManagerFilterSpec>()?),
8424            StructType::DirectPathProfileManagerTargetEntity => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetEntity>()?),
8425            StructType::DirectPathProfileManagerTargetCluster => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetCluster>()?),
8426            StructType::DirectPathProfileManagerTargetHost => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetHost>()?),
8427            StructType::DirectPathProfileManagerUpdateSpec => Ok(from.as_any_box().downcast::<DirectPathProfileManagerUpdateSpec>()?),
8428            StructType::DvsBackupRestoreCapability => Ok(from.as_any_box().downcast::<DvsBackupRestoreCapability>()?),
8429            StructType::DvsCapability => Ok(from.as_any_box().downcast::<DvsCapability>()?),
8430            StructType::DvsConfigInfo => Ok(from.as_any_box().downcast::<DvsConfigInfo>()?),
8431            StructType::VMwareDvsConfigInfo => Ok(from.as_any_box().downcast::<VMwareDvsConfigInfo>()?),
8432            StructType::DvsConfigSpec => Ok(from.as_any_box().downcast::<DvsConfigSpec>()?),
8433            StructType::VMwareDvsConfigSpec => Ok(from.as_any_box().downcast::<VMwareDvsConfigSpec>()?),
8434            StructType::DvsContactInfo => Ok(from.as_any_box().downcast::<DvsContactInfo>()?),
8435            StructType::DvsCreateSpec => Ok(from.as_any_box().downcast::<DvsCreateSpec>()?),
8436            StructType::DvsFeatureCapability => Ok(from.as_any_box().downcast::<DvsFeatureCapability>()?),
8437            StructType::VMwareDvsFeatureCapability => Ok(from.as_any_box().downcast::<VMwareDvsFeatureCapability>()?),
8438            StructType::DvsHealthCheckConfig => Ok(from.as_any_box().downcast::<DvsHealthCheckConfig>()?),
8439            StructType::VMwareDvsHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsHealthCheckConfig>()?),
8440            StructType::VMwareDvsTeamingHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsTeamingHealthCheckConfig>()?),
8441            StructType::VMwareDvsVlanMtuHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsVlanMtuHealthCheckConfig>()?),
8442            StructType::DvsHealthCheckCapability => Ok(from.as_any_box().downcast::<DvsHealthCheckCapability>()?),
8443            StructType::VMwareDvsHealthCheckCapability => Ok(from.as_any_box().downcast::<VMwareDvsHealthCheckCapability>()?),
8444            StructType::DvsHostInfrastructureTrafficResource => Ok(from.as_any_box().downcast::<DvsHostInfrastructureTrafficResource>()?),
8445            StructType::DvsHostInfrastructureTrafficResourceAllocation => Ok(from.as_any_box().downcast::<DvsHostInfrastructureTrafficResourceAllocation>()?),
8446            StructType::DvsNetworkResourceManagementCapability => Ok(from.as_any_box().downcast::<DvsNetworkResourceManagementCapability>()?),
8447            StructType::DvsResourceRuntimeInfo => Ok(from.as_any_box().downcast::<DvsResourceRuntimeInfo>()?),
8448            StructType::DvsRollbackCapability => Ok(from.as_any_box().downcast::<DvsRollbackCapability>()?),
8449            StructType::DvsRuntimeInfo => Ok(from.as_any_box().downcast::<DvsRuntimeInfo>()?),
8450            StructType::DvsSummary => Ok(from.as_any_box().downcast::<DvsSummary>()?),
8451            StructType::DvsPolicy => Ok(from.as_any_box().downcast::<DvsPolicy>()?),
8452            StructType::DvsUplinkPortPolicy => Ok(from.as_any_box().downcast::<DvsUplinkPortPolicy>()?),
8453            StructType::DvsNameArrayUplinkPortPolicy => Ok(from.as_any_box().downcast::<DvsNameArrayUplinkPortPolicy>()?),
8454            StructType::EnumDescription => Ok(from.as_any_box().downcast::<EnumDescription>()?),
8455            StructType::EnvironmentBrowserConfigOptionQuerySpec => Ok(from.as_any_box().downcast::<EnvironmentBrowserConfigOptionQuerySpec>()?),
8456            StructType::Extension => Ok(from.as_any_box().downcast::<Extension>()?),
8457            StructType::ExtensionClientInfo => Ok(from.as_any_box().downcast::<ExtensionClientInfo>()?),
8458            StructType::ExtensionEventTypeInfo => Ok(from.as_any_box().downcast::<ExtensionEventTypeInfo>()?),
8459            StructType::ExtensionFaultTypeInfo => Ok(from.as_any_box().downcast::<ExtensionFaultTypeInfo>()?),
8460            StructType::ExtensionHealthInfo => Ok(from.as_any_box().downcast::<ExtensionHealthInfo>()?),
8461            StructType::ExtensionOvfConsumerInfo => Ok(from.as_any_box().downcast::<ExtensionOvfConsumerInfo>()?),
8462            StructType::ExtensionPrivilegeInfo => Ok(from.as_any_box().downcast::<ExtensionPrivilegeInfo>()?),
8463            StructType::ExtensionResourceInfo => Ok(from.as_any_box().downcast::<ExtensionResourceInfo>()?),
8464            StructType::ExtensionServerInfo => Ok(from.as_any_box().downcast::<ExtensionServerInfo>()?),
8465            StructType::ExtensionTaskTypeInfo => Ok(from.as_any_box().downcast::<ExtensionTaskTypeInfo>()?),
8466            StructType::ExtensionManagerIpAllocationUsage => Ok(from.as_any_box().downcast::<ExtensionManagerIpAllocationUsage>()?),
8467            StructType::FaultsByHost => Ok(from.as_any_box().downcast::<FaultsByHost>()?),
8468            StructType::FaultsByVm => Ok(from.as_any_box().downcast::<FaultsByVm>()?),
8469            StructType::FileLockInfo => Ok(from.as_any_box().downcast::<FileLockInfo>()?),
8470            StructType::FileLockInfoResult => Ok(from.as_any_box().downcast::<FileLockInfoResult>()?),
8471            StructType::FolderBatchAddHostsToClusterResult => Ok(from.as_any_box().downcast::<FolderBatchAddHostsToClusterResult>()?),
8472            StructType::FolderBatchAddStandaloneHostsResult => Ok(from.as_any_box().downcast::<FolderBatchAddStandaloneHostsResult>()?),
8473            StructType::FolderExternallyManagedFolderInfo => Ok(from.as_any_box().downcast::<FolderExternallyManagedFolderInfo>()?),
8474            StructType::FolderFailedHostResult => Ok(from.as_any_box().downcast::<FolderFailedHostResult>()?),
8475            StructType::FolderNewHostSpec => Ok(from.as_any_box().downcast::<FolderNewHostSpec>()?),
8476            StructType::HbrManagerReplicationVmInfo => Ok(from.as_any_box().downcast::<HbrManagerReplicationVmInfo>()?),
8477            StructType::ReplicationVmProgressInfo => Ok(from.as_any_box().downcast::<ReplicationVmProgressInfo>()?),
8478            StructType::HbrManagerVmReplicationCapability => Ok(from.as_any_box().downcast::<HbrManagerVmReplicationCapability>()?),
8479            StructType::HbrReplicationTargetSpec => Ok(from.as_any_box().downcast::<HbrReplicationTargetSpec>()?),
8480            StructType::HbrTargetSpecReplacement => Ok(from.as_any_box().downcast::<HbrTargetSpecReplacement>()?),
8481            StructType::HbrTargetSpec => Ok(from.as_any_box().downcast::<HbrTargetSpec>()?),
8482            StructType::HealthUpdate => Ok(from.as_any_box().downcast::<HealthUpdate>()?),
8483            StructType::HealthUpdateInfo => Ok(from.as_any_box().downcast::<HealthUpdateInfo>()?),
8484            StructType::PerfInterval => Ok(from.as_any_box().downcast::<PerfInterval>()?),
8485            StructType::HostServiceTicket => Ok(from.as_any_box().downcast::<HostServiceTicket>()?),
8486            StructType::HostSystemComplianceCheckState => Ok(from.as_any_box().downcast::<HostSystemComplianceCheckState>()?),
8487            StructType::HostSystemReconnectSpec => Ok(from.as_any_box().downcast::<HostSystemReconnectSpec>()?),
8488            StructType::HostSystemRemediationState => Ok(from.as_any_box().downcast::<HostSystemRemediationState>()?),
8489            StructType::HttpNfcLeaseCapabilities => Ok(from.as_any_box().downcast::<HttpNfcLeaseCapabilities>()?),
8490            StructType::HttpNfcLeaseDatastoreLeaseInfo => Ok(from.as_any_box().downcast::<HttpNfcLeaseDatastoreLeaseInfo>()?),
8491            StructType::HttpNfcLeaseDeviceUrl => Ok(from.as_any_box().downcast::<HttpNfcLeaseDeviceUrl>()?),
8492            StructType::HttpNfcLeaseHostInfo => Ok(from.as_any_box().downcast::<HttpNfcLeaseHostInfo>()?),
8493            StructType::HttpNfcLeaseInfo => Ok(from.as_any_box().downcast::<HttpNfcLeaseInfo>()?),
8494            StructType::HttpNfcLeaseManifestEntry => Ok(from.as_any_box().downcast::<HttpNfcLeaseManifestEntry>()?),
8495            StructType::HttpNfcLeaseProbeResult => Ok(from.as_any_box().downcast::<HttpNfcLeaseProbeResult>()?),
8496            StructType::HttpNfcLeaseSourceFile => Ok(from.as_any_box().downcast::<HttpNfcLeaseSourceFile>()?),
8497            StructType::ImportSpec => Ok(from.as_any_box().downcast::<ImportSpec>()?),
8498            StructType::VirtualAppImportSpec => Ok(from.as_any_box().downcast::<VirtualAppImportSpec>()?),
8499            StructType::VirtualMachineImportSpec => Ok(from.as_any_box().downcast::<VirtualMachineImportSpec>()?),
8500            StructType::InheritablePolicy => Ok(from.as_any_box().downcast::<InheritablePolicy>()?),
8501            StructType::BoolPolicy => Ok(from.as_any_box().downcast::<BoolPolicy>()?),
8502            StructType::IntPolicy => Ok(from.as_any_box().downcast::<IntPolicy>()?),
8503            StructType::LongPolicy => Ok(from.as_any_box().downcast::<LongPolicy>()?),
8504            StructType::StringPolicy => Ok(from.as_any_box().downcast::<StringPolicy>()?),
8505            StructType::DvsFilterConfig => Ok(from.as_any_box().downcast::<DvsFilterConfig>()?),
8506            StructType::DvsFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsFilterConfigSpec>()?),
8507            StructType::DvsTrafficFilterConfig => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfig>()?),
8508            StructType::DvsTrafficFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfigSpec>()?),
8509            StructType::DvsFilterPolicy => Ok(from.as_any_box().downcast::<DvsFilterPolicy>()?),
8510            StructType::DvsTrafficShapingPolicy => Ok(from.as_any_box().downcast::<DvsTrafficShapingPolicy>()?),
8511            StructType::DvsVendorSpecificConfig => Ok(from.as_any_box().downcast::<DvsVendorSpecificConfig>()?),
8512            StructType::DvsFailureCriteria => Ok(from.as_any_box().downcast::<DvsFailureCriteria>()?),
8513            StructType::DvsMacLearningPolicy => Ok(from.as_any_box().downcast::<DvsMacLearningPolicy>()?),
8514            StructType::DvsMacManagementPolicy => Ok(from.as_any_box().downcast::<DvsMacManagementPolicy>()?),
8515            StructType::DvsSecurityPolicy => Ok(from.as_any_box().downcast::<DvsSecurityPolicy>()?),
8516            StructType::VMwareUplinkLacpPolicy => Ok(from.as_any_box().downcast::<VMwareUplinkLacpPolicy>()?),
8517            StructType::VMwareUplinkPortOrderPolicy => Ok(from.as_any_box().downcast::<VMwareUplinkPortOrderPolicy>()?),
8518            StructType::VmwareUplinkPortTeamingPolicy => Ok(from.as_any_box().downcast::<VmwareUplinkPortTeamingPolicy>()?),
8519            StructType::VmwareDistributedVirtualSwitchVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanSpec>()?),
8520            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
8521            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
8522            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
8523            StructType::IoFilterInfo => Ok(from.as_any_box().downcast::<IoFilterInfo>()?),
8524            StructType::ClusterIoFilterInfo => Ok(from.as_any_box().downcast::<ClusterIoFilterInfo>()?),
8525            StructType::HostIoFilterInfo => Ok(from.as_any_box().downcast::<HostIoFilterInfo>()?),
8526            StructType::IoFilterQueryIssueResult => Ok(from.as_any_box().downcast::<IoFilterQueryIssueResult>()?),
8527            StructType::IoFilterHostIssue => Ok(from.as_any_box().downcast::<IoFilterHostIssue>()?),
8528            StructType::IoFilterManagerSslTrust => Ok(from.as_any_box().downcast::<IoFilterManagerSslTrust>()?),
8529            StructType::PinnedCertificate => Ok(from.as_any_box().downcast::<PinnedCertificate>()?),
8530            StructType::UntrustedCertificate => Ok(from.as_any_box().downcast::<UntrustedCertificate>()?),
8531            StructType::IpPoolManagerIpAllocation => Ok(from.as_any_box().downcast::<IpPoolManagerIpAllocation>()?),
8532            StructType::KeyValue => Ok(from.as_any_box().downcast::<KeyValue>()?),
8533            StructType::LatencySensitivity => Ok(from.as_any_box().downcast::<LatencySensitivity>()?),
8534            StructType::LicenseAssignmentManagerLicenseAssignment => Ok(from.as_any_box().downcast::<LicenseAssignmentManagerLicenseAssignment>()?),
8535            StructType::LicenseAvailabilityInfo => Ok(from.as_any_box().downcast::<LicenseAvailabilityInfo>()?),
8536            StructType::LicenseDiagnostics => Ok(from.as_any_box().downcast::<LicenseDiagnostics>()?),
8537            StructType::LicenseManagerEvaluationInfo => Ok(from.as_any_box().downcast::<LicenseManagerEvaluationInfo>()?),
8538            StructType::LicenseFeatureInfo => Ok(from.as_any_box().downcast::<LicenseFeatureInfo>()?),
8539            StructType::HostLicensableResourceInfo => Ok(from.as_any_box().downcast::<HostLicensableResourceInfo>()?),
8540            StructType::LicenseManagerLicenseInfo => Ok(from.as_any_box().downcast::<LicenseManagerLicenseInfo>()?),
8541            StructType::LicenseSource => Ok(from.as_any_box().downcast::<LicenseSource>()?),
8542            StructType::EvaluationLicenseSource => Ok(from.as_any_box().downcast::<EvaluationLicenseSource>()?),
8543            StructType::LicenseServerSource => Ok(from.as_any_box().downcast::<LicenseServerSource>()?),
8544            StructType::LocalLicenseSource => Ok(from.as_any_box().downcast::<LocalLicenseSource>()?),
8545            StructType::LicenseUsageInfo => Ok(from.as_any_box().downcast::<LicenseUsageInfo>()?),
8546            StructType::LicenseReservationInfo => Ok(from.as_any_box().downcast::<LicenseReservationInfo>()?),
8547            StructType::LocalizationManagerMessageCatalog => Ok(from.as_any_box().downcast::<LocalizationManagerMessageCatalog>()?),
8548            StructType::NegatableExpression => Ok(from.as_any_box().downcast::<NegatableExpression>()?),
8549            StructType::IntExpression => Ok(from.as_any_box().downcast::<IntExpression>()?),
8550            StructType::IpAddress => Ok(from.as_any_box().downcast::<IpAddress>()?),
8551            StructType::IpRange => Ok(from.as_any_box().downcast::<IpRange>()?),
8552            StructType::SingleIp => Ok(from.as_any_box().downcast::<SingleIp>()?),
8553            StructType::MacAddress => Ok(from.as_any_box().downcast::<MacAddress>()?),
8554            StructType::MacRange => Ok(from.as_any_box().downcast::<MacRange>()?),
8555            StructType::SingleMac => Ok(from.as_any_box().downcast::<SingleMac>()?),
8556            StructType::StringExpression => Ok(from.as_any_box().downcast::<StringExpression>()?),
8557            StructType::DvsIpPort => Ok(from.as_any_box().downcast::<DvsIpPort>()?),
8558            StructType::DvsIpPortRange => Ok(from.as_any_box().downcast::<DvsIpPortRange>()?),
8559            StructType::DvsSingleIpPort => Ok(from.as_any_box().downcast::<DvsSingleIpPort>()?),
8560            StructType::NetworkSummary => Ok(from.as_any_box().downcast::<NetworkSummary>()?),
8561            StructType::OpaqueNetworkSummary => Ok(from.as_any_box().downcast::<OpaqueNetworkSummary>()?),
8562            StructType::NumericRange => Ok(from.as_any_box().downcast::<NumericRange>()?),
8563            StructType::OpaqueNetworkCapability => Ok(from.as_any_box().downcast::<OpaqueNetworkCapability>()?),
8564            StructType::OvfConsumerOstNode => Ok(from.as_any_box().downcast::<OvfConsumerOstNode>()?),
8565            StructType::OvfConsumerOvfSection => Ok(from.as_any_box().downcast::<OvfConsumerOvfSection>()?),
8566            StructType::OvfManagerCommonParams => Ok(from.as_any_box().downcast::<OvfManagerCommonParams>()?),
8567            StructType::OvfCreateImportSpecParams => Ok(from.as_any_box().downcast::<OvfCreateImportSpecParams>()?),
8568            StructType::OvfImportParams => Ok(from.as_any_box().downcast::<OvfImportParams>()?),
8569            StructType::OvfParseDescriptorParams => Ok(from.as_any_box().downcast::<OvfParseDescriptorParams>()?),
8570            StructType::OvfValidateHostParams => Ok(from.as_any_box().downcast::<OvfValidateHostParams>()?),
8571            StructType::OvfCreateDescriptorParams => Ok(from.as_any_box().downcast::<OvfCreateDescriptorParams>()?),
8572            StructType::OvfCreateDescriptorResult => Ok(from.as_any_box().downcast::<OvfCreateDescriptorResult>()?),
8573            StructType::OvfCreateImportSpecResult => Ok(from.as_any_box().downcast::<OvfCreateImportSpecResult>()?),
8574            StructType::OvfDatastoreMapping => Ok(from.as_any_box().downcast::<OvfDatastoreMapping>()?),
8575            StructType::OvfDeploymentOption => Ok(from.as_any_box().downcast::<OvfDeploymentOption>()?),
8576            StructType::OvfFileItem => Ok(from.as_any_box().downcast::<OvfFileItem>()?),
8577            StructType::OvfNetworkInfo => Ok(from.as_any_box().downcast::<OvfNetworkInfo>()?),
8578            StructType::OvfNetworkMapping => Ok(from.as_any_box().downcast::<OvfNetworkMapping>()?),
8579            StructType::OvfFile => Ok(from.as_any_box().downcast::<OvfFile>()?),
8580            StructType::OvfOptionInfo => Ok(from.as_any_box().downcast::<OvfOptionInfo>()?),
8581            StructType::OvfParseDescriptorResult => Ok(from.as_any_box().downcast::<OvfParseDescriptorResult>()?),
8582            StructType::OvfResourceMap => Ok(from.as_any_box().downcast::<OvfResourceMap>()?),
8583            StructType::OvfStorageProfileMapping => Ok(from.as_any_box().downcast::<OvfStorageProfileMapping>()?),
8584            StructType::OvfValidateHostResult => Ok(from.as_any_box().downcast::<OvfValidateHostResult>()?),
8585            StructType::PasswordField => Ok(from.as_any_box().downcast::<PasswordField>()?),
8586            StructType::PerformanceDescription => Ok(from.as_any_box().downcast::<PerformanceDescription>()?),
8587            StructType::PerfCompositeMetric => Ok(from.as_any_box().downcast::<PerfCompositeMetric>()?),
8588            StructType::PerfCounterInfo => Ok(from.as_any_box().downcast::<PerfCounterInfo>()?),
8589            StructType::PerformanceManagerCounterLevelMapping => Ok(from.as_any_box().downcast::<PerformanceManagerCounterLevelMapping>()?),
8590            StructType::PerfEntityMetricBase => Ok(from.as_any_box().downcast::<PerfEntityMetricBase>()?),
8591            StructType::PerfEntityMetric => Ok(from.as_any_box().downcast::<PerfEntityMetric>()?),
8592            StructType::PerfEntityMetricCsv => Ok(from.as_any_box().downcast::<PerfEntityMetricCsv>()?),
8593            StructType::PerfMetricId => Ok(from.as_any_box().downcast::<PerfMetricId>()?),
8594            StructType::PerfMetricSeries => Ok(from.as_any_box().downcast::<PerfMetricSeries>()?),
8595            StructType::PerfMetricIntSeries => Ok(from.as_any_box().downcast::<PerfMetricIntSeries>()?),
8596            StructType::PerfMetricSeriesCsv => Ok(from.as_any_box().downcast::<PerfMetricSeriesCsv>()?),
8597            StructType::PerfProviderSummary => Ok(from.as_any_box().downcast::<PerfProviderSummary>()?),
8598            StructType::PerfQuerySpec => Ok(from.as_any_box().downcast::<PerfQuerySpec>()?),
8599            StructType::PerfSampleInfo => Ok(from.as_any_box().downcast::<PerfSampleInfo>()?),
8600            StructType::PrivilegePolicyDef => Ok(from.as_any_box().downcast::<PrivilegePolicyDef>()?),
8601            StructType::ResourceAllocationInfo => Ok(from.as_any_box().downcast::<ResourceAllocationInfo>()?),
8602            StructType::ResourceAllocationOption => Ok(from.as_any_box().downcast::<ResourceAllocationOption>()?),
8603            StructType::ResourceConfigOption => Ok(from.as_any_box().downcast::<ResourceConfigOption>()?),
8604            StructType::ResourceConfigSpec => Ok(from.as_any_box().downcast::<ResourceConfigSpec>()?),
8605            StructType::DatabaseSizeEstimate => Ok(from.as_any_box().downcast::<DatabaseSizeEstimate>()?),
8606            StructType::DatabaseSizeParam => Ok(from.as_any_box().downcast::<DatabaseSizeParam>()?),
8607            StructType::InventoryDescription => Ok(from.as_any_box().downcast::<InventoryDescription>()?),
8608            StructType::PerformanceStatisticsDescription => Ok(from.as_any_box().downcast::<PerformanceStatisticsDescription>()?),
8609            StructType::ResourcePoolResourceUsage => Ok(from.as_any_box().downcast::<ResourcePoolResourceUsage>()?),
8610            StructType::ResourcePoolRuntimeInfo => Ok(from.as_any_box().downcast::<ResourcePoolRuntimeInfo>()?),
8611            StructType::ResourcePoolSummary => Ok(from.as_any_box().downcast::<ResourcePoolSummary>()?),
8612            StructType::VirtualAppSummary => Ok(from.as_any_box().downcast::<VirtualAppSummary>()?),
8613            StructType::ResourcePoolQuickStats => Ok(from.as_any_box().downcast::<ResourcePoolQuickStats>()?),
8614            StructType::SddcBase => Ok(from.as_any_box().downcast::<SddcBase>()?),
8615            StructType::VimVsanReconfigSpec => Ok(from.as_any_box().downcast::<VimVsanReconfigSpec>()?),
8616            StructType::SelectionSet => Ok(from.as_any_box().downcast::<SelectionSet>()?),
8617            StructType::DvPortgroupSelection => Ok(from.as_any_box().downcast::<DvPortgroupSelection>()?),
8618            StructType::DvsSelection => Ok(from.as_any_box().downcast::<DvsSelection>()?),
8619            StructType::HostVMotionCompatibility => Ok(from.as_any_box().downcast::<HostVMotionCompatibility>()?),
8620            StructType::ProductComponentInfo => Ok(from.as_any_box().downcast::<ProductComponentInfo>()?),
8621            StructType::ServiceContent => Ok(from.as_any_box().downcast::<ServiceContent>()?),
8622            StructType::ServiceLocator => Ok(from.as_any_box().downcast::<ServiceLocator>()?),
8623            StructType::ServiceLocatorCredential => Ok(from.as_any_box().downcast::<ServiceLocatorCredential>()?),
8624            StructType::ServiceLocatorNamePassword => Ok(from.as_any_box().downcast::<ServiceLocatorNamePassword>()?),
8625            StructType::ServiceLocatorSamlCredential => Ok(from.as_any_box().downcast::<ServiceLocatorSamlCredential>()?),
8626            StructType::ServiceManagerServiceInfo => Ok(from.as_any_box().downcast::<ServiceManagerServiceInfo>()?),
8627            StructType::SessionManagerGenericServiceTicket => Ok(from.as_any_box().downcast::<SessionManagerGenericServiceTicket>()?),
8628            StructType::SessionManagerLocalTicket => Ok(from.as_any_box().downcast::<SessionManagerLocalTicket>()?),
8629            StructType::SessionManagerServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerServiceRequestSpec>()?),
8630            StructType::SessionManagerHttpServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerHttpServiceRequestSpec>()?),
8631            StructType::SessionManagerVmomiServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerVmomiServiceRequestSpec>()?),
8632            StructType::SharesInfo => Ok(from.as_any_box().downcast::<SharesInfo>()?),
8633            StructType::SharesOption => Ok(from.as_any_box().downcast::<SharesOption>()?),
8634            StructType::SiteInfo => Ok(from.as_any_box().downcast::<SiteInfo>()?),
8635            StructType::StoragePodSummary => Ok(from.as_any_box().downcast::<StoragePodSummary>()?),
8636            StructType::StorageIoAllocationInfo => Ok(from.as_any_box().downcast::<StorageIoAllocationInfo>()?),
8637            StructType::StorageIoAllocationOption => Ok(from.as_any_box().downcast::<StorageIoAllocationOption>()?),
8638            StructType::StorageIormInfo => Ok(from.as_any_box().downcast::<StorageIormInfo>()?),
8639            StructType::StorageIormConfigOption => Ok(from.as_any_box().downcast::<StorageIormConfigOption>()?),
8640            StructType::StorageIormConfigSpec => Ok(from.as_any_box().downcast::<StorageIormConfigSpec>()?),
8641            StructType::PodStorageDrsEntry => Ok(from.as_any_box().downcast::<PodStorageDrsEntry>()?),
8642            StructType::StoragePerformanceSummary => Ok(from.as_any_box().downcast::<StoragePerformanceSummary>()?),
8643            StructType::StorageResourceManagerStorageProfileStatistics => Ok(from.as_any_box().downcast::<StorageResourceManagerStorageProfileStatistics>()?),
8644            StructType::Tag => Ok(from.as_any_box().downcast::<Tag>()?),
8645            StructType::TaskDescription => Ok(from.as_any_box().downcast::<TaskDescription>()?),
8646            StructType::TaskFilterSpec => Ok(from.as_any_box().downcast::<TaskFilterSpec>()?),
8647            StructType::TaskFilterSpecByEntity => Ok(from.as_any_box().downcast::<TaskFilterSpecByEntity>()?),
8648            StructType::TaskFilterSpecByTime => Ok(from.as_any_box().downcast::<TaskFilterSpecByTime>()?),
8649            StructType::TaskFilterSpecByUsername => Ok(from.as_any_box().downcast::<TaskFilterSpecByUsername>()?),
8650            StructType::TaskInfo => Ok(from.as_any_box().downcast::<TaskInfo>()?),
8651            StructType::TaskInfoFilterSpec => Ok(from.as_any_box().downcast::<TaskInfoFilterSpec>()?),
8652            StructType::TaskInfoFilterSpecFilterTaskResults => Ok(from.as_any_box().downcast::<TaskInfoFilterSpecFilterTaskResults>()?),
8653            StructType::TaskManagerTaskViewSpec => Ok(from.as_any_box().downcast::<TaskManagerTaskViewSpec>()?),
8654            StructType::TaskManagerViewByStartId => Ok(from.as_any_box().downcast::<TaskManagerViewByStartId>()?),
8655            StructType::TaskReason => Ok(from.as_any_box().downcast::<TaskReason>()?),
8656            StructType::TaskReasonAlarm => Ok(from.as_any_box().downcast::<TaskReasonAlarm>()?),
8657            StructType::TaskReasonSchedule => Ok(from.as_any_box().downcast::<TaskReasonSchedule>()?),
8658            StructType::TaskReasonSystem => Ok(from.as_any_box().downcast::<TaskReasonSystem>()?),
8659            StructType::TaskReasonUser => Ok(from.as_any_box().downcast::<TaskReasonUser>()?),
8660            StructType::UpdateVirtualMachineFilesResult => Ok(from.as_any_box().downcast::<UpdateVirtualMachineFilesResult>()?),
8661            StructType::UpdateVirtualMachineFilesResultFailedVmFileInfo => Ok(from.as_any_box().downcast::<UpdateVirtualMachineFilesResultFailedVmFileInfo>()?),
8662            StructType::UserSearchResult => Ok(from.as_any_box().downcast::<UserSearchResult>()?),
8663            StructType::PosixUserSearchResult => Ok(from.as_any_box().downcast::<PosixUserSearchResult>()?),
8664            StructType::UserSession => Ok(from.as_any_box().downcast::<UserSession>()?),
8665            StructType::VVolVmConfigFileUpdateResult => Ok(from.as_any_box().downcast::<VVolVmConfigFileUpdateResult>()?),
8666            StructType::VVolVmConfigFileUpdateResultFailedVmConfigFileInfo => Ok(from.as_any_box().downcast::<VVolVmConfigFileUpdateResultFailedVmConfigFileInfo>()?),
8667            StructType::VasaStorageArray => Ok(from.as_any_box().downcast::<VasaStorageArray>()?),
8668            StructType::VasaStorageArrayDiscoveryFcTransport => Ok(from.as_any_box().downcast::<VasaStorageArrayDiscoveryFcTransport>()?),
8669            StructType::VasaStorageArrayDiscoveryIpTransport => Ok(from.as_any_box().downcast::<VasaStorageArrayDiscoveryIpTransport>()?),
8670            StructType::VasaStorageArrayDiscoverySvcInfo => Ok(from.as_any_box().downcast::<VasaStorageArrayDiscoverySvcInfo>()?),
8671            StructType::VasaProviderContainerSpec => Ok(from.as_any_box().downcast::<VasaProviderContainerSpec>()?),
8672            StructType::VimVasaProvider => Ok(from.as_any_box().downcast::<VimVasaProvider>()?),
8673            StructType::VimVasaProviderStatePerArray => Ok(from.as_any_box().downcast::<VimVasaProviderStatePerArray>()?),
8674            StructType::VimVasaProviderVirtualHostConfig => Ok(from.as_any_box().downcast::<VimVasaProviderVirtualHostConfig>()?),
8675            StructType::VimVasaProviderInfo => Ok(from.as_any_box().downcast::<VimVasaProviderInfo>()?),
8676            StructType::VirtualAppLinkInfo => Ok(from.as_any_box().downcast::<VirtualAppLinkInfo>()?),
8677            StructType::VirtualDiskSpec => Ok(from.as_any_box().downcast::<VirtualDiskSpec>()?),
8678            StructType::DeviceBackedVirtualDiskSpec => Ok(from.as_any_box().downcast::<DeviceBackedVirtualDiskSpec>()?),
8679            StructType::FileBackedVirtualDiskSpec => Ok(from.as_any_box().downcast::<FileBackedVirtualDiskSpec>()?),
8680            StructType::SeSparseVirtualDiskSpec => Ok(from.as_any_box().downcast::<SeSparseVirtualDiskSpec>()?),
8681            StructType::VirtualMachineConnection => Ok(from.as_any_box().downcast::<VirtualMachineConnection>()?),
8682            StructType::VirtualMachineMksConnection => Ok(from.as_any_box().downcast::<VirtualMachineMksConnection>()?),
8683            StructType::DiskChangeInfo => Ok(from.as_any_box().downcast::<DiskChangeInfo>()?),
8684            StructType::DiskChangeExtent => Ok(from.as_any_box().downcast::<DiskChangeExtent>()?),
8685            StructType::VirtualMachineDisplayTopology => Ok(from.as_any_box().downcast::<VirtualMachineDisplayTopology>()?),
8686            StructType::VirtualMachineMksTicket => Ok(from.as_any_box().downcast::<VirtualMachineMksTicket>()?),
8687            StructType::StorageRequirement => Ok(from.as_any_box().downcast::<StorageRequirement>()?),
8688            StructType::VirtualMachineTicket => Ok(from.as_any_box().downcast::<VirtualMachineTicket>()?),
8689            StructType::VirtualMachineWipeResult => Ok(from.as_any_box().downcast::<VirtualMachineWipeResult>()?),
8690            StructType::VsanComparator => Ok(from.as_any_box().downcast::<VsanComparator>()?),
8691            StructType::VsanJsonComparator => Ok(from.as_any_box().downcast::<VsanJsonComparator>()?),
8692            StructType::VsanNestJsonComparator => Ok(from.as_any_box().downcast::<VsanNestJsonComparator>()?),
8693            StructType::VsanDataObfuscationRule => Ok(from.as_any_box().downcast::<VsanDataObfuscationRule>()?),
8694            StructType::VsanJsonFilterRule => Ok(from.as_any_box().downcast::<VsanJsonFilterRule>()?),
8695            StructType::VsanMassCollectorPropertyParams => Ok(from.as_any_box().downcast::<VsanMassCollectorPropertyParams>()?),
8696            StructType::VsanMassCollectorSpec => Ok(from.as_any_box().downcast::<VsanMassCollectorSpec>()?),
8697            StructType::VsanObjectTypeRule => Ok(from.as_any_box().downcast::<VsanObjectTypeRule>()?),
8698            StructType::VsanRegexBasedRule => Ok(from.as_any_box().downcast::<VsanRegexBasedRule>()?),
8699            StructType::VsanResourceConstraint => Ok(from.as_any_box().downcast::<VsanResourceConstraint>()?),
8700            StructType::VsanCompositeConstraint => Ok(from.as_any_box().downcast::<VsanCompositeConstraint>()?),
8701            StructType::VsanPropertyConstraint => Ok(from.as_any_box().downcast::<VsanPropertyConstraint>()?),
8702            StructType::VsanUpgradeSystemNetworkPartitionInfo => Ok(from.as_any_box().downcast::<VsanUpgradeSystemNetworkPartitionInfo>()?),
8703            StructType::VsanUpgradeSystemPreflightCheckIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemPreflightCheckIssue>()?),
8704            StructType::VsanUpgradeSystemApiBrokenIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemApiBrokenIssue>()?),
8705            StructType::VsanUpgradeSystemAutoClaimEnabledOnHostsIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemAutoClaimEnabledOnHostsIssue>()?),
8706            StructType::VsanUpgradeSystemHostsDisconnectedIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemHostsDisconnectedIssue>()?),
8707            StructType::VsanUpgradeSystemMissingHostsInClusterIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemMissingHostsInClusterIssue>()?),
8708            StructType::VsanUpgradeSystemNetworkPartitionIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemNetworkPartitionIssue>()?),
8709            StructType::VsanUpgradeSystemNotEnoughFreeCapacityIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemNotEnoughFreeCapacityIssue>()?),
8710            StructType::VsanUpgradeSystemRogueHostsInClusterIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemRogueHostsInClusterIssue>()?),
8711            StructType::VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue>()?),
8712            StructType::VsanUpgradeSystemWrongEsxVersionIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemWrongEsxVersionIssue>()?),
8713            StructType::VsanBrokenDiskChainIssue => Ok(from.as_any_box().downcast::<VsanBrokenDiskChainIssue>()?),
8714            StructType::VsanDisallowDataMovementIssue => Ok(from.as_any_box().downcast::<VsanDisallowDataMovementIssue>()?),
8715            StructType::VsanDisallowEvacuateDataIssue => Ok(from.as_any_box().downcast::<VsanDisallowEvacuateDataIssue>()?),
8716            StructType::VsanDiskUnhealthIssue => Ok(from.as_any_box().downcast::<VsanDiskUnhealthIssue>()?),
8717            StructType::VsanHigherObjectsPresentDuringDowngradeIssue => Ok(from.as_any_box().downcast::<VsanHigherObjectsPresentDuringDowngradeIssue>()?),
8718            StructType::VsanHostPropertyRetrieveIssue => Ok(from.as_any_box().downcast::<VsanHostPropertyRetrieveIssue>()?),
8719            StructType::VsanHostWithHybridDiskgroupIssue => Ok(from.as_any_box().downcast::<VsanHostWithHybridDiskgroupIssue>()?),
8720            StructType::VsanHostsCompressionOnlyNotSupported => Ok(from.as_any_box().downcast::<VsanHostsCompressionOnlyNotSupported>()?),
8721            StructType::VsanMixedEsxVersionInClientIssue => Ok(from.as_any_box().downcast::<VsanMixedEsxVersionInClientIssue>()?),
8722            StructType::VsanMixedEsxVersionIssue => Ok(from.as_any_box().downcast::<VsanMixedEsxVersionIssue>()?),
8723            StructType::VsanObjectInaccessibleIssue => Ok(from.as_any_box().downcast::<VsanObjectInaccessibleIssue>()?),
8724            StructType::VsanObjectPolicyIssue => Ok(from.as_any_box().downcast::<VsanObjectPolicyIssue>()?),
8725            StructType::VsanRemoteClusterNotCompatible => Ok(from.as_any_box().downcast::<VsanRemoteClusterNotCompatible>()?),
8726            StructType::VsanUnknownScanIssue => Ok(from.as_any_box().downcast::<VsanUnknownScanIssue>()?),
8727            StructType::VsanUnsupportedHighDiskVersionIssue => Ok(from.as_any_box().downcast::<VsanUnsupportedHighDiskVersionIssue>()?),
8728            StructType::VsanUpgradeSystemPreflightCheckResult => Ok(from.as_any_box().downcast::<VsanUpgradeSystemPreflightCheckResult>()?),
8729            StructType::VsanDiskFormatConversionCheckResult => Ok(from.as_any_box().downcast::<VsanDiskFormatConversionCheckResult>()?),
8730            StructType::VsanUpgradeSystemUpgradeHistoryItem => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryItem>()?),
8731            StructType::VsanUpgradeSystemUpgradeHistoryDiskGroupOp => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryDiskGroupOp>()?),
8732            StructType::VsanUpgradeSystemUpgradeHistoryPreflightFail => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryPreflightFail>()?),
8733            StructType::VsanUpgradeSystemUpgradeHistoryStoragePoolOp => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryStoragePoolOp>()?),
8734            StructType::VsanUpgradeSystemUpgradeStatus => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeStatus>()?),
8735            StructType::VsanUpgradeStatusEx => Ok(from.as_any_box().downcast::<VsanUpgradeStatusEx>()?),
8736            StructType::Action => Ok(from.as_any_box().downcast::<Action>()?),
8737            StructType::CreateTaskAction => Ok(from.as_any_box().downcast::<CreateTaskAction>()?),
8738            StructType::MethodAction => Ok(from.as_any_box().downcast::<MethodAction>()?),
8739            StructType::RunScriptAction => Ok(from.as_any_box().downcast::<RunScriptAction>()?),
8740            StructType::SendEmailAction => Ok(from.as_any_box().downcast::<SendEmailAction>()?),
8741            StructType::SendSnmpAction => Ok(from.as_any_box().downcast::<SendSnmpAction>()?),
8742            StructType::MethodActionArgument => Ok(from.as_any_box().downcast::<MethodActionArgument>()?),
8743            StructType::AlarmAction => Ok(from.as_any_box().downcast::<AlarmAction>()?),
8744            StructType::AlarmTriggeringAction => Ok(from.as_any_box().downcast::<AlarmTriggeringAction>()?),
8745            StructType::GroupAlarmAction => Ok(from.as_any_box().downcast::<GroupAlarmAction>()?),
8746            StructType::AlarmDescription => Ok(from.as_any_box().downcast::<AlarmDescription>()?),
8747            StructType::AlarmExpression => Ok(from.as_any_box().downcast::<AlarmExpression>()?),
8748            StructType::AndAlarmExpression => Ok(from.as_any_box().downcast::<AndAlarmExpression>()?),
8749            StructType::EventAlarmExpression => Ok(from.as_any_box().downcast::<EventAlarmExpression>()?),
8750            StructType::MetricAlarmExpression => Ok(from.as_any_box().downcast::<MetricAlarmExpression>()?),
8751            StructType::OrAlarmExpression => Ok(from.as_any_box().downcast::<OrAlarmExpression>()?),
8752            StructType::StateAlarmExpression => Ok(from.as_any_box().downcast::<StateAlarmExpression>()?),
8753            StructType::AlarmFilterSpec => Ok(from.as_any_box().downcast::<AlarmFilterSpec>()?),
8754            StructType::AlarmSetting => Ok(from.as_any_box().downcast::<AlarmSetting>()?),
8755            StructType::AlarmSpec => Ok(from.as_any_box().downcast::<AlarmSpec>()?),
8756            StructType::AlarmInfo => Ok(from.as_any_box().downcast::<AlarmInfo>()?),
8757            StructType::AlarmState => Ok(from.as_any_box().downcast::<AlarmState>()?),
8758            StructType::AlarmTriggeringActionTransitionSpec => Ok(from.as_any_box().downcast::<AlarmTriggeringActionTransitionSpec>()?),
8759            StructType::EventAlarmExpressionComparison => Ok(from.as_any_box().downcast::<EventAlarmExpressionComparison>()?),
8760            StructType::ClusterAction => Ok(from.as_any_box().downcast::<ClusterAction>()?),
8761            StructType::ClusterClusterInitialPlacementAction => Ok(from.as_any_box().downcast::<ClusterClusterInitialPlacementAction>()?),
8762            StructType::ClusterHostInfraUpdateHaModeAction => Ok(from.as_any_box().downcast::<ClusterHostInfraUpdateHaModeAction>()?),
8763            StructType::ClusterHostPowerAction => Ok(from.as_any_box().downcast::<ClusterHostPowerAction>()?),
8764            StructType::ClusterInitialPlacementAction => Ok(from.as_any_box().downcast::<ClusterInitialPlacementAction>()?),
8765            StructType::ClusterMigrationAction => Ok(from.as_any_box().downcast::<ClusterMigrationAction>()?),
8766            StructType::PlacementAction => Ok(from.as_any_box().downcast::<PlacementAction>()?),
8767            StructType::HbrDiskMigrationAction => Ok(from.as_any_box().downcast::<HbrDiskMigrationAction>()?),
8768            StructType::StorageMigrationAction => Ok(from.as_any_box().downcast::<StorageMigrationAction>()?),
8769            StructType::StoragePlacementAction => Ok(from.as_any_box().downcast::<StoragePlacementAction>()?),
8770            StructType::ClusterActionHistory => Ok(from.as_any_box().downcast::<ClusterActionHistory>()?),
8771            StructType::ClusterAttemptedVmInfo => Ok(from.as_any_box().downcast::<ClusterAttemptedVmInfo>()?),
8772            StructType::ClusterPowerContext => Ok(from.as_any_box().downcast::<ClusterPowerContext>()?),
8773            StructType::ClusterConfigInfo => Ok(from.as_any_box().downcast::<ClusterConfigInfo>()?),
8774            StructType::ClusterConfigSpec => Ok(from.as_any_box().downcast::<ClusterConfigSpec>()?),
8775            StructType::ClusterCryptoConfigInfo => Ok(from.as_any_box().downcast::<ClusterCryptoConfigInfo>()?),
8776            StructType::ClusterDasAamNodeState => Ok(from.as_any_box().downcast::<ClusterDasAamNodeState>()?),
8777            StructType::ClusterDasAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterDasAdmissionControlInfo>()?),
8778            StructType::ClusterFailoverHostAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverHostAdmissionControlInfo>()?),
8779            StructType::ClusterFailoverLevelAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverLevelAdmissionControlInfo>()?),
8780            StructType::ClusterFailoverResourcesAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverResourcesAdmissionControlInfo>()?),
8781            StructType::ClusterDasAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterDasAdmissionControlPolicy>()?),
8782            StructType::ClusterFailoverHostAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverHostAdmissionControlPolicy>()?),
8783            StructType::ClusterFailoverLevelAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverLevelAdmissionControlPolicy>()?),
8784            StructType::ClusterFailoverResourcesAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverResourcesAdmissionControlPolicy>()?),
8785            StructType::ClusterDasAdvancedRuntimeInfo => Ok(from.as_any_box().downcast::<ClusterDasAdvancedRuntimeInfo>()?),
8786            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfo => Ok(from.as_any_box().downcast::<ClusterDasFailoverLevelAdvancedRuntimeInfo>()?),
8787            StructType::DasHeartbeatDatastoreInfo => Ok(from.as_any_box().downcast::<DasHeartbeatDatastoreInfo>()?),
8788            StructType::ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo => Ok(from.as_any_box().downcast::<ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo>()?),
8789            StructType::ClusterDasConfigInfo => Ok(from.as_any_box().downcast::<ClusterDasConfigInfo>()?),
8790            StructType::ClusterDasData => Ok(from.as_any_box().downcast::<ClusterDasData>()?),
8791            StructType::ClusterDasDataSummary => Ok(from.as_any_box().downcast::<ClusterDasDataSummary>()?),
8792            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots => Ok(from.as_any_box().downcast::<ClusterDasFailoverLevelAdvancedRuntimeInfoHostSlots>()?),
8793            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo => Ok(from.as_any_box().downcast::<ClusterDasFailoverLevelAdvancedRuntimeInfoSlotInfo>()?),
8794            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots => Ok(from.as_any_box().downcast::<ClusterDasFailoverLevelAdvancedRuntimeInfoVmSlots>()?),
8795            StructType::ClusterDasFdmHostState => Ok(from.as_any_box().downcast::<ClusterDasFdmHostState>()?),
8796            StructType::ClusterDasHostInfo => Ok(from.as_any_box().downcast::<ClusterDasHostInfo>()?),
8797            StructType::ClusterDasAamHostInfo => Ok(from.as_any_box().downcast::<ClusterDasAamHostInfo>()?),
8798            StructType::ClusterDasHostRecommendation => Ok(from.as_any_box().downcast::<ClusterDasHostRecommendation>()?),
8799            StructType::ClusterDasVmConfigInfo => Ok(from.as_any_box().downcast::<ClusterDasVmConfigInfo>()?),
8800            StructType::ClusterDasVmSettings => Ok(from.as_any_box().downcast::<ClusterDasVmSettings>()?),
8801            StructType::ClusterDpmConfigInfo => Ok(from.as_any_box().downcast::<ClusterDpmConfigInfo>()?),
8802            StructType::ClusterDpmHostConfigInfo => Ok(from.as_any_box().downcast::<ClusterDpmHostConfigInfo>()?),
8803            StructType::ClusterDrsConfigInfo => Ok(from.as_any_box().downcast::<ClusterDrsConfigInfo>()?),
8804            StructType::ClusterDrsFaults => Ok(from.as_any_box().downcast::<ClusterDrsFaults>()?),
8805            StructType::ClusterDrsFaultsFaultsByVm => Ok(from.as_any_box().downcast::<ClusterDrsFaultsFaultsByVm>()?),
8806            StructType::ClusterDrsFaultsFaultsByVirtualDisk => Ok(from.as_any_box().downcast::<ClusterDrsFaultsFaultsByVirtualDisk>()?),
8807            StructType::ClusterDrsMigration => Ok(from.as_any_box().downcast::<ClusterDrsMigration>()?),
8808            StructType::ClusterDrsRecommendation => Ok(from.as_any_box().downcast::<ClusterDrsRecommendation>()?),
8809            StructType::ClusterDrsVmConfigInfo => Ok(from.as_any_box().downcast::<ClusterDrsVmConfigInfo>()?),
8810            StructType::ClusterEvcManagerCheckResult => Ok(from.as_any_box().downcast::<ClusterEvcManagerCheckResult>()?),
8811            StructType::ClusterEvcManagerEvcState => Ok(from.as_any_box().downcast::<ClusterEvcManagerEvcState>()?),
8812            StructType::ClusterEnterMaintenanceResult => Ok(from.as_any_box().downcast::<ClusterEnterMaintenanceResult>()?),
8813            StructType::ClusterFailoverHostAdmissionControlInfoHostStatus => Ok(from.as_any_box().downcast::<ClusterFailoverHostAdmissionControlInfoHostStatus>()?),
8814            StructType::ClusterGroupInfo => Ok(from.as_any_box().downcast::<ClusterGroupInfo>()?),
8815            StructType::ClusterHostGroup => Ok(from.as_any_box().downcast::<ClusterHostGroup>()?),
8816            StructType::ClusterVmGroup => Ok(from.as_any_box().downcast::<ClusterVmGroup>()?),
8817            StructType::ClusterHostRecommendation => Ok(from.as_any_box().downcast::<ClusterHostRecommendation>()?),
8818            StructType::ClusterInfraUpdateHaConfigInfo => Ok(from.as_any_box().downcast::<ClusterInfraUpdateHaConfigInfo>()?),
8819            StructType::ClusterNotAttemptedVmInfo => Ok(from.as_any_box().downcast::<ClusterNotAttemptedVmInfo>()?),
8820            StructType::ClusterOrchestrationInfo => Ok(from.as_any_box().downcast::<ClusterOrchestrationInfo>()?),
8821            StructType::PerformClusterPowerActionSpec => Ok(from.as_any_box().downcast::<PerformClusterPowerActionSpec>()?),
8822            StructType::PlacementResult => Ok(from.as_any_box().downcast::<PlacementResult>()?),
8823            StructType::PlacementSpec => Ok(from.as_any_box().downcast::<PlacementSpec>()?),
8824            StructType::ClusterPowerOnVmResult => Ok(from.as_any_box().downcast::<ClusterPowerOnVmResult>()?),
8825            StructType::ClusterPreemptibleVmPairInfo => Ok(from.as_any_box().downcast::<ClusterPreemptibleVmPairInfo>()?),
8826            StructType::ClusterProactiveDrsConfigInfo => Ok(from.as_any_box().downcast::<ClusterProactiveDrsConfigInfo>()?),
8827            StructType::QueryVsanManagedStorageSpaceUsageSpec => Ok(from.as_any_box().downcast::<QueryVsanManagedStorageSpaceUsageSpec>()?),
8828            StructType::ClusterRecommendation => Ok(from.as_any_box().downcast::<ClusterRecommendation>()?),
8829            StructType::ClusterResourceUsageSummary => Ok(from.as_any_box().downcast::<ClusterResourceUsageSummary>()?),
8830            StructType::ClusterRuleInfo => Ok(from.as_any_box().downcast::<ClusterRuleInfo>()?),
8831            StructType::ClusterAffinityRuleSpec => Ok(from.as_any_box().downcast::<ClusterAffinityRuleSpec>()?),
8832            StructType::ClusterAntiAffinityRuleSpec => Ok(from.as_any_box().downcast::<ClusterAntiAffinityRuleSpec>()?),
8833            StructType::ClusterDependencyRuleInfo => Ok(from.as_any_box().downcast::<ClusterDependencyRuleInfo>()?),
8834            StructType::ClusterFtVmHostRuleInfo => Ok(from.as_any_box().downcast::<ClusterFtVmHostRuleInfo>()?),
8835            StructType::ClusterVmHostRuleInfo => Ok(from.as_any_box().downcast::<ClusterVmHostRuleInfo>()?),
8836            StructType::VirtualDiskAntiAffinityRuleSpec => Ok(from.as_any_box().downcast::<VirtualDiskAntiAffinityRuleSpec>()?),
8837            StructType::VirtualDiskRuleSpec => Ok(from.as_any_box().downcast::<VirtualDiskRuleSpec>()?),
8838            StructType::VsanSiteFaultDomain => Ok(from.as_any_box().downcast::<VsanSiteFaultDomain>()?),
8839            StructType::VsanSiteFaultDomainConfig => Ok(from.as_any_box().downcast::<VsanSiteFaultDomainConfig>()?),
8840            StructType::ClusterSlotPolicy => Ok(from.as_any_box().downcast::<ClusterSlotPolicy>()?),
8841            StructType::ClusterFixedSizeSlotPolicy => Ok(from.as_any_box().downcast::<ClusterFixedSizeSlotPolicy>()?),
8842            StructType::VsanStorageComplianceResult => Ok(from.as_any_box().downcast::<VsanStorageComplianceResult>()?),
8843            StructType::VsanStorageOperationalStatus => Ok(from.as_any_box().downcast::<VsanStorageOperationalStatus>()?),
8844            StructType::VsanStoragePolicyStatus => Ok(from.as_any_box().downcast::<VsanStoragePolicyStatus>()?),
8845            StructType::ClusterSystemVMsConfigInfo => Ok(from.as_any_box().downcast::<ClusterSystemVMsConfigInfo>()?),
8846            StructType::ClusterSystemVMsConfigSpec => Ok(from.as_any_box().downcast::<ClusterSystemVMsConfigSpec>()?),
8847            StructType::ClusterUsageSummary => Ok(from.as_any_box().downcast::<ClusterUsageSummary>()?),
8848            StructType::VimClusterVsanPreferredFaultDomainInfo => Ok(from.as_any_box().downcast::<VimClusterVsanPreferredFaultDomainInfo>()?),
8849            StructType::VimClusterVsanStretchedClusterCapability => Ok(from.as_any_box().downcast::<VimClusterVsanStretchedClusterCapability>()?),
8850            StructType::VimClusterVsanStretchedClusterFaultDomainConfig => Ok(from.as_any_box().downcast::<VimClusterVsanStretchedClusterFaultDomainConfig>()?),
8851            StructType::VsanStretchedClusterHostVirtualApplianceStatus => Ok(from.as_any_box().downcast::<VsanStretchedClusterHostVirtualApplianceStatus>()?),
8852            StructType::VimClusterVsanWitnessHostInfo => Ok(from.as_any_box().downcast::<VimClusterVsanWitnessHostInfo>()?),
8853            StructType::ClusterVmComponentProtectionSettings => Ok(from.as_any_box().downcast::<ClusterVmComponentProtectionSettings>()?),
8854            StructType::ClusterVmOrchestrationInfo => Ok(from.as_any_box().downcast::<ClusterVmOrchestrationInfo>()?),
8855            StructType::ClusterVmReadiness => Ok(from.as_any_box().downcast::<ClusterVmReadiness>()?),
8856            StructType::ClusterVmToolsMonitoringSettings => Ok(from.as_any_box().downcast::<ClusterVmToolsMonitoringSettings>()?),
8857            StructType::VsanAttachToSrOperation => Ok(from.as_any_box().downcast::<VsanAttachToSrOperation>()?),
8858            StructType::VsanCapability => Ok(from.as_any_box().downcast::<VsanCapability>()?),
8859            StructType::VsanClusterAdvCfgSyncHostResult => Ok(from.as_any_box().downcast::<VsanClusterAdvCfgSyncHostResult>()?),
8860            StructType::VsanClusterAdvCfgSyncResult => Ok(from.as_any_box().downcast::<VsanClusterAdvCfgSyncResult>()?),
8861            StructType::VsanClusterBalancePerDiskInfo => Ok(from.as_any_box().downcast::<VsanClusterBalancePerDiskInfo>()?),
8862            StructType::VsanClusterBalanceSummary => Ok(from.as_any_box().downcast::<VsanClusterBalanceSummary>()?),
8863            StructType::VsanClusterClomdLivenessResult => Ok(from.as_any_box().downcast::<VsanClusterClomdLivenessResult>()?),
8864            StructType::VsanClusterConfig => Ok(from.as_any_box().downcast::<VsanClusterConfig>()?),
8865            StructType::VsanClusterCreateVmHealthTestResult => Ok(from.as_any_box().downcast::<VsanClusterCreateVmHealthTestResult>()?),
8866            StructType::VsanClusterDitEncryptionHealthSummary => Ok(from.as_any_box().downcast::<VsanClusterDitEncryptionHealthSummary>()?),
8867            StructType::VsanClusterEncryptionHealthSummary => Ok(from.as_any_box().downcast::<VsanClusterEncryptionHealthSummary>()?),
8868            StructType::VsanClusterFileServiceHealthSummary => Ok(from.as_any_box().downcast::<VsanClusterFileServiceHealthSummary>()?),
8869            StructType::VsanClusterGlobalDedupHealthSummary => Ok(from.as_any_box().downcast::<VsanClusterGlobalDedupHealthSummary>()?),
8870            StructType::VsanClusterHclInfo => Ok(from.as_any_box().downcast::<VsanClusterHclInfo>()?),
8871            StructType::VsanClusterHealthAction => Ok(from.as_any_box().downcast::<VsanClusterHealthAction>()?),
8872            StructType::VsanClusterHealthCheckInfo => Ok(from.as_any_box().downcast::<VsanClusterHealthCheckInfo>()?),
8873            StructType::VsanClusterHealthConfigs => Ok(from.as_any_box().downcast::<VsanClusterHealthConfigs>()?),
8874            StructType::VsanClusterHealthGroup => Ok(from.as_any_box().downcast::<VsanClusterHealthGroup>()?),
8875            StructType::VsanClusterHealthLinkBase => Ok(from.as_any_box().downcast::<VsanClusterHealthLinkBase>()?),
8876            StructType::VsanClusterHealthLink => Ok(from.as_any_box().downcast::<VsanClusterHealthLink>()?),
8877            StructType::VsanClusterHealthQuerySpec => Ok(from.as_any_box().downcast::<VsanClusterHealthQuerySpec>()?),
8878            StructType::VsanClusterHealthResultBase => Ok(from.as_any_box().downcast::<VsanClusterHealthResultBase>()?),
8879            StructType::VsanClusterHealthResultTable => Ok(from.as_any_box().downcast::<VsanClusterHealthResultTable>()?),
8880            StructType::VsanClusterHealthResultWithRemediation => Ok(from.as_any_box().downcast::<VsanClusterHealthResultWithRemediation>()?),
8881            StructType::VsanClusterHealthResultColumnInfo => Ok(from.as_any_box().downcast::<VsanClusterHealthResultColumnInfo>()?),
8882            StructType::VsanClusterHealthResultKeyValuePair => Ok(from.as_any_box().downcast::<VsanClusterHealthResultKeyValuePair>()?),
8883            StructType::VsanClusterHealthResultRow => Ok(from.as_any_box().downcast::<VsanClusterHealthResultRow>()?),
8884            StructType::VsanClusterHealthSummary => Ok(from.as_any_box().downcast::<VsanClusterHealthSummary>()?),
8885            StructType::VsanClusterHealthSystemObjectsRepairResult => Ok(from.as_any_box().downcast::<VsanClusterHealthSystemObjectsRepairResult>()?),
8886            StructType::VsanClusterHealthSystemStatusResult => Ok(from.as_any_box().downcast::<VsanClusterHealthSystemStatusResult>()?),
8887            StructType::VsanClusterHealthSystemVersionResult => Ok(from.as_any_box().downcast::<VsanClusterHealthSystemVersionResult>()?),
8888            StructType::VsanClusterHealthTest => Ok(from.as_any_box().downcast::<VsanClusterHealthTest>()?),
8889            StructType::VsanClusterHostVmknicMapping => Ok(from.as_any_box().downcast::<VsanClusterHostVmknicMapping>()?),
8890            StructType::VsanClusterLimitHealthResult => Ok(from.as_any_box().downcast::<VsanClusterLimitHealthResult>()?),
8891            StructType::VsanClusterNetworkHealthResult => Ok(from.as_any_box().downcast::<VsanClusterNetworkHealthResult>()?),
8892            StructType::VsanClusterNetworkLoadTestResult => Ok(from.as_any_box().downcast::<VsanClusterNetworkLoadTestResult>()?),
8893            StructType::VsanClusterNetworkPartitionInfo => Ok(from.as_any_box().downcast::<VsanClusterNetworkPartitionInfo>()?),
8894            StructType::VsanClusterNetworkPerfTaskSpec => Ok(from.as_any_box().downcast::<VsanClusterNetworkPerfTaskSpec>()?),
8895            StructType::VsanClusterProactiveTestResult => Ok(from.as_any_box().downcast::<VsanClusterProactiveTestResult>()?),
8896            StructType::VsanClusterTelemetryProxyConfig => Ok(from.as_any_box().downcast::<VsanClusterTelemetryProxyConfig>()?),
8897            StructType::VsanClusterVMsHealthOverallResult => Ok(from.as_any_box().downcast::<VsanClusterVMsHealthOverallResult>()?),
8898            StructType::VsanClusterVMsHealthSummaryResult => Ok(from.as_any_box().downcast::<VsanClusterVMsHealthSummaryResult>()?),
8899            StructType::VsanClusterVmdkLoadTestResult => Ok(from.as_any_box().downcast::<VsanClusterVmdkLoadTestResult>()?),
8900            StructType::VsanClusterWhatifHostFailuresResult => Ok(from.as_any_box().downcast::<VsanClusterWhatifHostFailuresResult>()?),
8901            StructType::VsanConfigGeneration => Ok(from.as_any_box().downcast::<VsanConfigGeneration>()?),
8902            StructType::VsanDataDrivenApiAction => Ok(from.as_any_box().downcast::<VsanDataDrivenApiAction>()?),
8903            StructType::VsanDiagnosticsThreshold => Ok(from.as_any_box().downcast::<VsanDiagnosticsThreshold>()?),
8904            StructType::VsanDiskFormatConversionSpec => Ok(from.as_any_box().downcast::<VsanDiskFormatConversionSpec>()?),
8905            StructType::VimClusterVsanDiskMappingsConfigSpec => Ok(from.as_any_box().downcast::<VimClusterVsanDiskMappingsConfigSpec>()?),
8906            StructType::VsanEntitySpaceUsage => Ok(from.as_any_box().downcast::<VsanEntitySpaceUsage>()?),
8907            StructType::VimClusterVsanFaultDomainSpec => Ok(from.as_any_box().downcast::<VimClusterVsanFaultDomainSpec>()?),
8908            StructType::VsanFaultDomainDestroySpec => Ok(from.as_any_box().downcast::<VsanFaultDomainDestroySpec>()?),
8909            StructType::VsanFaultDomainUpdateSpec => Ok(from.as_any_box().downcast::<VsanFaultDomainUpdateSpec>()?),
8910            StructType::VimClusterVsanFaultDomainsConfigSpec => Ok(from.as_any_box().downcast::<VimClusterVsanFaultDomainsConfigSpec>()?),
8911            StructType::VsanHealthActionBase => Ok(from.as_any_box().downcast::<VsanHealthActionBase>()?),
8912            StructType::VsanHealthActionSteps => Ok(from.as_any_box().downcast::<VsanHealthActionSteps>()?),
8913            StructType::VsanHealthApiBasedAction => Ok(from.as_any_box().downcast::<VsanHealthApiBasedAction>()?),
8914            StructType::VsanHealthCmdBasedAction => Ok(from.as_any_box().downcast::<VsanHealthCmdBasedAction>()?),
8915            StructType::VsanHealthDataDrivenAction => Ok(from.as_any_box().downcast::<VsanHealthDataDrivenAction>()?),
8916            StructType::VsanHealthTxtBasedAction => Ok(from.as_any_box().downcast::<VsanHealthTxtBasedAction>()?),
8917            StructType::VsanHealthConfirmationDialog => Ok(from.as_any_box().downcast::<VsanHealthConfirmationDialog>()?),
8918            StructType::VsanHealthCorrelation => Ok(from.as_any_box().downcast::<VsanHealthCorrelation>()?),
8919            StructType::VsanHealthExtMgmtPreCheckResult => Ok(from.as_any_box().downcast::<VsanHealthExtMgmtPreCheckResult>()?),
8920            StructType::VsanHealthTroubleshooting => Ok(from.as_any_box().downcast::<VsanHealthTroubleshooting>()?),
8921            StructType::VsanHistoricalHealthQuerySpec => Ok(from.as_any_box().downcast::<VsanHistoricalHealthQuerySpec>()?),
8922            StructType::VsanHistoricalHealthTest => Ok(from.as_any_box().downcast::<VsanHistoricalHealthTest>()?),
8923            StructType::VsanHostClomdLivenessResult => Ok(from.as_any_box().downcast::<VsanHostClomdLivenessResult>()?),
8924            StructType::VsanHostCreateVmHealthTestResult => Ok(from.as_any_box().downcast::<VsanHostCreateVmHealthTestResult>()?),
8925            StructType::VimClusterVsanHostDiskMapping => Ok(from.as_any_box().downcast::<VimClusterVsanHostDiskMapping>()?),
8926            StructType::VsanHostHealthSystemVersionResult => Ok(from.as_any_box().downcast::<VsanHostHealthSystemVersionResult>()?),
8927            StructType::VsanIoInsightInstance => Ok(from.as_any_box().downcast::<VsanIoInsightInstance>()?),
8928            StructType::VsanIoInsightInstanceQuerySpec => Ok(from.as_any_box().downcast::<VsanIoInsightInstanceQuerySpec>()?),
8929            StructType::VsanIscsiHomeObjectSpec => Ok(from.as_any_box().downcast::<VsanIscsiHomeObjectSpec>()?),
8930            StructType::VsanIscsiInitiatorGroup => Ok(from.as_any_box().downcast::<VsanIscsiInitiatorGroup>()?),
8931            StructType::VsanIscsiLunCommonInfo => Ok(from.as_any_box().downcast::<VsanIscsiLunCommonInfo>()?),
8932            StructType::VsanIscsiLun => Ok(from.as_any_box().downcast::<VsanIscsiLun>()?),
8933            StructType::VsanIscsiLunSpec => Ok(from.as_any_box().downcast::<VsanIscsiLunSpec>()?),
8934            StructType::VsanIscsiTargetAuthSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetAuthSpec>()?),
8935            StructType::VsanIscsiTargetBasicInfo => Ok(from.as_any_box().downcast::<VsanIscsiTargetBasicInfo>()?),
8936            StructType::VsanIscsiTargetCommonInfo => Ok(from.as_any_box().downcast::<VsanIscsiTargetCommonInfo>()?),
8937            StructType::VsanIscsiTarget => Ok(from.as_any_box().downcast::<VsanIscsiTarget>()?),
8938            StructType::VsanIscsiTargetSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetSpec>()?),
8939            StructType::VsanIscsiTargetServiceConfig => Ok(from.as_any_box().downcast::<VsanIscsiTargetServiceConfig>()?),
8940            StructType::VsanIscsiTargetServiceSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetServiceSpec>()?),
8941            StructType::VsanIscsiTargetServiceDefaultConfigSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetServiceDefaultConfigSpec>()?),
8942            StructType::VsanNetworkDiagnostics => Ok(from.as_any_box().downcast::<VsanNetworkDiagnostics>()?),
8943            StructType::VsanObjIdentityQuerySpec => Ok(from.as_any_box().downcast::<VsanObjIdentityQuerySpec>()?),
8944            StructType::VsanClusterObjectExtAttrs => Ok(from.as_any_box().downcast::<VsanClusterObjectExtAttrs>()?),
8945            StructType::VsanObjectExtraAttributes => Ok(from.as_any_box().downcast::<VsanObjectExtraAttributes>()?),
8946            StructType::VsanObjectIdentity => Ok(from.as_any_box().downcast::<VsanObjectIdentity>()?),
8947            StructType::VsanObjectIdentityAndHealth => Ok(from.as_any_box().downcast::<VsanObjectIdentityAndHealth>()?),
8948            StructType::VsanObjectInformation => Ok(from.as_any_box().downcast::<VsanObjectInformation>()?),
8949            StructType::VsanObjectQuerySpec => Ok(from.as_any_box().downcast::<VsanObjectQuerySpec>()?),
8950            StructType::VsanObjectSpaceSummary => Ok(from.as_any_box().downcast::<VsanObjectSpaceSummary>()?),
8951            StructType::VsanPerfDiagnoseQuerySpec => Ok(from.as_any_box().downcast::<VsanPerfDiagnoseQuerySpec>()?),
8952            StructType::VsanPerfDiagnosticException => Ok(from.as_any_box().downcast::<VsanPerfDiagnosticException>()?),
8953            StructType::VsanPerfDiagnosticResult => Ok(from.as_any_box().downcast::<VsanPerfDiagnosticResult>()?),
8954            StructType::VsanPerfEntityMetricCsv => Ok(from.as_any_box().downcast::<VsanPerfEntityMetricCsv>()?),
8955            StructType::VsanPerfEntityType => Ok(from.as_any_box().downcast::<VsanPerfEntityType>()?),
8956            StructType::VsanPerfGraph => Ok(from.as_any_box().downcast::<VsanPerfGraph>()?),
8957            StructType::VsanPerfHotspotEntitiesMetrics => Ok(from.as_any_box().downcast::<VsanPerfHotspotEntitiesMetrics>()?),
8958            StructType::VsanPerfHotspotQuerySpec => Ok(from.as_any_box().downcast::<VsanPerfHotspotQuerySpec>()?),
8959            StructType::VsanPerfMasterInformation => Ok(from.as_any_box().downcast::<VsanPerfMasterInformation>()?),
8960            StructType::VsanPerfMemberInfo => Ok(from.as_any_box().downcast::<VsanPerfMemberInfo>()?),
8961            StructType::VsanPerfMetricId => Ok(from.as_any_box().downcast::<VsanPerfMetricId>()?),
8962            StructType::VsanPerfMetricSeriesCsv => Ok(from.as_any_box().downcast::<VsanPerfMetricSeriesCsv>()?),
8963            StructType::VsanPerfNodeInformation => Ok(from.as_any_box().downcast::<VsanPerfNodeInformation>()?),
8964            StructType::VsanPerfQuerySpec => Ok(from.as_any_box().downcast::<VsanPerfQuerySpec>()?),
8965            StructType::VsanPerfThreshold => Ok(from.as_any_box().downcast::<VsanPerfThreshold>()?),
8966            StructType::VsanPerfTimeRange => Ok(from.as_any_box().downcast::<VsanPerfTimeRange>()?),
8967            StructType::VsanPerfTimeRangeQuerySpec => Ok(from.as_any_box().downcast::<VsanPerfTimeRangeQuerySpec>()?),
8968            StructType::VsanPerfTopEntities => Ok(from.as_any_box().downcast::<VsanPerfTopEntities>()?),
8969            StructType::VsanPerfTopEntity => Ok(from.as_any_box().downcast::<VsanPerfTopEntity>()?),
8970            StructType::VsanPerfTopQuerySpec => Ok(from.as_any_box().downcast::<VsanPerfTopQuerySpec>()?),
8971            StructType::VsanPerfsvcConfig => Ok(from.as_any_box().downcast::<VsanPerfsvcConfig>()?),
8972            StructType::VsanRemoteClusterQuerySpec => Ok(from.as_any_box().downcast::<VsanRemoteClusterQuerySpec>()?),
8973            StructType::VsanSpaceQuerySpec => Ok(from.as_any_box().downcast::<VsanSpaceQuerySpec>()?),
8974            StructType::VsanSpaceUsage => Ok(from.as_any_box().downcast::<VsanSpaceUsage>()?),
8975            StructType::VsanSpaceUsageDetailResult => Ok(from.as_any_box().downcast::<VsanSpaceUsageDetailResult>()?),
8976            StructType::VsanSpaceUsageWithDatastoreType => Ok(from.as_any_box().downcast::<VsanSpaceUsageWithDatastoreType>()?),
8977            StructType::VsanStorageWorkloadType => Ok(from.as_any_box().downcast::<VsanStorageWorkloadType>()?),
8978            StructType::VsanStretchedClusterConfig => Ok(from.as_any_box().downcast::<VsanStretchedClusterConfig>()?),
8979            StructType::VsanSyncingObjectFilter => Ok(from.as_any_box().downcast::<VsanSyncingObjectFilter>()?),
8980            StructType::VsanUnicastAddressInfo => Ok(from.as_any_box().downcast::<VsanUnicastAddressInfo>()?),
8981            StructType::VsanVcKmipServersHealth => Ok(from.as_any_box().downcast::<VsanVcKmipServersHealth>()?),
8982            StructType::VsanVcLifecycleCheckResult => Ok(from.as_any_box().downcast::<VsanVcLifecycleCheckResult>()?),
8983            StructType::VsanVcLifecycleCheckSpec => Ok(from.as_any_box().downcast::<VsanVcLifecycleCheckSpec>()?),
8984            StructType::VsanVsanClusterPcapGroup => Ok(from.as_any_box().downcast::<VsanVsanClusterPcapGroup>()?),
8985            StructType::VsanVsanClusterPcapResult => Ok(from.as_any_box().downcast::<VsanVsanClusterPcapResult>()?),
8986            StructType::VsanVumSystemConfig => Ok(from.as_any_box().downcast::<VsanVumSystemConfig>()?),
8987            StructType::VsanWhatifCapacity => Ok(from.as_any_box().downcast::<VsanWhatifCapacity>()?),
8988            StructType::VimClusterVsanWitnessSpec => Ok(from.as_any_box().downcast::<VimClusterVsanWitnessSpec>()?),
8989            StructType::CnsAccessControlSpec => Ok(from.as_any_box().downcast::<CnsAccessControlSpec>()?),
8990            StructType::CnsNfsAccessControlSpec => Ok(from.as_any_box().downcast::<CnsNfsAccessControlSpec>()?),
8991            StructType::CnsBackingObjectDetails => Ok(from.as_any_box().downcast::<CnsBackingObjectDetails>()?),
8992            StructType::CnsBlockBackingDetails => Ok(from.as_any_box().downcast::<CnsBlockBackingDetails>()?),
8993            StructType::CnsFileBackingDetails => Ok(from.as_any_box().downcast::<CnsFileBackingDetails>()?),
8994            StructType::CnsVsanFileShareBackingDetails => Ok(from.as_any_box().downcast::<CnsVsanFileShareBackingDetails>()?),
8995            StructType::CnsBaseCreateSpec => Ok(from.as_any_box().downcast::<CnsBaseCreateSpec>()?),
8996            StructType::CnsFileCreateSpec => Ok(from.as_any_box().downcast::<CnsFileCreateSpec>()?),
8997            StructType::CnsVsanFileCreateSpec => Ok(from.as_any_box().downcast::<CnsVsanFileCreateSpec>()?),
8998            StructType::CnsContainerCluster => Ok(from.as_any_box().downcast::<CnsContainerCluster>()?),
8999            StructType::CnsCursor => Ok(from.as_any_box().downcast::<CnsCursor>()?),
9000            StructType::CnsEntityMetadata => Ok(from.as_any_box().downcast::<CnsEntityMetadata>()?),
9001            StructType::CnsKubernetesEntityMetadata => Ok(from.as_any_box().downcast::<CnsKubernetesEntityMetadata>()?),
9002            StructType::CnsKubernetesEntityReference => Ok(from.as_any_box().downcast::<CnsKubernetesEntityReference>()?),
9003            StructType::CnsPlacementResult => Ok(from.as_any_box().downcast::<CnsPlacementResult>()?),
9004            StructType::CnsQueryFilter => Ok(from.as_any_box().downcast::<CnsQueryFilter>()?),
9005            StructType::CnsKubernetesQueryFilter => Ok(from.as_any_box().downcast::<CnsKubernetesQueryFilter>()?),
9006            StructType::CnsQueryResult => Ok(from.as_any_box().downcast::<CnsQueryResult>()?),
9007            StructType::CnsQuerySelection => Ok(from.as_any_box().downcast::<CnsQuerySelection>()?),
9008            StructType::CnsSnapshotCreateSpec => Ok(from.as_any_box().downcast::<CnsSnapshotCreateSpec>()?),
9009            StructType::CnsSnapshotDeleteSpec => Ok(from.as_any_box().downcast::<CnsSnapshotDeleteSpec>()?),
9010            StructType::CnsSnapshotId => Ok(from.as_any_box().downcast::<CnsSnapshotId>()?),
9011            StructType::CnsVolume => Ok(from.as_any_box().downcast::<CnsVolume>()?),
9012            StructType::CnsVolumeAclConfigureSpec => Ok(from.as_any_box().downcast::<CnsVolumeAclConfigureSpec>()?),
9013            StructType::CnsVolumeAttachDetachSpec => Ok(from.as_any_box().downcast::<CnsVolumeAttachDetachSpec>()?),
9014            StructType::CnsVolumeCreateSpec => Ok(from.as_any_box().downcast::<CnsVolumeCreateSpec>()?),
9015            StructType::CnsVolumeExtendSpec => Ok(from.as_any_box().downcast::<CnsVolumeExtendSpec>()?),
9016            StructType::CnsVolumeId => Ok(from.as_any_box().downcast::<CnsVolumeId>()?),
9017            StructType::CnsVolumeMetadata => Ok(from.as_any_box().downcast::<CnsVolumeMetadata>()?),
9018            StructType::CnsVolumeMetadataUpdateSpec => Ok(from.as_any_box().downcast::<CnsVolumeMetadataUpdateSpec>()?),
9019            StructType::CnsVolumeOperationBatchResult => Ok(from.as_any_box().downcast::<CnsVolumeOperationBatchResult>()?),
9020            StructType::CnsVolumeOperationResult => Ok(from.as_any_box().downcast::<CnsVolumeOperationResult>()?),
9021            StructType::CnsAsyncQueryResult => Ok(from.as_any_box().downcast::<CnsAsyncQueryResult>()?),
9022            StructType::CnsVolumeAttachResult => Ok(from.as_any_box().downcast::<CnsVolumeAttachResult>()?),
9023            StructType::CnsVolumeCreateResult => Ok(from.as_any_box().downcast::<CnsVolumeCreateResult>()?),
9024            StructType::CnsVolumePolicyReconfigSpec => Ok(from.as_any_box().downcast::<CnsVolumePolicyReconfigSpec>()?),
9025            StructType::CnsVolumeRelocateSpec => Ok(from.as_any_box().downcast::<CnsVolumeRelocateSpec>()?),
9026            StructType::CnsBlockVolumeRelocateSpec => Ok(from.as_any_box().downcast::<CnsBlockVolumeRelocateSpec>()?),
9027            StructType::CnsVolumeSource => Ok(from.as_any_box().downcast::<CnsVolumeSource>()?),
9028            StructType::CnsSnapshotVolumeSource => Ok(from.as_any_box().downcast::<CnsSnapshotVolumeSource>()?),
9029            StructType::DistributedVirtualPort => Ok(from.as_any_box().downcast::<DistributedVirtualPort>()?),
9030            StructType::DvPortConfigInfo => Ok(from.as_any_box().downcast::<DvPortConfigInfo>()?),
9031            StructType::DvPortConfigSpec => Ok(from.as_any_box().downcast::<DvPortConfigSpec>()?),
9032            StructType::DvsFilterParameter => Ok(from.as_any_box().downcast::<DvsFilterParameter>()?),
9033            StructType::DvsHostLocalPortInfo => Ok(from.as_any_box().downcast::<DvsHostLocalPortInfo>()?),
9034            StructType::DvPortStatus => Ok(from.as_any_box().downcast::<DvPortStatus>()?),
9035            StructType::DvPortSetting => Ok(from.as_any_box().downcast::<DvPortSetting>()?),
9036            StructType::VMwareDvsPortSetting => Ok(from.as_any_box().downcast::<VMwareDvsPortSetting>()?),
9037            StructType::DvPortState => Ok(from.as_any_box().downcast::<DvPortState>()?),
9038            StructType::DvPortgroupConfigInfo => Ok(from.as_any_box().downcast::<DvPortgroupConfigInfo>()?),
9039            StructType::DvPortgroupConfigSpec => Ok(from.as_any_box().downcast::<DvPortgroupConfigSpec>()?),
9040            StructType::DistributedVirtualPortgroupNsxPortgroupOperationResult => Ok(from.as_any_box().downcast::<DistributedVirtualPortgroupNsxPortgroupOperationResult>()?),
9041            StructType::DvPortgroupPolicy => Ok(from.as_any_box().downcast::<DvPortgroupPolicy>()?),
9042            StructType::VMwareDvsPortgroupPolicy => Ok(from.as_any_box().downcast::<VMwareDvsPortgroupPolicy>()?),
9043            StructType::DistributedVirtualPortgroupProblem => Ok(from.as_any_box().downcast::<DistributedVirtualPortgroupProblem>()?),
9044            StructType::DistributedVirtualPortgroupInfo => Ok(from.as_any_box().downcast::<DistributedVirtualPortgroupInfo>()?),
9045            StructType::DistributedVirtualSwitchInfo => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchInfo>()?),
9046            StructType::DistributedVirtualSwitchManagerCompatibilityResult => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerCompatibilityResult>()?),
9047            StructType::DvsManagerDvsConfigTarget => Ok(from.as_any_box().downcast::<DvsManagerDvsConfigTarget>()?),
9048            StructType::DistributedVirtualSwitchManagerDvsProductSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerDvsProductSpec>()?),
9049            StructType::DistributedVirtualSwitchManagerHostContainer => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostContainer>()?),
9050            StructType::DistributedVirtualSwitchManagerHostDvsFilterSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostDvsFilterSpec>()?),
9051            StructType::DistributedVirtualSwitchManagerHostArrayFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostArrayFilter>()?),
9052            StructType::DistributedVirtualSwitchManagerHostContainerFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostContainerFilter>()?),
9053            StructType::DistributedVirtualSwitchManagerHostDvsMembershipFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostDvsMembershipFilter>()?),
9054            StructType::DistributedVirtualSwitchManagerImportResult => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerImportResult>()?),
9055            StructType::DvsManagerPhysicalNicsList => Ok(from.as_any_box().downcast::<DvsManagerPhysicalNicsList>()?),
9056            StructType::EntityBackup => Ok(from.as_any_box().downcast::<EntityBackup>()?),
9057            StructType::EntityBackupConfig => Ok(from.as_any_box().downcast::<EntityBackupConfig>()?),
9058            StructType::DvsFilterSpecConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecConnecteeSpec>()?),
9059            StructType::DvsFilterSpecPnicConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecPnicConnecteeSpec>()?),
9060            StructType::DvsFilterSpecVmConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVmConnecteeSpec>()?),
9061            StructType::DvsFilterSpecVmknicConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVmknicConnecteeSpec>()?),
9062            StructType::DvsFilterSpecVlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVlanSpec>()?),
9063            StructType::DvsFilterSpecPvlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecPvlanSpec>()?),
9064            StructType::DvsFilterSpecTrunkVlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecTrunkVlanSpec>()?),
9065            StructType::DvsFilterSpecVlanIdSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVlanIdSpec>()?),
9066            StructType::DistributedVirtualSwitchHostMember => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMember>()?),
9067            StructType::DistributedVirtualSwitchHostMemberBacking => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberBacking>()?),
9068            StructType::DistributedVirtualSwitchHostMemberPnicBacking => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberPnicBacking>()?),
9069            StructType::DistributedVirtualSwitchHostMemberConfigInfo => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberConfigInfo>()?),
9070            StructType::DistributedVirtualSwitchHostMemberConfigSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberConfigSpec>()?),
9071            StructType::HostMemberHealthCheckResult => Ok(from.as_any_box().downcast::<HostMemberHealthCheckResult>()?),
9072            StructType::HostMemberUplinkHealthCheckResult => Ok(from.as_any_box().downcast::<HostMemberUplinkHealthCheckResult>()?),
9073            StructType::VMwareDvsMtuHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsMtuHealthCheckResult>()?),
9074            StructType::VMwareDvsVlanHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsVlanHealthCheckResult>()?),
9075            StructType::VMwareDvsTeamingHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsTeamingHealthCheckResult>()?),
9076            StructType::DistributedVirtualSwitchHostMemberHostUplinkState => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberHostUplinkState>()?),
9077            StructType::DistributedVirtualSwitchHostMemberPnicSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberPnicSpec>()?),
9078            StructType::HostMemberRuntimeInfo => Ok(from.as_any_box().downcast::<HostMemberRuntimeInfo>()?),
9079            StructType::DistributedVirtualSwitchHostMemberRuntimeState => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberRuntimeState>()?),
9080            StructType::DistributedVirtualSwitchHostMemberTransportZoneInfo => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberTransportZoneInfo>()?),
9081            StructType::DistributedVirtualSwitchHostProductSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostProductSpec>()?),
9082            StructType::DistributedVirtualSwitchKeyedOpaqueBlob => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchKeyedOpaqueBlob>()?),
9083            StructType::DistributedVirtualSwitchNetworkOffloadSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchNetworkOffloadSpec>()?),
9084            StructType::DvsNetworkResourcePool => Ok(from.as_any_box().downcast::<DvsNetworkResourcePool>()?),
9085            StructType::DvsNetworkResourcePoolAllocationInfo => Ok(from.as_any_box().downcast::<DvsNetworkResourcePoolAllocationInfo>()?),
9086            StructType::DvsNetworkResourcePoolConfigSpec => Ok(from.as_any_box().downcast::<DvsNetworkResourcePoolConfigSpec>()?),
9087            StructType::DistributedVirtualSwitchPortConnectee => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchPortConnectee>()?),
9088            StructType::DistributedVirtualSwitchPortConnection => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchPortConnection>()?),
9089            StructType::DistributedVirtualSwitchPortCriteria => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchPortCriteria>()?),
9090            StructType::DistributedVirtualSwitchPortStatistics => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchPortStatistics>()?),
9091            StructType::DistributedVirtualSwitchProductSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchProductSpec>()?),
9092            StructType::DvsTrafficRule => Ok(from.as_any_box().downcast::<DvsTrafficRule>()?),
9093            StructType::DvsNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsNetworkRuleAction>()?),
9094            StructType::DvsAcceptNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsAcceptNetworkRuleAction>()?),
9095            StructType::DvsCopyNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsCopyNetworkRuleAction>()?),
9096            StructType::DvsDropNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsDropNetworkRuleAction>()?),
9097            StructType::DvsGreEncapNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsGreEncapNetworkRuleAction>()?),
9098            StructType::DvsLogNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsLogNetworkRuleAction>()?),
9099            StructType::DvsMacRewriteNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsMacRewriteNetworkRuleAction>()?),
9100            StructType::DvsPuntNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsPuntNetworkRuleAction>()?),
9101            StructType::DvsRateLimitNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsRateLimitNetworkRuleAction>()?),
9102            StructType::DvsUpdateTagNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsUpdateTagNetworkRuleAction>()?),
9103            StructType::DvsNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsNetworkRuleQualifier>()?),
9104            StructType::DvsIpNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsIpNetworkRuleQualifier>()?),
9105            StructType::DvsMacNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsMacNetworkRuleQualifier>()?),
9106            StructType::DvsSystemTrafficNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsSystemTrafficNetworkRuleQualifier>()?),
9107            StructType::DvsTrafficRuleset => Ok(from.as_any_box().downcast::<DvsTrafficRuleset>()?),
9108            StructType::DvsVmVnicNetworkResourcePool => Ok(from.as_any_box().downcast::<DvsVmVnicNetworkResourcePool>()?),
9109            StructType::DvsVmVnicResourcePoolConfigSpec => Ok(from.as_any_box().downcast::<DvsVmVnicResourcePoolConfigSpec>()?),
9110            StructType::DvsVmVnicResourceAllocation => Ok(from.as_any_box().downcast::<DvsVmVnicResourceAllocation>()?),
9111            StructType::DvsVmVnicNetworkResourcePoolRuntimeInfo => Ok(from.as_any_box().downcast::<DvsVmVnicNetworkResourcePoolRuntimeInfo>()?),
9112            StructType::DvsVnicAllocatedResource => Ok(from.as_any_box().downcast::<DvsVnicAllocatedResource>()?),
9113            StructType::VmwareDistributedVirtualSwitchDpuFailoverPolicy => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchDpuFailoverPolicy>()?),
9114            StructType::VMwareDvsDpuCapability => Ok(from.as_any_box().downcast::<VMwareDvsDpuCapability>()?),
9115            StructType::VMwareIpfixConfig => Ok(from.as_any_box().downcast::<VMwareIpfixConfig>()?),
9116            StructType::VMwareDvsIpfixCapability => Ok(from.as_any_box().downcast::<VMwareDvsIpfixCapability>()?),
9117            StructType::VMwareDvsLacpCapability => Ok(from.as_any_box().downcast::<VMwareDvsLacpCapability>()?),
9118            StructType::VMwareDvsLacpGroupConfig => Ok(from.as_any_box().downcast::<VMwareDvsLacpGroupConfig>()?),
9119            StructType::VMwareDvsLacpGroupSpec => Ok(from.as_any_box().downcast::<VMwareDvsLacpGroupSpec>()?),
9120            StructType::VMwareDvsLagIpfixConfig => Ok(from.as_any_box().downcast::<VMwareDvsLagIpfixConfig>()?),
9121            StructType::VMwareDvsLagVlanConfig => Ok(from.as_any_box().downcast::<VMwareDvsLagVlanConfig>()?),
9122            StructType::VMwareDvsMtuCapability => Ok(from.as_any_box().downcast::<VMwareDvsMtuCapability>()?),
9123            StructType::VmwareDistributedVirtualSwitchNetworkOffloadConfig => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchNetworkOffloadConfig>()?),
9124            StructType::VMwareDvsPvlanConfigSpec => Ok(from.as_any_box().downcast::<VMwareDvsPvlanConfigSpec>()?),
9125            StructType::VMwareDvsPvlanMapEntry => Ok(from.as_any_box().downcast::<VMwareDvsPvlanMapEntry>()?),
9126            StructType::VmwareDistributedVirtualSwitchRealTimeConfig => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchRealTimeConfig>()?),
9127            StructType::VmwareDistributedVirtualSwitchRealTimeLanAnnotation => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchRealTimeLanAnnotation>()?),
9128            StructType::VMwareDvsVspanConfigSpec => Ok(from.as_any_box().downcast::<VMwareDvsVspanConfigSpec>()?),
9129            StructType::VMwareDvsVspanCapability => Ok(from.as_any_box().downcast::<VMwareDvsVspanCapability>()?),
9130            StructType::VMwareVspanPort => Ok(from.as_any_box().downcast::<VMwareVspanPort>()?),
9131            StructType::VMwareVspanSession => Ok(from.as_any_box().downcast::<VMwareVspanSession>()?),
9132            StructType::CryptoKeyId => Ok(from.as_any_box().downcast::<CryptoKeyId>()?),
9133            StructType::CryptoKeyPlain => Ok(from.as_any_box().downcast::<CryptoKeyPlain>()?),
9134            StructType::CryptoKeyResult => Ok(from.as_any_box().downcast::<CryptoKeyResult>()?),
9135            StructType::CryptoManagerHostKeyStatus => Ok(from.as_any_box().downcast::<CryptoManagerHostKeyStatus>()?),
9136            StructType::CryptoManagerKmipCertSignRequest => Ok(from.as_any_box().downcast::<CryptoManagerKmipCertSignRequest>()?),
9137            StructType::CryptoManagerKmipCertificateInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCertificateInfo>()?),
9138            StructType::CryptoManagerKmipClusterStatus => Ok(from.as_any_box().downcast::<CryptoManagerKmipClusterStatus>()?),
9139            StructType::CryptoManagerKmipCryptoKeyStatus => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatus>()?),
9140            StructType::CryptoManagerKmipCryptoKeyStatusKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusKeyInfo>()?),
9141            StructType::CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo>()?),
9142            StructType::CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo>()?),
9143            StructType::CryptoManagerKmipCustomAttributeSpec => Ok(from.as_any_box().downcast::<CryptoManagerKmipCustomAttributeSpec>()?),
9144            StructType::CryptoManagerKmipGenerateKeySpec => Ok(from.as_any_box().downcast::<CryptoManagerKmipGenerateKeySpec>()?),
9145            StructType::CryptoManagerKmipServerCertInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipServerCertInfo>()?),
9146            StructType::CryptoManagerKmipServerStatus => Ok(from.as_any_box().downcast::<CryptoManagerKmipServerStatus>()?),
9147            StructType::CryptoSpec => Ok(from.as_any_box().downcast::<CryptoSpec>()?),
9148            StructType::CryptoSpecDecrypt => Ok(from.as_any_box().downcast::<CryptoSpecDecrypt>()?),
9149            StructType::CryptoSpecDeepRecrypt => Ok(from.as_any_box().downcast::<CryptoSpecDeepRecrypt>()?),
9150            StructType::CryptoSpecEncrypt => Ok(from.as_any_box().downcast::<CryptoSpecEncrypt>()?),
9151            StructType::CryptoSpecNoOp => Ok(from.as_any_box().downcast::<CryptoSpecNoOp>()?),
9152            StructType::CryptoSpecRegister => Ok(from.as_any_box().downcast::<CryptoSpecRegister>()?),
9153            StructType::CryptoSpecShallowRecrypt => Ok(from.as_any_box().downcast::<CryptoSpecShallowRecrypt>()?),
9154            StructType::KeyProviderId => Ok(from.as_any_box().downcast::<KeyProviderId>()?),
9155            StructType::KmipClusterInfo => Ok(from.as_any_box().downcast::<KmipClusterInfo>()?),
9156            StructType::KmipClusterInfoKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoKeyInfo>()?),
9157            StructType::KmipClusterInfoWrappingKeyIdKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoWrappingKeyIdKeyInfo>()?),
9158            StructType::KmipClusterInfoWrappingRotationIntervalKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoWrappingRotationIntervalKeyInfo>()?),
9159            StructType::KmipServerInfo => Ok(from.as_any_box().downcast::<KmipServerInfo>()?),
9160            StructType::KmipServerSpec => Ok(from.as_any_box().downcast::<KmipServerSpec>()?),
9161            StructType::KmipServerSpecKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecKeySpec>()?),
9162            StructType::KmipServerSpecWrappingKeyIdKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecWrappingKeyIdKeySpec>()?),
9163            StructType::KmipServerSpecWrappingRotationIntervalKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecWrappingRotationIntervalKeySpec>()?),
9164            StructType::KmipServerStatus => Ok(from.as_any_box().downcast::<KmipServerStatus>()?),
9165            StructType::ChangesInfoEventArgument => Ok(from.as_any_box().downcast::<ChangesInfoEventArgument>()?),
9166            StructType::DvsOutOfSyncHostArgument => Ok(from.as_any_box().downcast::<DvsOutOfSyncHostArgument>()?),
9167            StructType::Event => Ok(from.as_any_box().downcast::<Event>()?),
9168            StructType::EventArgument => Ok(from.as_any_box().downcast::<EventArgument>()?),
9169            StructType::EntityEventArgument => Ok(from.as_any_box().downcast::<EntityEventArgument>()?),
9170            StructType::AlarmEventArgument => Ok(from.as_any_box().downcast::<AlarmEventArgument>()?),
9171            StructType::ComputeResourceEventArgument => Ok(from.as_any_box().downcast::<ComputeResourceEventArgument>()?),
9172            StructType::DatacenterEventArgument => Ok(from.as_any_box().downcast::<DatacenterEventArgument>()?),
9173            StructType::DatastoreEventArgument => Ok(from.as_any_box().downcast::<DatastoreEventArgument>()?),
9174            StructType::DvsEventArgument => Ok(from.as_any_box().downcast::<DvsEventArgument>()?),
9175            StructType::FolderEventArgument => Ok(from.as_any_box().downcast::<FolderEventArgument>()?),
9176            StructType::HostEventArgument => Ok(from.as_any_box().downcast::<HostEventArgument>()?),
9177            StructType::ManagedEntityEventArgument => Ok(from.as_any_box().downcast::<ManagedEntityEventArgument>()?),
9178            StructType::NetworkEventArgument => Ok(from.as_any_box().downcast::<NetworkEventArgument>()?),
9179            StructType::ResourcePoolEventArgument => Ok(from.as_any_box().downcast::<ResourcePoolEventArgument>()?),
9180            StructType::ScheduledTaskEventArgument => Ok(from.as_any_box().downcast::<ScheduledTaskEventArgument>()?),
9181            StructType::VmEventArgument => Ok(from.as_any_box().downcast::<VmEventArgument>()?),
9182            StructType::ProfileEventArgument => Ok(from.as_any_box().downcast::<ProfileEventArgument>()?),
9183            StructType::RoleEventArgument => Ok(from.as_any_box().downcast::<RoleEventArgument>()?),
9184            StructType::EventDescription => Ok(from.as_any_box().downcast::<EventDescription>()?),
9185            StructType::EventArgDesc => Ok(from.as_any_box().downcast::<EventArgDesc>()?),
9186            StructType::EventDescriptionEventDetail => Ok(from.as_any_box().downcast::<EventDescriptionEventDetail>()?),
9187            StructType::EventFilterSpec => Ok(from.as_any_box().downcast::<EventFilterSpec>()?),
9188            StructType::EventFilterSpecByEntity => Ok(from.as_any_box().downcast::<EventFilterSpecByEntity>()?),
9189            StructType::EventFilterSpecByTime => Ok(from.as_any_box().downcast::<EventFilterSpecByTime>()?),
9190            StructType::EventFilterSpecByUsername => Ok(from.as_any_box().downcast::<EventFilterSpecByUsername>()?),
9191            StructType::EventManagerEventViewSpec => Ok(from.as_any_box().downcast::<EventManagerEventViewSpec>()?),
9192            StructType::EventManagerViewByStartId => Ok(from.as_any_box().downcast::<EventManagerViewByStartId>()?),
9193            StructType::ExtendedEventPair => Ok(from.as_any_box().downcast::<ExtendedEventPair>()?),
9194            StructType::VnicPortArgument => Ok(from.as_any_box().downcast::<VnicPortArgument>()?),
9195            StructType::ExtExtendedProductInfo => Ok(from.as_any_box().downcast::<ExtExtendedProductInfo>()?),
9196            StructType::ManagedByInfo => Ok(from.as_any_box().downcast::<ManagedByInfo>()?),
9197            StructType::ExtManagedEntityInfo => Ok(from.as_any_box().downcast::<ExtManagedEntityInfo>()?),
9198            StructType::ExtSolutionManagerInfo => Ok(from.as_any_box().downcast::<ExtSolutionManagerInfo>()?),
9199            StructType::ExtSolutionManagerInfoTabInfo => Ok(from.as_any_box().downcast::<ExtSolutionManagerInfoTabInfo>()?),
9200            StructType::AnswerFileUpdateFailure => Ok(from.as_any_box().downcast::<AnswerFileUpdateFailure>()?),
9201            StructType::ConflictingConfigurationConfig => Ok(from.as_any_box().downcast::<ConflictingConfigurationConfig>()?),
9202            StructType::DatacenterMismatchArgument => Ok(from.as_any_box().downcast::<DatacenterMismatchArgument>()?),
9203            StructType::DvsApplyOperationFaultFaultOnObject => Ok(from.as_any_box().downcast::<DvsApplyOperationFaultFaultOnObject>()?),
9204            StructType::DvsOperationBulkFaultFaultOnHost => Ok(from.as_any_box().downcast::<DvsOperationBulkFaultFaultOnHost>()?),
9205            StructType::ImportOperationBulkFaultFaultOnImport => Ok(from.as_any_box().downcast::<ImportOperationBulkFaultFaultOnImport>()?),
9206            StructType::MultipleCertificatesVerifyFaultThumbprintData => Ok(from.as_any_box().downcast::<MultipleCertificatesVerifyFaultThumbprintData>()?),
9207            StructType::NoPermissionEntityPrivileges => Ok(from.as_any_box().downcast::<NoPermissionEntityPrivileges>()?),
9208            StructType::ProfileUpdateFailedUpdateFailure => Ok(from.as_any_box().downcast::<ProfileUpdateFailedUpdateFailure>()?),
9209            StructType::HostActiveDirectory => Ok(from.as_any_box().downcast::<HostActiveDirectory>()?),
9210            StructType::HostActiveDirectorySpec => Ok(from.as_any_box().downcast::<HostActiveDirectorySpec>()?),
9211            StructType::HostAssignableHardwareBinding => Ok(from.as_any_box().downcast::<HostAssignableHardwareBinding>()?),
9212            StructType::HostAssignableHardwareConfig => Ok(from.as_any_box().downcast::<HostAssignableHardwareConfig>()?),
9213            StructType::HostAssignableHardwareConfigAttributeOverride => Ok(from.as_any_box().downcast::<HostAssignableHardwareConfigAttributeOverride>()?),
9214            StructType::HostAuthenticationInfo => Ok(from.as_any_box().downcast::<HostAuthenticationInfo>()?),
9215            StructType::HostAuthenticationManagerInfo => Ok(from.as_any_box().downcast::<HostAuthenticationManagerInfo>()?),
9216            StructType::HostAuthenticationStoreInfo => Ok(from.as_any_box().downcast::<HostAuthenticationStoreInfo>()?),
9217            StructType::HostDirectoryStoreInfo => Ok(from.as_any_box().downcast::<HostDirectoryStoreInfo>()?),
9218            StructType::HostActiveDirectoryInfo => Ok(from.as_any_box().downcast::<HostActiveDirectoryInfo>()?),
9219            StructType::HostLocalAuthenticationInfo => Ok(from.as_any_box().downcast::<HostLocalAuthenticationInfo>()?),
9220            StructType::AutoStartPowerInfo => Ok(from.as_any_box().downcast::<AutoStartPowerInfo>()?),
9221            StructType::HostAutoStartManagerConfig => Ok(from.as_any_box().downcast::<HostAutoStartManagerConfig>()?),
9222            StructType::AutoStartDefaults => Ok(from.as_any_box().downcast::<AutoStartDefaults>()?),
9223            StructType::HostBiosInfo => Ok(from.as_any_box().downcast::<HostBiosInfo>()?),
9224            StructType::HostBootDeviceInfo => Ok(from.as_any_box().downcast::<HostBootDeviceInfo>()?),
9225            StructType::HostBootDevice => Ok(from.as_any_box().downcast::<HostBootDevice>()?),
9226            StructType::HostCacheConfigurationInfo => Ok(from.as_any_box().downcast::<HostCacheConfigurationInfo>()?),
9227            StructType::HostCacheConfigurationSpec => Ok(from.as_any_box().downcast::<HostCacheConfigurationSpec>()?),
9228            StructType::HostCapability => Ok(from.as_any_box().downcast::<HostCapability>()?),
9229            StructType::HostCertificateManagerCertificateInfo => Ok(from.as_any_box().downcast::<HostCertificateManagerCertificateInfo>()?),
9230            StructType::HostCertificateManagerCertificateSpec => Ok(from.as_any_box().downcast::<HostCertificateManagerCertificateSpec>()?),
9231            StructType::HostConfigChange => Ok(from.as_any_box().downcast::<HostConfigChange>()?),
9232            StructType::HostConfigInfo => Ok(from.as_any_box().downcast::<HostConfigInfo>()?),
9233            StructType::HostConfigManager => Ok(from.as_any_box().downcast::<HostConfigManager>()?),
9234            StructType::HostConfigSpec => Ok(from.as_any_box().downcast::<HostConfigSpec>()?),
9235            StructType::HostConnectInfo => Ok(from.as_any_box().downcast::<HostConnectInfo>()?),
9236            StructType::HostDatastoreConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreConnectInfo>()?),
9237            StructType::HostDatastoreExistsConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreExistsConnectInfo>()?),
9238            StructType::HostDatastoreNameConflictConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreNameConflictConnectInfo>()?),
9239            StructType::HostLicenseConnectInfo => Ok(from.as_any_box().downcast::<HostLicenseConnectInfo>()?),
9240            StructType::HostConnectInfoNetworkInfo => Ok(from.as_any_box().downcast::<HostConnectInfoNetworkInfo>()?),
9241            StructType::HostNewNetworkConnectInfo => Ok(from.as_any_box().downcast::<HostNewNetworkConnectInfo>()?),
9242            StructType::HostConnectSpec => Ok(from.as_any_box().downcast::<HostConnectSpec>()?),
9243            StructType::HostCpuIdInfo => Ok(from.as_any_box().downcast::<HostCpuIdInfo>()?),
9244            StructType::HostCpuInfo => Ok(from.as_any_box().downcast::<HostCpuInfo>()?),
9245            StructType::HostCpuPackage => Ok(from.as_any_box().downcast::<HostCpuPackage>()?),
9246            StructType::HostCpuPowerManagementInfo => Ok(from.as_any_box().downcast::<HostCpuPowerManagementInfo>()?),
9247            StructType::HostCpuSchedulerInfo => Ok(from.as_any_box().downcast::<HostCpuSchedulerInfo>()?),
9248            StructType::HostHyperThreadScheduleInfo => Ok(from.as_any_box().downcast::<HostHyperThreadScheduleInfo>()?),
9249            StructType::HostDataTransportConnectionInfo => Ok(from.as_any_box().downcast::<HostDataTransportConnectionInfo>()?),
9250            StructType::HostNfcConnectionInfo => Ok(from.as_any_box().downcast::<HostNfcConnectionInfo>()?),
9251            StructType::FileInfo => Ok(from.as_any_box().downcast::<FileInfo>()?),
9252            StructType::FloppyImageFileInfo => Ok(from.as_any_box().downcast::<FloppyImageFileInfo>()?),
9253            StructType::FolderFileInfo => Ok(from.as_any_box().downcast::<FolderFileInfo>()?),
9254            StructType::IsoImageFileInfo => Ok(from.as_any_box().downcast::<IsoImageFileInfo>()?),
9255            StructType::VmConfigFileInfo => Ok(from.as_any_box().downcast::<VmConfigFileInfo>()?),
9256            StructType::TemplateConfigFileInfo => Ok(from.as_any_box().downcast::<TemplateConfigFileInfo>()?),
9257            StructType::VmDiskFileInfo => Ok(from.as_any_box().downcast::<VmDiskFileInfo>()?),
9258            StructType::VmLogFileInfo => Ok(from.as_any_box().downcast::<VmLogFileInfo>()?),
9259            StructType::VmNvramFileInfo => Ok(from.as_any_box().downcast::<VmNvramFileInfo>()?),
9260            StructType::VmSnapshotFileInfo => Ok(from.as_any_box().downcast::<VmSnapshotFileInfo>()?),
9261            StructType::FileQueryFlags => Ok(from.as_any_box().downcast::<FileQueryFlags>()?),
9262            StructType::FileQuery => Ok(from.as_any_box().downcast::<FileQuery>()?),
9263            StructType::FloppyImageFileQuery => Ok(from.as_any_box().downcast::<FloppyImageFileQuery>()?),
9264            StructType::FolderFileQuery => Ok(from.as_any_box().downcast::<FolderFileQuery>()?),
9265            StructType::IsoImageFileQuery => Ok(from.as_any_box().downcast::<IsoImageFileQuery>()?),
9266            StructType::VmConfigFileQuery => Ok(from.as_any_box().downcast::<VmConfigFileQuery>()?),
9267            StructType::TemplateConfigFileQuery => Ok(from.as_any_box().downcast::<TemplateConfigFileQuery>()?),
9268            StructType::VmDiskFileQuery => Ok(from.as_any_box().downcast::<VmDiskFileQuery>()?),
9269            StructType::VmLogFileQuery => Ok(from.as_any_box().downcast::<VmLogFileQuery>()?),
9270            StructType::VmNvramFileQuery => Ok(from.as_any_box().downcast::<VmNvramFileQuery>()?),
9271            StructType::VmSnapshotFileQuery => Ok(from.as_any_box().downcast::<VmSnapshotFileQuery>()?),
9272            StructType::HostDatastoreBrowserSearchResults => Ok(from.as_any_box().downcast::<HostDatastoreBrowserSearchResults>()?),
9273            StructType::HostDatastoreBrowserSearchSpec => Ok(from.as_any_box().downcast::<HostDatastoreBrowserSearchSpec>()?),
9274            StructType::VmConfigFileEncryptionInfo => Ok(from.as_any_box().downcast::<VmConfigFileEncryptionInfo>()?),
9275            StructType::VmConfigFileQueryFlags => Ok(from.as_any_box().downcast::<VmConfigFileQueryFlags>()?),
9276            StructType::VmConfigFileQueryFilter => Ok(from.as_any_box().downcast::<VmConfigFileQueryFilter>()?),
9277            StructType::VmDiskFileEncryptionInfo => Ok(from.as_any_box().downcast::<VmDiskFileEncryptionInfo>()?),
9278            StructType::VmDiskFileQueryFlags => Ok(from.as_any_box().downcast::<VmDiskFileQueryFlags>()?),
9279            StructType::VmDiskFileQueryFilter => Ok(from.as_any_box().downcast::<VmDiskFileQueryFilter>()?),
9280            StructType::HostDatastoreSystemCapabilities => Ok(from.as_any_box().downcast::<HostDatastoreSystemCapabilities>()?),
9281            StructType::HostDatastoreSystemDatastoreResult => Ok(from.as_any_box().downcast::<HostDatastoreSystemDatastoreResult>()?),
9282            StructType::HostDatastoreSystemVvolDatastoreSpec => Ok(from.as_any_box().downcast::<HostDatastoreSystemVvolDatastoreSpec>()?),
9283            StructType::HostDateTimeConfig => Ok(from.as_any_box().downcast::<HostDateTimeConfig>()?),
9284            StructType::HostDateTimeInfo => Ok(from.as_any_box().downcast::<HostDateTimeInfo>()?),
9285            StructType::HostDateTimeSystemServiceTestResult => Ok(from.as_any_box().downcast::<HostDateTimeSystemServiceTestResult>()?),
9286            StructType::HostDateTimeSystemTimeZone => Ok(from.as_any_box().downcast::<HostDateTimeSystemTimeZone>()?),
9287            StructType::HostDeploymentInfo => Ok(from.as_any_box().downcast::<HostDeploymentInfo>()?),
9288            StructType::HostDevice => Ok(from.as_any_box().downcast::<HostDevice>()?),
9289            StructType::ScsiLun => Ok(from.as_any_box().downcast::<ScsiLun>()?),
9290            StructType::HostScsiDisk => Ok(from.as_any_box().downcast::<HostScsiDisk>()?),
9291            StructType::DevicePciId => Ok(from.as_any_box().downcast::<DevicePciId>()?),
9292            StructType::HostDhcpService => Ok(from.as_any_box().downcast::<HostDhcpService>()?),
9293            StructType::HostDhcpServiceConfig => Ok(from.as_any_box().downcast::<HostDhcpServiceConfig>()?),
9294            StructType::HostDhcpServiceSpec => Ok(from.as_any_box().downcast::<HostDhcpServiceSpec>()?),
9295            StructType::HostDiagnosticPartition => Ok(from.as_any_box().downcast::<HostDiagnosticPartition>()?),
9296            StructType::HostDiagnosticPartitionCreateDescription => Ok(from.as_any_box().downcast::<HostDiagnosticPartitionCreateDescription>()?),
9297            StructType::HostDiagnosticPartitionCreateOption => Ok(from.as_any_box().downcast::<HostDiagnosticPartitionCreateOption>()?),
9298            StructType::HostDiagnosticPartitionCreateSpec => Ok(from.as_any_box().downcast::<HostDiagnosticPartitionCreateSpec>()?),
9299            StructType::HostDigestInfo => Ok(from.as_any_box().downcast::<HostDigestInfo>()?),
9300            StructType::HostTpmDigestInfo => Ok(from.as_any_box().downcast::<HostTpmDigestInfo>()?),
9301            StructType::HostDiskConfigurationResult => Ok(from.as_any_box().downcast::<HostDiskConfigurationResult>()?),
9302            StructType::HostDiskDimensions => Ok(from.as_any_box().downcast::<HostDiskDimensions>()?),
9303            StructType::HostDiskDimensionsChs => Ok(from.as_any_box().downcast::<HostDiskDimensionsChs>()?),
9304            StructType::HostDiskDimensionsLba => Ok(from.as_any_box().downcast::<HostDiskDimensionsLba>()?),
9305            StructType::HostDiskPartitionInfo => Ok(from.as_any_box().downcast::<HostDiskPartitionInfo>()?),
9306            StructType::HostDiskPartitionBlockRange => Ok(from.as_any_box().downcast::<HostDiskPartitionBlockRange>()?),
9307            StructType::HostDiskPartitionLayout => Ok(from.as_any_box().downcast::<HostDiskPartitionLayout>()?),
9308            StructType::HostDiskPartitionAttributes => Ok(from.as_any_box().downcast::<HostDiskPartitionAttributes>()?),
9309            StructType::HostDiskPartitionSpec => Ok(from.as_any_box().downcast::<HostDiskPartitionSpec>()?),
9310            StructType::HostDnsConfig => Ok(from.as_any_box().downcast::<HostDnsConfig>()?),
9311            StructType::HostDnsConfigSpec => Ok(from.as_any_box().downcast::<HostDnsConfigSpec>()?),
9312            StructType::HostDvxClass => Ok(from.as_any_box().downcast::<HostDvxClass>()?),
9313            StructType::HostEnterMaintenanceResult => Ok(from.as_any_box().downcast::<HostEnterMaintenanceResult>()?),
9314            StructType::HostEsxAgentHostManagerConfigInfo => Ok(from.as_any_box().downcast::<HostEsxAgentHostManagerConfigInfo>()?),
9315            StructType::HostFaultToleranceManagerComponentHealthInfo => Ok(from.as_any_box().downcast::<HostFaultToleranceManagerComponentHealthInfo>()?),
9316            StructType::FcoeConfig => Ok(from.as_any_box().downcast::<FcoeConfig>()?),
9317            StructType::FcoeConfigFcoeCapabilities => Ok(from.as_any_box().downcast::<FcoeConfigFcoeCapabilities>()?),
9318            StructType::FcoeConfigFcoeSpecification => Ok(from.as_any_box().downcast::<FcoeConfigFcoeSpecification>()?),
9319            StructType::FcoeConfigVlanRange => Ok(from.as_any_box().downcast::<FcoeConfigVlanRange>()?),
9320            StructType::HostFeatureCapability => Ok(from.as_any_box().downcast::<HostFeatureCapability>()?),
9321            StructType::HostFeatureMask => Ok(from.as_any_box().downcast::<HostFeatureMask>()?),
9322            StructType::HostFeatureVersionInfo => Ok(from.as_any_box().downcast::<HostFeatureVersionInfo>()?),
9323            StructType::HostFibreChannelOverEthernetHbaLinkInfo => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetHbaLinkInfo>()?),
9324            StructType::HostFileAccess => Ok(from.as_any_box().downcast::<HostFileAccess>()?),
9325            StructType::ModeInfo => Ok(from.as_any_box().downcast::<ModeInfo>()?),
9326            StructType::HostFileSystemMountInfo => Ok(from.as_any_box().downcast::<HostFileSystemMountInfo>()?),
9327            StructType::HostFileSystemVolume => Ok(from.as_any_box().downcast::<HostFileSystemVolume>()?),
9328            StructType::HostLocalFileSystemVolume => Ok(from.as_any_box().downcast::<HostLocalFileSystemVolume>()?),
9329            StructType::HostNasVolume => Ok(from.as_any_box().downcast::<HostNasVolume>()?),
9330            StructType::HostPMemVolume => Ok(from.as_any_box().downcast::<HostPMemVolume>()?),
9331            StructType::HostVfatVolume => Ok(from.as_any_box().downcast::<HostVfatVolume>()?),
9332            StructType::HostVffsVolume => Ok(from.as_any_box().downcast::<HostVffsVolume>()?),
9333            StructType::HostVmfsVolume => Ok(from.as_any_box().downcast::<HostVmfsVolume>()?),
9334            StructType::HostVvolVolume => Ok(from.as_any_box().downcast::<HostVvolVolume>()?),
9335            StructType::HostFileSystemVolumeInfo => Ok(from.as_any_box().downcast::<HostFileSystemVolumeInfo>()?),
9336            StructType::HostFirewallConfig => Ok(from.as_any_box().downcast::<HostFirewallConfig>()?),
9337            StructType::HostFirewallConfigRuleSetConfig => Ok(from.as_any_box().downcast::<HostFirewallConfigRuleSetConfig>()?),
9338            StructType::HostFirewallInfo => Ok(from.as_any_box().downcast::<HostFirewallInfo>()?),
9339            StructType::HostFirewallDefaultPolicy => Ok(from.as_any_box().downcast::<HostFirewallDefaultPolicy>()?),
9340            StructType::HostFlagInfo => Ok(from.as_any_box().downcast::<HostFlagInfo>()?),
9341            StructType::HostForceMountedInfo => Ok(from.as_any_box().downcast::<HostForceMountedInfo>()?),
9342            StructType::HostFru => Ok(from.as_any_box().downcast::<HostFru>()?),
9343            StructType::HostGatewaySpec => Ok(from.as_any_box().downcast::<HostGatewaySpec>()?),
9344            StructType::HostGraphicsConfig => Ok(from.as_any_box().downcast::<HostGraphicsConfig>()?),
9345            StructType::HostGraphicsConfigDeviceType => Ok(from.as_any_box().downcast::<HostGraphicsConfigDeviceType>()?),
9346            StructType::HostGraphicsInfo => Ok(from.as_any_box().downcast::<HostGraphicsInfo>()?),
9347            StructType::HostHardwareInfo => Ok(from.as_any_box().downcast::<HostHardwareInfo>()?),
9348            StructType::HostHardwareStatusInfo => Ok(from.as_any_box().downcast::<HostHardwareStatusInfo>()?),
9349            StructType::DpuStatusInfoOperationalInfo => Ok(from.as_any_box().downcast::<DpuStatusInfoOperationalInfo>()?),
9350            StructType::HostHardwareElementInfo => Ok(from.as_any_box().downcast::<HostHardwareElementInfo>()?),
9351            StructType::DpuStatusInfo => Ok(from.as_any_box().downcast::<DpuStatusInfo>()?),
9352            StructType::HostStorageElementInfo => Ok(from.as_any_box().downcast::<HostStorageElementInfo>()?),
9353            StructType::HostStorageOperationalInfo => Ok(from.as_any_box().downcast::<HostStorageOperationalInfo>()?),
9354            StructType::HostHbaCreateSpec => Ok(from.as_any_box().downcast::<HostHbaCreateSpec>()?),
9355            StructType::HostTcpHbaCreateSpec => Ok(from.as_any_box().downcast::<HostTcpHbaCreateSpec>()?),
9356            StructType::HealthSystemRuntime => Ok(from.as_any_box().downcast::<HealthSystemRuntime>()?),
9357            StructType::HostAccessControlEntry => Ok(from.as_any_box().downcast::<HostAccessControlEntry>()?),
9358            StructType::HostHostBusAdapter => Ok(from.as_any_box().downcast::<HostHostBusAdapter>()?),
9359            StructType::HostBlockHba => Ok(from.as_any_box().downcast::<HostBlockHba>()?),
9360            StructType::HostFibreChannelHba => Ok(from.as_any_box().downcast::<HostFibreChannelHba>()?),
9361            StructType::HostFibreChannelOverEthernetHba => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetHba>()?),
9362            StructType::HostInternetScsiHba => Ok(from.as_any_box().downcast::<HostInternetScsiHba>()?),
9363            StructType::HostParallelScsiHba => Ok(from.as_any_box().downcast::<HostParallelScsiHba>()?),
9364            StructType::HostPcieHba => Ok(from.as_any_box().downcast::<HostPcieHba>()?),
9365            StructType::HostRdmaHba => Ok(from.as_any_box().downcast::<HostRdmaHba>()?),
9366            StructType::HostSerialAttachedHba => Ok(from.as_any_box().downcast::<HostSerialAttachedHba>()?),
9367            StructType::HostTcpHba => Ok(from.as_any_box().downcast::<HostTcpHba>()?),
9368            StructType::HostProxySwitch => Ok(from.as_any_box().downcast::<HostProxySwitch>()?),
9369            StructType::HostProxySwitchConfig => Ok(from.as_any_box().downcast::<HostProxySwitchConfig>()?),
9370            StructType::HostProxySwitchEnsInfo => Ok(from.as_any_box().downcast::<HostProxySwitchEnsInfo>()?),
9371            StructType::HostProxySwitchHostLagConfig => Ok(from.as_any_box().downcast::<HostProxySwitchHostLagConfig>()?),
9372            StructType::HostProxySwitchSpec => Ok(from.as_any_box().downcast::<HostProxySwitchSpec>()?),
9373            StructType::HostSpbmDatastoreInfo => Ok(from.as_any_box().downcast::<HostSpbmDatastoreInfo>()?),
9374            StructType::HostSpbmHashInfo => Ok(from.as_any_box().downcast::<HostSpbmHashInfo>()?),
9375            StructType::HostSpbmPolicyBlobInfo => Ok(from.as_any_box().downcast::<HostSpbmPolicyBlobInfo>()?),
9376            StructType::HostSpbmPolicyInfo => Ok(from.as_any_box().downcast::<HostSpbmPolicyInfo>()?),
9377            StructType::HostImageProfileSummary => Ok(from.as_any_box().downcast::<HostImageProfileSummary>()?),
9378            StructType::HostInternetScsiHbaAuthenticationCapabilities => Ok(from.as_any_box().downcast::<HostInternetScsiHbaAuthenticationCapabilities>()?),
9379            StructType::HostInternetScsiHbaAuthenticationProperties => Ok(from.as_any_box().downcast::<HostInternetScsiHbaAuthenticationProperties>()?),
9380            StructType::HostInternetScsiHbaDigestCapabilities => Ok(from.as_any_box().downcast::<HostInternetScsiHbaDigestCapabilities>()?),
9381            StructType::HostInternetScsiHbaDigestProperties => Ok(from.as_any_box().downcast::<HostInternetScsiHbaDigestProperties>()?),
9382            StructType::HostInternetScsiHbaDiscoveryCapabilities => Ok(from.as_any_box().downcast::<HostInternetScsiHbaDiscoveryCapabilities>()?),
9383            StructType::HostInternetScsiHbaDiscoveryProperties => Ok(from.as_any_box().downcast::<HostInternetScsiHbaDiscoveryProperties>()?),
9384            StructType::HostInternetScsiHbaIpCapabilities => Ok(from.as_any_box().downcast::<HostInternetScsiHbaIpCapabilities>()?),
9385            StructType::HostInternetScsiHbaIpProperties => Ok(from.as_any_box().downcast::<HostInternetScsiHbaIpProperties>()?),
9386            StructType::HostInternetScsiHbaIPv6Properties => Ok(from.as_any_box().downcast::<HostInternetScsiHbaIPv6Properties>()?),
9387            StructType::HostInternetScsiHbaIscsiIpv6Address => Ok(from.as_any_box().downcast::<HostInternetScsiHbaIscsiIpv6Address>()?),
9388            StructType::HostInternetScsiHbaSendTarget => Ok(from.as_any_box().downcast::<HostInternetScsiHbaSendTarget>()?),
9389            StructType::HostInternetScsiHbaStaticTarget => Ok(from.as_any_box().downcast::<HostInternetScsiHbaStaticTarget>()?),
9390            StructType::HostInternetScsiHbaTargetSet => Ok(from.as_any_box().downcast::<HostInternetScsiHbaTargetSet>()?),
9391            StructType::HostIpConfig => Ok(from.as_any_box().downcast::<HostIpConfig>()?),
9392            StructType::VsanFileServiceIpConfig => Ok(from.as_any_box().downcast::<VsanFileServiceIpConfig>()?),
9393            StructType::HostIpConfigIpV6Address => Ok(from.as_any_box().downcast::<HostIpConfigIpV6Address>()?),
9394            StructType::HostIpConfigIpV6AddressConfiguration => Ok(from.as_any_box().downcast::<HostIpConfigIpV6AddressConfiguration>()?),
9395            StructType::HostIpRouteConfig => Ok(from.as_any_box().downcast::<HostIpRouteConfig>()?),
9396            StructType::HostIpRouteConfigSpec => Ok(from.as_any_box().downcast::<HostIpRouteConfigSpec>()?),
9397            StructType::HostIpRouteEntry => Ok(from.as_any_box().downcast::<HostIpRouteEntry>()?),
9398            StructType::HostIpRouteOp => Ok(from.as_any_box().downcast::<HostIpRouteOp>()?),
9399            StructType::HostIpRouteTableConfig => Ok(from.as_any_box().downcast::<HostIpRouteTableConfig>()?),
9400            StructType::HostIpRouteTableInfo => Ok(from.as_any_box().downcast::<HostIpRouteTableInfo>()?),
9401            StructType::HostIpmiInfo => Ok(from.as_any_box().downcast::<HostIpmiInfo>()?),
9402            StructType::IscsiDependencyEntity => Ok(from.as_any_box().downcast::<IscsiDependencyEntity>()?),
9403            StructType::IscsiMigrationDependency => Ok(from.as_any_box().downcast::<IscsiMigrationDependency>()?),
9404            StructType::IscsiPortInfo => Ok(from.as_any_box().downcast::<IscsiPortInfo>()?),
9405            StructType::IscsiStatus => Ok(from.as_any_box().downcast::<IscsiStatus>()?),
9406            StructType::KernelModuleInfo => Ok(from.as_any_box().downcast::<KernelModuleInfo>()?),
9407            StructType::KernelModuleSectionInfo => Ok(from.as_any_box().downcast::<KernelModuleSectionInfo>()?),
9408            StructType::LacpInfo => Ok(from.as_any_box().downcast::<LacpInfo>()?),
9409            StructType::LagInfo => Ok(from.as_any_box().downcast::<LagInfo>()?),
9410            StructType::LagUplinkInfo => Ok(from.as_any_box().downcast::<LagUplinkInfo>()?),
9411            StructType::HostLicenseSpec => Ok(from.as_any_box().downcast::<HostLicenseSpec>()?),
9412            StructType::LinkDiscoveryProtocolConfig => Ok(from.as_any_box().downcast::<LinkDiscoveryProtocolConfig>()?),
9413            StructType::HostAccountSpec => Ok(from.as_any_box().downcast::<HostAccountSpec>()?),
9414            StructType::HostPosixAccountSpec => Ok(from.as_any_box().downcast::<HostPosixAccountSpec>()?),
9415            StructType::HostLocalFileSystemVolumeSpec => Ok(from.as_any_box().downcast::<HostLocalFileSystemVolumeSpec>()?),
9416            StructType::HostLowLevelProvisioningManagerDiskLayoutSpec => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerDiskLayoutSpec>()?),
9417            StructType::HostLowLevelProvisioningManagerFileDeleteResult => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerFileDeleteResult>()?),
9418            StructType::HostLowLevelProvisioningManagerFileDeleteSpec => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerFileDeleteSpec>()?),
9419            StructType::HostLowLevelProvisioningManagerFileReserveResult => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerFileReserveResult>()?),
9420            StructType::HostLowLevelProvisioningManagerFileReserveSpec => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerFileReserveSpec>()?),
9421            StructType::HostLowLevelProvisioningManagerSnapshotLayoutSpec => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerSnapshotLayoutSpec>()?),
9422            StructType::HostLowLevelProvisioningManagerVmMigrationStatus => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerVmMigrationStatus>()?),
9423            StructType::HostLowLevelProvisioningManagerVmRecoveryInfo => Ok(from.as_any_box().downcast::<HostLowLevelProvisioningManagerVmRecoveryInfo>()?),
9424            StructType::HostMaintenanceSpec => Ok(from.as_any_box().downcast::<HostMaintenanceSpec>()?),
9425            StructType::ServiceConsoleReservationInfo => Ok(from.as_any_box().downcast::<ServiceConsoleReservationInfo>()?),
9426            StructType::VirtualMachineMemoryReservationInfo => Ok(from.as_any_box().downcast::<VirtualMachineMemoryReservationInfo>()?),
9427            StructType::VirtualMachineMemoryReservationSpec => Ok(from.as_any_box().downcast::<VirtualMachineMemoryReservationSpec>()?),
9428            StructType::HostMemorySpec => Ok(from.as_any_box().downcast::<HostMemorySpec>()?),
9429            StructType::HostMemoryTierInfo => Ok(from.as_any_box().downcast::<HostMemoryTierInfo>()?),
9430            StructType::HostMountInfo => Ok(from.as_any_box().downcast::<HostMountInfo>()?),
9431            StructType::HostMultipathInfo => Ok(from.as_any_box().downcast::<HostMultipathInfo>()?),
9432            StructType::HostMultipathInfoLogicalUnit => Ok(from.as_any_box().downcast::<HostMultipathInfoLogicalUnit>()?),
9433            StructType::HostMultipathInfoLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoLogicalUnitPolicy>()?),
9434            StructType::HostMultipathInfoFixedLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoFixedLogicalUnitPolicy>()?),
9435            StructType::HostMultipathInfoHppLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoHppLogicalUnitPolicy>()?),
9436            StructType::HostMultipathInfoLogicalUnitStorageArrayTypePolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoLogicalUnitStorageArrayTypePolicy>()?),
9437            StructType::HostMultipathInfoPath => Ok(from.as_any_box().downcast::<HostMultipathInfoPath>()?),
9438            StructType::HostMultipathStateInfo => Ok(from.as_any_box().downcast::<HostMultipathStateInfo>()?),
9439            StructType::HostMultipathStateInfoPath => Ok(from.as_any_box().downcast::<HostMultipathStateInfoPath>()?),
9440            StructType::HostNasVolumeConfig => Ok(from.as_any_box().downcast::<HostNasVolumeConfig>()?),
9441            StructType::HostNasVolumeSpec => Ok(from.as_any_box().downcast::<HostNasVolumeSpec>()?),
9442            StructType::HostNasVolumeUserInfo => Ok(from.as_any_box().downcast::<HostNasVolumeUserInfo>()?),
9443            StructType::HostNatService => Ok(from.as_any_box().downcast::<HostNatService>()?),
9444            StructType::HostNatServiceConfig => Ok(from.as_any_box().downcast::<HostNatServiceConfig>()?),
9445            StructType::HostNatServiceNameServiceSpec => Ok(from.as_any_box().downcast::<HostNatServiceNameServiceSpec>()?),
9446            StructType::HostNatServicePortForwardSpec => Ok(from.as_any_box().downcast::<HostNatServicePortForwardSpec>()?),
9447            StructType::HostNatServiceSpec => Ok(from.as_any_box().downcast::<HostNatServiceSpec>()?),
9448            StructType::HostNetCapabilities => Ok(from.as_any_box().downcast::<HostNetCapabilities>()?),
9449            StructType::HostNetOffloadCapabilities => Ok(from.as_any_box().downcast::<HostNetOffloadCapabilities>()?),
9450            StructType::HostNetStackInstance => Ok(from.as_any_box().downcast::<HostNetStackInstance>()?),
9451            StructType::HostNetworkConfig => Ok(from.as_any_box().downcast::<HostNetworkConfig>()?),
9452            StructType::HostNetworkConfigNetStackSpec => Ok(from.as_any_box().downcast::<HostNetworkConfigNetStackSpec>()?),
9453            StructType::HostNetworkConfigResult => Ok(from.as_any_box().downcast::<HostNetworkConfigResult>()?),
9454            StructType::HostNetworkInfo => Ok(from.as_any_box().downcast::<HostNetworkInfo>()?),
9455            StructType::HostNetworkPolicy => Ok(from.as_any_box().downcast::<HostNetworkPolicy>()?),
9456            StructType::HostNicFailureCriteria => Ok(from.as_any_box().downcast::<HostNicFailureCriteria>()?),
9457            StructType::HostNicOrderPolicy => Ok(from.as_any_box().downcast::<HostNicOrderPolicy>()?),
9458            StructType::HostNicTeamingPolicy => Ok(from.as_any_box().downcast::<HostNicTeamingPolicy>()?),
9459            StructType::HostNetworkSecurityPolicy => Ok(from.as_any_box().downcast::<HostNetworkSecurityPolicy>()?),
9460            StructType::HostNetworkTrafficShapingPolicy => Ok(from.as_any_box().downcast::<HostNetworkTrafficShapingPolicy>()?),
9461            StructType::HostNtpConfig => Ok(from.as_any_box().downcast::<HostNtpConfig>()?),
9462            StructType::HostNumaInfo => Ok(from.as_any_box().downcast::<HostNumaInfo>()?),
9463            StructType::HostNumaNode => Ok(from.as_any_box().downcast::<HostNumaNode>()?),
9464            StructType::HostNumericSensorInfo => Ok(from.as_any_box().downcast::<HostNumericSensorInfo>()?),
9465            StructType::NvdimmDimmInfo => Ok(from.as_any_box().downcast::<NvdimmDimmInfo>()?),
9466            StructType::NvdimmGuid => Ok(from.as_any_box().downcast::<NvdimmGuid>()?),
9467            StructType::NvdimmHealthInfo => Ok(from.as_any_box().downcast::<NvdimmHealthInfo>()?),
9468            StructType::NvdimmInterleaveSetInfo => Ok(from.as_any_box().downcast::<NvdimmInterleaveSetInfo>()?),
9469            StructType::NvdimmNamespaceCreateSpec => Ok(from.as_any_box().downcast::<NvdimmNamespaceCreateSpec>()?),
9470            StructType::NvdimmNamespaceDeleteSpec => Ok(from.as_any_box().downcast::<NvdimmNamespaceDeleteSpec>()?),
9471            StructType::NvdimmNamespaceDetails => Ok(from.as_any_box().downcast::<NvdimmNamespaceDetails>()?),
9472            StructType::NvdimmNamespaceInfo => Ok(from.as_any_box().downcast::<NvdimmNamespaceInfo>()?),
9473            StructType::NvdimmSystemInfo => Ok(from.as_any_box().downcast::<NvdimmSystemInfo>()?),
9474            StructType::NvdimmPMemNamespaceCreateSpec => Ok(from.as_any_box().downcast::<NvdimmPMemNamespaceCreateSpec>()?),
9475            StructType::NvdimmRegionInfo => Ok(from.as_any_box().downcast::<NvdimmRegionInfo>()?),
9476            StructType::NvdimmSummary => Ok(from.as_any_box().downcast::<NvdimmSummary>()?),
9477            StructType::HostNvmeController => Ok(from.as_any_box().downcast::<HostNvmeController>()?),
9478            StructType::HostNvmeDisconnectSpec => Ok(from.as_any_box().downcast::<HostNvmeDisconnectSpec>()?),
9479            StructType::HostNvmeDiscoveryLog => Ok(from.as_any_box().downcast::<HostNvmeDiscoveryLog>()?),
9480            StructType::HostNvmeDiscoveryLogEntry => Ok(from.as_any_box().downcast::<HostNvmeDiscoveryLogEntry>()?),
9481            StructType::HostNvmeNamespace => Ok(from.as_any_box().downcast::<HostNvmeNamespace>()?),
9482            StructType::HostNvmeSpec => Ok(from.as_any_box().downcast::<HostNvmeSpec>()?),
9483            StructType::HostNvmeConnectSpec => Ok(from.as_any_box().downcast::<HostNvmeConnectSpec>()?),
9484            StructType::HostNvmeDiscoverSpec => Ok(from.as_any_box().downcast::<HostNvmeDiscoverSpec>()?),
9485            StructType::HostNvmeTopology => Ok(from.as_any_box().downcast::<HostNvmeTopology>()?),
9486            StructType::HostNvmeTopologyInterface => Ok(from.as_any_box().downcast::<HostNvmeTopologyInterface>()?),
9487            StructType::HostNvmeTransportParameters => Ok(from.as_any_box().downcast::<HostNvmeTransportParameters>()?),
9488            StructType::HostNvmeOpaqueTransportParameters => Ok(from.as_any_box().downcast::<HostNvmeOpaqueTransportParameters>()?),
9489            StructType::HostNvmeOverFibreChannelParameters => Ok(from.as_any_box().downcast::<HostNvmeOverFibreChannelParameters>()?),
9490            StructType::HostNvmeOverRdmaParameters => Ok(from.as_any_box().downcast::<HostNvmeOverRdmaParameters>()?),
9491            StructType::HostNvmeOverTcpParameters => Ok(from.as_any_box().downcast::<HostNvmeOverTcpParameters>()?),
9492            StructType::HostOpaqueNetworkInfo => Ok(from.as_any_box().downcast::<HostOpaqueNetworkInfo>()?),
9493            StructType::HostOpaqueSwitch => Ok(from.as_any_box().downcast::<HostOpaqueSwitch>()?),
9494            StructType::HostOpaqueSwitchPhysicalNicZone => Ok(from.as_any_box().downcast::<HostOpaqueSwitchPhysicalNicZone>()?),
9495            StructType::HostPartialMaintenanceModeRuntimeInfo => Ok(from.as_any_box().downcast::<HostPartialMaintenanceModeRuntimeInfo>()?),
9496            StructType::HostPatchManagerLocator => Ok(from.as_any_box().downcast::<HostPatchManagerLocator>()?),
9497            StructType::HostPatchManagerPatchManagerOperationSpec => Ok(from.as_any_box().downcast::<HostPatchManagerPatchManagerOperationSpec>()?),
9498            StructType::HostPatchManagerResult => Ok(from.as_any_box().downcast::<HostPatchManagerResult>()?),
9499            StructType::HostPatchManagerStatus => Ok(from.as_any_box().downcast::<HostPatchManagerStatus>()?),
9500            StructType::HostPatchManagerStatusPrerequisitePatch => Ok(from.as_any_box().downcast::<HostPatchManagerStatusPrerequisitePatch>()?),
9501            StructType::HostPathSelectionPolicyOption => Ok(from.as_any_box().downcast::<HostPathSelectionPolicyOption>()?),
9502            StructType::HostPciDevice => Ok(from.as_any_box().downcast::<HostPciDevice>()?),
9503            StructType::HostPciPassthruConfig => Ok(from.as_any_box().downcast::<HostPciPassthruConfig>()?),
9504            StructType::HostSriovConfig => Ok(from.as_any_box().downcast::<HostSriovConfig>()?),
9505            StructType::HostPciPassthruInfo => Ok(from.as_any_box().downcast::<HostPciPassthruInfo>()?),
9506            StructType::HostSriovInfo => Ok(from.as_any_box().downcast::<HostSriovInfo>()?),
9507            StructType::HostPersistentMemoryInfo => Ok(from.as_any_box().downcast::<HostPersistentMemoryInfo>()?),
9508            StructType::PhysicalNic => Ok(from.as_any_box().downcast::<PhysicalNic>()?),
9509            StructType::PhysicalNicCdpDeviceCapability => Ok(from.as_any_box().downcast::<PhysicalNicCdpDeviceCapability>()?),
9510            StructType::PhysicalNicCdpInfo => Ok(from.as_any_box().downcast::<PhysicalNicCdpInfo>()?),
9511            StructType::PhysicalNicConfig => Ok(from.as_any_box().downcast::<PhysicalNicConfig>()?),
9512            StructType::PhysicalNicLinkInfo => Ok(from.as_any_box().downcast::<PhysicalNicLinkInfo>()?),
9513            StructType::LinkLayerDiscoveryProtocolInfo => Ok(from.as_any_box().downcast::<LinkLayerDiscoveryProtocolInfo>()?),
9514            StructType::PhysicalNicHintInfo => Ok(from.as_any_box().downcast::<PhysicalNicHintInfo>()?),
9515            StructType::PhysicalNicHint => Ok(from.as_any_box().downcast::<PhysicalNicHint>()?),
9516            StructType::PhysicalNicIpHint => Ok(from.as_any_box().downcast::<PhysicalNicIpHint>()?),
9517            StructType::PhysicalNicNameHint => Ok(from.as_any_box().downcast::<PhysicalNicNameHint>()?),
9518            StructType::PhysicalNicSpec => Ok(from.as_any_box().downcast::<PhysicalNicSpec>()?),
9519            StructType::HostPlugStoreTopology => Ok(from.as_any_box().downcast::<HostPlugStoreTopology>()?),
9520            StructType::HostPlugStoreTopologyAdapter => Ok(from.as_any_box().downcast::<HostPlugStoreTopologyAdapter>()?),
9521            StructType::HostPlugStoreTopologyDevice => Ok(from.as_any_box().downcast::<HostPlugStoreTopologyDevice>()?),
9522            StructType::HostPlugStoreTopologyPath => Ok(from.as_any_box().downcast::<HostPlugStoreTopologyPath>()?),
9523            StructType::HostPlugStoreTopologyPlugin => Ok(from.as_any_box().downcast::<HostPlugStoreTopologyPlugin>()?),
9524            StructType::HostPlugStoreTopologyTarget => Ok(from.as_any_box().downcast::<HostPlugStoreTopologyTarget>()?),
9525            StructType::PnicTsoInfo => Ok(from.as_any_box().downcast::<PnicTsoInfo>()?),
9526            StructType::HostPortGroup => Ok(from.as_any_box().downcast::<HostPortGroup>()?),
9527            StructType::HostPortGroupConfig => Ok(from.as_any_box().downcast::<HostPortGroupConfig>()?),
9528            StructType::HostPortGroupPort => Ok(from.as_any_box().downcast::<HostPortGroupPort>()?),
9529            StructType::HostPortGroupSpec => Ok(from.as_any_box().downcast::<HostPortGroupSpec>()?),
9530            StructType::PowerSystemCapability => Ok(from.as_any_box().downcast::<PowerSystemCapability>()?),
9531            StructType::PowerSystemInfo => Ok(from.as_any_box().downcast::<PowerSystemInfo>()?),
9532            StructType::HostPowerPolicy => Ok(from.as_any_box().downcast::<HostPowerPolicy>()?),
9533            StructType::HostProtocolEndpoint => Ok(from.as_any_box().downcast::<HostProtocolEndpoint>()?),
9534            StructType::HostPtpConfig => Ok(from.as_any_box().downcast::<HostPtpConfig>()?),
9535            StructType::HostPtpConfigPtpPort => Ok(from.as_any_box().downcast::<HostPtpConfigPtpPort>()?),
9536            StructType::HostQualifiedName => Ok(from.as_any_box().downcast::<HostQualifiedName>()?),
9537            StructType::HostRdmaDevice => Ok(from.as_any_box().downcast::<HostRdmaDevice>()?),
9538            StructType::HostRdmaDeviceBacking => Ok(from.as_any_box().downcast::<HostRdmaDeviceBacking>()?),
9539            StructType::HostRdmaDevicePnicBacking => Ok(from.as_any_box().downcast::<HostRdmaDevicePnicBacking>()?),
9540            StructType::HostRdmaDeviceCapability => Ok(from.as_any_box().downcast::<HostRdmaDeviceCapability>()?),
9541            StructType::HostRdmaDeviceConnectionInfo => Ok(from.as_any_box().downcast::<HostRdmaDeviceConnectionInfo>()?),
9542            StructType::HostReliableMemoryInfo => Ok(from.as_any_box().downcast::<HostReliableMemoryInfo>()?),
9543            StructType::HostResignatureRescanResult => Ok(from.as_any_box().downcast::<HostResignatureRescanResult>()?),
9544            StructType::HostFirewallRuleset => Ok(from.as_any_box().downcast::<HostFirewallRuleset>()?),
9545            StructType::HostFirewallRulesetIpList => Ok(from.as_any_box().downcast::<HostFirewallRulesetIpList>()?),
9546            StructType::HostFirewallRulesetIpNetwork => Ok(from.as_any_box().downcast::<HostFirewallRulesetIpNetwork>()?),
9547            StructType::HostFirewallRule => Ok(from.as_any_box().downcast::<HostFirewallRule>()?),
9548            StructType::HostFirewallRulesetRulesetSpec => Ok(from.as_any_box().downcast::<HostFirewallRulesetRulesetSpec>()?),
9549            StructType::HostRuntimeInfo => Ok(from.as_any_box().downcast::<HostRuntimeInfo>()?),
9550            StructType::HostRuntimeInfoNetStackInstanceRuntimeInfo => Ok(from.as_any_box().downcast::<HostRuntimeInfoNetStackInstanceRuntimeInfo>()?),
9551            StructType::HostNetworkResourceRuntime => Ok(from.as_any_box().downcast::<HostNetworkResourceRuntime>()?),
9552            StructType::HostRuntimeInfoNetworkRuntimeInfo => Ok(from.as_any_box().downcast::<HostRuntimeInfoNetworkRuntimeInfo>()?),
9553            StructType::HostPlacedVirtualNicIdentifier => Ok(from.as_any_box().downcast::<HostPlacedVirtualNicIdentifier>()?),
9554            StructType::HostPnicNetworkResourceInfo => Ok(from.as_any_box().downcast::<HostPnicNetworkResourceInfo>()?),
9555            StructType::HostRuntimeInfoStateEncryptionInfo => Ok(from.as_any_box().downcast::<HostRuntimeInfoStateEncryptionInfo>()?),
9556            StructType::HostScsiDiskPartition => Ok(from.as_any_box().downcast::<HostScsiDiskPartition>()?),
9557            StructType::ScsiLunCapabilities => Ok(from.as_any_box().downcast::<ScsiLunCapabilities>()?),
9558            StructType::ScsiLunDescriptor => Ok(from.as_any_box().downcast::<ScsiLunDescriptor>()?),
9559            StructType::ScsiLunDurableName => Ok(from.as_any_box().downcast::<ScsiLunDurableName>()?),
9560            StructType::HostScsiTopology => Ok(from.as_any_box().downcast::<HostScsiTopology>()?),
9561            StructType::HostScsiTopologyInterface => Ok(from.as_any_box().downcast::<HostScsiTopologyInterface>()?),
9562            StructType::HostScsiTopologyLun => Ok(from.as_any_box().downcast::<HostScsiTopologyLun>()?),
9563            StructType::HostScsiTopologyTarget => Ok(from.as_any_box().downcast::<HostScsiTopologyTarget>()?),
9564            StructType::HostSecuritySpec => Ok(from.as_any_box().downcast::<HostSecuritySpec>()?),
9565            StructType::HostService => Ok(from.as_any_box().downcast::<HostService>()?),
9566            StructType::HostServiceSourcePackage => Ok(from.as_any_box().downcast::<HostServiceSourcePackage>()?),
9567            StructType::HostServiceConfig => Ok(from.as_any_box().downcast::<HostServiceConfig>()?),
9568            StructType::HostServiceInfo => Ok(from.as_any_box().downcast::<HostServiceInfo>()?),
9569            StructType::HostSevInfo => Ok(from.as_any_box().downcast::<HostSevInfo>()?),
9570            StructType::HostSgxInfo => Ok(from.as_any_box().downcast::<HostSgxInfo>()?),
9571            StructType::HostSgxRegistrationInfo => Ok(from.as_any_box().downcast::<HostSgxRegistrationInfo>()?),
9572            StructType::HostSharedGpuCapabilities => Ok(from.as_any_box().downcast::<HostSharedGpuCapabilities>()?),
9573            StructType::HostSnmpSystemAgentLimits => Ok(from.as_any_box().downcast::<HostSnmpSystemAgentLimits>()?),
9574            StructType::HostSnmpConfigSpec => Ok(from.as_any_box().downcast::<HostSnmpConfigSpec>()?),
9575            StructType::HostSnmpDestination => Ok(from.as_any_box().downcast::<HostSnmpDestination>()?),
9576            StructType::SoftwarePackage => Ok(from.as_any_box().downcast::<SoftwarePackage>()?),
9577            StructType::SoftwarePackageCapability => Ok(from.as_any_box().downcast::<SoftwarePackageCapability>()?),
9578            StructType::Relation => Ok(from.as_any_box().downcast::<Relation>()?),
9579            StructType::HostSriovDevicePoolInfo => Ok(from.as_any_box().downcast::<HostSriovDevicePoolInfo>()?),
9580            StructType::HostSriovNetworkDevicePoolInfo => Ok(from.as_any_box().downcast::<HostSriovNetworkDevicePoolInfo>()?),
9581            StructType::HostSslThumbprintInfo => Ok(from.as_any_box().downcast::<HostSslThumbprintInfo>()?),
9582            StructType::HostStorageArrayTypePolicyOption => Ok(from.as_any_box().downcast::<HostStorageArrayTypePolicyOption>()?),
9583            StructType::HostStorageDeviceInfo => Ok(from.as_any_box().downcast::<HostStorageDeviceInfo>()?),
9584            StructType::HostStorageSystemDiskLocatorLedResult => Ok(from.as_any_box().downcast::<HostStorageSystemDiskLocatorLedResult>()?),
9585            StructType::HostStorageSystemScsiLunResult => Ok(from.as_any_box().downcast::<HostStorageSystemScsiLunResult>()?),
9586            StructType::HostStorageSystemVmfsVolumeResult => Ok(from.as_any_box().downcast::<HostStorageSystemVmfsVolumeResult>()?),
9587            StructType::HostListSummary => Ok(from.as_any_box().downcast::<HostListSummary>()?),
9588            StructType::HostConfigSummary => Ok(from.as_any_box().downcast::<HostConfigSummary>()?),
9589            StructType::HostListSummaryGatewaySummary => Ok(from.as_any_box().downcast::<HostListSummaryGatewaySummary>()?),
9590            StructType::HostHardwareSummary => Ok(from.as_any_box().downcast::<HostHardwareSummary>()?),
9591            StructType::HostListSummaryQuickStats => Ok(from.as_any_box().downcast::<HostListSummaryQuickStats>()?),
9592            StructType::SystemEventInfo => Ok(from.as_any_box().downcast::<SystemEventInfo>()?),
9593            StructType::HostSystemHealthInfo => Ok(from.as_any_box().downcast::<HostSystemHealthInfo>()?),
9594            StructType::HostSystemIdentificationInfo => Ok(from.as_any_box().downcast::<HostSystemIdentificationInfo>()?),
9595            StructType::HostSystemInfo => Ok(from.as_any_box().downcast::<HostSystemInfo>()?),
9596            StructType::HostSystemResourceInfo => Ok(from.as_any_box().downcast::<HostSystemResourceInfo>()?),
9597            StructType::HostSystemSwapConfiguration => Ok(from.as_any_box().downcast::<HostSystemSwapConfiguration>()?),
9598            StructType::HostSystemSwapConfigurationSystemSwapOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationSystemSwapOption>()?),
9599            StructType::HostSystemSwapConfigurationDatastoreOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationDatastoreOption>()?),
9600            StructType::HostSystemSwapConfigurationDisabledOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationDisabledOption>()?),
9601            StructType::HostSystemSwapConfigurationHostCacheOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationHostCacheOption>()?),
9602            StructType::HostSystemSwapConfigurationHostLocalSwapOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationHostLocalSwapOption>()?),
9603            StructType::HostTargetTransport => Ok(from.as_any_box().downcast::<HostTargetTransport>()?),
9604            StructType::HostBlockAdapterTargetTransport => Ok(from.as_any_box().downcast::<HostBlockAdapterTargetTransport>()?),
9605            StructType::HostFibreChannelTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelTargetTransport>()?),
9606            StructType::HostFibreChannelOverEthernetTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetTargetTransport>()?),
9607            StructType::HostInternetScsiTargetTransport => Ok(from.as_any_box().downcast::<HostInternetScsiTargetTransport>()?),
9608            StructType::HostParallelScsiTargetTransport => Ok(from.as_any_box().downcast::<HostParallelScsiTargetTransport>()?),
9609            StructType::HostPcieTargetTransport => Ok(from.as_any_box().downcast::<HostPcieTargetTransport>()?),
9610            StructType::HostRdmaTargetTransport => Ok(from.as_any_box().downcast::<HostRdmaTargetTransport>()?),
9611            StructType::HostSerialAttachedTargetTransport => Ok(from.as_any_box().downcast::<HostSerialAttachedTargetTransport>()?),
9612            StructType::HostTcpTargetTransport => Ok(from.as_any_box().downcast::<HostTcpTargetTransport>()?),
9613            StructType::HostTdxInfo => Ok(from.as_any_box().downcast::<HostTdxInfo>()?),
9614            StructType::HostTpmAttestationInfo => Ok(from.as_any_box().downcast::<HostTpmAttestationInfo>()?),
9615            StructType::HostTpmAttestationReport => Ok(from.as_any_box().downcast::<HostTpmAttestationReport>()?),
9616            StructType::HostTpmEventDetails => Ok(from.as_any_box().downcast::<HostTpmEventDetails>()?),
9617            StructType::HostTpmBootCompleteEventDetails => Ok(from.as_any_box().downcast::<HostTpmBootCompleteEventDetails>()?),
9618            StructType::HostTpmBootSecurityOptionEventDetails => Ok(from.as_any_box().downcast::<HostTpmBootSecurityOptionEventDetails>()?),
9619            StructType::HostTpmNvTagEventDetails => Ok(from.as_any_box().downcast::<HostTpmNvTagEventDetails>()?),
9620            StructType::HostTpmSignerEventDetails => Ok(from.as_any_box().downcast::<HostTpmSignerEventDetails>()?),
9621            StructType::HostTpmCommandEventDetails => Ok(from.as_any_box().downcast::<HostTpmCommandEventDetails>()?),
9622            StructType::HostTpmOptionEventDetails => Ok(from.as_any_box().downcast::<HostTpmOptionEventDetails>()?),
9623            StructType::HostTpmSoftwareComponentEventDetails => Ok(from.as_any_box().downcast::<HostTpmSoftwareComponentEventDetails>()?),
9624            StructType::HostTpmVersionEventDetails => Ok(from.as_any_box().downcast::<HostTpmVersionEventDetails>()?),
9625            StructType::HostTpmEventLogEntry => Ok(from.as_any_box().downcast::<HostTpmEventLogEntry>()?),
9626            StructType::HostTrustAuthorityAttestationInfo => Ok(from.as_any_box().downcast::<HostTrustAuthorityAttestationInfo>()?),
9627            StructType::HostUnresolvedVmfsExtent => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsExtent>()?),
9628            StructType::HostUnresolvedVmfsResignatureSpec => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsResignatureSpec>()?),
9629            StructType::HostUnresolvedVmfsResolutionResult => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsResolutionResult>()?),
9630            StructType::HostUnresolvedVmfsResolutionSpec => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsResolutionSpec>()?),
9631            StructType::HostUnresolvedVmfsVolume => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsVolume>()?),
9632            StructType::HostUnresolvedVmfsVolumeResolveStatus => Ok(from.as_any_box().downcast::<HostUnresolvedVmfsVolumeResolveStatus>()?),
9633            StructType::HostVFlashManagerVFlashCacheConfigInfo => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashCacheConfigInfo>()?),
9634            StructType::HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashCacheConfigInfoVFlashModuleConfigOption>()?),
9635            StructType::HostVFlashManagerVFlashCacheConfigSpec => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashCacheConfigSpec>()?),
9636            StructType::HostVFlashManagerVFlashConfigInfo => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashConfigInfo>()?),
9637            StructType::HostVFlashManagerVFlashResourceConfigInfo => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashResourceConfigInfo>()?),
9638            StructType::HostVFlashManagerVFlashResourceConfigSpec => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashResourceConfigSpec>()?),
9639            StructType::HostVFlashManagerVFlashResourceRunTimeInfo => Ok(from.as_any_box().downcast::<HostVFlashManagerVFlashResourceRunTimeInfo>()?),
9640            StructType::HostVFlashResourceConfigurationResult => Ok(from.as_any_box().downcast::<HostVFlashResourceConfigurationResult>()?),
9641            StructType::HostVMotionConfig => Ok(from.as_any_box().downcast::<HostVMotionConfig>()?),
9642            StructType::HostVMotionInfo => Ok(from.as_any_box().downcast::<HostVMotionInfo>()?),
9643            StructType::HostVMotionManagerDstInstantCloneResult => Ok(from.as_any_box().downcast::<HostVMotionManagerDstInstantCloneResult>()?),
9644            StructType::HostVMotionManagerSrcInstantCloneResult => Ok(from.as_any_box().downcast::<HostVMotionManagerSrcInstantCloneResult>()?),
9645            StructType::HostVMotionNetConfig => Ok(from.as_any_box().downcast::<HostVMotionNetConfig>()?),
9646            StructType::VimHostVsanStretchedClusterHostCapability => Ok(from.as_any_box().downcast::<VimHostVsanStretchedClusterHostCapability>()?),
9647            StructType::HostVffsSpec => Ok(from.as_any_box().downcast::<HostVffsSpec>()?),
9648            StructType::HostVirtualNic => Ok(from.as_any_box().downcast::<HostVirtualNic>()?),
9649            StructType::HostVirtualNicConfig => Ok(from.as_any_box().downcast::<HostVirtualNicConfig>()?),
9650            StructType::HostVirtualNicIpRouteSpec => Ok(from.as_any_box().downcast::<HostVirtualNicIpRouteSpec>()?),
9651            StructType::HostVirtualNicOpaqueNetworkSpec => Ok(from.as_any_box().downcast::<HostVirtualNicOpaqueNetworkSpec>()?),
9652            StructType::HostVirtualNicSpec => Ok(from.as_any_box().downcast::<HostVirtualNicSpec>()?),
9653            StructType::HostVirtualNicConnection => Ok(from.as_any_box().downcast::<HostVirtualNicConnection>()?),
9654            StructType::VirtualNicManagerNetConfig => Ok(from.as_any_box().downcast::<VirtualNicManagerNetConfig>()?),
9655            StructType::HostVirtualNicManagerNicTypeSelection => Ok(from.as_any_box().downcast::<HostVirtualNicManagerNicTypeSelection>()?),
9656            StructType::HostVirtualNicManagerInfo => Ok(from.as_any_box().downcast::<HostVirtualNicManagerInfo>()?),
9657            StructType::HostVirtualSwitch => Ok(from.as_any_box().downcast::<HostVirtualSwitch>()?),
9658            StructType::HostVirtualSwitchBeaconConfig => Ok(from.as_any_box().downcast::<HostVirtualSwitchBeaconConfig>()?),
9659            StructType::HostVirtualSwitchBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchBridge>()?),
9660            StructType::HostVirtualSwitchAutoBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchAutoBridge>()?),
9661            StructType::HostVirtualSwitchBondBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchBondBridge>()?),
9662            StructType::HostVirtualSwitchSimpleBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchSimpleBridge>()?),
9663            StructType::HostVirtualSwitchConfig => Ok(from.as_any_box().downcast::<HostVirtualSwitchConfig>()?),
9664            StructType::HostVirtualSwitchSpec => Ok(from.as_any_box().downcast::<HostVirtualSwitchSpec>()?),
9665            StructType::HostVmciAccessManagerAccessSpec => Ok(from.as_any_box().downcast::<HostVmciAccessManagerAccessSpec>()?),
9666            StructType::VmfsDatastoreOption => Ok(from.as_any_box().downcast::<VmfsDatastoreOption>()?),
9667            StructType::VmfsDatastoreBaseOption => Ok(from.as_any_box().downcast::<VmfsDatastoreBaseOption>()?),
9668            StructType::VmfsDatastoreMultipleExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreMultipleExtentOption>()?),
9669            StructType::VmfsDatastoreSingleExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreSingleExtentOption>()?),
9670            StructType::VmfsDatastoreAllExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreAllExtentOption>()?),
9671            StructType::VmfsDatastoreSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreSpec>()?),
9672            StructType::VmfsDatastoreCreateSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreCreateSpec>()?),
9673            StructType::VmfsDatastoreExpandSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreExpandSpec>()?),
9674            StructType::VmfsDatastoreExtendSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreExtendSpec>()?),
9675            StructType::HostVmfsRescanResult => Ok(from.as_any_box().downcast::<HostVmfsRescanResult>()?),
9676            StructType::VmfsConfigOption => Ok(from.as_any_box().downcast::<VmfsConfigOption>()?),
9677            StructType::HostVmfsSpec => Ok(from.as_any_box().downcast::<HostVmfsSpec>()?),
9678            StructType::VmfsUnmapBandwidthSpec => Ok(from.as_any_box().downcast::<VmfsUnmapBandwidthSpec>()?),
9679            StructType::VsanBasicDeviceInfo => Ok(from.as_any_box().downcast::<VsanBasicDeviceInfo>()?),
9680            StructType::VsanClusterMembershipInfo => Ok(from.as_any_box().downcast::<VsanClusterMembershipInfo>()?),
9681            StructType::VsanDaemonHealth => Ok(from.as_any_box().downcast::<VsanDaemonHealth>()?),
9682            StructType::VsanDiskEncryptionHealth => Ok(from.as_any_box().downcast::<VsanDiskEncryptionHealth>()?),
9683            StructType::VsanDiskRebalanceResult => Ok(from.as_any_box().downcast::<VsanDiskRebalanceResult>()?),
9684            StructType::VsanDitEncryptionHealthSummary => Ok(from.as_any_box().downcast::<VsanDitEncryptionHealthSummary>()?),
9685            StructType::VsanEncryptionHealthSummary => Ok(from.as_any_box().downcast::<VsanEncryptionHealthSummary>()?),
9686            StructType::VsanFailedRepairObjectResult => Ok(from.as_any_box().downcast::<VsanFailedRepairObjectResult>()?),
9687            StructType::VsanFileServerHealthSummary => Ok(from.as_any_box().downcast::<VsanFileServerHealthSummary>()?),
9688            StructType::VsanFileServiceBalanceHealth => Ok(from.as_any_box().downcast::<VsanFileServiceBalanceHealth>()?),
9689            StructType::VsanFileServiceHealthSummary => Ok(from.as_any_box().downcast::<VsanFileServiceHealthSummary>()?),
9690            StructType::VsanFileServiceRootFsHealth => Ok(from.as_any_box().downcast::<VsanFileServiceRootFsHealth>()?),
9691            StructType::VsanFileServiceShareHealthSummary => Ok(from.as_any_box().downcast::<VsanFileServiceShareHealthSummary>()?),
9692            StructType::VsanHclCommonDeviceInfo => Ok(from.as_any_box().downcast::<VsanHclCommonDeviceInfo>()?),
9693            StructType::VsanHclNicInfo => Ok(from.as_any_box().downcast::<VsanHclNicInfo>()?),
9694            StructType::VsanHclComputeResource => Ok(from.as_any_box().downcast::<VsanHclComputeResource>()?),
9695            StructType::VsanHclControllerInfo => Ok(from.as_any_box().downcast::<VsanHclControllerInfo>()?),
9696            StructType::VsanHclDiskInfo => Ok(from.as_any_box().downcast::<VsanHclDiskInfo>()?),
9697            StructType::VsanHclFirmwareFile => Ok(from.as_any_box().downcast::<VsanHclFirmwareFile>()?),
9698            StructType::VsanHclFirmwareUpdateSpec => Ok(from.as_any_box().downcast::<VsanHclFirmwareUpdateSpec>()?),
9699            StructType::VsanHclMemInfo => Ok(from.as_any_box().downcast::<VsanHclMemInfo>()?),
9700            StructType::VsanHealthQuerySpec => Ok(from.as_any_box().downcast::<VsanHealthQuerySpec>()?),
9701            StructType::VsanHostCimProviderInfo => Ok(from.as_any_box().downcast::<VsanHostCimProviderInfo>()?),
9702            StructType::VsanHostEmmSummary => Ok(from.as_any_box().downcast::<VsanHostEmmSummary>()?),
9703            StructType::VsanHostFwComponent => Ok(from.as_any_box().downcast::<VsanHostFwComponent>()?),
9704            StructType::VsanHostGlobalDedupConfigHealthSummary => Ok(from.as_any_box().downcast::<VsanHostGlobalDedupConfigHealthSummary>()?),
9705            StructType::VsanHostHclInfo => Ok(from.as_any_box().downcast::<VsanHostHclInfo>()?),
9706            StructType::VsanHostHealthSystemStatusResult => Ok(from.as_any_box().downcast::<VsanHostHealthSystemStatusResult>()?),
9707            StructType::VsanHostHwDeviceId => Ok(from.as_any_box().downcast::<VsanHostHwDeviceId>()?),
9708            StructType::VsanHostIoInsightInfo => Ok(from.as_any_box().downcast::<VsanHostIoInsightInfo>()?),
9709            StructType::VsanHostQueryCheckLimitsSpec => Ok(from.as_any_box().downcast::<VsanHostQueryCheckLimitsSpec>()?),
9710            StructType::VsanHostReference => Ok(from.as_any_box().downcast::<VsanHostReference>()?),
9711            StructType::VsanHostVirtualApplianceInfo => Ok(from.as_any_box().downcast::<VsanHostVirtualApplianceInfo>()?),
9712            StructType::VsanHostVmdkLoadTestResult => Ok(from.as_any_box().downcast::<VsanHostVmdkLoadTestResult>()?),
9713            StructType::VsanHwToVcgInfoMapping => Ok(from.as_any_box().downcast::<VsanHwToVcgInfoMapping>()?),
9714            StructType::HostVsanInternalSystemCmmdsQuery => Ok(from.as_any_box().downcast::<HostVsanInternalSystemCmmdsQuery>()?),
9715            StructType::HostVsanInternalSystemDeleteVsanObjectsResult => Ok(from.as_any_box().downcast::<HostVsanInternalSystemDeleteVsanObjectsResult>()?),
9716            StructType::VsanNewPolicyBatch => Ok(from.as_any_box().downcast::<VsanNewPolicyBatch>()?),
9717            StructType::VsanPolicyChangeBatch => Ok(from.as_any_box().downcast::<VsanPolicyChangeBatch>()?),
9718            StructType::VsanPolicyCost => Ok(from.as_any_box().downcast::<VsanPolicyCost>()?),
9719            StructType::VsanPolicySatisfiability => Ok(from.as_any_box().downcast::<VsanPolicySatisfiability>()?),
9720            StructType::HostVsanInternalSystemVsanObjectOperationResult => Ok(from.as_any_box().downcast::<HostVsanInternalSystemVsanObjectOperationResult>()?),
9721            StructType::HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult => Ok(from.as_any_box().downcast::<HostVsanInternalSystemVsanPhysicalDiskDiagnosticsResult>()?),
9722            StructType::VsanIoInsightInfo => Ok(from.as_any_box().downcast::<VsanIoInsightInfo>()?),
9723            StructType::VsanIperfClientSpec => Ok(from.as_any_box().downcast::<VsanIperfClientSpec>()?),
9724            StructType::VsanKmsHealth => Ok(from.as_any_box().downcast::<VsanKmsHealth>()?),
9725            StructType::VsanLimitHealthResult => Ok(from.as_any_box().downcast::<VsanLimitHealthResult>()?),
9726            StructType::VsanNetworkDiagnosticsHealthInfo => Ok(from.as_any_box().downcast::<VsanNetworkDiagnosticsHealthInfo>()?),
9727            StructType::VsanNetworkHealthResult => Ok(from.as_any_box().downcast::<VsanNetworkHealthResult>()?),
9728            StructType::VsanNetworkLoadTestResult => Ok(from.as_any_box().downcast::<VsanNetworkLoadTestResult>()?),
9729            StructType::VsanNetworkPeerHealthResult => Ok(from.as_any_box().downcast::<VsanNetworkPeerHealthResult>()?),
9730            StructType::VsanNicRdmaInfo => Ok(from.as_any_box().downcast::<VsanNicRdmaInfo>()?),
9731            StructType::VsanObjectHealth => Ok(from.as_any_box().downcast::<VsanObjectHealth>()?),
9732            StructType::VsanObjectOverallHealth => Ok(from.as_any_box().downcast::<VsanObjectOverallHealth>()?),
9733            StructType::VsanPhysicalDiskHealth => Ok(from.as_any_box().downcast::<VsanPhysicalDiskHealth>()?),
9734            StructType::VsanPhysicalDiskHealthSummary => Ok(from.as_any_box().downcast::<VsanPhysicalDiskHealthSummary>()?),
9735            StructType::VsanProactiveRebalanceInfoEx => Ok(from.as_any_box().downcast::<VsanProactiveRebalanceInfoEx>()?),
9736            StructType::VsanQueryResultHostInfo => Ok(from.as_any_box().downcast::<VsanQueryResultHostInfo>()?),
9737            StructType::VsanRepairObjectsResult => Ok(from.as_any_box().downcast::<VsanRepairObjectsResult>()?),
9738            StructType::VsanResourceHealth => Ok(from.as_any_box().downcast::<VsanResourceHealth>()?),
9739            StructType::VsanServerClusterInfo => Ok(from.as_any_box().downcast::<VsanServerClusterInfo>()?),
9740            StructType::VsanSmartDiskStats => Ok(from.as_any_box().downcast::<VsanSmartDiskStats>()?),
9741            StructType::VsanSmartParameter => Ok(from.as_any_box().downcast::<VsanSmartParameter>()?),
9742            StructType::VsanSmartStatsHostSummary => Ok(from.as_any_box().downcast::<VsanSmartStatsHostSummary>()?),
9743            StructType::VsanVcgDeviceInfo => Ok(from.as_any_box().downcast::<VsanVcgDeviceInfo>()?),
9744            StructType::VsanVmdkIoLoadSpec => Ok(from.as_any_box().downcast::<VsanVmdkIoLoadSpec>()?),
9745            StructType::VsanVmdkLoadTestResult => Ok(from.as_any_box().downcast::<VsanVmdkLoadTestResult>()?),
9746            StructType::VsanVmdkLoadTestSpec => Ok(from.as_any_box().downcast::<VsanVmdkLoadTestSpec>()?),
9747            StructType::VsanVsanPcapResult => Ok(from.as_any_box().downcast::<VsanVsanPcapResult>()?),
9748            StructType::HostVvolNqn => Ok(from.as_any_box().downcast::<HostVvolNqn>()?),
9749            StructType::VVolHostPe => Ok(from.as_any_box().downcast::<VVolHostPe>()?),
9750            StructType::HostVvolVolumeHostVvolNqn => Ok(from.as_any_box().downcast::<HostVvolVolumeHostVvolNqn>()?),
9751            StructType::HostVvolVolumeSpecification => Ok(from.as_any_box().downcast::<HostVvolVolumeSpecification>()?),
9752            StructType::NetDhcpConfigInfo => Ok(from.as_any_box().downcast::<NetDhcpConfigInfo>()?),
9753            StructType::NetDhcpConfigInfoDhcpOptions => Ok(from.as_any_box().downcast::<NetDhcpConfigInfoDhcpOptions>()?),
9754            StructType::NetDhcpConfigSpec => Ok(from.as_any_box().downcast::<NetDhcpConfigSpec>()?),
9755            StructType::NetDhcpConfigSpecDhcpOptionsSpec => Ok(from.as_any_box().downcast::<NetDhcpConfigSpecDhcpOptionsSpec>()?),
9756            StructType::NetDnsConfigInfo => Ok(from.as_any_box().downcast::<NetDnsConfigInfo>()?),
9757            StructType::NetDnsConfigSpec => Ok(from.as_any_box().downcast::<NetDnsConfigSpec>()?),
9758            StructType::NetIpConfigInfo => Ok(from.as_any_box().downcast::<NetIpConfigInfo>()?),
9759            StructType::NetIpConfigInfoIpAddress => Ok(from.as_any_box().downcast::<NetIpConfigInfoIpAddress>()?),
9760            StructType::NetIpConfigSpec => Ok(from.as_any_box().downcast::<NetIpConfigSpec>()?),
9761            StructType::NetIpConfigSpecIpAddressSpec => Ok(from.as_any_box().downcast::<NetIpConfigSpecIpAddressSpec>()?),
9762            StructType::NetIpRouteConfigInfo => Ok(from.as_any_box().downcast::<NetIpRouteConfigInfo>()?),
9763            StructType::NetIpRouteConfigInfoGateway => Ok(from.as_any_box().downcast::<NetIpRouteConfigInfoGateway>()?),
9764            StructType::NetIpRouteConfigInfoIpRoute => Ok(from.as_any_box().downcast::<NetIpRouteConfigInfoIpRoute>()?),
9765            StructType::NetIpRouteConfigSpec => Ok(from.as_any_box().downcast::<NetIpRouteConfigSpec>()?),
9766            StructType::NetIpRouteConfigSpecGatewaySpec => Ok(from.as_any_box().downcast::<NetIpRouteConfigSpecGatewaySpec>()?),
9767            StructType::NetIpRouteConfigSpecIpRouteSpec => Ok(from.as_any_box().downcast::<NetIpRouteConfigSpecIpRouteSpec>()?),
9768            StructType::NetIpStackInfo => Ok(from.as_any_box().downcast::<NetIpStackInfo>()?),
9769            StructType::NetIpStackInfoDefaultRouter => Ok(from.as_any_box().downcast::<NetIpStackInfoDefaultRouter>()?),
9770            StructType::NetIpStackInfoNetToMedia => Ok(from.as_any_box().downcast::<NetIpStackInfoNetToMedia>()?),
9771            StructType::NetBiosConfigInfo => Ok(from.as_any_box().downcast::<NetBiosConfigInfo>()?),
9772            StructType::WinNetBiosConfigInfo => Ok(from.as_any_box().downcast::<WinNetBiosConfigInfo>()?),
9773            StructType::ArrayUpdateSpec => Ok(from.as_any_box().downcast::<ArrayUpdateSpec>()?),
9774            StructType::ClusterDasVmConfigSpec => Ok(from.as_any_box().downcast::<ClusterDasVmConfigSpec>()?),
9775            StructType::ClusterDatastoreUpdateSpec => Ok(from.as_any_box().downcast::<ClusterDatastoreUpdateSpec>()?),
9776            StructType::ClusterDpmHostConfigSpec => Ok(from.as_any_box().downcast::<ClusterDpmHostConfigSpec>()?),
9777            StructType::ClusterDrsVmConfigSpec => Ok(from.as_any_box().downcast::<ClusterDrsVmConfigSpec>()?),
9778            StructType::ClusterGroupSpec => Ok(from.as_any_box().downcast::<ClusterGroupSpec>()?),
9779            StructType::ClusterPreemptibleVmPairSpec => Ok(from.as_any_box().downcast::<ClusterPreemptibleVmPairSpec>()?),
9780            StructType::ClusterRuleSpec => Ok(from.as_any_box().downcast::<ClusterRuleSpec>()?),
9781            StructType::ClusterTagCategoryUpdateSpec => Ok(from.as_any_box().downcast::<ClusterTagCategoryUpdateSpec>()?),
9782            StructType::ClusterVmOrchestrationSpec => Ok(from.as_any_box().downcast::<ClusterVmOrchestrationSpec>()?),
9783            StructType::StorageDrsOptionSpec => Ok(from.as_any_box().downcast::<StorageDrsOptionSpec>()?),
9784            StructType::StorageDrsVmConfigSpec => Ok(from.as_any_box().downcast::<StorageDrsVmConfigSpec>()?),
9785            StructType::VAppOvfSectionSpec => Ok(from.as_any_box().downcast::<VAppOvfSectionSpec>()?),
9786            StructType::VAppProductSpec => Ok(from.as_any_box().downcast::<VAppProductSpec>()?),
9787            StructType::VAppPropertySpec => Ok(from.as_any_box().downcast::<VAppPropertySpec>()?),
9788            StructType::VirtualMachineCpuIdInfoSpec => Ok(from.as_any_box().downcast::<VirtualMachineCpuIdInfoSpec>()?),
9789            StructType::OptionType => Ok(from.as_any_box().downcast::<OptionType>()?),
9790            StructType::BoolOption => Ok(from.as_any_box().downcast::<BoolOption>()?),
9791            StructType::ChoiceOption => Ok(from.as_any_box().downcast::<ChoiceOption>()?),
9792            StructType::FloatOption => Ok(from.as_any_box().downcast::<FloatOption>()?),
9793            StructType::IntOption => Ok(from.as_any_box().downcast::<IntOption>()?),
9794            StructType::LongOption => Ok(from.as_any_box().downcast::<LongOption>()?),
9795            StructType::StringOption => Ok(from.as_any_box().downcast::<StringOption>()?),
9796            StructType::OptionValue => Ok(from.as_any_box().downcast::<OptionValue>()?),
9797            StructType::HostInternetScsiHbaParamValue => Ok(from.as_any_box().downcast::<HostInternetScsiHbaParamValue>()?),
9798            StructType::ApplyProfile => Ok(from.as_any_box().downcast::<ApplyProfile>()?),
9799            StructType::ProfileApplyProfileElement => Ok(from.as_any_box().downcast::<ProfileApplyProfileElement>()?),
9800            StructType::ActiveDirectoryProfile => Ok(from.as_any_box().downcast::<ActiveDirectoryProfile>()?),
9801            StructType::AuthenticationProfile => Ok(from.as_any_box().downcast::<AuthenticationProfile>()?),
9802            StructType::DateTimeProfile => Ok(from.as_any_box().downcast::<DateTimeProfile>()?),
9803            StructType::DvsProfile => Ok(from.as_any_box().downcast::<DvsProfile>()?),
9804            StructType::DvsVNicProfile => Ok(from.as_any_box().downcast::<DvsVNicProfile>()?),
9805            StructType::DvsHostVNicProfile => Ok(from.as_any_box().downcast::<DvsHostVNicProfile>()?),
9806            StructType::DvsServiceConsoleVNicProfile => Ok(from.as_any_box().downcast::<DvsServiceConsoleVNicProfile>()?),
9807            StructType::FirewallProfile => Ok(from.as_any_box().downcast::<FirewallProfile>()?),
9808            StructType::FirewallProfileRulesetProfile => Ok(from.as_any_box().downcast::<FirewallProfileRulesetProfile>()?),
9809            StructType::HostApplyProfile => Ok(from.as_any_box().downcast::<HostApplyProfile>()?),
9810            StructType::HostMemoryProfile => Ok(from.as_any_box().downcast::<HostMemoryProfile>()?),
9811            StructType::IpAddressProfile => Ok(from.as_any_box().downcast::<IpAddressProfile>()?),
9812            StructType::IpRouteProfile => Ok(from.as_any_box().downcast::<IpRouteProfile>()?),
9813            StructType::NasStorageProfile => Ok(from.as_any_box().downcast::<NasStorageProfile>()?),
9814            StructType::NetStackInstanceProfile => Ok(from.as_any_box().downcast::<NetStackInstanceProfile>()?),
9815            StructType::NetworkPolicyProfile => Ok(from.as_any_box().downcast::<NetworkPolicyProfile>()?),
9816            StructType::NetworkProfile => Ok(from.as_any_box().downcast::<NetworkProfile>()?),
9817            StructType::NetworkProfileDnsConfigProfile => Ok(from.as_any_box().downcast::<NetworkProfileDnsConfigProfile>()?),
9818            StructType::NsxHostVNicProfile => Ok(from.as_any_box().downcast::<NsxHostVNicProfile>()?),
9819            StructType::OpaqueSwitchProfile => Ok(from.as_any_box().downcast::<OpaqueSwitchProfile>()?),
9820            StructType::OptionProfile => Ok(from.as_any_box().downcast::<OptionProfile>()?),
9821            StructType::PermissionProfile => Ok(from.as_any_box().downcast::<PermissionProfile>()?),
9822            StructType::PhysicalNicProfile => Ok(from.as_any_box().downcast::<PhysicalNicProfile>()?),
9823            StructType::PnicUplinkProfile => Ok(from.as_any_box().downcast::<PnicUplinkProfile>()?),
9824            StructType::PortGroupProfile => Ok(from.as_any_box().downcast::<PortGroupProfile>()?),
9825            StructType::HostPortGroupProfile => Ok(from.as_any_box().downcast::<HostPortGroupProfile>()?),
9826            StructType::ServiceConsolePortGroupProfile => Ok(from.as_any_box().downcast::<ServiceConsolePortGroupProfile>()?),
9827            StructType::VmPortGroupProfile => Ok(from.as_any_box().downcast::<VmPortGroupProfile>()?),
9828            StructType::VirtualSwitchSelectionProfile => Ok(from.as_any_box().downcast::<VirtualSwitchSelectionProfile>()?),
9829            StructType::VlanProfile => Ok(from.as_any_box().downcast::<VlanProfile>()?),
9830            StructType::SecurityProfile => Ok(from.as_any_box().downcast::<SecurityProfile>()?),
9831            StructType::ServiceProfile => Ok(from.as_any_box().downcast::<ServiceProfile>()?),
9832            StructType::StaticRouteProfile => Ok(from.as_any_box().downcast::<StaticRouteProfile>()?),
9833            StructType::StorageProfile => Ok(from.as_any_box().downcast::<StorageProfile>()?),
9834            StructType::UserGroupProfile => Ok(from.as_any_box().downcast::<UserGroupProfile>()?),
9835            StructType::UserProfile => Ok(from.as_any_box().downcast::<UserProfile>()?),
9836            StructType::VirtualSwitchProfile => Ok(from.as_any_box().downcast::<VirtualSwitchProfile>()?),
9837            StructType::LinkProfile => Ok(from.as_any_box().downcast::<LinkProfile>()?),
9838            StructType::NumPortsProfile => Ok(from.as_any_box().downcast::<NumPortsProfile>()?),
9839            StructType::ProfileApplyProfileProperty => Ok(from.as_any_box().downcast::<ProfileApplyProfileProperty>()?),
9840            StructType::ComplianceLocator => Ok(from.as_any_box().downcast::<ComplianceLocator>()?),
9841            StructType::ComplianceProfile => Ok(from.as_any_box().downcast::<ComplianceProfile>()?),
9842            StructType::ComplianceResult => Ok(from.as_any_box().downcast::<ComplianceResult>()?),
9843            StructType::ComplianceFailure => Ok(from.as_any_box().downcast::<ComplianceFailure>()?),
9844            StructType::ComplianceFailureComplianceFailureValues => Ok(from.as_any_box().downcast::<ComplianceFailureComplianceFailureValues>()?),
9845            StructType::ProfileDeferredPolicyOptionParameter => Ok(from.as_any_box().downcast::<ProfileDeferredPolicyOptionParameter>()?),
9846            StructType::ProfileExpression => Ok(from.as_any_box().downcast::<ProfileExpression>()?),
9847            StructType::ProfileCompositeExpression => Ok(from.as_any_box().downcast::<ProfileCompositeExpression>()?),
9848            StructType::ProfileSimpleExpression => Ok(from.as_any_box().downcast::<ProfileSimpleExpression>()?),
9849            StructType::ProfileExpressionMetadata => Ok(from.as_any_box().downcast::<ProfileExpressionMetadata>()?),
9850            StructType::ProfileParameterMetadata => Ok(from.as_any_box().downcast::<ProfileParameterMetadata>()?),
9851            StructType::ProfileParameterMetadataParameterRelationMetadata => Ok(from.as_any_box().downcast::<ProfileParameterMetadataParameterRelationMetadata>()?),
9852            StructType::ProfilePolicy => Ok(from.as_any_box().downcast::<ProfilePolicy>()?),
9853            StructType::ProfilePolicyMetadata => Ok(from.as_any_box().downcast::<ProfilePolicyMetadata>()?),
9854            StructType::PolicyOption => Ok(from.as_any_box().downcast::<PolicyOption>()?),
9855            StructType::CompositePolicyOption => Ok(from.as_any_box().downcast::<CompositePolicyOption>()?),
9856            StructType::ProfilePolicyOptionMetadata => Ok(from.as_any_box().downcast::<ProfilePolicyOptionMetadata>()?),
9857            StructType::ProfileCompositePolicyOptionMetadata => Ok(from.as_any_box().downcast::<ProfileCompositePolicyOptionMetadata>()?),
9858            StructType::UserInputRequiredParameterMetadata => Ok(from.as_any_box().downcast::<UserInputRequiredParameterMetadata>()?),
9859            StructType::ProfileConfigInfo => Ok(from.as_any_box().downcast::<ProfileConfigInfo>()?),
9860            StructType::ClusterProfileConfigInfo => Ok(from.as_any_box().downcast::<ClusterProfileConfigInfo>()?),
9861            StructType::HostProfileConfigInfo => Ok(from.as_any_box().downcast::<HostProfileConfigInfo>()?),
9862            StructType::ProfileCreateSpec => Ok(from.as_any_box().downcast::<ProfileCreateSpec>()?),
9863            StructType::ProfileSerializedCreateSpec => Ok(from.as_any_box().downcast::<ProfileSerializedCreateSpec>()?),
9864            StructType::HostProfileSerializedHostProfileSpec => Ok(from.as_any_box().downcast::<HostProfileSerializedHostProfileSpec>()?),
9865            StructType::ClusterProfileCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileCreateSpec>()?),
9866            StructType::ClusterProfileConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigSpec>()?),
9867            StructType::ClusterProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileCompleteConfigSpec>()?),
9868            StructType::ClusterProfileConfigServiceCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigServiceCreateSpec>()?),
9869            StructType::HostProfileConfigSpec => Ok(from.as_any_box().downcast::<HostProfileConfigSpec>()?),
9870            StructType::HostProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<HostProfileCompleteConfigSpec>()?),
9871            StructType::HostProfileHostBasedConfigSpec => Ok(from.as_any_box().downcast::<HostProfileHostBasedConfigSpec>()?),
9872            StructType::ProfileDescription => Ok(from.as_any_box().downcast::<ProfileDescription>()?),
9873            StructType::ProfileDescriptionSection => Ok(from.as_any_box().downcast::<ProfileDescriptionSection>()?),
9874            StructType::ProfileMetadata => Ok(from.as_any_box().downcast::<ProfileMetadata>()?),
9875            StructType::ProfileMetadataProfileOperationMessage => Ok(from.as_any_box().downcast::<ProfileMetadataProfileOperationMessage>()?),
9876            StructType::ProfileMetadataProfileSortSpec => Ok(from.as_any_box().downcast::<ProfileMetadataProfileSortSpec>()?),
9877            StructType::ProfilePropertyPath => Ok(from.as_any_box().downcast::<ProfilePropertyPath>()?),
9878            StructType::ProfileProfileStructure => Ok(from.as_any_box().downcast::<ProfileProfileStructure>()?),
9879            StructType::ProfileProfileStructureProperty => Ok(from.as_any_box().downcast::<ProfileProfileStructureProperty>()?),
9880            StructType::AnswerFile => Ok(from.as_any_box().downcast::<AnswerFile>()?),
9881            StructType::AnswerFileStatusResult => Ok(from.as_any_box().downcast::<AnswerFileStatusResult>()?),
9882            StructType::AnswerFileStatusError => Ok(from.as_any_box().downcast::<AnswerFileStatusError>()?),
9883            StructType::ProfileExecuteResult => Ok(from.as_any_box().downcast::<ProfileExecuteResult>()?),
9884            StructType::ApplyHostProfileConfigurationSpec => Ok(from.as_any_box().downcast::<ApplyHostProfileConfigurationSpec>()?),
9885            StructType::ProfileExecuteError => Ok(from.as_any_box().downcast::<ProfileExecuteError>()?),
9886            StructType::HostProfileValidationFailureInfo => Ok(from.as_any_box().downcast::<HostProfileValidationFailureInfo>()?),
9887            StructType::HostSpecification => Ok(from.as_any_box().downcast::<HostSpecification>()?),
9888            StructType::HostSubSpecification => Ok(from.as_any_box().downcast::<HostSubSpecification>()?),
9889            StructType::AnswerFileCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileCreateSpec>()?),
9890            StructType::AnswerFileOptionsCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileOptionsCreateSpec>()?),
9891            StructType::AnswerFileSerializedCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileSerializedCreateSpec>()?),
9892            StructType::ApplyHostProfileConfigurationResult => Ok(from.as_any_box().downcast::<ApplyHostProfileConfigurationResult>()?),
9893            StructType::HostProfileManagerCompositionResult => Ok(from.as_any_box().downcast::<HostProfileManagerCompositionResult>()?),
9894            StructType::HostProfileManagerCompositionResultResultElement => Ok(from.as_any_box().downcast::<HostProfileManagerCompositionResultResultElement>()?),
9895            StructType::HostProfileManagerCompositionValidationResult => Ok(from.as_any_box().downcast::<HostProfileManagerCompositionValidationResult>()?),
9896            StructType::HostProfileManagerCompositionValidationResultResultElement => Ok(from.as_any_box().downcast::<HostProfileManagerCompositionValidationResultResultElement>()?),
9897            StructType::HostProfileManagerConfigTaskList => Ok(from.as_any_box().downcast::<HostProfileManagerConfigTaskList>()?),
9898            StructType::HostProfilesEntityCustomizations => Ok(from.as_any_box().downcast::<HostProfilesEntityCustomizations>()?),
9899            StructType::StructuredCustomizations => Ok(from.as_any_box().downcast::<StructuredCustomizations>()?),
9900            StructType::HostProfileManagerHostToConfigSpecMap => Ok(from.as_any_box().downcast::<HostProfileManagerHostToConfigSpecMap>()?),
9901            StructType::ScheduledTaskDescription => Ok(from.as_any_box().downcast::<ScheduledTaskDescription>()?),
9902            StructType::ScheduledTaskSpec => Ok(from.as_any_box().downcast::<ScheduledTaskSpec>()?),
9903            StructType::ScheduledTaskInfo => Ok(from.as_any_box().downcast::<ScheduledTaskInfo>()?),
9904            StructType::TaskScheduler => Ok(from.as_any_box().downcast::<TaskScheduler>()?),
9905            StructType::AfterStartupTaskScheduler => Ok(from.as_any_box().downcast::<AfterStartupTaskScheduler>()?),
9906            StructType::OnceTaskScheduler => Ok(from.as_any_box().downcast::<OnceTaskScheduler>()?),
9907            StructType::RecurrentTaskScheduler => Ok(from.as_any_box().downcast::<RecurrentTaskScheduler>()?),
9908            StructType::HourlyTaskScheduler => Ok(from.as_any_box().downcast::<HourlyTaskScheduler>()?),
9909            StructType::DailyTaskScheduler => Ok(from.as_any_box().downcast::<DailyTaskScheduler>()?),
9910            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
9911            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
9912            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
9913            StructType::WeeklyTaskScheduler => Ok(from.as_any_box().downcast::<WeeklyTaskScheduler>()?),
9914            StructType::ApplyStorageRecommendationResult => Ok(from.as_any_box().downcast::<ApplyStorageRecommendationResult>()?),
9915            StructType::StorageDrsAutomationConfig => Ok(from.as_any_box().downcast::<StorageDrsAutomationConfig>()?),
9916            StructType::StorageDrsConfigInfo => Ok(from.as_any_box().downcast::<StorageDrsConfigInfo>()?),
9917            StructType::StorageDrsConfigSpec => Ok(from.as_any_box().downcast::<StorageDrsConfigSpec>()?),
9918            StructType::StorageDrsIoLoadBalanceConfig => Ok(from.as_any_box().downcast::<StorageDrsIoLoadBalanceConfig>()?),
9919            StructType::PlacementAffinityRule => Ok(from.as_any_box().downcast::<PlacementAffinityRule>()?),
9920            StructType::PlacementRankResult => Ok(from.as_any_box().downcast::<PlacementRankResult>()?),
9921            StructType::PlacementRankSpec => Ok(from.as_any_box().downcast::<PlacementRankSpec>()?),
9922            StructType::StorageDrsPlacementRankVmSpec => Ok(from.as_any_box().downcast::<StorageDrsPlacementRankVmSpec>()?),
9923            StructType::StorageDrsPodConfigInfo => Ok(from.as_any_box().downcast::<StorageDrsPodConfigInfo>()?),
9924            StructType::StorageDrsPodConfigSpec => Ok(from.as_any_box().downcast::<StorageDrsPodConfigSpec>()?),
9925            StructType::StorageDrsPodSelectionSpec => Ok(from.as_any_box().downcast::<StorageDrsPodSelectionSpec>()?),
9926            StructType::PodDiskLocator => Ok(from.as_any_box().downcast::<PodDiskLocator>()?),
9927            StructType::VmPodConfigForPlacement => Ok(from.as_any_box().downcast::<VmPodConfigForPlacement>()?),
9928            StructType::StorageDrsSpaceLoadBalanceConfig => Ok(from.as_any_box().downcast::<StorageDrsSpaceLoadBalanceConfig>()?),
9929            StructType::StoragePlacementResult => Ok(from.as_any_box().downcast::<StoragePlacementResult>()?),
9930            StructType::StoragePlacementSpec => Ok(from.as_any_box().downcast::<StoragePlacementSpec>()?),
9931            StructType::StorageDrsVmConfigInfo => Ok(from.as_any_box().downcast::<StorageDrsVmConfigInfo>()?),
9932            StructType::VAppCloneSpec => Ok(from.as_any_box().downcast::<VAppCloneSpec>()?),
9933            StructType::VAppCloneSpecNetworkMappingPair => Ok(from.as_any_box().downcast::<VAppCloneSpecNetworkMappingPair>()?),
9934            StructType::VAppCloneSpecResourceMap => Ok(from.as_any_box().downcast::<VAppCloneSpecResourceMap>()?),
9935            StructType::VAppEntityConfigInfo => Ok(from.as_any_box().downcast::<VAppEntityConfigInfo>()?),
9936            StructType::VAppIpAssignmentInfo => Ok(from.as_any_box().downcast::<VAppIpAssignmentInfo>()?),
9937            StructType::IpPool => Ok(from.as_any_box().downcast::<IpPool>()?),
9938            StructType::IpPoolAssociation => Ok(from.as_any_box().downcast::<IpPoolAssociation>()?),
9939            StructType::IpPoolIpPoolConfigInfo => Ok(from.as_any_box().downcast::<IpPoolIpPoolConfigInfo>()?),
9940            StructType::VAppOvfSectionInfo => Ok(from.as_any_box().downcast::<VAppOvfSectionInfo>()?),
9941            StructType::VAppProductInfo => Ok(from.as_any_box().downcast::<VAppProductInfo>()?),
9942            StructType::VAppPropertyInfo => Ok(from.as_any_box().downcast::<VAppPropertyInfo>()?),
9943            StructType::VmConfigInfo => Ok(from.as_any_box().downcast::<VmConfigInfo>()?),
9944            StructType::VAppConfigInfo => Ok(from.as_any_box().downcast::<VAppConfigInfo>()?),
9945            StructType::VmConfigSpec => Ok(from.as_any_box().downcast::<VmConfigSpec>()?),
9946            StructType::VAppConfigSpec => Ok(from.as_any_box().downcast::<VAppConfigSpec>()?),
9947            StructType::ClusterNetworkConfigSpec => Ok(from.as_any_box().downcast::<ClusterNetworkConfigSpec>()?),
9948            StructType::FailoverNodeInfo => Ok(from.as_any_box().downcast::<FailoverNodeInfo>()?),
9949            StructType::NodeDeploymentSpec => Ok(from.as_any_box().downcast::<NodeDeploymentSpec>()?),
9950            StructType::PassiveNodeDeploymentSpec => Ok(from.as_any_box().downcast::<PassiveNodeDeploymentSpec>()?),
9951            StructType::NodeNetworkSpec => Ok(from.as_any_box().downcast::<NodeNetworkSpec>()?),
9952            StructType::PassiveNodeNetworkSpec => Ok(from.as_any_box().downcast::<PassiveNodeNetworkSpec>()?),
9953            StructType::SourceNodeSpec => Ok(from.as_any_box().downcast::<SourceNodeSpec>()?),
9954            StructType::VchaClusterConfigInfo => Ok(from.as_any_box().downcast::<VchaClusterConfigInfo>()?),
9955            StructType::VchaClusterConfigSpec => Ok(from.as_any_box().downcast::<VchaClusterConfigSpec>()?),
9956            StructType::VchaClusterDeploymentSpec => Ok(from.as_any_box().downcast::<VchaClusterDeploymentSpec>()?),
9957            StructType::VchaClusterNetworkSpec => Ok(from.as_any_box().downcast::<VchaClusterNetworkSpec>()?),
9958            StructType::WitnessNodeInfo => Ok(from.as_any_box().downcast::<WitnessNodeInfo>()?),
9959            StructType::VchaClusterHealth => Ok(from.as_any_box().downcast::<VchaClusterHealth>()?),
9960            StructType::VchaClusterRuntimeInfo => Ok(from.as_any_box().downcast::<VchaClusterRuntimeInfo>()?),
9961            StructType::VchaNodeRuntimeInfo => Ok(from.as_any_box().downcast::<VchaNodeRuntimeInfo>()?),
9962            StructType::VirtualMachineAffinityInfo => Ok(from.as_any_box().downcast::<VirtualMachineAffinityInfo>()?),
9963            StructType::VirtualMachineBaseIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineBaseIndependentFilterSpec>()?),
9964            StructType::VirtualMachineEmptyIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineEmptyIndependentFilterSpec>()?),
9965            StructType::VirtualMachineIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineIndependentFilterSpec>()?),
9966            StructType::VirtualMachineBootOptions => Ok(from.as_any_box().downcast::<VirtualMachineBootOptions>()?),
9967            StructType::VirtualMachineBootOptionsBootableDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableDevice>()?),
9968            StructType::VirtualMachineBootOptionsBootableCdromDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableCdromDevice>()?),
9969            StructType::VirtualMachineBootOptionsBootableDiskDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableDiskDevice>()?),
9970            StructType::VirtualMachineBootOptionsBootableEthernetDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableEthernetDevice>()?),
9971            StructType::VirtualMachineBootOptionsBootableFloppyDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableFloppyDevice>()?),
9972            StructType::VirtualMachineCapability => Ok(from.as_any_box().downcast::<VirtualMachineCapability>()?),
9973            StructType::VirtualMachineCertThumbprint => Ok(from.as_any_box().downcast::<VirtualMachineCertThumbprint>()?),
9974            StructType::VirtualMachineCloneSpec => Ok(from.as_any_box().downcast::<VirtualMachineCloneSpec>()?),
9975            StructType::VirtualMachineConfigInfo => Ok(from.as_any_box().downcast::<VirtualMachineConfigInfo>()?),
9976            StructType::VirtualMachineConfigInfoDatastoreUrlPair => Ok(from.as_any_box().downcast::<VirtualMachineConfigInfoDatastoreUrlPair>()?),
9977            StructType::VirtualMachineConfigInfoOverheadInfo => Ok(from.as_any_box().downcast::<VirtualMachineConfigInfoOverheadInfo>()?),
9978            StructType::VirtualMachineConfigOption => Ok(from.as_any_box().downcast::<VirtualMachineConfigOption>()?),
9979            StructType::VirtualMachineConfigOptionDescriptor => Ok(from.as_any_box().downcast::<VirtualMachineConfigOptionDescriptor>()?),
9980            StructType::VirtualMachineConfigSpec => Ok(from.as_any_box().downcast::<VirtualMachineConfigSpec>()?),
9981            StructType::ConfigTarget => Ok(from.as_any_box().downcast::<ConfigTarget>()?),
9982            StructType::VirtualMachineConsolePreferences => Ok(from.as_any_box().downcast::<VirtualMachineConsolePreferences>()?),
9983            StructType::VirtualMachineContentLibraryItemInfo => Ok(from.as_any_box().downcast::<VirtualMachineContentLibraryItemInfo>()?),
9984            StructType::DatastoreOption => Ok(from.as_any_box().downcast::<DatastoreOption>()?),
9985            StructType::VirtualMachineDatastoreVolumeOption => Ok(from.as_any_box().downcast::<VirtualMachineDatastoreVolumeOption>()?),
9986            StructType::VirtualMachineDefaultPowerOpInfo => Ok(from.as_any_box().downcast::<VirtualMachineDefaultPowerOpInfo>()?),
9987            StructType::VirtualMachineDeviceRuntimeInfo => Ok(from.as_any_box().downcast::<VirtualMachineDeviceRuntimeInfo>()?),
9988            StructType::VirtualMachineDeviceRuntimeInfoDeviceRuntimeState => Ok(from.as_any_box().downcast::<VirtualMachineDeviceRuntimeInfoDeviceRuntimeState>()?),
9989            StructType::VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState => Ok(from.as_any_box().downcast::<VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState>()?),
9990            StructType::VirtualMachineDvxClassInfo => Ok(from.as_any_box().downcast::<VirtualMachineDvxClassInfo>()?),
9991            StructType::FaultToleranceConfigInfo => Ok(from.as_any_box().downcast::<FaultToleranceConfigInfo>()?),
9992            StructType::FaultTolerancePrimaryConfigInfo => Ok(from.as_any_box().downcast::<FaultTolerancePrimaryConfigInfo>()?),
9993            StructType::FaultToleranceSecondaryConfigInfo => Ok(from.as_any_box().downcast::<FaultToleranceSecondaryConfigInfo>()?),
9994            StructType::FaultToleranceConfigSpec => Ok(from.as_any_box().downcast::<FaultToleranceConfigSpec>()?),
9995            StructType::FaultToleranceMetaSpec => Ok(from.as_any_box().downcast::<FaultToleranceMetaSpec>()?),
9996            StructType::FaultToleranceSecondaryOpResult => Ok(from.as_any_box().downcast::<FaultToleranceSecondaryOpResult>()?),
9997            StructType::FaultToleranceVmConfigSpec => Ok(from.as_any_box().downcast::<FaultToleranceVmConfigSpec>()?),
9998            StructType::FaultToleranceDiskSpec => Ok(from.as_any_box().downcast::<FaultToleranceDiskSpec>()?),
9999            StructType::VirtualMachineFeatureRequirement => Ok(from.as_any_box().downcast::<VirtualMachineFeatureRequirement>()?),
10000            StructType::VirtualMachineFileInfo => Ok(from.as_any_box().downcast::<VirtualMachineFileInfo>()?),
10001            StructType::VirtualMachineFileLayout => Ok(from.as_any_box().downcast::<VirtualMachineFileLayout>()?),
10002            StructType::VirtualMachineFileLayoutDiskLayout => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutDiskLayout>()?),
10003            StructType::VirtualMachineFileLayoutSnapshotLayout => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutSnapshotLayout>()?),
10004            StructType::VirtualMachineFileLayoutEx => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutEx>()?),
10005            StructType::VirtualMachineFileLayoutExDiskLayout => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutExDiskLayout>()?),
10006            StructType::VirtualMachineFileLayoutExDiskUnit => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutExDiskUnit>()?),
10007            StructType::VirtualMachineFileLayoutExFileInfo => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutExFileInfo>()?),
10008            StructType::VirtualMachineFileLayoutExSnapshotLayout => Ok(from.as_any_box().downcast::<VirtualMachineFileLayoutExSnapshotLayout>()?),
10009            StructType::VirtualMachineFlagInfo => Ok(from.as_any_box().downcast::<VirtualMachineFlagInfo>()?),
10010            StructType::VirtualMachineForkConfigInfo => Ok(from.as_any_box().downcast::<VirtualMachineForkConfigInfo>()?),
10011            StructType::GuestInfo => Ok(from.as_any_box().downcast::<GuestInfo>()?),
10012            StructType::GuestInfoCustomizationInfo => Ok(from.as_any_box().downcast::<GuestInfoCustomizationInfo>()?),
10013            StructType::GuestDiskInfo => Ok(from.as_any_box().downcast::<GuestDiskInfo>()?),
10014            StructType::GuestInfoNamespaceGenerationInfo => Ok(from.as_any_box().downcast::<GuestInfoNamespaceGenerationInfo>()?),
10015            StructType::GuestNicInfo => Ok(from.as_any_box().downcast::<GuestNicInfo>()?),
10016            StructType::GuestScreenInfo => Ok(from.as_any_box().downcast::<GuestScreenInfo>()?),
10017            StructType::GuestStackInfo => Ok(from.as_any_box().downcast::<GuestStackInfo>()?),
10018            StructType::GuestInfoVirtualDiskMapping => Ok(from.as_any_box().downcast::<GuestInfoVirtualDiskMapping>()?),
10019            StructType::VirtualMachineGuestIntegrityInfo => Ok(from.as_any_box().downcast::<VirtualMachineGuestIntegrityInfo>()?),
10020            StructType::VirtualMachineGuestMonitoringModeInfo => Ok(from.as_any_box().downcast::<VirtualMachineGuestMonitoringModeInfo>()?),
10021            StructType::GuestOsDescriptor => Ok(from.as_any_box().downcast::<GuestOsDescriptor>()?),
10022            StructType::VirtualMachineGuestQuiesceSpec => Ok(from.as_any_box().downcast::<VirtualMachineGuestQuiesceSpec>()?),
10023            StructType::VirtualMachineWindowsQuiesceSpec => Ok(from.as_any_box().downcast::<VirtualMachineWindowsQuiesceSpec>()?),
10024            StructType::VirtualMachineIdeDiskDevicePartitionInfo => Ok(from.as_any_box().downcast::<VirtualMachineIdeDiskDevicePartitionInfo>()?),
10025            StructType::VirtualMachineInstantCloneSpec => Ok(from.as_any_box().downcast::<VirtualMachineInstantCloneSpec>()?),
10026            StructType::VirtualMachineLegacyNetworkSwitchInfo => Ok(from.as_any_box().downcast::<VirtualMachineLegacyNetworkSwitchInfo>()?),
10027            StructType::VirtualMachineMessage => Ok(from.as_any_box().downcast::<VirtualMachineMessage>()?),
10028            StructType::VirtualMachineMetadataManagerVmMetadata => Ok(from.as_any_box().downcast::<VirtualMachineMetadataManagerVmMetadata>()?),
10029            StructType::VirtualMachineMetadataManagerVmMetadataInput => Ok(from.as_any_box().downcast::<VirtualMachineMetadataManagerVmMetadataInput>()?),
10030            StructType::VirtualMachineMetadataManagerVmMetadataOwner => Ok(from.as_any_box().downcast::<VirtualMachineMetadataManagerVmMetadataOwner>()?),
10031            StructType::VirtualMachineMetadataManagerVmMetadataResult => Ok(from.as_any_box().downcast::<VirtualMachineMetadataManagerVmMetadataResult>()?),
10032            StructType::VirtualMachineNetworkShaperInfo => Ok(from.as_any_box().downcast::<VirtualMachineNetworkShaperInfo>()?),
10033            StructType::VirtualMachineProfileDetails => Ok(from.as_any_box().downcast::<VirtualMachineProfileDetails>()?),
10034            StructType::VirtualMachineProfileDetailsDiskProfileDetails => Ok(from.as_any_box().downcast::<VirtualMachineProfileDetailsDiskProfileDetails>()?),
10035            StructType::VirtualMachineProfileRawData => Ok(from.as_any_box().downcast::<VirtualMachineProfileRawData>()?),
10036            StructType::VirtualMachineProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineProfileSpec>()?),
10037            StructType::VirtualMachineDefaultProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineDefaultProfileSpec>()?),
10038            StructType::VirtualMachineDefinedProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineDefinedProfileSpec>()?),
10039            StructType::VirtualMachineEmptyProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineEmptyProfileSpec>()?),
10040            StructType::VirtualMachinePropertyRelation => Ok(from.as_any_box().downcast::<VirtualMachinePropertyRelation>()?),
10041            StructType::VirtualMachineQuestionInfo => Ok(from.as_any_box().downcast::<VirtualMachineQuestionInfo>()?),
10042            StructType::VirtualMachineRelocateSpec => Ok(from.as_any_box().downcast::<VirtualMachineRelocateSpec>()?),
10043            StructType::VirtualMachineRelocateSpecDiskLocator => Ok(from.as_any_box().downcast::<VirtualMachineRelocateSpecDiskLocator>()?),
10044            StructType::VirtualMachineRelocateSpecDiskLocatorBackingSpec => Ok(from.as_any_box().downcast::<VirtualMachineRelocateSpecDiskLocatorBackingSpec>()?),
10045            StructType::ReplicationConfigSpec => Ok(from.as_any_box().downcast::<ReplicationConfigSpec>()?),
10046            StructType::ReplicationInfoDiskSettings => Ok(from.as_any_box().downcast::<ReplicationInfoDiskSettings>()?),
10047            StructType::VirtualMachineRuntimeInfo => Ok(from.as_any_box().downcast::<VirtualMachineRuntimeInfo>()?),
10048            StructType::VirtualMachineRuntimeInfoDasProtectionState => Ok(from.as_any_box().downcast::<VirtualMachineRuntimeInfoDasProtectionState>()?),
10049            StructType::ScheduledHardwareUpgradeInfo => Ok(from.as_any_box().downcast::<ScheduledHardwareUpgradeInfo>()?),
10050            StructType::VirtualMachineSgxInfo => Ok(from.as_any_box().downcast::<VirtualMachineSgxInfo>()?),
10051            StructType::VirtualMachineSnapshotInfo => Ok(from.as_any_box().downcast::<VirtualMachineSnapshotInfo>()?),
10052            StructType::SnapshotSelectionSpec => Ok(from.as_any_box().downcast::<SnapshotSelectionSpec>()?),
10053            StructType::VirtualMachineSnapshotTree => Ok(from.as_any_box().downcast::<VirtualMachineSnapshotTree>()?),
10054            StructType::VirtualMachineSriovDevicePoolInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovDevicePoolInfo>()?),
10055            StructType::VirtualMachineSriovNetworkDevicePoolInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovNetworkDevicePoolInfo>()?),
10056            StructType::VirtualMachineStorageInfo => Ok(from.as_any_box().downcast::<VirtualMachineStorageInfo>()?),
10057            StructType::VirtualMachineUsageOnDatastore => Ok(from.as_any_box().downcast::<VirtualMachineUsageOnDatastore>()?),
10058            StructType::SubnetInfoFolderInfo => Ok(from.as_any_box().downcast::<SubnetInfoFolderInfo>()?),
10059            StructType::VirtualMachineSummary => Ok(from.as_any_box().downcast::<VirtualMachineSummary>()?),
10060            StructType::VirtualMachineConfigSummary => Ok(from.as_any_box().downcast::<VirtualMachineConfigSummary>()?),
10061            StructType::VirtualMachineGuestSummary => Ok(from.as_any_box().downcast::<VirtualMachineGuestSummary>()?),
10062            StructType::VirtualMachineQuickStats => Ok(from.as_any_box().downcast::<VirtualMachineQuickStats>()?),
10063            StructType::VirtualMachineQuickStatsMemoryTierStats => Ok(from.as_any_box().downcast::<VirtualMachineQuickStatsMemoryTierStats>()?),
10064            StructType::VirtualMachineStorageSummary => Ok(from.as_any_box().downcast::<VirtualMachineStorageSummary>()?),
10065            StructType::VirtualMachineTargetInfo => Ok(from.as_any_box().downcast::<VirtualMachineTargetInfo>()?),
10066            StructType::VirtualMachineCdromInfo => Ok(from.as_any_box().downcast::<VirtualMachineCdromInfo>()?),
10067            StructType::VirtualMachineDatastoreInfo => Ok(from.as_any_box().downcast::<VirtualMachineDatastoreInfo>()?),
10068            StructType::VirtualMachineDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineDiskDeviceInfo>()?),
10069            StructType::VirtualMachineIdeDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineIdeDiskDeviceInfo>()?),
10070            StructType::VirtualMachineScsiDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineScsiDiskDeviceInfo>()?),
10071            StructType::VirtualMachineDynamicPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachineDynamicPassthroughInfo>()?),
10072            StructType::VirtualMachineFloppyInfo => Ok(from.as_any_box().downcast::<VirtualMachineFloppyInfo>()?),
10073            StructType::VirtualMachineNetworkInfo => Ok(from.as_any_box().downcast::<VirtualMachineNetworkInfo>()?),
10074            StructType::OpaqueNetworkTargetInfo => Ok(from.as_any_box().downcast::<OpaqueNetworkTargetInfo>()?),
10075            StructType::VirtualMachineParallelInfo => Ok(from.as_any_box().downcast::<VirtualMachineParallelInfo>()?),
10076            StructType::VirtualMachinePciPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachinePciPassthroughInfo>()?),
10077            StructType::VirtualMachineSriovInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovInfo>()?),
10078            StructType::VirtualMachinePciSharedGpuPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachinePciSharedGpuPassthroughInfo>()?),
10079            StructType::VirtualMachinePrecisionClockInfo => Ok(from.as_any_box().downcast::<VirtualMachinePrecisionClockInfo>()?),
10080            StructType::VirtualMachineScsiPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachineScsiPassthroughInfo>()?),
10081            StructType::VirtualMachineSerialInfo => Ok(from.as_any_box().downcast::<VirtualMachineSerialInfo>()?),
10082            StructType::VirtualMachineSgxTargetInfo => Ok(from.as_any_box().downcast::<VirtualMachineSgxTargetInfo>()?),
10083            StructType::VirtualMachineSoundInfo => Ok(from.as_any_box().downcast::<VirtualMachineSoundInfo>()?),
10084            StructType::SubnetInfo => Ok(from.as_any_box().downcast::<SubnetInfo>()?),
10085            StructType::VirtualMachineUsbInfo => Ok(from.as_any_box().downcast::<VirtualMachineUsbInfo>()?),
10086            StructType::VirtualMachineVFlashModuleInfo => Ok(from.as_any_box().downcast::<VirtualMachineVFlashModuleInfo>()?),
10087            StructType::VirtualMachineVMotionStunTimeInfo => Ok(from.as_any_box().downcast::<VirtualMachineVMotionStunTimeInfo>()?),
10088            StructType::VirtualMachineVendorDeviceGroupInfo => Ok(from.as_any_box().downcast::<VirtualMachineVendorDeviceGroupInfo>()?),
10089            StructType::VirtualMachineVgpuDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineVgpuDeviceInfo>()?),
10090            StructType::VirtualMachineVgpuProfileInfo => Ok(from.as_any_box().downcast::<VirtualMachineVgpuProfileInfo>()?),
10091            StructType::ToolsConfigInfo => Ok(from.as_any_box().downcast::<ToolsConfigInfo>()?),
10092            StructType::ToolsConfigInfoToolsLastInstallInfo => Ok(from.as_any_box().downcast::<ToolsConfigInfoToolsLastInstallInfo>()?),
10093            StructType::UsbScanCodeSpec => Ok(from.as_any_box().downcast::<UsbScanCodeSpec>()?),
10094            StructType::UsbScanCodeSpecKeyEvent => Ok(from.as_any_box().downcast::<UsbScanCodeSpecKeyEvent>()?),
10095            StructType::UsbScanCodeSpecModifierType => Ok(from.as_any_box().downcast::<UsbScanCodeSpecModifierType>()?),
10096            StructType::VirtualMachineVcpuConfig => Ok(from.as_any_box().downcast::<VirtualMachineVcpuConfig>()?),
10097            StructType::VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineVendorDeviceGroupInfoComponentDeviceInfo>()?),
10098            StructType::VirtualMachineVirtualDeviceGroups => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceGroups>()?),
10099            StructType::VirtualMachineVirtualDeviceGroupsDeviceGroup => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceGroupsDeviceGroup>()?),
10100            StructType::VirtualMachineVirtualDeviceGroupsVendorDeviceGroup => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceGroupsVendorDeviceGroup>()?),
10101            StructType::VirtualMachineVirtualDeviceSwap => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceSwap>()?),
10102            StructType::VirtualMachineVirtualDeviceSwapDeviceSwapInfo => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceSwapDeviceSwapInfo>()?),
10103            StructType::VirtualHardware => Ok(from.as_any_box().downcast::<VirtualHardware>()?),
10104            StructType::VirtualHardwareOption => Ok(from.as_any_box().downcast::<VirtualHardwareOption>()?),
10105            StructType::VirtualMachineVirtualNuma => Ok(from.as_any_box().downcast::<VirtualMachineVirtualNuma>()?),
10106            StructType::VirtualMachineVirtualNumaInfo => Ok(from.as_any_box().downcast::<VirtualMachineVirtualNumaInfo>()?),
10107            StructType::VirtualMachineVirtualPMem => Ok(from.as_any_box().downcast::<VirtualMachineVirtualPMem>()?),
10108            StructType::CheckResult => Ok(from.as_any_box().downcast::<CheckResult>()?),
10109            StructType::CustomizationAdapterMapping => Ok(from.as_any_box().downcast::<CustomizationAdapterMapping>()?),
10110            StructType::CustomizationGlobalIpSettings => Ok(from.as_any_box().downcast::<CustomizationGlobalIpSettings>()?),
10111            StructType::CustomizationGuiRunOnce => Ok(from.as_any_box().downcast::<CustomizationGuiRunOnce>()?),
10112            StructType::CustomizationGuiUnattended => Ok(from.as_any_box().downcast::<CustomizationGuiUnattended>()?),
10113            StructType::CustomizationIpSettings => Ok(from.as_any_box().downcast::<CustomizationIpSettings>()?),
10114            StructType::CustomizationIpSettingsIpV6AddressSpec => Ok(from.as_any_box().downcast::<CustomizationIpSettingsIpV6AddressSpec>()?),
10115            StructType::CustomizationIdentification => Ok(from.as_any_box().downcast::<CustomizationIdentification>()?),
10116            StructType::CustomizationIdentitySettings => Ok(from.as_any_box().downcast::<CustomizationIdentitySettings>()?),
10117            StructType::CustomizationCloudinitPrep => Ok(from.as_any_box().downcast::<CustomizationCloudinitPrep>()?),
10118            StructType::CustomizationLinuxPrep => Ok(from.as_any_box().downcast::<CustomizationLinuxPrep>()?),
10119            StructType::CustomizationSysprep => Ok(from.as_any_box().downcast::<CustomizationSysprep>()?),
10120            StructType::CustomizationSysprepText => Ok(from.as_any_box().downcast::<CustomizationSysprepText>()?),
10121            StructType::CustomizationIpGenerator => Ok(from.as_any_box().downcast::<CustomizationIpGenerator>()?),
10122            StructType::CustomizationCustomIpGenerator => Ok(from.as_any_box().downcast::<CustomizationCustomIpGenerator>()?),
10123            StructType::CustomizationDhcpIpGenerator => Ok(from.as_any_box().downcast::<CustomizationDhcpIpGenerator>()?),
10124            StructType::CustomizationFixedIp => Ok(from.as_any_box().downcast::<CustomizationFixedIp>()?),
10125            StructType::CustomizationUnknownIpGenerator => Ok(from.as_any_box().downcast::<CustomizationUnknownIpGenerator>()?),
10126            StructType::CustomizationIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationIpV6Generator>()?),
10127            StructType::CustomizationAutoIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationAutoIpV6Generator>()?),
10128            StructType::CustomizationCustomIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationCustomIpV6Generator>()?),
10129            StructType::CustomizationDhcpIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationDhcpIpV6Generator>()?),
10130            StructType::CustomizationFixedIpV6 => Ok(from.as_any_box().downcast::<CustomizationFixedIpV6>()?),
10131            StructType::CustomizationStatelessIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationStatelessIpV6Generator>()?),
10132            StructType::CustomizationUnknownIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationUnknownIpV6Generator>()?),
10133            StructType::CustomizationLicenseFilePrintData => Ok(from.as_any_box().downcast::<CustomizationLicenseFilePrintData>()?),
10134            StructType::CustomizationName => Ok(from.as_any_box().downcast::<CustomizationName>()?),
10135            StructType::CustomizationCustomName => Ok(from.as_any_box().downcast::<CustomizationCustomName>()?),
10136            StructType::CustomizationFixedName => Ok(from.as_any_box().downcast::<CustomizationFixedName>()?),
10137            StructType::CustomizationPrefixName => Ok(from.as_any_box().downcast::<CustomizationPrefixName>()?),
10138            StructType::CustomizationUnknownName => Ok(from.as_any_box().downcast::<CustomizationUnknownName>()?),
10139            StructType::CustomizationVirtualMachineName => Ok(from.as_any_box().downcast::<CustomizationVirtualMachineName>()?),
10140            StructType::CustomizationOptions => Ok(from.as_any_box().downcast::<CustomizationOptions>()?),
10141            StructType::CustomizationLinuxOptions => Ok(from.as_any_box().downcast::<CustomizationLinuxOptions>()?),
10142            StructType::CustomizationWinOptions => Ok(from.as_any_box().downcast::<CustomizationWinOptions>()?),
10143            StructType::CustomizationPassword => Ok(from.as_any_box().downcast::<CustomizationPassword>()?),
10144            StructType::CustomizationSpec => Ok(from.as_any_box().downcast::<CustomizationSpec>()?),
10145            StructType::CustomizationUserData => Ok(from.as_any_box().downcast::<CustomizationUserData>()?),
10146            StructType::HostDiskMappingInfo => Ok(from.as_any_box().downcast::<HostDiskMappingInfo>()?),
10147            StructType::HostDiskMappingPartitionInfo => Ok(from.as_any_box().downcast::<HostDiskMappingPartitionInfo>()?),
10148            StructType::HostDiskMappingOption => Ok(from.as_any_box().downcast::<HostDiskMappingOption>()?),
10149            StructType::HostDiskMappingPartitionOption => Ok(from.as_any_box().downcast::<HostDiskMappingPartitionOption>()?),
10150            StructType::VirtualDevice => Ok(from.as_any_box().downcast::<VirtualDevice>()?),
10151            StructType::VirtualCdrom => Ok(from.as_any_box().downcast::<VirtualCdrom>()?),
10152            StructType::VirtualController => Ok(from.as_any_box().downcast::<VirtualController>()?),
10153            StructType::VirtualIdeController => Ok(from.as_any_box().downcast::<VirtualIdeController>()?),
10154            StructType::VirtualNvdimmController => Ok(from.as_any_box().downcast::<VirtualNvdimmController>()?),
10155            StructType::VirtualNvmeController => Ok(from.as_any_box().downcast::<VirtualNvmeController>()?),
10156            StructType::VirtualPciController => Ok(from.as_any_box().downcast::<VirtualPciController>()?),
10157            StructType::VirtualPs2Controller => Ok(from.as_any_box().downcast::<VirtualPs2Controller>()?),
10158            StructType::VirtualSataController => Ok(from.as_any_box().downcast::<VirtualSataController>()?),
10159            StructType::VirtualAhciController => Ok(from.as_any_box().downcast::<VirtualAhciController>()?),
10160            StructType::VirtualScsiController => Ok(from.as_any_box().downcast::<VirtualScsiController>()?),
10161            StructType::ParaVirtualScsiController => Ok(from.as_any_box().downcast::<ParaVirtualScsiController>()?),
10162            StructType::VirtualBusLogicController => Ok(from.as_any_box().downcast::<VirtualBusLogicController>()?),
10163            StructType::VirtualLsiLogicController => Ok(from.as_any_box().downcast::<VirtualLsiLogicController>()?),
10164            StructType::VirtualLsiLogicSasController => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasController>()?),
10165            StructType::VirtualSioController => Ok(from.as_any_box().downcast::<VirtualSioController>()?),
10166            StructType::VirtualUsbController => Ok(from.as_any_box().downcast::<VirtualUsbController>()?),
10167            StructType::VirtualUsbxhciController => Ok(from.as_any_box().downcast::<VirtualUsbxhciController>()?),
10168            StructType::VirtualDisk => Ok(from.as_any_box().downcast::<VirtualDisk>()?),
10169            StructType::VirtualEthernetCard => Ok(from.as_any_box().downcast::<VirtualEthernetCard>()?),
10170            StructType::VirtualE1000 => Ok(from.as_any_box().downcast::<VirtualE1000>()?),
10171            StructType::VirtualE1000E => Ok(from.as_any_box().downcast::<VirtualE1000E>()?),
10172            StructType::VirtualPcNet32 => Ok(from.as_any_box().downcast::<VirtualPcNet32>()?),
10173            StructType::VirtualSriovEthernetCard => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCard>()?),
10174            StructType::VirtualVmxnet => Ok(from.as_any_box().downcast::<VirtualVmxnet>()?),
10175            StructType::VirtualVmxnet2 => Ok(from.as_any_box().downcast::<VirtualVmxnet2>()?),
10176            StructType::VirtualVmxnet3 => Ok(from.as_any_box().downcast::<VirtualVmxnet3>()?),
10177            StructType::VirtualVmxnet3Vrdma => Ok(from.as_any_box().downcast::<VirtualVmxnet3Vrdma>()?),
10178            StructType::VirtualFloppy => Ok(from.as_any_box().downcast::<VirtualFloppy>()?),
10179            StructType::VirtualKeyboard => Ok(from.as_any_box().downcast::<VirtualKeyboard>()?),
10180            StructType::VirtualNvdimm => Ok(from.as_any_box().downcast::<VirtualNvdimm>()?),
10181            StructType::VirtualPciPassthrough => Ok(from.as_any_box().downcast::<VirtualPciPassthrough>()?),
10182            StructType::VirtualParallelPort => Ok(from.as_any_box().downcast::<VirtualParallelPort>()?),
10183            StructType::VirtualPointingDevice => Ok(from.as_any_box().downcast::<VirtualPointingDevice>()?),
10184            StructType::VirtualPrecisionClock => Ok(from.as_any_box().downcast::<VirtualPrecisionClock>()?),
10185            StructType::VirtualScsiPassthrough => Ok(from.as_any_box().downcast::<VirtualScsiPassthrough>()?),
10186            StructType::VirtualSerialPort => Ok(from.as_any_box().downcast::<VirtualSerialPort>()?),
10187            StructType::VirtualSoundCard => Ok(from.as_any_box().downcast::<VirtualSoundCard>()?),
10188            StructType::VirtualEnsoniq1371 => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371>()?),
10189            StructType::VirtualHdAudioCard => Ok(from.as_any_box().downcast::<VirtualHdAudioCard>()?),
10190            StructType::VirtualSoundBlaster16 => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16>()?),
10191            StructType::VirtualTpm => Ok(from.as_any_box().downcast::<VirtualTpm>()?),
10192            StructType::VirtualUsb => Ok(from.as_any_box().downcast::<VirtualUsb>()?),
10193            StructType::VirtualMachineVmciDevice => Ok(from.as_any_box().downcast::<VirtualMachineVmciDevice>()?),
10194            StructType::VirtualMachineVmirom => Ok(from.as_any_box().downcast::<VirtualMachineVmirom>()?),
10195            StructType::VirtualMachineVideoCard => Ok(from.as_any_box().downcast::<VirtualMachineVideoCard>()?),
10196            StructType::VirtualWdt => Ok(from.as_any_box().downcast::<VirtualWdt>()?),
10197            StructType::VirtualDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceBackingInfo>()?),
10198            StructType::VirtualDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingInfo>()?),
10199            StructType::VirtualCdromAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingInfo>()?),
10200            StructType::VirtualCdromPassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingInfo>()?),
10201            StructType::VirtualDiskRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingInfo>()?),
10202            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
10203            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
10204            StructType::VirtualEthernetCardNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingInfo>()?),
10205            StructType::VirtualFloppyDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingInfo>()?),
10206            StructType::VirtualPciPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingInfo>()?),
10207            StructType::VirtualPciPassthroughDynamicBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingInfo>()?),
10208            StructType::VirtualParallelPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingInfo>()?),
10209            StructType::VirtualPointingDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPointingDeviceDeviceBackingInfo>()?),
10210            StructType::VirtualScsiPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingInfo>()?),
10211            StructType::VirtualSerialPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingInfo>()?),
10212            StructType::VirtualSoundCardDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingInfo>()?),
10213            StructType::VirtualUsbRemoteHostBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingInfo>()?),
10214            StructType::VirtualUsbusbBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingInfo>()?),
10215            StructType::VirtualDeviceFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingInfo>()?),
10216            StructType::VirtualCdromIsoBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingInfo>()?),
10217            StructType::VirtualDiskFlatVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingInfo>()?),
10218            StructType::VirtualDiskFlatVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingInfo>()?),
10219            StructType::VirtualDiskLocalPMemBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingInfo>()?),
10220            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
10221            StructType::VirtualDiskSeSparseBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingInfo>()?),
10222            StructType::VirtualDiskSparseVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingInfo>()?),
10223            StructType::VirtualDiskSparseVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingInfo>()?),
10224            StructType::VirtualFloppyImageBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingInfo>()?),
10225            StructType::VirtualNvdimmBackingInfo => Ok(from.as_any_box().downcast::<VirtualNvdimmBackingInfo>()?),
10226            StructType::VirtualParallelPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingInfo>()?),
10227            StructType::VirtualSerialPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingInfo>()?),
10228            StructType::VirtualDevicePipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingInfo>()?),
10229            StructType::VirtualSerialPortPipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingInfo>()?),
10230            StructType::VirtualDeviceRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingInfo>()?),
10231            StructType::VirtualCdromRemoteAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingInfo>()?),
10232            StructType::VirtualCdromRemotePassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingInfo>()?),
10233            StructType::VirtualFloppyRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingInfo>()?),
10234            StructType::VirtualUsbRemoteClientBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingInfo>()?),
10235            StructType::VirtualDeviceUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingInfo>()?),
10236            StructType::VirtualSerialPortUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingInfo>()?),
10237            StructType::VirtualEthernetCardDistributedVirtualPortBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardDistributedVirtualPortBackingInfo>()?),
10238            StructType::VirtualEthernetCardOpaqueNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardOpaqueNetworkBackingInfo>()?),
10239            StructType::VirtualPciPassthroughDvxBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDvxBackingInfo>()?),
10240            StructType::VirtualPciPassthroughPluginBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingInfo>()?),
10241            StructType::VirtualPciPassthroughVmiopBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingInfo>()?),
10242            StructType::VirtualPrecisionClockSystemClockBackingInfo => Ok(from.as_any_box().downcast::<VirtualPrecisionClockSystemClockBackingInfo>()?),
10243            StructType::VirtualSerialPortThinPrintBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortThinPrintBackingInfo>()?),
10244            StructType::VirtualSriovEthernetCardSriovBackingInfo => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardSriovBackingInfo>()?),
10245            StructType::VirtualDeviceBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualDeviceBusSlotInfo>()?),
10246            StructType::VirtualDevicePciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualDevicePciBusSlotInfo>()?),
10247            StructType::VirtualUsbControllerPciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualUsbControllerPciBusSlotInfo>()?),
10248            StructType::VirtualDeviceConnectInfo => Ok(from.as_any_box().downcast::<VirtualDeviceConnectInfo>()?),
10249            StructType::VirtualDeviceDeviceGroupInfo => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceGroupInfo>()?),
10250            StructType::VirtualDeviceOption => Ok(from.as_any_box().downcast::<VirtualDeviceOption>()?),
10251            StructType::VirtualCdromOption => Ok(from.as_any_box().downcast::<VirtualCdromOption>()?),
10252            StructType::VirtualControllerOption => Ok(from.as_any_box().downcast::<VirtualControllerOption>()?),
10253            StructType::VirtualIdeControllerOption => Ok(from.as_any_box().downcast::<VirtualIdeControllerOption>()?),
10254            StructType::VirtualNvdimmControllerOption => Ok(from.as_any_box().downcast::<VirtualNvdimmControllerOption>()?),
10255            StructType::VirtualNvmeControllerOption => Ok(from.as_any_box().downcast::<VirtualNvmeControllerOption>()?),
10256            StructType::VirtualPciControllerOption => Ok(from.as_any_box().downcast::<VirtualPciControllerOption>()?),
10257            StructType::VirtualPs2ControllerOption => Ok(from.as_any_box().downcast::<VirtualPs2ControllerOption>()?),
10258            StructType::VirtualSataControllerOption => Ok(from.as_any_box().downcast::<VirtualSataControllerOption>()?),
10259            StructType::VirtualAhciControllerOption => Ok(from.as_any_box().downcast::<VirtualAhciControllerOption>()?),
10260            StructType::VirtualScsiControllerOption => Ok(from.as_any_box().downcast::<VirtualScsiControllerOption>()?),
10261            StructType::ParaVirtualScsiControllerOption => Ok(from.as_any_box().downcast::<ParaVirtualScsiControllerOption>()?),
10262            StructType::VirtualBusLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualBusLogicControllerOption>()?),
10263            StructType::VirtualLsiLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicControllerOption>()?),
10264            StructType::VirtualLsiLogicSasControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasControllerOption>()?),
10265            StructType::VirtualSioControllerOption => Ok(from.as_any_box().downcast::<VirtualSioControllerOption>()?),
10266            StructType::VirtualUsbControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbControllerOption>()?),
10267            StructType::VirtualUsbxhciControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbxhciControllerOption>()?),
10268            StructType::VirtualDiskOption => Ok(from.as_any_box().downcast::<VirtualDiskOption>()?),
10269            StructType::VirtualEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardOption>()?),
10270            StructType::VirtualE1000Option => Ok(from.as_any_box().downcast::<VirtualE1000Option>()?),
10271            StructType::VirtualE1000EOption => Ok(from.as_any_box().downcast::<VirtualE1000EOption>()?),
10272            StructType::VirtualPcNet32Option => Ok(from.as_any_box().downcast::<VirtualPcNet32Option>()?),
10273            StructType::VirtualSriovEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardOption>()?),
10274            StructType::VirtualVmxnetOption => Ok(from.as_any_box().downcast::<VirtualVmxnetOption>()?),
10275            StructType::VirtualVmxnet2Option => Ok(from.as_any_box().downcast::<VirtualVmxnet2Option>()?),
10276            StructType::VirtualVmxnet3Option => Ok(from.as_any_box().downcast::<VirtualVmxnet3Option>()?),
10277            StructType::VirtualVmxnet3VrdmaOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3VrdmaOption>()?),
10278            StructType::VirtualFloppyOption => Ok(from.as_any_box().downcast::<VirtualFloppyOption>()?),
10279            StructType::VirtualKeyboardOption => Ok(from.as_any_box().downcast::<VirtualKeyboardOption>()?),
10280            StructType::VirtualNvdimmOption => Ok(from.as_any_box().downcast::<VirtualNvdimmOption>()?),
10281            StructType::VirtualPciPassthroughOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughOption>()?),
10282            StructType::VirtualParallelPortOption => Ok(from.as_any_box().downcast::<VirtualParallelPortOption>()?),
10283            StructType::VirtualPointingDeviceOption => Ok(from.as_any_box().downcast::<VirtualPointingDeviceOption>()?),
10284            StructType::VirtualPrecisionClockOption => Ok(from.as_any_box().downcast::<VirtualPrecisionClockOption>()?),
10285            StructType::VirtualScsiPassthroughOption => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughOption>()?),
10286            StructType::VirtualSerialPortOption => Ok(from.as_any_box().downcast::<VirtualSerialPortOption>()?),
10287            StructType::VirtualSoundCardOption => Ok(from.as_any_box().downcast::<VirtualSoundCardOption>()?),
10288            StructType::VirtualEnsoniq1371Option => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371Option>()?),
10289            StructType::VirtualHdAudioCardOption => Ok(from.as_any_box().downcast::<VirtualHdAudioCardOption>()?),
10290            StructType::VirtualSoundBlaster16Option => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16Option>()?),
10291            StructType::VirtualTpmOption => Ok(from.as_any_box().downcast::<VirtualTpmOption>()?),
10292            StructType::VirtualUsbOption => Ok(from.as_any_box().downcast::<VirtualUsbOption>()?),
10293            StructType::VirtualMachineVmciDeviceOption => Ok(from.as_any_box().downcast::<VirtualMachineVmciDeviceOption>()?),
10294            StructType::VirtualVmiromOption => Ok(from.as_any_box().downcast::<VirtualVmiromOption>()?),
10295            StructType::VirtualVideoCardOption => Ok(from.as_any_box().downcast::<VirtualVideoCardOption>()?),
10296            StructType::VirtualWdtOption => Ok(from.as_any_box().downcast::<VirtualWdtOption>()?),
10297            StructType::VirtualDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceBackingOption>()?),
10298            StructType::VirtualDeviceDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingOption>()?),
10299            StructType::VirtualCdromAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingOption>()?),
10300            StructType::VirtualCdromPassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingOption>()?),
10301            StructType::VirtualCdromRemoteAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingOption>()?),
10302            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
10303            StructType::VirtualDiskRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingOption>()?),
10304            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
10305            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
10306            StructType::VirtualEthernetCardNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingOption>()?),
10307            StructType::VirtualFloppyDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingOption>()?),
10308            StructType::VirtualPciPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingOption>()?),
10309            StructType::VirtualPciPassthroughDynamicBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingOption>()?),
10310            StructType::VirtualParallelPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingOption>()?),
10311            StructType::VirtualPointingDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPointingDeviceBackingOption>()?),
10312            StructType::VirtualScsiPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingOption>()?),
10313            StructType::VirtualSerialPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingOption>()?),
10314            StructType::VirtualSoundCardDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingOption>()?),
10315            StructType::VirtualUsbRemoteHostBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingOption>()?),
10316            StructType::VirtualUsbusbBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingOption>()?),
10317            StructType::VirtualDeviceFileBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingOption>()?),
10318            StructType::VirtualCdromIsoBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingOption>()?),
10319            StructType::VirtualDiskFlatVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingOption>()?),
10320            StructType::VirtualDiskFlatVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingOption>()?),
10321            StructType::VirtualDiskLocalPMemBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingOption>()?),
10322            StructType::VirtualDiskSeSparseBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingOption>()?),
10323            StructType::VirtualDiskSparseVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingOption>()?),
10324            StructType::VirtualDiskSparseVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingOption>()?),
10325            StructType::VirtualFloppyImageBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingOption>()?),
10326            StructType::VirtualParallelPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingOption>()?),
10327            StructType::VirtualSerialPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingOption>()?),
10328            StructType::VirtualDevicePipeBackingOption => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingOption>()?),
10329            StructType::VirtualSerialPortPipeBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingOption>()?),
10330            StructType::VirtualDeviceRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingOption>()?),
10331            StructType::VirtualCdromRemotePassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingOption>()?),
10332            StructType::VirtualFloppyRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingOption>()?),
10333            StructType::VirtualUsbRemoteClientBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingOption>()?),
10334            StructType::VirtualDeviceUriBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingOption>()?),
10335            StructType::VirtualSerialPortUriBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingOption>()?),
10336            StructType::VirtualEthernetCardDvPortBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardDvPortBackingOption>()?),
10337            StructType::VirtualEthernetCardOpaqueNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardOpaqueNetworkBackingOption>()?),
10338            StructType::VirtualPciPassthroughDvxBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDvxBackingOption>()?),
10339            StructType::VirtualPciPassthroughPluginBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingOption>()?),
10340            StructType::VirtualPciPassthroughVmiopBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingOption>()?),
10341            StructType::VirtualPrecisionClockSystemClockBackingOption => Ok(from.as_any_box().downcast::<VirtualPrecisionClockSystemClockBackingOption>()?),
10342            StructType::VirtualSerialPortThinPrintBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortThinPrintBackingOption>()?),
10343            StructType::VirtualSriovEthernetCardSriovBackingOption => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardSriovBackingOption>()?),
10344            StructType::VirtualDeviceBusSlotOption => Ok(from.as_any_box().downcast::<VirtualDeviceBusSlotOption>()?),
10345            StructType::VirtualDeviceConnectOption => Ok(from.as_any_box().downcast::<VirtualDeviceConnectOption>()?),
10346            StructType::VirtualDeviceConfigSpec => Ok(from.as_any_box().downcast::<VirtualDeviceConfigSpec>()?),
10347            StructType::VirtualDiskConfigSpec => Ok(from.as_any_box().downcast::<VirtualDiskConfigSpec>()?),
10348            StructType::VirtualDeviceConfigSpecBackingSpec => Ok(from.as_any_box().downcast::<VirtualDeviceConfigSpecBackingSpec>()?),
10349            StructType::VirtualDiskVFlashCacheConfigInfo => Ok(from.as_any_box().downcast::<VirtualDiskVFlashCacheConfigInfo>()?),
10350            StructType::VirtualDiskId => Ok(from.as_any_box().downcast::<VirtualDiskId>()?),
10351            StructType::VirtualDiskDeltaDiskFormatsSupported => Ok(from.as_any_box().downcast::<VirtualDiskDeltaDiskFormatsSupported>()?),
10352            StructType::VirtualDiskOptionVFlashCacheConfigOption => Ok(from.as_any_box().downcast::<VirtualDiskOptionVFlashCacheConfigOption>()?),
10353            StructType::VirtualEthernetCardResourceAllocation => Ok(from.as_any_box().downcast::<VirtualEthernetCardResourceAllocation>()?),
10354            StructType::VirtualPciPassthroughAllowedDevice => Ok(from.as_any_box().downcast::<VirtualPciPassthroughAllowedDevice>()?),
10355            StructType::VirtualMachineVmciDeviceFilterInfo => Ok(from.as_any_box().downcast::<VirtualMachineVmciDeviceFilterInfo>()?),
10356            StructType::VirtualMachineVmciDeviceFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineVmciDeviceFilterSpec>()?),
10357            StructType::VirtualMachineVmciDeviceOptionFilterSpecOption => Ok(from.as_any_box().downcast::<VirtualMachineVmciDeviceOptionFilterSpecOption>()?),
10358            StructType::VirtualVmxnet3StrictLatencyConfig => Ok(from.as_any_box().downcast::<VirtualVmxnet3StrictLatencyConfig>()?),
10359            StructType::VirtualVmxnet3OptionStrictLatencyConfigOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3OptionStrictLatencyConfigOption>()?),
10360            StructType::GuestAliases => Ok(from.as_any_box().downcast::<GuestAliases>()?),
10361            StructType::GuestAuthAliasInfo => Ok(from.as_any_box().downcast::<GuestAuthAliasInfo>()?),
10362            StructType::GuestAuthSubject => Ok(from.as_any_box().downcast::<GuestAuthSubject>()?),
10363            StructType::GuestAuthAnySubject => Ok(from.as_any_box().downcast::<GuestAuthAnySubject>()?),
10364            StructType::GuestAuthNamedSubject => Ok(from.as_any_box().downcast::<GuestAuthNamedSubject>()?),
10365            StructType::GuestMappedAliases => Ok(from.as_any_box().downcast::<GuestMappedAliases>()?),
10366            StructType::GuestFileAttributes => Ok(from.as_any_box().downcast::<GuestFileAttributes>()?),
10367            StructType::GuestPosixFileAttributes => Ok(from.as_any_box().downcast::<GuestPosixFileAttributes>()?),
10368            StructType::GuestWindowsFileAttributes => Ok(from.as_any_box().downcast::<GuestWindowsFileAttributes>()?),
10369            StructType::GuestFileInfo => Ok(from.as_any_box().downcast::<GuestFileInfo>()?),
10370            StructType::FileTransferInformation => Ok(from.as_any_box().downcast::<FileTransferInformation>()?),
10371            StructType::GuestListFileInfo => Ok(from.as_any_box().downcast::<GuestListFileInfo>()?),
10372            StructType::GuestAuthentication => Ok(from.as_any_box().downcast::<GuestAuthentication>()?),
10373            StructType::NamePasswordAuthentication => Ok(from.as_any_box().downcast::<NamePasswordAuthentication>()?),
10374            StructType::SamlTokenAuthentication => Ok(from.as_any_box().downcast::<SamlTokenAuthentication>()?),
10375            StructType::SspiAuthentication => Ok(from.as_any_box().downcast::<SspiAuthentication>()?),
10376            StructType::TicketedSessionAuthentication => Ok(from.as_any_box().downcast::<TicketedSessionAuthentication>()?),
10377            StructType::GuestProcessInfo => Ok(from.as_any_box().downcast::<GuestProcessInfo>()?),
10378            StructType::GuestProgramSpec => Ok(from.as_any_box().downcast::<GuestProgramSpec>()?),
10379            StructType::GuestWindowsProgramSpec => Ok(from.as_any_box().downcast::<GuestWindowsProgramSpec>()?),
10380            StructType::GuestRegKeySpec => Ok(from.as_any_box().downcast::<GuestRegKeySpec>()?),
10381            StructType::GuestRegKeyNameSpec => Ok(from.as_any_box().downcast::<GuestRegKeyNameSpec>()?),
10382            StructType::GuestRegKeyRecordSpec => Ok(from.as_any_box().downcast::<GuestRegKeyRecordSpec>()?),
10383            StructType::GuestRegValueSpec => Ok(from.as_any_box().downcast::<GuestRegValueSpec>()?),
10384            StructType::GuestRegValueDataSpec => Ok(from.as_any_box().downcast::<GuestRegValueDataSpec>()?),
10385            StructType::GuestRegValueBinarySpec => Ok(from.as_any_box().downcast::<GuestRegValueBinarySpec>()?),
10386            StructType::GuestRegValueDwordSpec => Ok(from.as_any_box().downcast::<GuestRegValueDwordSpec>()?),
10387            StructType::GuestRegValueExpandStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueExpandStringSpec>()?),
10388            StructType::GuestRegValueMultiStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueMultiStringSpec>()?),
10389            StructType::GuestRegValueQwordSpec => Ok(from.as_any_box().downcast::<GuestRegValueQwordSpec>()?),
10390            StructType::GuestRegValueStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueStringSpec>()?),
10391            StructType::GuestRegValueNameSpec => Ok(from.as_any_box().downcast::<GuestRegValueNameSpec>()?),
10392            StructType::DeviceGroupId => Ok(from.as_any_box().downcast::<DeviceGroupId>()?),
10393            StructType::FaultDomainId => Ok(from.as_any_box().downcast::<FaultDomainId>()?),
10394            StructType::FaultDomainInfo => Ok(from.as_any_box().downcast::<FaultDomainInfo>()?),
10395            StructType::ReplicationGroupId => Ok(from.as_any_box().downcast::<ReplicationGroupId>()?),
10396            StructType::ReplicationSpec => Ok(from.as_any_box().downcast::<ReplicationSpec>()?),
10397            StructType::VsanCapacityReservationInfo => Ok(from.as_any_box().downcast::<VsanCapacityReservationInfo>()?),
10398            StructType::ClusterRuntimeInfo => Ok(from.as_any_box().downcast::<ClusterRuntimeInfo>()?),
10399            StructType::VsanCompatibilityCheckResult => Ok(from.as_any_box().downcast::<VsanCompatibilityCheckResult>()?),
10400            StructType::VimVsanDataEfficiencyCapacityState => Ok(from.as_any_box().downcast::<VimVsanDataEfficiencyCapacityState>()?),
10401            StructType::VsanDataEfficiencyConfig => Ok(from.as_any_box().downcast::<VsanDataEfficiencyConfig>()?),
10402            StructType::VsanDataEfficiencyConfigEx => Ok(from.as_any_box().downcast::<VsanDataEfficiencyConfigEx>()?),
10403            StructType::VsanDataEncryptionConfig => Ok(from.as_any_box().downcast::<VsanDataEncryptionConfig>()?),
10404            StructType::VsanDataInTransitEncryptionConfig => Ok(from.as_any_box().downcast::<VsanDataInTransitEncryptionConfig>()?),
10405            StructType::VsanDatastoreConfig => Ok(from.as_any_box().downcast::<VsanDatastoreConfig>()?),
10406            StructType::VsanAdvancedDatastoreConfig => Ok(from.as_any_box().downcast::<VsanAdvancedDatastoreConfig>()?),
10407            StructType::VsanDatastoreSpec => Ok(from.as_any_box().downcast::<VsanDatastoreSpec>()?),
10408            StructType::VsanClientDatastoreConfig => Ok(from.as_any_box().downcast::<VsanClientDatastoreConfig>()?),
10409            StructType::VsanXvcClientConfig => Ok(from.as_any_box().downcast::<VsanXvcClientConfig>()?),
10410            StructType::DefaultDatastorePolicySelectionInfo => Ok(from.as_any_box().downcast::<DefaultDatastorePolicySelectionInfo>()?),
10411            StructType::VsanDirectoryServerConfig => Ok(from.as_any_box().downcast::<VsanDirectoryServerConfig>()?),
10412            StructType::ActiveVsanDirectoryServerConfig => Ok(from.as_any_box().downcast::<ActiveVsanDirectoryServerConfig>()?),
10413            StructType::DiskClaimConfiguration => Ok(from.as_any_box().downcast::<DiskClaimConfiguration>()?),
10414            StructType::VsanEntityCompatibilityResult => Ok(from.as_any_box().downcast::<VsanEntityCompatibilityResult>()?),
10415            StructType::EntityResourceCheckDetails => Ok(from.as_any_box().downcast::<EntityResourceCheckDetails>()?),
10416            StructType::VsanDiskGroupResourceCheckResult => Ok(from.as_any_box().downcast::<VsanDiskGroupResourceCheckResult>()?),
10417            StructType::VsanDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanDiskResourceCheckResult>()?),
10418            StructType::VsanStoragePoolDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanStoragePoolDiskResourceCheckResult>()?),
10419            StructType::VsanFaultDomainResourceCheckResult => Ok(from.as_any_box().downcast::<VsanFaultDomainResourceCheckResult>()?),
10420            StructType::VsanHostResourceCheckResult => Ok(from.as_any_box().downcast::<VsanHostResourceCheckResult>()?),
10421            StructType::VsanResourceCheckResult => Ok(from.as_any_box().downcast::<VsanResourceCheckResult>()?),
10422            StructType::VsanResourceCheckComponentResult => Ok(from.as_any_box().downcast::<VsanResourceCheckComponentResult>()?),
10423            StructType::VsanResourceCheckDataPersistenceResult => Ok(from.as_any_box().downcast::<VsanResourceCheckDataPersistenceResult>()?),
10424            StructType::VsanResourceCheckVsanResult => Ok(from.as_any_box().downcast::<VsanResourceCheckVsanResult>()?),
10425            StructType::VsanStoragePoolResourceCheckResult => Ok(from.as_any_box().downcast::<VsanStoragePoolResourceCheckResult>()?),
10426            StructType::VsanFileServiceConfig => Ok(from.as_any_box().downcast::<VsanFileServiceConfig>()?),
10427            StructType::VsanFileServiceDomain => Ok(from.as_any_box().downcast::<VsanFileServiceDomain>()?),
10428            StructType::VsanFileServiceDomainConfig => Ok(from.as_any_box().downcast::<VsanFileServiceDomainConfig>()?),
10429            StructType::VsanFileServiceDomainQuerySpec => Ok(from.as_any_box().downcast::<VsanFileServiceDomainQuerySpec>()?),
10430            StructType::VsanFileShare => Ok(from.as_any_box().downcast::<VsanFileShare>()?),
10431            StructType::VsanFileShareConfig => Ok(from.as_any_box().downcast::<VsanFileShareConfig>()?),
10432            StructType::VsanFileShareNetPermission => Ok(from.as_any_box().downcast::<VsanFileShareNetPermission>()?),
10433            StructType::VsanFileShareQueryProperties => Ok(from.as_any_box().downcast::<VsanFileShareQueryProperties>()?),
10434            StructType::FileShareQueryResult => Ok(from.as_any_box().downcast::<FileShareQueryResult>()?),
10435            StructType::VsanFileShareQuerySpec => Ok(from.as_any_box().downcast::<VsanFileShareQuerySpec>()?),
10436            StructType::VsanFileShareRuntimeInfo => Ok(from.as_any_box().downcast::<VsanFileShareRuntimeInfo>()?),
10437            StructType::VsanFileShareSmbOptions => Ok(from.as_any_box().downcast::<VsanFileShareSmbOptions>()?),
10438            StructType::VsanFileShareSnapshot => Ok(from.as_any_box().downcast::<VsanFileShareSnapshot>()?),
10439            StructType::VsanFileShareSnapshotConfig => Ok(from.as_any_box().downcast::<VsanFileShareSnapshotConfig>()?),
10440            StructType::VsanFileShareSnapshotQueryResult => Ok(from.as_any_box().downcast::<VsanFileShareSnapshotQueryResult>()?),
10441            StructType::VsanFileShareSnapshotQuerySpec => Ok(from.as_any_box().downcast::<VsanFileShareSnapshotQuerySpec>()?),
10442            StructType::VsanHciMeshDatastoreSource => Ok(from.as_any_box().downcast::<VsanHciMeshDatastoreSource>()?),
10443            StructType::VsanIoDiagnosticsFailedCheck => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsFailedCheck>()?),
10444            StructType::VsanIoDiagnosticsInstance => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsInstance>()?),
10445            StructType::VsanIoDiagnosticsInstanceEvent => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsInstanceEvent>()?),
10446            StructType::VsanIoDiagnosticsInstanceQuerySpec => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsInstanceQuerySpec>()?),
10447            StructType::VsanIoDiagnosticsObjectLayout => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsObjectLayout>()?),
10448            StructType::VsanIoDiagnosticsPrecheckResult => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsPrecheckResult>()?),
10449            StructType::VsanIoDiagnosticsStats => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsStats>()?),
10450            StructType::VsanIoDiagnosticsTarget => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsTarget>()?),
10451            StructType::VsanIoDiagnosticsTargetStats => Ok(from.as_any_box().downcast::<VsanIoDiagnosticsTargetStats>()?),
10452            StructType::VsanIoLatency => Ok(from.as_any_box().downcast::<VsanIoLatency>()?),
10453            StructType::VsanIoLatencyMetrics => Ok(from.as_any_box().downcast::<VsanIoLatencyMetrics>()?),
10454            StructType::LifecycleConfigDetails => Ok(from.as_any_box().downcast::<LifecycleConfigDetails>()?),
10455            StructType::LifecycleFaultDomainDetails => Ok(from.as_any_box().downcast::<LifecycleFaultDomainDetails>()?),
10456            StructType::LifecyclePreCheckResult => Ok(from.as_any_box().downcast::<LifecyclePreCheckResult>()?),
10457            StructType::LifecycleWitnessDetails => Ok(from.as_any_box().downcast::<LifecycleWitnessDetails>()?),
10458            StructType::VsanMetricProfile => Ok(from.as_any_box().downcast::<VsanMetricProfile>()?),
10459            StructType::VsanMetricsConfig => Ok(from.as_any_box().downcast::<VsanMetricsConfig>()?),
10460            StructType::VsanMountPrecheckItem => Ok(from.as_any_box().downcast::<VsanMountPrecheckItem>()?),
10461            StructType::VsanDatastoreSourcePrecheckItem => Ok(from.as_any_box().downcast::<VsanDatastoreSourcePrecheckItem>()?),
10462            StructType::VsanMountPrecheckNetworkConnectivityResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkConnectivityResult>()?),
10463            StructType::VsanMountPrecheckNetworkLatencyResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkLatencyResult>()?),
10464            StructType::VsanMountPrecheckNetworkConnectivity => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkConnectivity>()?),
10465            StructType::VsanMountPrecheckNetworkConnectivityDetail => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkConnectivityDetail>()?),
10466            StructType::VsanMountPrecheckNetworkLatency => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkLatency>()?),
10467            StructType::VsanMountPrecheckNetworkLatencyDetail => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkLatencyDetail>()?),
10468            StructType::VsanMountPrecheckResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckResult>()?),
10469            StructType::VsanDatastoreSourcePrecheckResult => Ok(from.as_any_box().downcast::<VsanDatastoreSourcePrecheckResult>()?),
10470            StructType::VsanObjectHealthTelemetrySummary => Ok(from.as_any_box().downcast::<VsanObjectHealthTelemetrySummary>()?),
10471            StructType::VsanObjectIoStats => Ok(from.as_any_box().downcast::<VsanObjectIoStats>()?),
10472            StructType::VsanProactiveRebalanceInfo => Ok(from.as_any_box().downcast::<VsanProactiveRebalanceInfo>()?),
10473            StructType::VsanRdmaConfig => Ok(from.as_any_box().downcast::<VsanRdmaConfig>()?),
10474            StructType::VsanRemoteVcInfo => Ok(from.as_any_box().downcast::<VsanRemoteVcInfo>()?),
10475            StructType::VsanRemoteVcInfoStandalone => Ok(from.as_any_box().downcast::<VsanRemoteVcInfoStandalone>()?),
10476            StructType::RemoteVsanSite => Ok(from.as_any_box().downcast::<RemoteVsanSite>()?),
10477            StructType::RemoteVsanSiteAffinity => Ok(from.as_any_box().downcast::<RemoteVsanSiteAffinity>()?),
10478            StructType::RepairTimerInfo => Ok(from.as_any_box().downcast::<RepairTimerInfo>()?),
10479            StructType::VsanResourceCheckSpec => Ok(from.as_any_box().downcast::<VsanResourceCheckSpec>()?),
10480            StructType::VsanResourceCheckStatus => Ok(from.as_any_box().downcast::<VsanResourceCheckStatus>()?),
10481            StructType::VsanResourceCheckTaskDetails => Ok(from.as_any_box().downcast::<VsanResourceCheckTaskDetails>()?),
10482            StructType::VsanDiskDataEvacuationResourceCheckTaskDetails => Ok(from.as_any_box().downcast::<VsanDiskDataEvacuationResourceCheckTaskDetails>()?),
10483            StructType::ResyncIopsInfo => Ok(from.as_any_box().downcast::<ResyncIopsInfo>()?),
10484            StructType::VsanRuntimeStatsHostMap => Ok(from.as_any_box().downcast::<VsanRuntimeStatsHostMap>()?),
10485            StructType::SsdEnduranceThresholdSpec => Ok(from.as_any_box().downcast::<SsdEnduranceThresholdSpec>()?),
10486            StructType::VsanServerHostUnicastInfo => Ok(from.as_any_box().downcast::<VsanServerHostUnicastInfo>()?),
10487            StructType::VsanSharedWitnessCompatibilityResult => Ok(from.as_any_box().downcast::<VsanSharedWitnessCompatibilityResult>()?),
10488            StructType::VsanSnapServiceConfig => Ok(from.as_any_box().downcast::<VsanSnapServiceConfig>()?),
10489            StructType::VcRemoteVsanServerClusterConfig => Ok(from.as_any_box().downcast::<VcRemoteVsanServerClusterConfig>()?),
10490            StructType::VcRemoteVsanServerClusterInfo => Ok(from.as_any_box().downcast::<VcRemoteVsanServerClusterInfo>()?),
10491            StructType::VsanIscsiVipConfigSpec => Ok(from.as_any_box().downcast::<VsanIscsiVipConfigSpec>()?),
10492            StructType::VsanIscsiVipConfig => Ok(from.as_any_box().downcast::<VsanIscsiVipConfig>()?),
10493            StructType::VsanIscsiVipDVswitchConfig => Ok(from.as_any_box().downcast::<VsanIscsiVipDVswitchConfig>()?),
10494            StructType::VsanVipNetworkConfig => Ok(from.as_any_box().downcast::<VsanVipNetworkConfig>()?),
10495            StructType::VsanIscsiVipVswitchConfig => Ok(from.as_any_box().downcast::<VsanIscsiVipVswitchConfig>()?),
10496            StructType::VsanBurnInTest => Ok(from.as_any_box().downcast::<VsanBurnInTest>()?),
10497            StructType::VsanBurnInTestCheckResult => Ok(from.as_any_box().downcast::<VsanBurnInTestCheckResult>()?),
10498            StructType::VsanCloudHealthStatus => Ok(from.as_any_box().downcast::<VsanCloudHealthStatus>()?),
10499            StructType::VsanClusterBurnInTestResultList => Ok(from.as_any_box().downcast::<VsanClusterBurnInTestResultList>()?),
10500            StructType::VsanCompliantDriver => Ok(from.as_any_box().downcast::<VsanCompliantDriver>()?),
10501            StructType::VsanCompliantFirmware => Ok(from.as_any_box().downcast::<VsanCompliantFirmware>()?),
10502            StructType::VsanConfigBaseIssue => Ok(from.as_any_box().downcast::<VsanConfigBaseIssue>()?),
10503            StructType::VsanConfigNotAllDisksClaimedIssue => Ok(from.as_any_box().downcast::<VsanConfigNotAllDisksClaimedIssue>()?),
10504            StructType::VsanConfigCheckResult => Ok(from.as_any_box().downcast::<VsanConfigCheckResult>()?),
10505            StructType::VsanDatastoreDefaultPolicySelectionConfig => Ok(from.as_any_box().downcast::<VsanDatastoreDefaultPolicySelectionConfig>()?),
10506            StructType::VsanDeconvergedNetConfig => Ok(from.as_any_box().downcast::<VsanDeconvergedNetConfig>()?),
10507            StructType::VsanDiskModelInfo => Ok(from.as_any_box().downcast::<VsanDiskModelInfo>()?),
10508            StructType::VsanDownloadItem => Ok(from.as_any_box().downcast::<VsanDownloadItem>()?),
10509            StructType::VsanEsaConfig => Ok(from.as_any_box().downcast::<VsanEsaConfig>()?),
10510            StructType::VsanEsaConfigInfo => Ok(from.as_any_box().downcast::<VsanEsaConfigInfo>()?),
10511            StructType::VsanEsaDiskConfiguration => Ok(from.as_any_box().downcast::<VsanEsaDiskConfiguration>()?),
10512            StructType::VsanExtendedConfig => Ok(from.as_any_box().downcast::<VsanExtendedConfig>()?),
10513            StructType::VsanFileServiceOvfSpec => Ok(from.as_any_box().downcast::<VsanFileServiceOvfSpec>()?),
10514            StructType::VsanFileServicePreflightCheckResult => Ok(from.as_any_box().downcast::<VsanFileServicePreflightCheckResult>()?),
10515            StructType::VsanGenericClusterBaseIssue => Ok(from.as_any_box().downcast::<VsanGenericClusterBaseIssue>()?),
10516            StructType::VsanGenericClusterBestPracticeHealth => Ok(from.as_any_box().downcast::<VsanGenericClusterBestPracticeHealth>()?),
10517            StructType::VsanHclDeviceConstraint => Ok(from.as_any_box().downcast::<VsanHclDeviceConstraint>()?),
10518            StructType::VsanHclDiskConstraint => Ok(from.as_any_box().downcast::<VsanHclDiskConstraint>()?),
10519            StructType::VsanHclDriverInfo => Ok(from.as_any_box().downcast::<VsanHclDriverInfo>()?),
10520            StructType::VsanHclMinFwConstraint => Ok(from.as_any_box().downcast::<VsanHclMinFwConstraint>()?),
10521            StructType::VsanHclQuerySpec => Ok(from.as_any_box().downcast::<VsanHclQuerySpec>()?),
10522            StructType::VsanHclReleaseConstraint => Ok(from.as_any_box().downcast::<VsanHclReleaseConstraint>()?),
10523            StructType::VsanHealthConfigSpec => Ok(from.as_any_box().downcast::<VsanHealthConfigSpec>()?),
10524            StructType::VsanHealthCustomizationSpec => Ok(from.as_any_box().downcast::<VsanHealthCustomizationSpec>()?),
10525            StructType::VsanHealthThreshold => Ok(from.as_any_box().downcast::<VsanHealthThreshold>()?),
10526            StructType::VsanHistoricalHealthConfig => Ok(from.as_any_box().downcast::<VsanHistoricalHealthConfig>()?),
10527            StructType::VsanHostDeviceInfo => Ok(from.as_any_box().downcast::<VsanHostDeviceInfo>()?),
10528            StructType::VsanHwToVcgInfoMappingSpec => Ok(from.as_any_box().downcast::<VsanHwToVcgInfoMappingSpec>()?),
10529            StructType::VsanIoTripAnalyzerConfig => Ok(from.as_any_box().downcast::<VsanIoTripAnalyzerConfig>()?),
10530            StructType::VsanIoTripAnalyzerRecurrence => Ok(from.as_any_box().downcast::<VsanIoTripAnalyzerRecurrence>()?),
10531            StructType::VsanInternalExtendedConfig => Ok(from.as_any_box().downcast::<VsanInternalExtendedConfig>()?),
10532            StructType::VsanNetworkConfigBaseIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigBaseIssue>()?),
10533            StructType::VsanNetworkConfigPnicSpeedInconsistencyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigPnicSpeedInconsistencyIssue>()?),
10534            StructType::VsanNetworkConfigPortgroupWithNoRedundancyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigPortgroupWithNoRedundancyIssue>()?),
10535            StructType::VsanNetworkConfigVdsScopeIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVdsScopeIssue>()?),
10536            StructType::VsanNetworkConfigVsanNotOnVdsIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVsanNotOnVdsIssue>()?),
10537            StructType::VsanNetworkConfigVswitchWithNoRedundancyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVswitchWithNoRedundancyIssue>()?),
10538            StructType::VsanNetworkVMotionVmknicNotFountIssue => Ok(from.as_any_box().downcast::<VsanNetworkVMotionVmknicNotFountIssue>()?),
10539            StructType::VsanNetworkConfigBestPracticeHealth => Ok(from.as_any_box().downcast::<VsanNetworkConfigBestPracticeHealth>()?),
10540            StructType::VsanObjSnapParams => Ok(from.as_any_box().downcast::<VsanObjSnapParams>()?),
10541            StructType::VsanObjectDetail => Ok(from.as_any_box().downcast::<VsanObjectDetail>()?),
10542            StructType::VsanObjectSnapshotId => Ok(from.as_any_box().downcast::<VsanObjectSnapshotId>()?),
10543            StructType::VimVsanVsanPMemConfig => Ok(from.as_any_box().downcast::<VimVsanVsanPMemConfig>()?),
10544            StructType::VsanPerfsvcHealthResult => Ok(from.as_any_box().downcast::<VsanPerfsvcHealthResult>()?),
10545            StructType::VsanPrepareVsanForVcsaSpec => Ok(from.as_any_box().downcast::<VsanPrepareVsanForVcsaSpec>()?),
10546            StructType::VsanSnapshotDetail => Ok(from.as_any_box().downcast::<VsanSnapshotDetail>()?),
10547            StructType::VsanSnapshotQueryResult => Ok(from.as_any_box().downcast::<VsanSnapshotQueryResult>()?),
10548            StructType::VsanSnapshotQuerySpec => Ok(from.as_any_box().downcast::<VsanSnapshotQuerySpec>()?),
10549            StructType::VsanSpaceEfficiencyMetadataSize => Ok(from.as_any_box().downcast::<VsanSpaceEfficiencyMetadataSize>()?),
10550            StructType::VsanSpaceEfficiencyRatio => Ok(from.as_any_box().downcast::<VsanSpaceEfficiencyRatio>()?),
10551            StructType::VsanUnmapConfig => Ok(from.as_any_box().downcast::<VsanUnmapConfig>()?),
10552            StructType::VsanUpdateItem => Ok(from.as_any_box().downcast::<VsanUpdateItem>()?),
10553            StructType::VsanVcPostDeployConfigSpec => Ok(from.as_any_box().downcast::<VsanVcPostDeployConfigSpec>()?),
10554            StructType::VsanVcStretchedClusterConfigSpec => Ok(from.as_any_box().downcast::<VsanVcStretchedClusterConfigSpec>()?),
10555            StructType::VsanVcsaDeploymentProgress => Ok(from.as_any_box().downcast::<VsanVcsaDeploymentProgress>()?),
10556            StructType::VsanVdsMigrationPlan => Ok(from.as_any_box().downcast::<VsanVdsMigrationPlan>()?),
10557            StructType::VsanVdsPgMigrationHostInfo => Ok(from.as_any_box().downcast::<VsanVdsPgMigrationHostInfo>()?),
10558            StructType::VsanVdsPgMigrationSpec => Ok(from.as_any_box().downcast::<VsanVdsPgMigrationSpec>()?),
10559            StructType::VsanVdsPgMigrationVmInfo => Ok(from.as_any_box().downcast::<VsanVdsPgMigrationVmInfo>()?),
10560            StructType::VsanVibInstallPreflightStatus => Ok(from.as_any_box().downcast::<VsanVibInstallPreflightStatus>()?),
10561            StructType::VsanVibScanResult => Ok(from.as_any_box().downcast::<VsanVibScanResult>()?),
10562            StructType::VsanVibSpec => Ok(from.as_any_box().downcast::<VsanVibSpec>()?),
10563            StructType::VsanVmVdsMigrationSpec => Ok(from.as_any_box().downcast::<VsanVmVdsMigrationSpec>()?),
10564            StructType::VsanVnicVdsMigrationSpec => Ok(from.as_any_box().downcast::<VsanVnicVdsMigrationSpec>()?),
10565            StructType::VsanVumConfig => Ok(from.as_any_box().downcast::<VsanVumConfig>()?),
10566            StructType::VsanWitnessHostConfig => Ok(from.as_any_box().downcast::<VsanWitnessHostConfig>()?),
10567            StructType::VsanXvcClientInfo => Ok(from.as_any_box().downcast::<VsanXvcClientInfo>()?),
10568            StructType::VsanXvcDatastoreConfig => Ok(from.as_any_box().downcast::<VsanXvcDatastoreConfig>()?),
10569            StructType::VsanXvcDatastoreInfo => Ok(from.as_any_box().downcast::<VsanXvcDatastoreInfo>()?),
10570            StructType::VsanXvcClientInfoSpec => Ok(from.as_any_box().downcast::<VsanXvcClientInfoSpec>()?),
10571            StructType::VsanXvcQueryCriteria => Ok(from.as_any_box().downcast::<VsanXvcQueryCriteria>()?),
10572            StructType::VsanXvcQueryFilter => Ok(from.as_any_box().downcast::<VsanXvcQueryFilter>()?),
10573            StructType::VsanXvcQueryPropertyValue => Ok(from.as_any_box().downcast::<VsanXvcQueryPropertyValue>()?),
10574            StructType::VsanXvcQueryResultSet => Ok(from.as_any_box().downcast::<VsanXvcQueryResultSet>()?),
10575            StructType::VsanXvcQuerySpec => Ok(from.as_any_box().downcast::<VsanXvcQuerySpec>()?),
10576            StructType::VsanXvcResultItem => Ok(from.as_any_box().downcast::<VsanXvcResultItem>()?),
10577            StructType::VsanClusterConfigInfo => Ok(from.as_any_box().downcast::<VsanClusterConfigInfo>()?),
10578            StructType::VsanConfigInfoEx => Ok(from.as_any_box().downcast::<VsanConfigInfoEx>()?),
10579            StructType::VsanClusterConfigInfoHostDefaultInfo => Ok(from.as_any_box().downcast::<VsanClusterConfigInfoHostDefaultInfo>()?),
10580            StructType::VsanClusterCoreConfig => Ok(from.as_any_box().downcast::<VsanClusterCoreConfig>()?),
10581            StructType::VsanClusterCoreConfigSpec => Ok(from.as_any_box().downcast::<VsanClusterCoreConfigSpec>()?),
10582            StructType::VsanHostAbortWipeDiskStatus => Ok(from.as_any_box().downcast::<VsanHostAbortWipeDiskStatus>()?),
10583            StructType::VsanHostAboutInfoEx => Ok(from.as_any_box().downcast::<VsanHostAboutInfoEx>()?),
10584            StructType::VsanAddStoragePoolDiskSpec => Ok(from.as_any_box().downcast::<VsanAddStoragePoolDiskSpec>()?),
10585            StructType::VsanHostClusterStatus => Ok(from.as_any_box().downcast::<VsanHostClusterStatus>()?),
10586            StructType::VsanHostClusterStatusState => Ok(from.as_any_box().downcast::<VsanHostClusterStatusState>()?),
10587            StructType::VsanHostClusterStatusStateCompletionEstimate => Ok(from.as_any_box().downcast::<VsanHostClusterStatusStateCompletionEstimate>()?),
10588            StructType::VsanComplianceDetail => Ok(from.as_any_box().downcast::<VsanComplianceDetail>()?),
10589            StructType::VsanComplianceResult => Ok(from.as_any_box().downcast::<VsanComplianceResult>()?),
10590            StructType::VsanHostConfigInfo => Ok(from.as_any_box().downcast::<VsanHostConfigInfo>()?),
10591            StructType::VsanHostConfigInfoEx => Ok(from.as_any_box().downcast::<VsanHostConfigInfoEx>()?),
10592            StructType::VsanHostConfigInfoClusterInfo => Ok(from.as_any_box().downcast::<VsanHostConfigInfoClusterInfo>()?),
10593            StructType::VsanHostFaultDomainInfo => Ok(from.as_any_box().downcast::<VsanHostFaultDomainInfo>()?),
10594            StructType::VsanHostConfigInfoNetworkInfo => Ok(from.as_any_box().downcast::<VsanHostConfigInfoNetworkInfo>()?),
10595            StructType::VsanHostConfigInfoNetworkInfoPortConfig => Ok(from.as_any_box().downcast::<VsanHostConfigInfoNetworkInfoPortConfig>()?),
10596            StructType::VsanHostPortConfigEx => Ok(from.as_any_box().downcast::<VsanHostPortConfigEx>()?),
10597            StructType::VsanHostConfigInfoStorageInfo => Ok(from.as_any_box().downcast::<VsanHostConfigInfoStorageInfo>()?),
10598            StructType::VsanHostCreateNativeKeyProviderSpec => Ok(from.as_any_box().downcast::<VsanHostCreateNativeKeyProviderSpec>()?),
10599            StructType::VsanInTransitEncryptionInfo => Ok(from.as_any_box().downcast::<VsanInTransitEncryptionInfo>()?),
10600            StructType::VsanHostDecommissionMode => Ok(from.as_any_box().downcast::<VsanHostDecommissionMode>()?),
10601            StructType::VsanDeleteStoragePoolDiskSpec => Ok(from.as_any_box().downcast::<VsanDeleteStoragePoolDiskSpec>()?),
10602            StructType::VsanHostDiskMapInfo => Ok(from.as_any_box().downcast::<VsanHostDiskMapInfo>()?),
10603            StructType::VimVsanHostDiskMapInfoEx => Ok(from.as_any_box().downcast::<VimVsanHostDiskMapInfoEx>()?),
10604            StructType::VsanHostDiskMapResult => Ok(from.as_any_box().downcast::<VsanHostDiskMapResult>()?),
10605            StructType::VsanHostDiskMapping => Ok(from.as_any_box().downcast::<VsanHostDiskMapping>()?),
10606            StructType::VimVsanHostDiskMappingCreationSpec => Ok(from.as_any_box().downcast::<VimVsanHostDiskMappingCreationSpec>()?),
10607            StructType::VsanHostDiskResult => Ok(from.as_any_box().downcast::<VsanHostDiskResult>()?),
10608            StructType::VimVsanHostDiskResultEx => Ok(from.as_any_box().downcast::<VimVsanHostDiskResultEx>()?),
10609            StructType::VsanHostDrsStats => Ok(from.as_any_box().downcast::<VsanHostDrsStats>()?),
10610            StructType::VsanHostEncryptionInfo => Ok(from.as_any_box().downcast::<VsanHostEncryptionInfo>()?),
10611            StructType::VsanHostIpConfig => Ok(from.as_any_box().downcast::<VsanHostIpConfig>()?),
10612            StructType::VsanHostIpConfigEx => Ok(from.as_any_box().downcast::<VsanHostIpConfigEx>()?),
10613            StructType::VsanHostMembershipInfo => Ok(from.as_any_box().downcast::<VsanHostMembershipInfo>()?),
10614            StructType::VsanPolicyStatus => Ok(from.as_any_box().downcast::<VsanPolicyStatus>()?),
10615            StructType::VimVsanHostQueryVsanDisksSpec => Ok(from.as_any_box().downcast::<VimVsanHostQueryVsanDisksSpec>()?),
10616            StructType::RemoteVsanServerClusterConfig => Ok(from.as_any_box().downcast::<RemoteVsanServerClusterConfig>()?),
10617            StructType::VsanHostRuntimeStats => Ok(from.as_any_box().downcast::<VsanHostRuntimeStats>()?),
10618            StructType::VsanHostServerClusterUnicastConfig => Ok(from.as_any_box().downcast::<VsanHostServerClusterUnicastConfig>()?),
10619            StructType::VsanHostServerClusterUnicastInfo => Ok(from.as_any_box().downcast::<VsanHostServerClusterUnicastInfo>()?),
10620            StructType::SiteAffinityInfo => Ok(from.as_any_box().downcast::<SiteAffinityInfo>()?),
10621            StructType::VsanStoragePoolDisk => Ok(from.as_any_box().downcast::<VsanStoragePoolDisk>()?),
10622            StructType::VimVsanHostStoragePoolDiskInfo => Ok(from.as_any_box().downcast::<VimVsanHostStoragePoolDiskInfo>()?),
10623            StructType::VimVsanHostStoragePoolInfo => Ok(from.as_any_box().downcast::<VimVsanHostStoragePoolInfo>()?),
10624            StructType::VimVsanHostTrimDiskEntry => Ok(from.as_any_box().downcast::<VimVsanHostTrimDiskEntry>()?),
10625            StructType::VimVsanHostTrimDiskSpec => Ok(from.as_any_box().downcast::<VimVsanHostTrimDiskSpec>()?),
10626            StructType::VimVsanHostUpdateStoragePoolDiskSpec => Ok(from.as_any_box().downcast::<VimVsanHostUpdateStoragePoolDiskSpec>()?),
10627            StructType::VsanHostAssociatedObjects => Ok(from.as_any_box().downcast::<VsanHostAssociatedObjects>()?),
10628            StructType::VsanHostAssociatedObjectsResult => Ok(from.as_any_box().downcast::<VsanHostAssociatedObjectsResult>()?),
10629            StructType::VsanComplianceQuerySpec => Ok(from.as_any_box().downcast::<VsanComplianceQuerySpec>()?),
10630            StructType::VsanHostComponentSyncState => Ok(from.as_any_box().downcast::<VsanHostComponentSyncState>()?),
10631            StructType::VimVsanHostVsanDirectStorage => Ok(from.as_any_box().downcast::<VimVsanHostVsanDirectStorage>()?),
10632            StructType::VsanHostVsanDiskInfo => Ok(from.as_any_box().downcast::<VsanHostVsanDiskInfo>()?),
10633            StructType::VimVsanHostVsanDiskManagementSystemCapability => Ok(from.as_any_box().downcast::<VimVsanHostVsanDiskManagementSystemCapability>()?),
10634            StructType::VimVsanHostVsanHostCapability => Ok(from.as_any_box().downcast::<VimVsanHostVsanHostCapability>()?),
10635            StructType::VimVsanHostVsanManagedDisksInfo => Ok(from.as_any_box().downcast::<VimVsanHostVsanManagedDisksInfo>()?),
10636            StructType::VimVsanHostVsanManagedPMemInfo => Ok(from.as_any_box().downcast::<VimVsanHostVsanManagedPMemInfo>()?),
10637            StructType::VsanObjectProfileInfo => Ok(from.as_any_box().downcast::<VsanObjectProfileInfo>()?),
10638            StructType::VsanHostVsanObjectSyncState => Ok(from.as_any_box().downcast::<VsanHostVsanObjectSyncState>()?),
10639            StructType::VsanHostRuntimeInfo => Ok(from.as_any_box().downcast::<VsanHostRuntimeInfo>()?),
10640            StructType::VsanHostRuntimeInfoDiskIssue => Ok(from.as_any_box().downcast::<VsanHostRuntimeInfoDiskIssue>()?),
10641            StructType::VimVsanHostVsanScsiDisk => Ok(from.as_any_box().downcast::<VimVsanHostVsanScsiDisk>()?),
10642            StructType::VsanHostVsanObjectSyncQueryResult => Ok(from.as_any_box().downcast::<VsanHostVsanObjectSyncQueryResult>()?),
10643            StructType::VsanSyncingObjectRecoveryDetails => Ok(from.as_any_box().downcast::<VsanSyncingObjectRecoveryDetails>()?),
10644            StructType::VsanWhatIfEvacDetail => Ok(from.as_any_box().downcast::<VsanWhatIfEvacDetail>()?),
10645            StructType::VsanWhatIfEvacResult => Ok(from.as_any_box().downcast::<VsanWhatIfEvacResult>()?),
10646            StructType::VsanHostWipeDiskStatus => Ok(from.as_any_box().downcast::<VsanHostWipeDiskStatus>()?),
10647            StructType::BaseConfigInfo => Ok(from.as_any_box().downcast::<BaseConfigInfo>()?),
10648            StructType::VStorageObjectConfigInfo => Ok(from.as_any_box().downcast::<VStorageObjectConfigInfo>()?),
10649            StructType::BaseConfigInfoBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoBackingInfo>()?),
10650            StructType::BaseConfigInfoFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoFileBackingInfo>()?),
10651            StructType::BaseConfigInfoDiskFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoDiskFileBackingInfo>()?),
10652            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
10653            StructType::VslmCreateSpec => Ok(from.as_any_box().downcast::<VslmCreateSpec>()?),
10654            StructType::VslmCreateSpecBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecBackingSpec>()?),
10655            StructType::VslmCreateSpecDiskFileBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecDiskFileBackingSpec>()?),
10656            StructType::VslmCreateSpecRawDiskMappingBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecRawDiskMappingBackingSpec>()?),
10657            StructType::DiskCryptoSpec => Ok(from.as_any_box().downcast::<DiskCryptoSpec>()?),
10658            StructType::Id => Ok(from.as_any_box().downcast::<Id>()?),
10659            StructType::VslmInfrastructureObjectPolicy => Ok(from.as_any_box().downcast::<VslmInfrastructureObjectPolicy>()?),
10660            StructType::VslmInfrastructureObjectPolicySpec => Ok(from.as_any_box().downcast::<VslmInfrastructureObjectPolicySpec>()?),
10661            StructType::VslmMigrateSpec => Ok(from.as_any_box().downcast::<VslmMigrateSpec>()?),
10662            StructType::VslmCloneSpec => Ok(from.as_any_box().downcast::<VslmCloneSpec>()?),
10663            StructType::VslmRelocateSpec => Ok(from.as_any_box().downcast::<VslmRelocateSpec>()?),
10664            StructType::VStorageObjectReconcileResult => Ok(from.as_any_box().downcast::<VStorageObjectReconcileResult>()?),
10665            StructType::VStorageObjectReconcileResultInvalidDiskPath => Ok(from.as_any_box().downcast::<VStorageObjectReconcileResultInvalidDiskPath>()?),
10666            StructType::VStorageObjectReconcileResultReconcileDetail => Ok(from.as_any_box().downcast::<VStorageObjectReconcileResultReconcileDetail>()?),
10667            StructType::VStorageObjectReconcileSpec => Ok(from.as_any_box().downcast::<VStorageObjectReconcileSpec>()?),
10668            StructType::VStorageObjectStateInfo => Ok(from.as_any_box().downcast::<VStorageObjectStateInfo>()?),
10669            StructType::VslmTagEntry => Ok(from.as_any_box().downcast::<VslmTagEntry>()?),
10670            StructType::VslmVClockInfo => Ok(from.as_any_box().downcast::<VslmVClockInfo>()?),
10671            StructType::VStorageObject => Ok(from.as_any_box().downcast::<VStorageObject>()?),
10672            StructType::VStorageObjectSnapshot => Ok(from.as_any_box().downcast::<VStorageObjectSnapshot>()?),
10673            StructType::VStorageObjectSnapshotDetails => Ok(from.as_any_box().downcast::<VStorageObjectSnapshotDetails>()?),
10674            StructType::VStorageObjectSnapshotInfo => Ok(from.as_any_box().downcast::<VStorageObjectSnapshotInfo>()?),
10675            StructType::VStorageObjectSnapshotInfoVStorageObjectSnapshot => Ok(from.as_any_box().downcast::<VStorageObjectSnapshotInfoVStorageObjectSnapshot>()?),
10676            StructType::RetrieveVStorageObjSpec => Ok(from.as_any_box().downcast::<RetrieveVStorageObjSpec>()?),
10677            StructType::VStorageObjectAssociations => Ok(from.as_any_box().downcast::<VStorageObjectAssociations>()?),
10678            StructType::VStorageObjectAssociationsVmDiskAssociations => Ok(from.as_any_box().downcast::<VStorageObjectAssociationsVmDiskAssociations>()?),
10679            StructType::DynamicArray => Ok(from.as_any_box().downcast::<DynamicArray>()?),
10680            StructType::DynamicProperty => Ok(from.as_any_box().downcast::<DynamicProperty>()?),
10681            StructType::KeyAnyValue => Ok(from.as_any_box().downcast::<KeyAnyValue>()?),
10682            StructType::LocalizableMessage => Ok(from.as_any_box().downcast::<LocalizableMessage>()?),
10683            StructType::LocalizedMethodFault => Ok(from.as_any_box().downcast::<LocalizedMethodFault>()?),
10684            StructType::PropertyChange => Ok(from.as_any_box().downcast::<PropertyChange>()?),
10685            StructType::PropertyFilterSpec => Ok(from.as_any_box().downcast::<PropertyFilterSpec>()?),
10686            StructType::PropertyFilterUpdate => Ok(from.as_any_box().downcast::<PropertyFilterUpdate>()?),
10687            StructType::MissingObject => Ok(from.as_any_box().downcast::<MissingObject>()?),
10688            StructType::MissingProperty => Ok(from.as_any_box().downcast::<MissingProperty>()?),
10689            StructType::ObjectContent => Ok(from.as_any_box().downcast::<ObjectContent>()?),
10690            StructType::ObjectSpec => Ok(from.as_any_box().downcast::<ObjectSpec>()?),
10691            StructType::ObjectUpdate => Ok(from.as_any_box().downcast::<ObjectUpdate>()?),
10692            StructType::PropertySpec => Ok(from.as_any_box().downcast::<PropertySpec>()?),
10693            StructType::RetrieveOptions => Ok(from.as_any_box().downcast::<RetrieveOptions>()?),
10694            StructType::RetrieveResult => Ok(from.as_any_box().downcast::<RetrieveResult>()?),
10695            StructType::SelectionSpec => Ok(from.as_any_box().downcast::<SelectionSpec>()?),
10696            StructType::TraversalSpec => Ok(from.as_any_box().downcast::<TraversalSpec>()?),
10697            StructType::UpdateSet => Ok(from.as_any_box().downcast::<UpdateSet>()?),
10698            StructType::WaitOptions => Ok(from.as_any_box().downcast::<WaitOptions>()?),
10699            StructType::VslmAboutInfo => Ok(from.as_any_box().downcast::<VslmAboutInfo>()?),
10700            StructType::VslmQueryDatastoreInfoResult => Ok(from.as_any_box().downcast::<VslmQueryDatastoreInfoResult>()?),
10701            StructType::VslmServiceInstanceContent => Ok(from.as_any_box().downcast::<VslmServiceInstanceContent>()?),
10702            StructType::VslmTaskInfo => Ok(from.as_any_box().downcast::<VslmTaskInfo>()?),
10703            StructType::VslmTaskReason => Ok(from.as_any_box().downcast::<VslmTaskReason>()?),
10704            StructType::VslmTaskReasonAlarm => Ok(from.as_any_box().downcast::<VslmTaskReasonAlarm>()?),
10705            StructType::VslmTaskReasonSchedule => Ok(from.as_any_box().downcast::<VslmTaskReasonSchedule>()?),
10706            StructType::VslmTaskReasonSystem => Ok(from.as_any_box().downcast::<VslmTaskReasonSystem>()?),
10707            StructType::VslmTaskReasonUser => Ok(from.as_any_box().downcast::<VslmTaskReasonUser>()?),
10708            StructType::VslmDatastoreSyncStatus => Ok(from.as_any_box().downcast::<VslmDatastoreSyncStatus>()?),
10709            StructType::VslmVsoVStorageObjectAssociations => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectAssociations>()?),
10710            StructType::VslmVsoVStorageObjectAssociationsVmDiskAssociation => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectAssociationsVmDiskAssociation>()?),
10711            StructType::VslmVsoVStorageObjectQueryResult => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectQueryResult>()?),
10712            StructType::VslmVsoVStorageObjectQuerySpec => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectQuerySpec>()?),
10713            StructType::VslmVsoVStorageObjectResult => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectResult>()?),
10714            StructType::VslmVsoVStorageObjectSnapshotResult => Ok(from.as_any_box().downcast::<VslmVsoVStorageObjectSnapshotResult>()?),
10715            _ => Err(from.as_any_box()),
10716        }
10717    }
10718}
10719/// Deprecated as of vSphere 9.0. Please refer to vLCM APIs.
10720/// 
10721/// Scope specifies which where to deploy agents.
10722/// 
10723/// This structure may be used only with operations rendered under `/eam`.
10724pub trait AgencyScopeTrait : super::traits::DataObjectTrait {
10725}
10726impl<'s> serde::Serialize for dyn AgencyScopeTrait + 's {
10727            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10728            where
10729                S: serde::Serializer,
10730            {
10731                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
10732            }
10733        }
10734impl<'de> serde::Deserialize<'de> for Box<dyn AgencyScopeTrait> {
10735            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10736                deserializer.deserialize_map(AgencyScopeVisitor)
10737            }
10738        }
10739
10740struct AgencyScopeVisitor;
10741
10742impl<'de> de::Visitor<'de> for AgencyScopeVisitor {
10743    type Value = Box<dyn AgencyScopeTrait>;
10744
10745    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10746        formatter.write_str("a valid AgencyScopeTrait JSON object with a _typeName field")
10747    }
10748
10749    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
10750    where
10751        A: de::MapAccess<'de>,
10752    {
10753        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
10754        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
10755        match any {
10756            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
10757                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
10758            VimAny::Value(value) => Err(de::Error::custom(format!(
10759                "expected object not wrapped value: {:?}",
10760                value))),
10761        }
10762    }
10763}
10764
10765impl AgencyScopeTrait for AgencyScope {
10766}
10767impl AgencyScopeTrait for AgencyComputeResourceScope {
10768}
10769impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AgencyScopeTrait {
10770    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
10771        let data_type = from.data_type();
10772        match data_type {
10773            StructType::AgencyScope => Some(from.as_any_ref().downcast_ref::<AgencyScope>()?),
10774            StructType::AgencyComputeResourceScope => Some(from.as_any_ref().downcast_ref::<AgencyComputeResourceScope>()?),
10775            _ => None,
10776        }
10777    }
10778    
10779    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
10780        let data_type = from.data_type();
10781        match data_type {
10782            StructType::AgencyScope => Ok(from.as_any_box().downcast::<AgencyScope>()?),
10783            StructType::AgencyComputeResourceScope => Ok(from.as_any_box().downcast::<AgencyComputeResourceScope>()?),
10784            _ => Err(from.as_any_box()),
10785        }
10786    }
10787}
10788/// Deprecated as of vSphere 9.0. Please refer to vLCM APIs.
10789/// 
10790/// Specifies an SSL trust policy.
10791/// 
10792/// This structure may be used only with operations rendered under `/eam`.
10793/// 
10794/// ***Since:*** vEAM API 8.2
10795pub trait AgentSslTrustTrait : super::traits::DataObjectTrait {
10796}
10797impl<'s> serde::Serialize for dyn AgentSslTrustTrait + 's {
10798            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10799            where
10800                S: serde::Serializer,
10801            {
10802                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
10803            }
10804        }
10805impl<'de> serde::Deserialize<'de> for Box<dyn AgentSslTrustTrait> {
10806            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10807                deserializer.deserialize_map(AgentSslTrustVisitor)
10808            }
10809        }
10810
10811struct AgentSslTrustVisitor;
10812
10813impl<'de> de::Visitor<'de> for AgentSslTrustVisitor {
10814    type Value = Box<dyn AgentSslTrustTrait>;
10815
10816    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10817        formatter.write_str("a valid AgentSslTrustTrait JSON object with a _typeName field")
10818    }
10819
10820    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
10821    where
10822        A: de::MapAccess<'de>,
10823    {
10824        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
10825        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
10826        match any {
10827            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
10828                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
10829            VimAny::Value(value) => Err(de::Error::custom(format!(
10830                "expected object not wrapped value: {:?}",
10831                value))),
10832        }
10833    }
10834}
10835
10836impl AgentSslTrustTrait for AgentSslTrust {
10837}
10838impl AgentSslTrustTrait for AgentAnyCertificate {
10839}
10840impl AgentSslTrustTrait for AgentPinnedPemCertificate {
10841}
10842impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AgentSslTrustTrait {
10843    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
10844        let data_type = from.data_type();
10845        match data_type {
10846            StructType::AgentSslTrust => Some(from.as_any_ref().downcast_ref::<AgentSslTrust>()?),
10847            StructType::AgentAnyCertificate => Some(from.as_any_ref().downcast_ref::<AgentAnyCertificate>()?),
10848            StructType::AgentPinnedPemCertificate => Some(from.as_any_ref().downcast_ref::<AgentPinnedPemCertificate>()?),
10849            _ => None,
10850        }
10851    }
10852    
10853    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
10854        let data_type = from.data_type();
10855        match data_type {
10856            StructType::AgentSslTrust => Ok(from.as_any_box().downcast::<AgentSslTrust>()?),
10857            StructType::AgentAnyCertificate => Ok(from.as_any_box().downcast::<AgentAnyCertificate>()?),
10858            StructType::AgentPinnedPemCertificate => Ok(from.as_any_box().downcast::<AgentPinnedPemCertificate>()?),
10859            _ => Err(from.as_any_box()),
10860        }
10861    }
10862}
10863/// Deprecated as of vSphere 9.0. Please refer to vLCM APIs.
10864/// 
10865/// Specifies the storage policies configured on Agent VMs.
10866/// 
10867/// This structure may be used only with operations rendered under `/eam`.
10868pub trait AgentStoragePolicyTrait : super::traits::DataObjectTrait {
10869}
10870impl<'s> serde::Serialize for dyn AgentStoragePolicyTrait + 's {
10871            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10872            where
10873                S: serde::Serializer,
10874            {
10875                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
10876            }
10877        }
10878impl<'de> serde::Deserialize<'de> for Box<dyn AgentStoragePolicyTrait> {
10879            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10880                deserializer.deserialize_map(AgentStoragePolicyVisitor)
10881            }
10882        }
10883
10884struct AgentStoragePolicyVisitor;
10885
10886impl<'de> de::Visitor<'de> for AgentStoragePolicyVisitor {
10887    type Value = Box<dyn AgentStoragePolicyTrait>;
10888
10889    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10890        formatter.write_str("a valid AgentStoragePolicyTrait JSON object with a _typeName field")
10891    }
10892
10893    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
10894    where
10895        A: de::MapAccess<'de>,
10896    {
10897        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
10898        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
10899        match any {
10900            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
10901                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
10902            VimAny::Value(value) => Err(de::Error::custom(format!(
10903                "expected object not wrapped value: {:?}",
10904                value))),
10905        }
10906    }
10907}
10908
10909impl AgentStoragePolicyTrait for AgentStoragePolicy {
10910}
10911impl AgentStoragePolicyTrait for AgentVsanStoragePolicy {
10912}
10913impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AgentStoragePolicyTrait {
10914    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
10915        let data_type = from.data_type();
10916        match data_type {
10917            StructType::AgentStoragePolicy => Some(from.as_any_ref().downcast_ref::<AgentStoragePolicy>()?),
10918            StructType::AgentVsanStoragePolicy => Some(from.as_any_ref().downcast_ref::<AgentVsanStoragePolicy>()?),
10919            _ => None,
10920        }
10921    }
10922    
10923    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
10924        let data_type = from.data_type();
10925        match data_type {
10926            StructType::AgentStoragePolicy => Ok(from.as_any_box().downcast::<AgentStoragePolicy>()?),
10927            StructType::AgentVsanStoragePolicy => Ok(from.as_any_box().downcast::<AgentVsanStoragePolicy>()?),
10928            _ => Err(from.as_any_box()),
10929        }
10930    }
10931}
10932/// Deprecated as of vSphere 9.0. Please refer to vLCM APIs.
10933/// 
10934/// The <code>RuntimeInfo</code> represents the runtime information of the vSphere ESX Agent
10935/// Manager managed
10936/// objects *Agency* and *Agent*.
10937/// 
10938/// The runtime information provides
10939/// two kinds of information, namely, the
10940/// desired goal state of the entity and the status with regards to conforming
10941/// to that goal state.
10942/// 
10943/// This structure may be used only with operations rendered under `/eam`.
10944pub trait EamObjectRuntimeInfoTrait : super::traits::DataObjectTrait {
10945    /// The health of the managed entity.
10946    /// 
10947    /// This denotes how well the entity conforms to the
10948    /// goal state.
10949    /// 
10950    /// See also *EamObjectRuntimeInfoStatus_enum*.
10951    fn get_status(&self) -> &str;
10952    /// Current issues that have been detected for this entity.
10953    /// 
10954    /// Each issue can be remediated
10955    /// by invoking *EamObject.Resolve* or *EamObject.ResolveAll*.
10956    fn get_issue(&self) -> &Option<Vec<Box<dyn super::traits::IssueTrait>>>;
10957    /// The desired state of the entity.
10958    /// 
10959    /// See also *EamObjectRuntimeInfoGoalState_enum*.
10960    fn get_goal_state(&self) -> &str;
10961    /// The *Agent* or *Agency* with which this <code>RuntimeInfo</code> object is associated.
10962    /// 
10963    /// Refers instance of *EamObject*.
10964    fn get_entity(&self) -> &super::structs::ManagedObjectReference;
10965}
10966impl<'s> serde::Serialize for dyn EamObjectRuntimeInfoTrait + 's {
10967            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
10968            where
10969                S: serde::Serializer,
10970            {
10971                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
10972            }
10973        }
10974impl<'de> serde::Deserialize<'de> for Box<dyn EamObjectRuntimeInfoTrait> {
10975            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10976                deserializer.deserialize_map(EamObjectRuntimeInfoVisitor)
10977            }
10978        }
10979
10980struct EamObjectRuntimeInfoVisitor;
10981
10982impl<'de> de::Visitor<'de> for EamObjectRuntimeInfoVisitor {
10983    type Value = Box<dyn EamObjectRuntimeInfoTrait>;
10984
10985    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10986        formatter.write_str("a valid EamObjectRuntimeInfoTrait JSON object with a _typeName field")
10987    }
10988
10989    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
10990    where
10991        A: de::MapAccess<'de>,
10992    {
10993        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
10994        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
10995        match any {
10996            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
10997                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
10998            VimAny::Value(value) => Err(de::Error::custom(format!(
10999                "expected object not wrapped value: {:?}",
11000                value))),
11001        }
11002    }
11003}
11004
11005impl EamObjectRuntimeInfoTrait for EamObjectRuntimeInfo {
11006    fn get_status(&self) -> &str { &self.status }
11007    fn get_issue(&self) -> &Option<Vec<Box<dyn super::traits::IssueTrait>>> { &self.issue }
11008    fn get_goal_state(&self) -> &str { &self.goal_state }
11009    fn get_entity(&self) -> &super::structs::ManagedObjectReference { &self.entity }
11010}
11011impl EamObjectRuntimeInfoTrait for AgentRuntimeInfo {
11012    fn get_status(&self) -> &str { &self.status }
11013    fn get_issue(&self) -> &Option<Vec<Box<dyn super::traits::IssueTrait>>> { &self.issue }
11014    fn get_goal_state(&self) -> &str { &self.goal_state }
11015    fn get_entity(&self) -> &super::structs::ManagedObjectReference { &self.entity }
11016}
11017impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn EamObjectRuntimeInfoTrait {
11018    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
11019        let data_type = from.data_type();
11020        match data_type {
11021            StructType::EamObjectRuntimeInfo => Some(from.as_any_ref().downcast_ref::<EamObjectRuntimeInfo>()?),
11022            StructType::AgentRuntimeInfo => Some(from.as_any_ref().downcast_ref::<AgentRuntimeInfo>()?),
11023            _ => None,
11024        }
11025    }
11026    
11027    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
11028        let data_type = from.data_type();
11029        match data_type {
11030            StructType::EamObjectRuntimeInfo => Ok(from.as_any_box().downcast::<EamObjectRuntimeInfo>()?),
11031            StructType::AgentRuntimeInfo => Ok(from.as_any_box().downcast::<AgentRuntimeInfo>()?),
11032            _ => Err(from.as_any_box()),
11033        }
11034    }
11035}
11036/// An issue represents a problem encountered while deploying and configurating agents
11037/// in a vCenter installation.
11038/// 
11039/// An issue conveys the type of problem and the
11040/// entitity on which the problem has been encountered. Most issues are related to agents,
11041/// but they can also relate to an agency or a host.
11042/// 
11043/// The set of issues provided by the vSphere ESX Agent Manager describes the discrepency between
11044/// the _desired_ agent deployment state, as defined by the agency configurations,
11045/// and the _actual_ deployment. The (@link EamObject.RuntimeInfo.Status.status)
11046/// of an agency or agent is green if it has reached its goal state. It is
11047/// marked as yellow if the vSphere ESX Agent Manager is actively working to bring the object
11048/// to its goal state. It is red if there is a discrepency between the current state and
11049/// the desired state. In the red state, a set of issues are filed on the object that
11050/// describe the reason for the discrepency between the desired and actual states.
11051/// 
11052/// Issues are characterized as either active or passive remediable issues. For an active
11053/// remediable issue, the vSphere ESX Agent Manager can actively try to solve the issue. For
11054/// example, by deploying a new agent, removing an agent, changing its power state, and so
11055/// on. For a passive remediable issue, the vSphere ESX Agent Manager is not able to solve the
11056/// problem directly, and can only report the problem. For example, this could be
11057/// caused by an incomplete host configuration.
11058/// 
11059/// When <code>resolve</code> is called for an active remediable issue, the vSphere ESX Agent Manager
11060/// starts performing the appropiate remediation steps for the particular issue. For a passive
11061/// remediable issue, the EAM manager simply checks if the condition
11062/// still exists, and if not it removes the issue.
11063/// 
11064/// The vSphere ESX Agent Manager actively monitors most conditions relating to both
11065/// active and passive issues. Thus, it often automatically discovers when an
11066/// issue has been remediated and removes the issue without needing to explicitly
11067/// call <code>resolve</code> on an issue.
11068/// 
11069/// The complete Issue hierarchy is shown below:
11070/// - *Issue*
11071///   - *AgencyIssue*
11072///     - *AgentIssue*
11073///     - *ManagedHostNotReachable*
11074///       - *VmNotDeployed*
11075///         - *CannotAccessAgentOVF*
11076///         - *IncompatibleHostVersion*
11077///         - *InsufficientResources*
11078///         - *InsufficientSpace*
11079///         - *OvfInvalidFormat*
11080///         - *NoAgentVmDatastore*
11081///         - *NoAgentVmNetwork*
11082///       - *VmIssue*
11083///         - *OvfInvalidProperty*
11084///         - *VmDeployed*
11085///           - *HostInMaintenanceMode*
11086///           - *HostInStandbyMode*
11087///         - *VmCorrupted*
11088///         - *VmOrphaned*
11089///         - *VmPoweredOff*
11090///           - *InsufficientIpAddresses*
11091///           - *MissingAgentIpPool*
11092///         - *VmPoweredOn*
11093///         - *VmSuspended*
11094///       - *VibIssue*
11095///         - *VibCannotPutHostInMaintenanceMode*
11096///         - *VibNotInstalled*
11097///           - *CannotAccessAgentVib*
11098///           - *VibDependenciesNotMetByHost*
11099///           - *VibInvalidFormat*
11100///           - *VibRequirementsNotMetByHost*
11101///         - *VibRequiresHostInMaintenanceMode*
11102///         - *VibRequiresHostReboot*
11103///         - *VibRequiresManualInstallation*
11104///         - *VibRequiresManualUninstallation*
11105///         - *ImmediateHostRebootRequired*
11106///     - *OrphanedAgency*
11107///     - *IntegrityAgencyVUMIssue*
11108///       - *IntegrityAgencyVUMUnavailable*
11109///       - *IntegrityAgencyCannotStageSoftware*
11110///       - *IntegrityAgencyCannotDeleteSoftware*
11111///     - *ClusterAgentAgentIssue*
11112///       - *ClusterAgentVmIssue*
11113///         - *ClusterAgentVmNotRemoved*
11114///         - *ClusterAgentVmPoweredOff*
11115///           - *ClusterAgentInsufficientClusterResources*
11116///       - *ClusterAgentVmNotDeployed*
11117///         - *ClusterAgentInsufficientClusterSpace*
11118///         - *ClusterAgentMissingClusterVmDatastore*
11119///         - *ClusterAgentMissingClusterVmNetwork*
11120///           
11121/// See also *EamObject.Resolve*, *EamObject.ResolveAll*.
11122/// 
11123/// This structure may be used only with operations rendered under `/eam`.
11124pub trait IssueTrait : super::traits::DataObjectTrait {
11125    /// A unique identifier per <code>Issue</code> instance.
11126    fn get_key(&self) -> i32;
11127    /// A localized message describing the issue.
11128    fn get_description(&self) -> &str;
11129    /// The point in time when this issue was generated.
11130    /// 
11131    /// Note that issues can be
11132    /// regenerated periodically, so this time does not neccessarily reflect the
11133    /// first time the issue was detected.
11134    fn get_time(&self) -> &str;
11135}
11136impl<'s> serde::Serialize for dyn IssueTrait + 's {
11137            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11138            where
11139                S: serde::Serializer,
11140            {
11141                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
11142            }
11143        }
11144impl<'de> serde::Deserialize<'de> for Box<dyn IssueTrait> {
11145            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11146                deserializer.deserialize_map(IssueVisitor)
11147            }
11148        }
11149
11150struct IssueVisitor;
11151
11152impl<'de> de::Visitor<'de> for IssueVisitor {
11153    type Value = Box<dyn IssueTrait>;
11154
11155    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11156        formatter.write_str("a valid IssueTrait JSON object with a _typeName field")
11157    }
11158
11159    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
11160    where
11161        A: de::MapAccess<'de>,
11162    {
11163        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
11164        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
11165        match any {
11166            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
11167                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
11168            VimAny::Value(value) => Err(de::Error::custom(format!(
11169                "expected object not wrapped value: {:?}",
11170                value))),
11171        }
11172    }
11173}
11174
11175impl IssueTrait for Issue {
11176    fn get_key(&self) -> i32 { self.key }
11177    fn get_description(&self) -> &str { &self.description }
11178    fn get_time(&self) -> &str { &self.time }
11179}
11180impl IssueTrait for AgencyIssue {
11181    fn get_key(&self) -> i32 { self.key }
11182    fn get_description(&self) -> &str { &self.description }
11183    fn get_time(&self) -> &str { &self.time }
11184}
11185impl IssueTrait for AgencyDisabled {
11186    fn get_key(&self) -> i32 { self.key }
11187    fn get_description(&self) -> &str { &self.description }
11188    fn get_time(&self) -> &str { &self.time }
11189}
11190impl IssueTrait for AgentIssue {
11191    fn get_key(&self) -> i32 { self.key }
11192    fn get_description(&self) -> &str { &self.description }
11193    fn get_time(&self) -> &str { &self.time }
11194}
11195impl IssueTrait for EamCertificateNotTrusted {
11196    fn get_key(&self) -> i32 { self.key }
11197    fn get_description(&self) -> &str { &self.description }
11198    fn get_time(&self) -> &str { &self.time }
11199}
11200impl IssueTrait for HostInPartialMaintenanceMode {
11201    fn get_key(&self) -> i32 { self.key }
11202    fn get_description(&self) -> &str { &self.description }
11203    fn get_time(&self) -> &str { &self.time }
11204}
11205impl IssueTrait for ManagedHostNotReachable {
11206    fn get_key(&self) -> i32 { self.key }
11207    fn get_description(&self) -> &str { &self.description }
11208    fn get_time(&self) -> &str { &self.time }
11209}
11210impl IssueTrait for MissingDvFilterSwitch {
11211    fn get_key(&self) -> i32 { self.key }
11212    fn get_description(&self) -> &str { &self.description }
11213    fn get_time(&self) -> &str { &self.time }
11214}
11215impl IssueTrait for OvfInvalidProperty {
11216    fn get_key(&self) -> i32 { self.key }
11217    fn get_description(&self) -> &str { &self.description }
11218    fn get_time(&self) -> &str { &self.time }
11219}
11220impl IssueTrait for TransitionFailed {
11221    fn get_key(&self) -> i32 { self.key }
11222    fn get_description(&self) -> &str { &self.description }
11223    fn get_time(&self) -> &str { &self.time }
11224}
11225impl IssueTrait for VibIssue {
11226    fn get_key(&self) -> i32 { self.key }
11227    fn get_description(&self) -> &str { &self.description }
11228    fn get_time(&self) -> &str { &self.time }
11229}
11230impl IssueTrait for ImmediateHostRebootRequired {
11231    fn get_key(&self) -> i32 { self.key }
11232    fn get_description(&self) -> &str { &self.description }
11233    fn get_time(&self) -> &str { &self.time }
11234}
11235impl IssueTrait for VibCannotPutHostInMaintenanceMode {
11236    fn get_key(&self) -> i32 { self.key }
11237    fn get_description(&self) -> &str { &self.description }
11238    fn get_time(&self) -> &str { &self.time }
11239}
11240impl IssueTrait for VibCannotPutHostOutOfMaintenanceMode {
11241    fn get_key(&self) -> i32 { self.key }
11242    fn get_description(&self) -> &str { &self.description }
11243    fn get_time(&self) -> &str { &self.time }
11244}
11245impl IssueTrait for VibNotInstalled {
11246    fn get_key(&self) -> i32 { self.key }
11247    fn get_description(&self) -> &str { &self.description }
11248    fn get_time(&self) -> &str { &self.time }
11249}
11250impl IssueTrait for CannotAccessAgentVib {
11251    fn get_key(&self) -> i32 { self.key }
11252    fn get_description(&self) -> &str { &self.description }
11253    fn get_time(&self) -> &str { &self.time }
11254}
11255impl IssueTrait for VibDependenciesNotMetByHost {
11256    fn get_key(&self) -> i32 { self.key }
11257    fn get_description(&self) -> &str { &self.description }
11258    fn get_time(&self) -> &str { &self.time }
11259}
11260impl IssueTrait for VibInvalidFormat {
11261    fn get_key(&self) -> i32 { self.key }
11262    fn get_description(&self) -> &str { &self.description }
11263    fn get_time(&self) -> &str { &self.time }
11264}
11265impl IssueTrait for VibRequirementsNotMetByHost {
11266    fn get_key(&self) -> i32 { self.key }
11267    fn get_description(&self) -> &str { &self.description }
11268    fn get_time(&self) -> &str { &self.time }
11269}
11270impl IssueTrait for VibRequiresHostInMaintenanceMode {
11271    fn get_key(&self) -> i32 { self.key }
11272    fn get_description(&self) -> &str { &self.description }
11273    fn get_time(&self) -> &str { &self.time }
11274}
11275impl IssueTrait for VibRequiresHostReboot {
11276    fn get_key(&self) -> i32 { self.key }
11277    fn get_description(&self) -> &str { &self.description }
11278    fn get_time(&self) -> &str { &self.time }
11279}
11280impl IssueTrait for VibRequiresManualInstallation {
11281    fn get_key(&self) -> i32 { self.key }
11282    fn get_description(&self) -> &str { &self.description }
11283    fn get_time(&self) -> &str { &self.time }
11284}
11285impl IssueTrait for VibRequiresManualUninstallation {
11286    fn get_key(&self) -> i32 { self.key }
11287    fn get_description(&self) -> &str { &self.description }
11288    fn get_time(&self) -> &str { &self.time }
11289}
11290impl IssueTrait for VmIssue {
11291    fn get_key(&self) -> i32 { self.key }
11292    fn get_description(&self) -> &str { &self.description }
11293    fn get_time(&self) -> &str { &self.time }
11294}
11295impl IssueTrait for InvalidConfig {
11296    fn get_key(&self) -> i32 { self.key }
11297    fn get_description(&self) -> &str { &self.description }
11298    fn get_time(&self) -> &str { &self.time }
11299}
11300impl IssueTrait for VmCorrupted {
11301    fn get_key(&self) -> i32 { self.key }
11302    fn get_description(&self) -> &str { &self.description }
11303    fn get_time(&self) -> &str { &self.time }
11304}
11305impl IssueTrait for VmDeployed {
11306    fn get_key(&self) -> i32 { self.key }
11307    fn get_description(&self) -> &str { &self.description }
11308    fn get_time(&self) -> &str { &self.time }
11309}
11310impl IssueTrait for HostInMaintenanceMode {
11311    fn get_key(&self) -> i32 { self.key }
11312    fn get_description(&self) -> &str { &self.description }
11313    fn get_time(&self) -> &str { &self.time }
11314}
11315impl IssueTrait for HostInStandbyMode {
11316    fn get_key(&self) -> i32 { self.key }
11317    fn get_description(&self) -> &str { &self.description }
11318    fn get_time(&self) -> &str { &self.time }
11319}
11320impl IssueTrait for HostPoweredOff {
11321    fn get_key(&self) -> i32 { self.key }
11322    fn get_description(&self) -> &str { &self.description }
11323    fn get_time(&self) -> &str { &self.time }
11324}
11325impl IssueTrait for VmHookFailed {
11326    fn get_key(&self) -> i32 { self.key }
11327    fn get_description(&self) -> &str { &self.description }
11328    fn get_time(&self) -> &str { &self.time }
11329}
11330impl IssueTrait for VmHookTimedout {
11331    fn get_key(&self) -> i32 { self.key }
11332    fn get_description(&self) -> &str { &self.description }
11333    fn get_time(&self) -> &str { &self.time }
11334}
11335impl IssueTrait for VmInaccessible {
11336    fn get_key(&self) -> i32 { self.key }
11337    fn get_description(&self) -> &str { &self.description }
11338    fn get_time(&self) -> &str { &self.time }
11339}
11340impl IssueTrait for VmMarkedAsTemplate {
11341    fn get_key(&self) -> i32 { self.key }
11342    fn get_description(&self) -> &str { &self.description }
11343    fn get_time(&self) -> &str { &self.time }
11344}
11345impl IssueTrait for VmOrphaned {
11346    fn get_key(&self) -> i32 { self.key }
11347    fn get_description(&self) -> &str { &self.description }
11348    fn get_time(&self) -> &str { &self.time }
11349}
11350impl IssueTrait for VmPoweredOff {
11351    fn get_key(&self) -> i32 { self.key }
11352    fn get_description(&self) -> &str { &self.description }
11353    fn get_time(&self) -> &str { &self.time }
11354}
11355impl IssueTrait for InsufficientIpAddresses {
11356    fn get_key(&self) -> i32 { self.key }
11357    fn get_description(&self) -> &str { &self.description }
11358    fn get_time(&self) -> &str { &self.time }
11359}
11360impl IssueTrait for MissingAgentIpPool {
11361    fn get_key(&self) -> i32 { self.key }
11362    fn get_description(&self) -> &str { &self.description }
11363    fn get_time(&self) -> &str { &self.time }
11364}
11365impl IssueTrait for VmPoweredOn {
11366    fn get_key(&self) -> i32 { self.key }
11367    fn get_description(&self) -> &str { &self.description }
11368    fn get_time(&self) -> &str { &self.time }
11369}
11370impl IssueTrait for VmProtected {
11371    fn get_key(&self) -> i32 { self.key }
11372    fn get_description(&self) -> &str { &self.description }
11373    fn get_time(&self) -> &str { &self.time }
11374}
11375impl IssueTrait for VmSuspended {
11376    fn get_key(&self) -> i32 { self.key }
11377    fn get_description(&self) -> &str { &self.description }
11378    fn get_time(&self) -> &str { &self.time }
11379}
11380impl IssueTrait for VmWrongFolder {
11381    fn get_key(&self) -> i32 { self.key }
11382    fn get_description(&self) -> &str { &self.description }
11383    fn get_time(&self) -> &str { &self.time }
11384}
11385impl IssueTrait for VmWrongResourcePool {
11386    fn get_key(&self) -> i32 { self.key }
11387    fn get_description(&self) -> &str { &self.description }
11388    fn get_time(&self) -> &str { &self.time }
11389}
11390impl IssueTrait for VmNotDeployed {
11391    fn get_key(&self) -> i32 { self.key }
11392    fn get_description(&self) -> &str { &self.description }
11393    fn get_time(&self) -> &str { &self.time }
11394}
11395impl IssueTrait for CannotAccessAgentOvf {
11396    fn get_key(&self) -> i32 { self.key }
11397    fn get_description(&self) -> &str { &self.description }
11398    fn get_time(&self) -> &str { &self.time }
11399}
11400impl IssueTrait for IncompatibleHostVersion {
11401    fn get_key(&self) -> i32 { self.key }
11402    fn get_description(&self) -> &str { &self.description }
11403    fn get_time(&self) -> &str { &self.time }
11404}
11405impl IssueTrait for InsufficientResources {
11406    fn get_key(&self) -> i32 { self.key }
11407    fn get_description(&self) -> &str { &self.description }
11408    fn get_time(&self) -> &str { &self.time }
11409}
11410impl IssueTrait for InsufficientSpace {
11411    fn get_key(&self) -> i32 { self.key }
11412    fn get_description(&self) -> &str { &self.description }
11413    fn get_time(&self) -> &str { &self.time }
11414}
11415impl IssueTrait for NoAgentVmDatastore {
11416    fn get_key(&self) -> i32 { self.key }
11417    fn get_description(&self) -> &str { &self.description }
11418    fn get_time(&self) -> &str { &self.time }
11419}
11420impl IssueTrait for NoCustomAgentVmDatastore {
11421    fn get_key(&self) -> i32 { self.key }
11422    fn get_description(&self) -> &str { &self.description }
11423    fn get_time(&self) -> &str { &self.time }
11424}
11425impl IssueTrait for NoAgentVmNetwork {
11426    fn get_key(&self) -> i32 { self.key }
11427    fn get_description(&self) -> &str { &self.description }
11428    fn get_time(&self) -> &str { &self.time }
11429}
11430impl IssueTrait for NoCustomAgentVmNetwork {
11431    fn get_key(&self) -> i32 { self.key }
11432    fn get_description(&self) -> &str { &self.description }
11433    fn get_time(&self) -> &str { &self.time }
11434}
11435impl IssueTrait for NoDiscoverableAgentVmDatastore {
11436    fn get_key(&self) -> i32 { self.key }
11437    fn get_description(&self) -> &str { &self.description }
11438    fn get_time(&self) -> &str { &self.time }
11439}
11440impl IssueTrait for NoDiscoverableAgentVmNetwork {
11441    fn get_key(&self) -> i32 { self.key }
11442    fn get_description(&self) -> &str { &self.description }
11443    fn get_time(&self) -> &str { &self.time }
11444}
11445impl IssueTrait for OvfInvalidFormat {
11446    fn get_key(&self) -> i32 { self.key }
11447    fn get_description(&self) -> &str { &self.description }
11448    fn get_time(&self) -> &str { &self.time }
11449}
11450impl IssueTrait for VmRequiresHostOutOfMaintenanceMode {
11451    fn get_key(&self) -> i32 { self.key }
11452    fn get_description(&self) -> &str { &self.description }
11453    fn get_time(&self) -> &str { &self.time }
11454}
11455impl IssueTrait for PersonalityAgentPmIssue {
11456    fn get_key(&self) -> i32 { self.key }
11457    fn get_description(&self) -> &str { &self.description }
11458    fn get_time(&self) -> &str { &self.time }
11459}
11460impl IssueTrait for PersonalityAgentAwaitingPmRemediation {
11461    fn get_key(&self) -> i32 { self.key }
11462    fn get_description(&self) -> &str { &self.description }
11463    fn get_time(&self) -> &str { &self.time }
11464}
11465impl IssueTrait for PersonalityAgentBlockedByAgencyOperation {
11466    fn get_key(&self) -> i32 { self.key }
11467    fn get_description(&self) -> &str { &self.description }
11468    fn get_time(&self) -> &str { &self.time }
11469}
11470impl IssueTrait for OrphanedAgency {
11471    fn get_key(&self) -> i32 { self.key }
11472    fn get_description(&self) -> &str { &self.description }
11473    fn get_time(&self) -> &str { &self.time }
11474}
11475impl IssueTrait for ClusterAgentAgentIssue {
11476    fn get_key(&self) -> i32 { self.key }
11477    fn get_description(&self) -> &str { &self.description }
11478    fn get_time(&self) -> &str { &self.time }
11479}
11480impl IssueTrait for ClusterAgentOvfInvalidProperty {
11481    fn get_key(&self) -> i32 { self.key }
11482    fn get_description(&self) -> &str { &self.description }
11483    fn get_time(&self) -> &str { &self.time }
11484}
11485impl IssueTrait for ClusterAgentTransitionFailed {
11486    fn get_key(&self) -> i32 { self.key }
11487    fn get_description(&self) -> &str { &self.description }
11488    fn get_time(&self) -> &str { &self.time }
11489}
11490impl IssueTrait for ClusterAgentVmIssue {
11491    fn get_key(&self) -> i32 { self.key }
11492    fn get_description(&self) -> &str { &self.description }
11493    fn get_time(&self) -> &str { &self.time }
11494}
11495impl IssueTrait for ClusterAgentHostInMaintenanceMode {
11496    fn get_key(&self) -> i32 { self.key }
11497    fn get_description(&self) -> &str { &self.description }
11498    fn get_time(&self) -> &str { &self.time }
11499}
11500impl IssueTrait for ClusterAgentHostInPartialMaintenanceMode {
11501    fn get_key(&self) -> i32 { self.key }
11502    fn get_description(&self) -> &str { &self.description }
11503    fn get_time(&self) -> &str { &self.time }
11504}
11505impl IssueTrait for ClusterAgentInvalidConfig {
11506    fn get_key(&self) -> i32 { self.key }
11507    fn get_description(&self) -> &str { &self.description }
11508    fn get_time(&self) -> &str { &self.time }
11509}
11510impl IssueTrait for ClusterAgentVmHookFailed {
11511    fn get_key(&self) -> i32 { self.key }
11512    fn get_description(&self) -> &str { &self.description }
11513    fn get_time(&self) -> &str { &self.time }
11514}
11515impl IssueTrait for ClusterAgentVmHookTimedout {
11516    fn get_key(&self) -> i32 { self.key }
11517    fn get_description(&self) -> &str { &self.description }
11518    fn get_time(&self) -> &str { &self.time }
11519}
11520impl IssueTrait for ClusterAgentVmInaccessible {
11521    fn get_key(&self) -> i32 { self.key }
11522    fn get_description(&self) -> &str { &self.description }
11523    fn get_time(&self) -> &str { &self.time }
11524}
11525impl IssueTrait for ClusterAgentVmNotRemoved {
11526    fn get_key(&self) -> i32 { self.key }
11527    fn get_description(&self) -> &str { &self.description }
11528    fn get_time(&self) -> &str { &self.time }
11529}
11530impl IssueTrait for ClusterAgentVmPoweredOff {
11531    fn get_key(&self) -> i32 { self.key }
11532    fn get_description(&self) -> &str { &self.description }
11533    fn get_time(&self) -> &str { &self.time }
11534}
11535impl IssueTrait for ClusterAgentInsufficientClusterResources {
11536    fn get_key(&self) -> i32 { self.key }
11537    fn get_description(&self) -> &str { &self.description }
11538    fn get_time(&self) -> &str { &self.time }
11539}
11540impl IssueTrait for ClusterAgentVmPoweredOn {
11541    fn get_key(&self) -> i32 { self.key }
11542    fn get_description(&self) -> &str { &self.description }
11543    fn get_time(&self) -> &str { &self.time }
11544}
11545impl IssueTrait for ClusterAgentVmProtected {
11546    fn get_key(&self) -> i32 { self.key }
11547    fn get_description(&self) -> &str { &self.description }
11548    fn get_time(&self) -> &str { &self.time }
11549}
11550impl IssueTrait for ClusterAgentVmSuspended {
11551    fn get_key(&self) -> i32 { self.key }
11552    fn get_description(&self) -> &str { &self.description }
11553    fn get_time(&self) -> &str { &self.time }
11554}
11555impl IssueTrait for ClusterAgentVmNotDeployed {
11556    fn get_key(&self) -> i32 { self.key }
11557    fn get_description(&self) -> &str { &self.description }
11558    fn get_time(&self) -> &str { &self.time }
11559}
11560impl IssueTrait for ClusterAgentCertificateNotTrusted {
11561    fn get_key(&self) -> i32 { self.key }
11562    fn get_description(&self) -> &str { &self.description }
11563    fn get_time(&self) -> &str { &self.time }
11564}
11565impl IssueTrait for ClusterAgentInsufficientClusterSpace {
11566    fn get_key(&self) -> i32 { self.key }
11567    fn get_description(&self) -> &str { &self.description }
11568    fn get_time(&self) -> &str { &self.time }
11569}
11570impl IssueTrait for ClusterAgentMissingClusterVmDatastore {
11571    fn get_key(&self) -> i32 { self.key }
11572    fn get_description(&self) -> &str { &self.description }
11573    fn get_time(&self) -> &str { &self.time }
11574}
11575impl IssueTrait for ClusterAgentMissingClusterVmNetwork {
11576    fn get_key(&self) -> i32 { self.key }
11577    fn get_description(&self) -> &str { &self.description }
11578    fn get_time(&self) -> &str { &self.time }
11579}
11580impl IssueTrait for IntegrityAgencyVumIssue {
11581    fn get_key(&self) -> i32 { self.key }
11582    fn get_description(&self) -> &str { &self.description }
11583    fn get_time(&self) -> &str { &self.time }
11584}
11585impl IssueTrait for IntegrityAgencyCannotDeleteSoftware {
11586    fn get_key(&self) -> i32 { self.key }
11587    fn get_description(&self) -> &str { &self.description }
11588    fn get_time(&self) -> &str { &self.time }
11589}
11590impl IssueTrait for IntegrityAgencyCannotStageSoftware {
11591    fn get_key(&self) -> i32 { self.key }
11592    fn get_description(&self) -> &str { &self.description }
11593    fn get_time(&self) -> &str { &self.time }
11594}
11595impl IssueTrait for IntegrityAgencyVumUnavailable {
11596    fn get_key(&self) -> i32 { self.key }
11597    fn get_description(&self) -> &str { &self.description }
11598    fn get_time(&self) -> &str { &self.time }
11599}
11600impl IssueTrait for PersonalityAgencyPmIssue {
11601    fn get_key(&self) -> i32 { self.key }
11602    fn get_description(&self) -> &str { &self.description }
11603    fn get_time(&self) -> &str { &self.time }
11604}
11605impl IssueTrait for PersonalityAgencyCannotConfigureSolutions {
11606    fn get_key(&self) -> i32 { self.key }
11607    fn get_description(&self) -> &str { &self.description }
11608    fn get_time(&self) -> &str { &self.time }
11609}
11610impl IssueTrait for PersonalityAgencyDepotIssue {
11611    fn get_key(&self) -> i32 { self.key }
11612    fn get_description(&self) -> &str { &self.description }
11613    fn get_time(&self) -> &str { &self.time }
11614}
11615impl IssueTrait for PersonalityAgencyCannotUploadDepot {
11616    fn get_key(&self) -> i32 { self.key }
11617    fn get_description(&self) -> &str { &self.description }
11618    fn get_time(&self) -> &str { &self.time }
11619}
11620impl IssueTrait for PersonalityAgencyInaccessibleDepot {
11621    fn get_key(&self) -> i32 { self.key }
11622    fn get_description(&self) -> &str { &self.description }
11623    fn get_time(&self) -> &str { &self.time }
11624}
11625impl IssueTrait for PersonalityAgencyInvalidDepot {
11626    fn get_key(&self) -> i32 { self.key }
11627    fn get_description(&self) -> &str { &self.description }
11628    fn get_time(&self) -> &str { &self.time }
11629}
11630impl IssueTrait for PersonalityAgencyPmUnavailable {
11631    fn get_key(&self) -> i32 { self.key }
11632    fn get_description(&self) -> &str { &self.description }
11633    fn get_time(&self) -> &str { &self.time }
11634}
11635impl IssueTrait for ExtensibleIssue {
11636    fn get_key(&self) -> i32 { self.key }
11637    fn get_description(&self) -> &str { &self.description }
11638    fn get_time(&self) -> &str { &self.time }
11639}
11640impl IssueTrait for HostIssue {
11641    fn get_key(&self) -> i32 { self.key }
11642    fn get_description(&self) -> &str { &self.description }
11643    fn get_time(&self) -> &str { &self.time }
11644}
11645impl IssueTrait for OrphanedDvFilterSwitch {
11646    fn get_key(&self) -> i32 { self.key }
11647    fn get_description(&self) -> &str { &self.description }
11648    fn get_time(&self) -> &str { &self.time }
11649}
11650impl IssueTrait for UnknownAgentVm {
11651    fn get_key(&self) -> i32 { self.key }
11652    fn get_description(&self) -> &str { &self.description }
11653    fn get_time(&self) -> &str { &self.time }
11654}
11655impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn IssueTrait {
11656    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
11657        let data_type = from.data_type();
11658        match data_type {
11659            StructType::Issue => Some(from.as_any_ref().downcast_ref::<Issue>()?),
11660            StructType::AgencyIssue => Some(from.as_any_ref().downcast_ref::<AgencyIssue>()?),
11661            StructType::AgencyDisabled => Some(from.as_any_ref().downcast_ref::<AgencyDisabled>()?),
11662            StructType::AgentIssue => Some(from.as_any_ref().downcast_ref::<AgentIssue>()?),
11663            StructType::EamCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<EamCertificateNotTrusted>()?),
11664            StructType::HostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInPartialMaintenanceMode>()?),
11665            StructType::ManagedHostNotReachable => Some(from.as_any_ref().downcast_ref::<ManagedHostNotReachable>()?),
11666            StructType::MissingDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<MissingDvFilterSwitch>()?),
11667            StructType::OvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<OvfInvalidProperty>()?),
11668            StructType::TransitionFailed => Some(from.as_any_ref().downcast_ref::<TransitionFailed>()?),
11669            StructType::VibIssue => Some(from.as_any_ref().downcast_ref::<VibIssue>()?),
11670            StructType::ImmediateHostRebootRequired => Some(from.as_any_ref().downcast_ref::<ImmediateHostRebootRequired>()?),
11671            StructType::VibCannotPutHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostInMaintenanceMode>()?),
11672            StructType::VibCannotPutHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostOutOfMaintenanceMode>()?),
11673            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
11674            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
11675            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
11676            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
11677            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
11678            StructType::VibRequiresHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibRequiresHostInMaintenanceMode>()?),
11679            StructType::VibRequiresHostReboot => Some(from.as_any_ref().downcast_ref::<VibRequiresHostReboot>()?),
11680            StructType::VibRequiresManualInstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualInstallation>()?),
11681            StructType::VibRequiresManualUninstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualUninstallation>()?),
11682            StructType::VmIssue => Some(from.as_any_ref().downcast_ref::<VmIssue>()?),
11683            StructType::InvalidConfig => Some(from.as_any_ref().downcast_ref::<InvalidConfig>()?),
11684            StructType::VmCorrupted => Some(from.as_any_ref().downcast_ref::<VmCorrupted>()?),
11685            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
11686            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
11687            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
11688            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
11689            StructType::VmHookFailed => Some(from.as_any_ref().downcast_ref::<VmHookFailed>()?),
11690            StructType::VmHookTimedout => Some(from.as_any_ref().downcast_ref::<VmHookTimedout>()?),
11691            StructType::VmInaccessible => Some(from.as_any_ref().downcast_ref::<VmInaccessible>()?),
11692            StructType::VmMarkedAsTemplate => Some(from.as_any_ref().downcast_ref::<VmMarkedAsTemplate>()?),
11693            StructType::VmOrphaned => Some(from.as_any_ref().downcast_ref::<VmOrphaned>()?),
11694            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
11695            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
11696            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
11697            StructType::VmPoweredOn => Some(from.as_any_ref().downcast_ref::<VmPoweredOn>()?),
11698            StructType::VmProtected => Some(from.as_any_ref().downcast_ref::<VmProtected>()?),
11699            StructType::VmSuspended => Some(from.as_any_ref().downcast_ref::<VmSuspended>()?),
11700            StructType::VmWrongFolder => Some(from.as_any_ref().downcast_ref::<VmWrongFolder>()?),
11701            StructType::VmWrongResourcePool => Some(from.as_any_ref().downcast_ref::<VmWrongResourcePool>()?),
11702            StructType::VmNotDeployed => Some(from.as_any_ref().downcast_ref::<VmNotDeployed>()?),
11703            StructType::CannotAccessAgentOvf => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentOvf>()?),
11704            StructType::IncompatibleHostVersion => Some(from.as_any_ref().downcast_ref::<IncompatibleHostVersion>()?),
11705            StructType::InsufficientResources => Some(from.as_any_ref().downcast_ref::<InsufficientResources>()?),
11706            StructType::InsufficientSpace => Some(from.as_any_ref().downcast_ref::<InsufficientSpace>()?),
11707            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
11708            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
11709            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
11710            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
11711            StructType::NoDiscoverableAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmDatastore>()?),
11712            StructType::NoDiscoverableAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmNetwork>()?),
11713            StructType::OvfInvalidFormat => Some(from.as_any_ref().downcast_ref::<OvfInvalidFormat>()?),
11714            StructType::VmRequiresHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VmRequiresHostOutOfMaintenanceMode>()?),
11715            StructType::PersonalityAgentPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgentPmIssue>()?),
11716            StructType::PersonalityAgentAwaitingPmRemediation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentAwaitingPmRemediation>()?),
11717            StructType::PersonalityAgentBlockedByAgencyOperation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentBlockedByAgencyOperation>()?),
11718            StructType::OrphanedAgency => Some(from.as_any_ref().downcast_ref::<OrphanedAgency>()?),
11719            StructType::ClusterAgentAgentIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentAgentIssue>()?),
11720            StructType::ClusterAgentOvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<ClusterAgentOvfInvalidProperty>()?),
11721            StructType::ClusterAgentTransitionFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentTransitionFailed>()?),
11722            StructType::ClusterAgentVmIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmIssue>()?),
11723            StructType::ClusterAgentHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInMaintenanceMode>()?),
11724            StructType::ClusterAgentHostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInPartialMaintenanceMode>()?),
11725            StructType::ClusterAgentInvalidConfig => Some(from.as_any_ref().downcast_ref::<ClusterAgentInvalidConfig>()?),
11726            StructType::ClusterAgentVmHookFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookFailed>()?),
11727            StructType::ClusterAgentVmHookTimedout => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookTimedout>()?),
11728            StructType::ClusterAgentVmInaccessible => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmInaccessible>()?),
11729            StructType::ClusterAgentVmNotRemoved => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotRemoved>()?),
11730            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
11731            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
11732            StructType::ClusterAgentVmPoweredOn => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOn>()?),
11733            StructType::ClusterAgentVmProtected => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmProtected>()?),
11734            StructType::ClusterAgentVmSuspended => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmSuspended>()?),
11735            StructType::ClusterAgentVmNotDeployed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotDeployed>()?),
11736            StructType::ClusterAgentCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<ClusterAgentCertificateNotTrusted>()?),
11737            StructType::ClusterAgentInsufficientClusterSpace => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterSpace>()?),
11738            StructType::ClusterAgentMissingClusterVmDatastore => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmDatastore>()?),
11739            StructType::ClusterAgentMissingClusterVmNetwork => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmNetwork>()?),
11740            StructType::IntegrityAgencyVumIssue => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumIssue>()?),
11741            StructType::IntegrityAgencyCannotDeleteSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotDeleteSoftware>()?),
11742            StructType::IntegrityAgencyCannotStageSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotStageSoftware>()?),
11743            StructType::IntegrityAgencyVumUnavailable => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumUnavailable>()?),
11744            StructType::PersonalityAgencyPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmIssue>()?),
11745            StructType::PersonalityAgencyCannotConfigureSolutions => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotConfigureSolutions>()?),
11746            StructType::PersonalityAgencyDepotIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyDepotIssue>()?),
11747            StructType::PersonalityAgencyCannotUploadDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotUploadDepot>()?),
11748            StructType::PersonalityAgencyInaccessibleDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInaccessibleDepot>()?),
11749            StructType::PersonalityAgencyInvalidDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInvalidDepot>()?),
11750            StructType::PersonalityAgencyPmUnavailable => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmUnavailable>()?),
11751            StructType::ExtensibleIssue => Some(from.as_any_ref().downcast_ref::<ExtensibleIssue>()?),
11752            StructType::HostIssue => Some(from.as_any_ref().downcast_ref::<HostIssue>()?),
11753            StructType::OrphanedDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<OrphanedDvFilterSwitch>()?),
11754            StructType::UnknownAgentVm => Some(from.as_any_ref().downcast_ref::<UnknownAgentVm>()?),
11755            _ => None,
11756        }
11757    }
11758    
11759    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
11760        let data_type = from.data_type();
11761        match data_type {
11762            StructType::Issue => Ok(from.as_any_box().downcast::<Issue>()?),
11763            StructType::AgencyIssue => Ok(from.as_any_box().downcast::<AgencyIssue>()?),
11764            StructType::AgencyDisabled => Ok(from.as_any_box().downcast::<AgencyDisabled>()?),
11765            StructType::AgentIssue => Ok(from.as_any_box().downcast::<AgentIssue>()?),
11766            StructType::EamCertificateNotTrusted => Ok(from.as_any_box().downcast::<EamCertificateNotTrusted>()?),
11767            StructType::HostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<HostInPartialMaintenanceMode>()?),
11768            StructType::ManagedHostNotReachable => Ok(from.as_any_box().downcast::<ManagedHostNotReachable>()?),
11769            StructType::MissingDvFilterSwitch => Ok(from.as_any_box().downcast::<MissingDvFilterSwitch>()?),
11770            StructType::OvfInvalidProperty => Ok(from.as_any_box().downcast::<OvfInvalidProperty>()?),
11771            StructType::TransitionFailed => Ok(from.as_any_box().downcast::<TransitionFailed>()?),
11772            StructType::VibIssue => Ok(from.as_any_box().downcast::<VibIssue>()?),
11773            StructType::ImmediateHostRebootRequired => Ok(from.as_any_box().downcast::<ImmediateHostRebootRequired>()?),
11774            StructType::VibCannotPutHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostInMaintenanceMode>()?),
11775            StructType::VibCannotPutHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostOutOfMaintenanceMode>()?),
11776            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
11777            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
11778            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
11779            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
11780            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
11781            StructType::VibRequiresHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibRequiresHostInMaintenanceMode>()?),
11782            StructType::VibRequiresHostReboot => Ok(from.as_any_box().downcast::<VibRequiresHostReboot>()?),
11783            StructType::VibRequiresManualInstallation => Ok(from.as_any_box().downcast::<VibRequiresManualInstallation>()?),
11784            StructType::VibRequiresManualUninstallation => Ok(from.as_any_box().downcast::<VibRequiresManualUninstallation>()?),
11785            StructType::VmIssue => Ok(from.as_any_box().downcast::<VmIssue>()?),
11786            StructType::InvalidConfig => Ok(from.as_any_box().downcast::<InvalidConfig>()?),
11787            StructType::VmCorrupted => Ok(from.as_any_box().downcast::<VmCorrupted>()?),
11788            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
11789            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
11790            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
11791            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
11792            StructType::VmHookFailed => Ok(from.as_any_box().downcast::<VmHookFailed>()?),
11793            StructType::VmHookTimedout => Ok(from.as_any_box().downcast::<VmHookTimedout>()?),
11794            StructType::VmInaccessible => Ok(from.as_any_box().downcast::<VmInaccessible>()?),
11795            StructType::VmMarkedAsTemplate => Ok(from.as_any_box().downcast::<VmMarkedAsTemplate>()?),
11796            StructType::VmOrphaned => Ok(from.as_any_box().downcast::<VmOrphaned>()?),
11797            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
11798            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
11799            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
11800            StructType::VmPoweredOn => Ok(from.as_any_box().downcast::<VmPoweredOn>()?),
11801            StructType::VmProtected => Ok(from.as_any_box().downcast::<VmProtected>()?),
11802            StructType::VmSuspended => Ok(from.as_any_box().downcast::<VmSuspended>()?),
11803            StructType::VmWrongFolder => Ok(from.as_any_box().downcast::<VmWrongFolder>()?),
11804            StructType::VmWrongResourcePool => Ok(from.as_any_box().downcast::<VmWrongResourcePool>()?),
11805            StructType::VmNotDeployed => Ok(from.as_any_box().downcast::<VmNotDeployed>()?),
11806            StructType::CannotAccessAgentOvf => Ok(from.as_any_box().downcast::<CannotAccessAgentOvf>()?),
11807            StructType::IncompatibleHostVersion => Ok(from.as_any_box().downcast::<IncompatibleHostVersion>()?),
11808            StructType::InsufficientResources => Ok(from.as_any_box().downcast::<InsufficientResources>()?),
11809            StructType::InsufficientSpace => Ok(from.as_any_box().downcast::<InsufficientSpace>()?),
11810            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
11811            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
11812            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
11813            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
11814            StructType::NoDiscoverableAgentVmDatastore => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmDatastore>()?),
11815            StructType::NoDiscoverableAgentVmNetwork => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmNetwork>()?),
11816            StructType::OvfInvalidFormat => Ok(from.as_any_box().downcast::<OvfInvalidFormat>()?),
11817            StructType::VmRequiresHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VmRequiresHostOutOfMaintenanceMode>()?),
11818            StructType::PersonalityAgentPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgentPmIssue>()?),
11819            StructType::PersonalityAgentAwaitingPmRemediation => Ok(from.as_any_box().downcast::<PersonalityAgentAwaitingPmRemediation>()?),
11820            StructType::PersonalityAgentBlockedByAgencyOperation => Ok(from.as_any_box().downcast::<PersonalityAgentBlockedByAgencyOperation>()?),
11821            StructType::OrphanedAgency => Ok(from.as_any_box().downcast::<OrphanedAgency>()?),
11822            StructType::ClusterAgentAgentIssue => Ok(from.as_any_box().downcast::<ClusterAgentAgentIssue>()?),
11823            StructType::ClusterAgentOvfInvalidProperty => Ok(from.as_any_box().downcast::<ClusterAgentOvfInvalidProperty>()?),
11824            StructType::ClusterAgentTransitionFailed => Ok(from.as_any_box().downcast::<ClusterAgentTransitionFailed>()?),
11825            StructType::ClusterAgentVmIssue => Ok(from.as_any_box().downcast::<ClusterAgentVmIssue>()?),
11826            StructType::ClusterAgentHostInMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInMaintenanceMode>()?),
11827            StructType::ClusterAgentHostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInPartialMaintenanceMode>()?),
11828            StructType::ClusterAgentInvalidConfig => Ok(from.as_any_box().downcast::<ClusterAgentInvalidConfig>()?),
11829            StructType::ClusterAgentVmHookFailed => Ok(from.as_any_box().downcast::<ClusterAgentVmHookFailed>()?),
11830            StructType::ClusterAgentVmHookTimedout => Ok(from.as_any_box().downcast::<ClusterAgentVmHookTimedout>()?),
11831            StructType::ClusterAgentVmInaccessible => Ok(from.as_any_box().downcast::<ClusterAgentVmInaccessible>()?),
11832            StructType::ClusterAgentVmNotRemoved => Ok(from.as_any_box().downcast::<ClusterAgentVmNotRemoved>()?),
11833            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
11834            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
11835            StructType::ClusterAgentVmPoweredOn => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOn>()?),
11836            StructType::ClusterAgentVmProtected => Ok(from.as_any_box().downcast::<ClusterAgentVmProtected>()?),
11837            StructType::ClusterAgentVmSuspended => Ok(from.as_any_box().downcast::<ClusterAgentVmSuspended>()?),
11838            StructType::ClusterAgentVmNotDeployed => Ok(from.as_any_box().downcast::<ClusterAgentVmNotDeployed>()?),
11839            StructType::ClusterAgentCertificateNotTrusted => Ok(from.as_any_box().downcast::<ClusterAgentCertificateNotTrusted>()?),
11840            StructType::ClusterAgentInsufficientClusterSpace => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterSpace>()?),
11841            StructType::ClusterAgentMissingClusterVmDatastore => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmDatastore>()?),
11842            StructType::ClusterAgentMissingClusterVmNetwork => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmNetwork>()?),
11843            StructType::IntegrityAgencyVumIssue => Ok(from.as_any_box().downcast::<IntegrityAgencyVumIssue>()?),
11844            StructType::IntegrityAgencyCannotDeleteSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotDeleteSoftware>()?),
11845            StructType::IntegrityAgencyCannotStageSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotStageSoftware>()?),
11846            StructType::IntegrityAgencyVumUnavailable => Ok(from.as_any_box().downcast::<IntegrityAgencyVumUnavailable>()?),
11847            StructType::PersonalityAgencyPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyPmIssue>()?),
11848            StructType::PersonalityAgencyCannotConfigureSolutions => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotConfigureSolutions>()?),
11849            StructType::PersonalityAgencyDepotIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyDepotIssue>()?),
11850            StructType::PersonalityAgencyCannotUploadDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotUploadDepot>()?),
11851            StructType::PersonalityAgencyInaccessibleDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInaccessibleDepot>()?),
11852            StructType::PersonalityAgencyInvalidDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInvalidDepot>()?),
11853            StructType::PersonalityAgencyPmUnavailable => Ok(from.as_any_box().downcast::<PersonalityAgencyPmUnavailable>()?),
11854            StructType::ExtensibleIssue => Ok(from.as_any_box().downcast::<ExtensibleIssue>()?),
11855            StructType::HostIssue => Ok(from.as_any_box().downcast::<HostIssue>()?),
11856            StructType::OrphanedDvFilterSwitch => Ok(from.as_any_box().downcast::<OrphanedDvFilterSwitch>()?),
11857            StructType::UnknownAgentVm => Ok(from.as_any_box().downcast::<UnknownAgentVm>()?),
11858            _ => Err(from.as_any_box()),
11859        }
11860    }
11861}
11862/// Base class for all agency issues.
11863/// 
11864/// This structure may be used only with operations rendered under `/eam`.
11865pub trait AgencyIssueTrait : super::traits::IssueTrait {
11866    /// The agency to which this issue belongs.
11867    /// 
11868    /// Refers instance of *Agency*.
11869    fn get_agency(&self) -> &super::structs::ManagedObjectReference;
11870    /// The name of the agency.
11871    fn get_agency_name(&self) -> &str;
11872    /// The ID of the solution to which this issue belongs.
11873    fn get_solution_id(&self) -> &str;
11874    /// The name of the solution to which this issue belongs.
11875    fn get_solution_name(&self) -> &str;
11876}
11877impl<'s> serde::Serialize for dyn AgencyIssueTrait + 's {
11878            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
11879            where
11880                S: serde::Serializer,
11881            {
11882                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
11883            }
11884        }
11885impl<'de> serde::Deserialize<'de> for Box<dyn AgencyIssueTrait> {
11886            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
11887                deserializer.deserialize_map(AgencyIssueVisitor)
11888            }
11889        }
11890
11891struct AgencyIssueVisitor;
11892
11893impl<'de> de::Visitor<'de> for AgencyIssueVisitor {
11894    type Value = Box<dyn AgencyIssueTrait>;
11895
11896    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11897        formatter.write_str("a valid AgencyIssueTrait JSON object with a _typeName field")
11898    }
11899
11900    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
11901    where
11902        A: de::MapAccess<'de>,
11903    {
11904        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
11905        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
11906        match any {
11907            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
11908                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
11909            VimAny::Value(value) => Err(de::Error::custom(format!(
11910                "expected object not wrapped value: {:?}",
11911                value))),
11912        }
11913    }
11914}
11915
11916impl AgencyIssueTrait for AgencyIssue {
11917    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11918    fn get_agency_name(&self) -> &str { &self.agency_name }
11919    fn get_solution_id(&self) -> &str { &self.solution_id }
11920    fn get_solution_name(&self) -> &str { &self.solution_name }
11921}
11922impl AgencyIssueTrait for AgencyDisabled {
11923    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11924    fn get_agency_name(&self) -> &str { &self.agency_name }
11925    fn get_solution_id(&self) -> &str { &self.solution_id }
11926    fn get_solution_name(&self) -> &str { &self.solution_name }
11927}
11928impl AgencyIssueTrait for AgentIssue {
11929    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11930    fn get_agency_name(&self) -> &str { &self.agency_name }
11931    fn get_solution_id(&self) -> &str { &self.solution_id }
11932    fn get_solution_name(&self) -> &str { &self.solution_name }
11933}
11934impl AgencyIssueTrait for EamCertificateNotTrusted {
11935    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11936    fn get_agency_name(&self) -> &str { &self.agency_name }
11937    fn get_solution_id(&self) -> &str { &self.solution_id }
11938    fn get_solution_name(&self) -> &str { &self.solution_name }
11939}
11940impl AgencyIssueTrait for HostInPartialMaintenanceMode {
11941    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11942    fn get_agency_name(&self) -> &str { &self.agency_name }
11943    fn get_solution_id(&self) -> &str { &self.solution_id }
11944    fn get_solution_name(&self) -> &str { &self.solution_name }
11945}
11946impl AgencyIssueTrait for ManagedHostNotReachable {
11947    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11948    fn get_agency_name(&self) -> &str { &self.agency_name }
11949    fn get_solution_id(&self) -> &str { &self.solution_id }
11950    fn get_solution_name(&self) -> &str { &self.solution_name }
11951}
11952impl AgencyIssueTrait for MissingDvFilterSwitch {
11953    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11954    fn get_agency_name(&self) -> &str { &self.agency_name }
11955    fn get_solution_id(&self) -> &str { &self.solution_id }
11956    fn get_solution_name(&self) -> &str { &self.solution_name }
11957}
11958impl AgencyIssueTrait for OvfInvalidProperty {
11959    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11960    fn get_agency_name(&self) -> &str { &self.agency_name }
11961    fn get_solution_id(&self) -> &str { &self.solution_id }
11962    fn get_solution_name(&self) -> &str { &self.solution_name }
11963}
11964impl AgencyIssueTrait for TransitionFailed {
11965    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11966    fn get_agency_name(&self) -> &str { &self.agency_name }
11967    fn get_solution_id(&self) -> &str { &self.solution_id }
11968    fn get_solution_name(&self) -> &str { &self.solution_name }
11969}
11970impl AgencyIssueTrait for VibIssue {
11971    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11972    fn get_agency_name(&self) -> &str { &self.agency_name }
11973    fn get_solution_id(&self) -> &str { &self.solution_id }
11974    fn get_solution_name(&self) -> &str { &self.solution_name }
11975}
11976impl AgencyIssueTrait for ImmediateHostRebootRequired {
11977    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11978    fn get_agency_name(&self) -> &str { &self.agency_name }
11979    fn get_solution_id(&self) -> &str { &self.solution_id }
11980    fn get_solution_name(&self) -> &str { &self.solution_name }
11981}
11982impl AgencyIssueTrait for VibCannotPutHostInMaintenanceMode {
11983    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11984    fn get_agency_name(&self) -> &str { &self.agency_name }
11985    fn get_solution_id(&self) -> &str { &self.solution_id }
11986    fn get_solution_name(&self) -> &str { &self.solution_name }
11987}
11988impl AgencyIssueTrait for VibCannotPutHostOutOfMaintenanceMode {
11989    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11990    fn get_agency_name(&self) -> &str { &self.agency_name }
11991    fn get_solution_id(&self) -> &str { &self.solution_id }
11992    fn get_solution_name(&self) -> &str { &self.solution_name }
11993}
11994impl AgencyIssueTrait for VibNotInstalled {
11995    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
11996    fn get_agency_name(&self) -> &str { &self.agency_name }
11997    fn get_solution_id(&self) -> &str { &self.solution_id }
11998    fn get_solution_name(&self) -> &str { &self.solution_name }
11999}
12000impl AgencyIssueTrait for CannotAccessAgentVib {
12001    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12002    fn get_agency_name(&self) -> &str { &self.agency_name }
12003    fn get_solution_id(&self) -> &str { &self.solution_id }
12004    fn get_solution_name(&self) -> &str { &self.solution_name }
12005}
12006impl AgencyIssueTrait for VibDependenciesNotMetByHost {
12007    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12008    fn get_agency_name(&self) -> &str { &self.agency_name }
12009    fn get_solution_id(&self) -> &str { &self.solution_id }
12010    fn get_solution_name(&self) -> &str { &self.solution_name }
12011}
12012impl AgencyIssueTrait for VibInvalidFormat {
12013    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12014    fn get_agency_name(&self) -> &str { &self.agency_name }
12015    fn get_solution_id(&self) -> &str { &self.solution_id }
12016    fn get_solution_name(&self) -> &str { &self.solution_name }
12017}
12018impl AgencyIssueTrait for VibRequirementsNotMetByHost {
12019    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12020    fn get_agency_name(&self) -> &str { &self.agency_name }
12021    fn get_solution_id(&self) -> &str { &self.solution_id }
12022    fn get_solution_name(&self) -> &str { &self.solution_name }
12023}
12024impl AgencyIssueTrait for VibRequiresHostInMaintenanceMode {
12025    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12026    fn get_agency_name(&self) -> &str { &self.agency_name }
12027    fn get_solution_id(&self) -> &str { &self.solution_id }
12028    fn get_solution_name(&self) -> &str { &self.solution_name }
12029}
12030impl AgencyIssueTrait for VibRequiresHostReboot {
12031    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12032    fn get_agency_name(&self) -> &str { &self.agency_name }
12033    fn get_solution_id(&self) -> &str { &self.solution_id }
12034    fn get_solution_name(&self) -> &str { &self.solution_name }
12035}
12036impl AgencyIssueTrait for VibRequiresManualInstallation {
12037    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12038    fn get_agency_name(&self) -> &str { &self.agency_name }
12039    fn get_solution_id(&self) -> &str { &self.solution_id }
12040    fn get_solution_name(&self) -> &str { &self.solution_name }
12041}
12042impl AgencyIssueTrait for VibRequiresManualUninstallation {
12043    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12044    fn get_agency_name(&self) -> &str { &self.agency_name }
12045    fn get_solution_id(&self) -> &str { &self.solution_id }
12046    fn get_solution_name(&self) -> &str { &self.solution_name }
12047}
12048impl AgencyIssueTrait for VmIssue {
12049    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12050    fn get_agency_name(&self) -> &str { &self.agency_name }
12051    fn get_solution_id(&self) -> &str { &self.solution_id }
12052    fn get_solution_name(&self) -> &str { &self.solution_name }
12053}
12054impl AgencyIssueTrait for InvalidConfig {
12055    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12056    fn get_agency_name(&self) -> &str { &self.agency_name }
12057    fn get_solution_id(&self) -> &str { &self.solution_id }
12058    fn get_solution_name(&self) -> &str { &self.solution_name }
12059}
12060impl AgencyIssueTrait for VmCorrupted {
12061    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12062    fn get_agency_name(&self) -> &str { &self.agency_name }
12063    fn get_solution_id(&self) -> &str { &self.solution_id }
12064    fn get_solution_name(&self) -> &str { &self.solution_name }
12065}
12066impl AgencyIssueTrait for VmDeployed {
12067    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12068    fn get_agency_name(&self) -> &str { &self.agency_name }
12069    fn get_solution_id(&self) -> &str { &self.solution_id }
12070    fn get_solution_name(&self) -> &str { &self.solution_name }
12071}
12072impl AgencyIssueTrait for HostInMaintenanceMode {
12073    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12074    fn get_agency_name(&self) -> &str { &self.agency_name }
12075    fn get_solution_id(&self) -> &str { &self.solution_id }
12076    fn get_solution_name(&self) -> &str { &self.solution_name }
12077}
12078impl AgencyIssueTrait for HostInStandbyMode {
12079    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12080    fn get_agency_name(&self) -> &str { &self.agency_name }
12081    fn get_solution_id(&self) -> &str { &self.solution_id }
12082    fn get_solution_name(&self) -> &str { &self.solution_name }
12083}
12084impl AgencyIssueTrait for HostPoweredOff {
12085    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12086    fn get_agency_name(&self) -> &str { &self.agency_name }
12087    fn get_solution_id(&self) -> &str { &self.solution_id }
12088    fn get_solution_name(&self) -> &str { &self.solution_name }
12089}
12090impl AgencyIssueTrait for VmHookFailed {
12091    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12092    fn get_agency_name(&self) -> &str { &self.agency_name }
12093    fn get_solution_id(&self) -> &str { &self.solution_id }
12094    fn get_solution_name(&self) -> &str { &self.solution_name }
12095}
12096impl AgencyIssueTrait for VmHookTimedout {
12097    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12098    fn get_agency_name(&self) -> &str { &self.agency_name }
12099    fn get_solution_id(&self) -> &str { &self.solution_id }
12100    fn get_solution_name(&self) -> &str { &self.solution_name }
12101}
12102impl AgencyIssueTrait for VmInaccessible {
12103    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12104    fn get_agency_name(&self) -> &str { &self.agency_name }
12105    fn get_solution_id(&self) -> &str { &self.solution_id }
12106    fn get_solution_name(&self) -> &str { &self.solution_name }
12107}
12108impl AgencyIssueTrait for VmMarkedAsTemplate {
12109    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12110    fn get_agency_name(&self) -> &str { &self.agency_name }
12111    fn get_solution_id(&self) -> &str { &self.solution_id }
12112    fn get_solution_name(&self) -> &str { &self.solution_name }
12113}
12114impl AgencyIssueTrait for VmOrphaned {
12115    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12116    fn get_agency_name(&self) -> &str { &self.agency_name }
12117    fn get_solution_id(&self) -> &str { &self.solution_id }
12118    fn get_solution_name(&self) -> &str { &self.solution_name }
12119}
12120impl AgencyIssueTrait for VmPoweredOff {
12121    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12122    fn get_agency_name(&self) -> &str { &self.agency_name }
12123    fn get_solution_id(&self) -> &str { &self.solution_id }
12124    fn get_solution_name(&self) -> &str { &self.solution_name }
12125}
12126impl AgencyIssueTrait for InsufficientIpAddresses {
12127    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12128    fn get_agency_name(&self) -> &str { &self.agency_name }
12129    fn get_solution_id(&self) -> &str { &self.solution_id }
12130    fn get_solution_name(&self) -> &str { &self.solution_name }
12131}
12132impl AgencyIssueTrait for MissingAgentIpPool {
12133    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12134    fn get_agency_name(&self) -> &str { &self.agency_name }
12135    fn get_solution_id(&self) -> &str { &self.solution_id }
12136    fn get_solution_name(&self) -> &str { &self.solution_name }
12137}
12138impl AgencyIssueTrait for VmPoweredOn {
12139    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12140    fn get_agency_name(&self) -> &str { &self.agency_name }
12141    fn get_solution_id(&self) -> &str { &self.solution_id }
12142    fn get_solution_name(&self) -> &str { &self.solution_name }
12143}
12144impl AgencyIssueTrait for VmProtected {
12145    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12146    fn get_agency_name(&self) -> &str { &self.agency_name }
12147    fn get_solution_id(&self) -> &str { &self.solution_id }
12148    fn get_solution_name(&self) -> &str { &self.solution_name }
12149}
12150impl AgencyIssueTrait for VmSuspended {
12151    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12152    fn get_agency_name(&self) -> &str { &self.agency_name }
12153    fn get_solution_id(&self) -> &str { &self.solution_id }
12154    fn get_solution_name(&self) -> &str { &self.solution_name }
12155}
12156impl AgencyIssueTrait for VmWrongFolder {
12157    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12158    fn get_agency_name(&self) -> &str { &self.agency_name }
12159    fn get_solution_id(&self) -> &str { &self.solution_id }
12160    fn get_solution_name(&self) -> &str { &self.solution_name }
12161}
12162impl AgencyIssueTrait for VmWrongResourcePool {
12163    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12164    fn get_agency_name(&self) -> &str { &self.agency_name }
12165    fn get_solution_id(&self) -> &str { &self.solution_id }
12166    fn get_solution_name(&self) -> &str { &self.solution_name }
12167}
12168impl AgencyIssueTrait for VmNotDeployed {
12169    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12170    fn get_agency_name(&self) -> &str { &self.agency_name }
12171    fn get_solution_id(&self) -> &str { &self.solution_id }
12172    fn get_solution_name(&self) -> &str { &self.solution_name }
12173}
12174impl AgencyIssueTrait for CannotAccessAgentOvf {
12175    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12176    fn get_agency_name(&self) -> &str { &self.agency_name }
12177    fn get_solution_id(&self) -> &str { &self.solution_id }
12178    fn get_solution_name(&self) -> &str { &self.solution_name }
12179}
12180impl AgencyIssueTrait for IncompatibleHostVersion {
12181    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12182    fn get_agency_name(&self) -> &str { &self.agency_name }
12183    fn get_solution_id(&self) -> &str { &self.solution_id }
12184    fn get_solution_name(&self) -> &str { &self.solution_name }
12185}
12186impl AgencyIssueTrait for InsufficientResources {
12187    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12188    fn get_agency_name(&self) -> &str { &self.agency_name }
12189    fn get_solution_id(&self) -> &str { &self.solution_id }
12190    fn get_solution_name(&self) -> &str { &self.solution_name }
12191}
12192impl AgencyIssueTrait for InsufficientSpace {
12193    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12194    fn get_agency_name(&self) -> &str { &self.agency_name }
12195    fn get_solution_id(&self) -> &str { &self.solution_id }
12196    fn get_solution_name(&self) -> &str { &self.solution_name }
12197}
12198impl AgencyIssueTrait for NoAgentVmDatastore {
12199    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12200    fn get_agency_name(&self) -> &str { &self.agency_name }
12201    fn get_solution_id(&self) -> &str { &self.solution_id }
12202    fn get_solution_name(&self) -> &str { &self.solution_name }
12203}
12204impl AgencyIssueTrait for NoCustomAgentVmDatastore {
12205    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12206    fn get_agency_name(&self) -> &str { &self.agency_name }
12207    fn get_solution_id(&self) -> &str { &self.solution_id }
12208    fn get_solution_name(&self) -> &str { &self.solution_name }
12209}
12210impl AgencyIssueTrait for NoAgentVmNetwork {
12211    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12212    fn get_agency_name(&self) -> &str { &self.agency_name }
12213    fn get_solution_id(&self) -> &str { &self.solution_id }
12214    fn get_solution_name(&self) -> &str { &self.solution_name }
12215}
12216impl AgencyIssueTrait for NoCustomAgentVmNetwork {
12217    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12218    fn get_agency_name(&self) -> &str { &self.agency_name }
12219    fn get_solution_id(&self) -> &str { &self.solution_id }
12220    fn get_solution_name(&self) -> &str { &self.solution_name }
12221}
12222impl AgencyIssueTrait for NoDiscoverableAgentVmDatastore {
12223    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12224    fn get_agency_name(&self) -> &str { &self.agency_name }
12225    fn get_solution_id(&self) -> &str { &self.solution_id }
12226    fn get_solution_name(&self) -> &str { &self.solution_name }
12227}
12228impl AgencyIssueTrait for NoDiscoverableAgentVmNetwork {
12229    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12230    fn get_agency_name(&self) -> &str { &self.agency_name }
12231    fn get_solution_id(&self) -> &str { &self.solution_id }
12232    fn get_solution_name(&self) -> &str { &self.solution_name }
12233}
12234impl AgencyIssueTrait for OvfInvalidFormat {
12235    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12236    fn get_agency_name(&self) -> &str { &self.agency_name }
12237    fn get_solution_id(&self) -> &str { &self.solution_id }
12238    fn get_solution_name(&self) -> &str { &self.solution_name }
12239}
12240impl AgencyIssueTrait for VmRequiresHostOutOfMaintenanceMode {
12241    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12242    fn get_agency_name(&self) -> &str { &self.agency_name }
12243    fn get_solution_id(&self) -> &str { &self.solution_id }
12244    fn get_solution_name(&self) -> &str { &self.solution_name }
12245}
12246impl AgencyIssueTrait for PersonalityAgentPmIssue {
12247    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12248    fn get_agency_name(&self) -> &str { &self.agency_name }
12249    fn get_solution_id(&self) -> &str { &self.solution_id }
12250    fn get_solution_name(&self) -> &str { &self.solution_name }
12251}
12252impl AgencyIssueTrait for PersonalityAgentAwaitingPmRemediation {
12253    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12254    fn get_agency_name(&self) -> &str { &self.agency_name }
12255    fn get_solution_id(&self) -> &str { &self.solution_id }
12256    fn get_solution_name(&self) -> &str { &self.solution_name }
12257}
12258impl AgencyIssueTrait for PersonalityAgentBlockedByAgencyOperation {
12259    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12260    fn get_agency_name(&self) -> &str { &self.agency_name }
12261    fn get_solution_id(&self) -> &str { &self.solution_id }
12262    fn get_solution_name(&self) -> &str { &self.solution_name }
12263}
12264impl AgencyIssueTrait for OrphanedAgency {
12265    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12266    fn get_agency_name(&self) -> &str { &self.agency_name }
12267    fn get_solution_id(&self) -> &str { &self.solution_id }
12268    fn get_solution_name(&self) -> &str { &self.solution_name }
12269}
12270impl AgencyIssueTrait for ClusterAgentAgentIssue {
12271    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12272    fn get_agency_name(&self) -> &str { &self.agency_name }
12273    fn get_solution_id(&self) -> &str { &self.solution_id }
12274    fn get_solution_name(&self) -> &str { &self.solution_name }
12275}
12276impl AgencyIssueTrait for ClusterAgentOvfInvalidProperty {
12277    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12278    fn get_agency_name(&self) -> &str { &self.agency_name }
12279    fn get_solution_id(&self) -> &str { &self.solution_id }
12280    fn get_solution_name(&self) -> &str { &self.solution_name }
12281}
12282impl AgencyIssueTrait for ClusterAgentTransitionFailed {
12283    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12284    fn get_agency_name(&self) -> &str { &self.agency_name }
12285    fn get_solution_id(&self) -> &str { &self.solution_id }
12286    fn get_solution_name(&self) -> &str { &self.solution_name }
12287}
12288impl AgencyIssueTrait for ClusterAgentVmIssue {
12289    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12290    fn get_agency_name(&self) -> &str { &self.agency_name }
12291    fn get_solution_id(&self) -> &str { &self.solution_id }
12292    fn get_solution_name(&self) -> &str { &self.solution_name }
12293}
12294impl AgencyIssueTrait for ClusterAgentHostInMaintenanceMode {
12295    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12296    fn get_agency_name(&self) -> &str { &self.agency_name }
12297    fn get_solution_id(&self) -> &str { &self.solution_id }
12298    fn get_solution_name(&self) -> &str { &self.solution_name }
12299}
12300impl AgencyIssueTrait for ClusterAgentHostInPartialMaintenanceMode {
12301    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12302    fn get_agency_name(&self) -> &str { &self.agency_name }
12303    fn get_solution_id(&self) -> &str { &self.solution_id }
12304    fn get_solution_name(&self) -> &str { &self.solution_name }
12305}
12306impl AgencyIssueTrait for ClusterAgentInvalidConfig {
12307    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12308    fn get_agency_name(&self) -> &str { &self.agency_name }
12309    fn get_solution_id(&self) -> &str { &self.solution_id }
12310    fn get_solution_name(&self) -> &str { &self.solution_name }
12311}
12312impl AgencyIssueTrait for ClusterAgentVmHookFailed {
12313    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12314    fn get_agency_name(&self) -> &str { &self.agency_name }
12315    fn get_solution_id(&self) -> &str { &self.solution_id }
12316    fn get_solution_name(&self) -> &str { &self.solution_name }
12317}
12318impl AgencyIssueTrait for ClusterAgentVmHookTimedout {
12319    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12320    fn get_agency_name(&self) -> &str { &self.agency_name }
12321    fn get_solution_id(&self) -> &str { &self.solution_id }
12322    fn get_solution_name(&self) -> &str { &self.solution_name }
12323}
12324impl AgencyIssueTrait for ClusterAgentVmInaccessible {
12325    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12326    fn get_agency_name(&self) -> &str { &self.agency_name }
12327    fn get_solution_id(&self) -> &str { &self.solution_id }
12328    fn get_solution_name(&self) -> &str { &self.solution_name }
12329}
12330impl AgencyIssueTrait for ClusterAgentVmNotRemoved {
12331    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12332    fn get_agency_name(&self) -> &str { &self.agency_name }
12333    fn get_solution_id(&self) -> &str { &self.solution_id }
12334    fn get_solution_name(&self) -> &str { &self.solution_name }
12335}
12336impl AgencyIssueTrait for ClusterAgentVmPoweredOff {
12337    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12338    fn get_agency_name(&self) -> &str { &self.agency_name }
12339    fn get_solution_id(&self) -> &str { &self.solution_id }
12340    fn get_solution_name(&self) -> &str { &self.solution_name }
12341}
12342impl AgencyIssueTrait for ClusterAgentInsufficientClusterResources {
12343    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12344    fn get_agency_name(&self) -> &str { &self.agency_name }
12345    fn get_solution_id(&self) -> &str { &self.solution_id }
12346    fn get_solution_name(&self) -> &str { &self.solution_name }
12347}
12348impl AgencyIssueTrait for ClusterAgentVmPoweredOn {
12349    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12350    fn get_agency_name(&self) -> &str { &self.agency_name }
12351    fn get_solution_id(&self) -> &str { &self.solution_id }
12352    fn get_solution_name(&self) -> &str { &self.solution_name }
12353}
12354impl AgencyIssueTrait for ClusterAgentVmProtected {
12355    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12356    fn get_agency_name(&self) -> &str { &self.agency_name }
12357    fn get_solution_id(&self) -> &str { &self.solution_id }
12358    fn get_solution_name(&self) -> &str { &self.solution_name }
12359}
12360impl AgencyIssueTrait for ClusterAgentVmSuspended {
12361    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12362    fn get_agency_name(&self) -> &str { &self.agency_name }
12363    fn get_solution_id(&self) -> &str { &self.solution_id }
12364    fn get_solution_name(&self) -> &str { &self.solution_name }
12365}
12366impl AgencyIssueTrait for ClusterAgentVmNotDeployed {
12367    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12368    fn get_agency_name(&self) -> &str { &self.agency_name }
12369    fn get_solution_id(&self) -> &str { &self.solution_id }
12370    fn get_solution_name(&self) -> &str { &self.solution_name }
12371}
12372impl AgencyIssueTrait for ClusterAgentCertificateNotTrusted {
12373    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12374    fn get_agency_name(&self) -> &str { &self.agency_name }
12375    fn get_solution_id(&self) -> &str { &self.solution_id }
12376    fn get_solution_name(&self) -> &str { &self.solution_name }
12377}
12378impl AgencyIssueTrait for ClusterAgentInsufficientClusterSpace {
12379    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12380    fn get_agency_name(&self) -> &str { &self.agency_name }
12381    fn get_solution_id(&self) -> &str { &self.solution_id }
12382    fn get_solution_name(&self) -> &str { &self.solution_name }
12383}
12384impl AgencyIssueTrait for ClusterAgentMissingClusterVmDatastore {
12385    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12386    fn get_agency_name(&self) -> &str { &self.agency_name }
12387    fn get_solution_id(&self) -> &str { &self.solution_id }
12388    fn get_solution_name(&self) -> &str { &self.solution_name }
12389}
12390impl AgencyIssueTrait for ClusterAgentMissingClusterVmNetwork {
12391    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12392    fn get_agency_name(&self) -> &str { &self.agency_name }
12393    fn get_solution_id(&self) -> &str { &self.solution_id }
12394    fn get_solution_name(&self) -> &str { &self.solution_name }
12395}
12396impl AgencyIssueTrait for IntegrityAgencyVumIssue {
12397    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12398    fn get_agency_name(&self) -> &str { &self.agency_name }
12399    fn get_solution_id(&self) -> &str { &self.solution_id }
12400    fn get_solution_name(&self) -> &str { &self.solution_name }
12401}
12402impl AgencyIssueTrait for IntegrityAgencyCannotDeleteSoftware {
12403    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12404    fn get_agency_name(&self) -> &str { &self.agency_name }
12405    fn get_solution_id(&self) -> &str { &self.solution_id }
12406    fn get_solution_name(&self) -> &str { &self.solution_name }
12407}
12408impl AgencyIssueTrait for IntegrityAgencyCannotStageSoftware {
12409    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12410    fn get_agency_name(&self) -> &str { &self.agency_name }
12411    fn get_solution_id(&self) -> &str { &self.solution_id }
12412    fn get_solution_name(&self) -> &str { &self.solution_name }
12413}
12414impl AgencyIssueTrait for IntegrityAgencyVumUnavailable {
12415    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12416    fn get_agency_name(&self) -> &str { &self.agency_name }
12417    fn get_solution_id(&self) -> &str { &self.solution_id }
12418    fn get_solution_name(&self) -> &str { &self.solution_name }
12419}
12420impl AgencyIssueTrait for PersonalityAgencyPmIssue {
12421    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12422    fn get_agency_name(&self) -> &str { &self.agency_name }
12423    fn get_solution_id(&self) -> &str { &self.solution_id }
12424    fn get_solution_name(&self) -> &str { &self.solution_name }
12425}
12426impl AgencyIssueTrait for PersonalityAgencyCannotConfigureSolutions {
12427    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12428    fn get_agency_name(&self) -> &str { &self.agency_name }
12429    fn get_solution_id(&self) -> &str { &self.solution_id }
12430    fn get_solution_name(&self) -> &str { &self.solution_name }
12431}
12432impl AgencyIssueTrait for PersonalityAgencyDepotIssue {
12433    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12434    fn get_agency_name(&self) -> &str { &self.agency_name }
12435    fn get_solution_id(&self) -> &str { &self.solution_id }
12436    fn get_solution_name(&self) -> &str { &self.solution_name }
12437}
12438impl AgencyIssueTrait for PersonalityAgencyCannotUploadDepot {
12439    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12440    fn get_agency_name(&self) -> &str { &self.agency_name }
12441    fn get_solution_id(&self) -> &str { &self.solution_id }
12442    fn get_solution_name(&self) -> &str { &self.solution_name }
12443}
12444impl AgencyIssueTrait for PersonalityAgencyInaccessibleDepot {
12445    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12446    fn get_agency_name(&self) -> &str { &self.agency_name }
12447    fn get_solution_id(&self) -> &str { &self.solution_id }
12448    fn get_solution_name(&self) -> &str { &self.solution_name }
12449}
12450impl AgencyIssueTrait for PersonalityAgencyInvalidDepot {
12451    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12452    fn get_agency_name(&self) -> &str { &self.agency_name }
12453    fn get_solution_id(&self) -> &str { &self.solution_id }
12454    fn get_solution_name(&self) -> &str { &self.solution_name }
12455}
12456impl AgencyIssueTrait for PersonalityAgencyPmUnavailable {
12457    fn get_agency(&self) -> &super::structs::ManagedObjectReference { &self.agency }
12458    fn get_agency_name(&self) -> &str { &self.agency_name }
12459    fn get_solution_id(&self) -> &str { &self.solution_id }
12460    fn get_solution_name(&self) -> &str { &self.solution_name }
12461}
12462impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AgencyIssueTrait {
12463    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
12464        let data_type = from.data_type();
12465        match data_type {
12466            StructType::AgencyIssue => Some(from.as_any_ref().downcast_ref::<AgencyIssue>()?),
12467            StructType::AgencyDisabled => Some(from.as_any_ref().downcast_ref::<AgencyDisabled>()?),
12468            StructType::AgentIssue => Some(from.as_any_ref().downcast_ref::<AgentIssue>()?),
12469            StructType::EamCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<EamCertificateNotTrusted>()?),
12470            StructType::HostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInPartialMaintenanceMode>()?),
12471            StructType::ManagedHostNotReachable => Some(from.as_any_ref().downcast_ref::<ManagedHostNotReachable>()?),
12472            StructType::MissingDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<MissingDvFilterSwitch>()?),
12473            StructType::OvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<OvfInvalidProperty>()?),
12474            StructType::TransitionFailed => Some(from.as_any_ref().downcast_ref::<TransitionFailed>()?),
12475            StructType::VibIssue => Some(from.as_any_ref().downcast_ref::<VibIssue>()?),
12476            StructType::ImmediateHostRebootRequired => Some(from.as_any_ref().downcast_ref::<ImmediateHostRebootRequired>()?),
12477            StructType::VibCannotPutHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostInMaintenanceMode>()?),
12478            StructType::VibCannotPutHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostOutOfMaintenanceMode>()?),
12479            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
12480            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
12481            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
12482            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
12483            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
12484            StructType::VibRequiresHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibRequiresHostInMaintenanceMode>()?),
12485            StructType::VibRequiresHostReboot => Some(from.as_any_ref().downcast_ref::<VibRequiresHostReboot>()?),
12486            StructType::VibRequiresManualInstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualInstallation>()?),
12487            StructType::VibRequiresManualUninstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualUninstallation>()?),
12488            StructType::VmIssue => Some(from.as_any_ref().downcast_ref::<VmIssue>()?),
12489            StructType::InvalidConfig => Some(from.as_any_ref().downcast_ref::<InvalidConfig>()?),
12490            StructType::VmCorrupted => Some(from.as_any_ref().downcast_ref::<VmCorrupted>()?),
12491            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
12492            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
12493            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
12494            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
12495            StructType::VmHookFailed => Some(from.as_any_ref().downcast_ref::<VmHookFailed>()?),
12496            StructType::VmHookTimedout => Some(from.as_any_ref().downcast_ref::<VmHookTimedout>()?),
12497            StructType::VmInaccessible => Some(from.as_any_ref().downcast_ref::<VmInaccessible>()?),
12498            StructType::VmMarkedAsTemplate => Some(from.as_any_ref().downcast_ref::<VmMarkedAsTemplate>()?),
12499            StructType::VmOrphaned => Some(from.as_any_ref().downcast_ref::<VmOrphaned>()?),
12500            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
12501            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
12502            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
12503            StructType::VmPoweredOn => Some(from.as_any_ref().downcast_ref::<VmPoweredOn>()?),
12504            StructType::VmProtected => Some(from.as_any_ref().downcast_ref::<VmProtected>()?),
12505            StructType::VmSuspended => Some(from.as_any_ref().downcast_ref::<VmSuspended>()?),
12506            StructType::VmWrongFolder => Some(from.as_any_ref().downcast_ref::<VmWrongFolder>()?),
12507            StructType::VmWrongResourcePool => Some(from.as_any_ref().downcast_ref::<VmWrongResourcePool>()?),
12508            StructType::VmNotDeployed => Some(from.as_any_ref().downcast_ref::<VmNotDeployed>()?),
12509            StructType::CannotAccessAgentOvf => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentOvf>()?),
12510            StructType::IncompatibleHostVersion => Some(from.as_any_ref().downcast_ref::<IncompatibleHostVersion>()?),
12511            StructType::InsufficientResources => Some(from.as_any_ref().downcast_ref::<InsufficientResources>()?),
12512            StructType::InsufficientSpace => Some(from.as_any_ref().downcast_ref::<InsufficientSpace>()?),
12513            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
12514            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
12515            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
12516            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
12517            StructType::NoDiscoverableAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmDatastore>()?),
12518            StructType::NoDiscoverableAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmNetwork>()?),
12519            StructType::OvfInvalidFormat => Some(from.as_any_ref().downcast_ref::<OvfInvalidFormat>()?),
12520            StructType::VmRequiresHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VmRequiresHostOutOfMaintenanceMode>()?),
12521            StructType::PersonalityAgentPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgentPmIssue>()?),
12522            StructType::PersonalityAgentAwaitingPmRemediation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentAwaitingPmRemediation>()?),
12523            StructType::PersonalityAgentBlockedByAgencyOperation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentBlockedByAgencyOperation>()?),
12524            StructType::OrphanedAgency => Some(from.as_any_ref().downcast_ref::<OrphanedAgency>()?),
12525            StructType::ClusterAgentAgentIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentAgentIssue>()?),
12526            StructType::ClusterAgentOvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<ClusterAgentOvfInvalidProperty>()?),
12527            StructType::ClusterAgentTransitionFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentTransitionFailed>()?),
12528            StructType::ClusterAgentVmIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmIssue>()?),
12529            StructType::ClusterAgentHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInMaintenanceMode>()?),
12530            StructType::ClusterAgentHostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInPartialMaintenanceMode>()?),
12531            StructType::ClusterAgentInvalidConfig => Some(from.as_any_ref().downcast_ref::<ClusterAgentInvalidConfig>()?),
12532            StructType::ClusterAgentVmHookFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookFailed>()?),
12533            StructType::ClusterAgentVmHookTimedout => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookTimedout>()?),
12534            StructType::ClusterAgentVmInaccessible => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmInaccessible>()?),
12535            StructType::ClusterAgentVmNotRemoved => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotRemoved>()?),
12536            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
12537            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
12538            StructType::ClusterAgentVmPoweredOn => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOn>()?),
12539            StructType::ClusterAgentVmProtected => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmProtected>()?),
12540            StructType::ClusterAgentVmSuspended => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmSuspended>()?),
12541            StructType::ClusterAgentVmNotDeployed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotDeployed>()?),
12542            StructType::ClusterAgentCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<ClusterAgentCertificateNotTrusted>()?),
12543            StructType::ClusterAgentInsufficientClusterSpace => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterSpace>()?),
12544            StructType::ClusterAgentMissingClusterVmDatastore => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmDatastore>()?),
12545            StructType::ClusterAgentMissingClusterVmNetwork => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmNetwork>()?),
12546            StructType::IntegrityAgencyVumIssue => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumIssue>()?),
12547            StructType::IntegrityAgencyCannotDeleteSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotDeleteSoftware>()?),
12548            StructType::IntegrityAgencyCannotStageSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotStageSoftware>()?),
12549            StructType::IntegrityAgencyVumUnavailable => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumUnavailable>()?),
12550            StructType::PersonalityAgencyPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmIssue>()?),
12551            StructType::PersonalityAgencyCannotConfigureSolutions => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotConfigureSolutions>()?),
12552            StructType::PersonalityAgencyDepotIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyDepotIssue>()?),
12553            StructType::PersonalityAgencyCannotUploadDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotUploadDepot>()?),
12554            StructType::PersonalityAgencyInaccessibleDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInaccessibleDepot>()?),
12555            StructType::PersonalityAgencyInvalidDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInvalidDepot>()?),
12556            StructType::PersonalityAgencyPmUnavailable => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmUnavailable>()?),
12557            _ => None,
12558        }
12559    }
12560    
12561    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
12562        let data_type = from.data_type();
12563        match data_type {
12564            StructType::AgencyIssue => Ok(from.as_any_box().downcast::<AgencyIssue>()?),
12565            StructType::AgencyDisabled => Ok(from.as_any_box().downcast::<AgencyDisabled>()?),
12566            StructType::AgentIssue => Ok(from.as_any_box().downcast::<AgentIssue>()?),
12567            StructType::EamCertificateNotTrusted => Ok(from.as_any_box().downcast::<EamCertificateNotTrusted>()?),
12568            StructType::HostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<HostInPartialMaintenanceMode>()?),
12569            StructType::ManagedHostNotReachable => Ok(from.as_any_box().downcast::<ManagedHostNotReachable>()?),
12570            StructType::MissingDvFilterSwitch => Ok(from.as_any_box().downcast::<MissingDvFilterSwitch>()?),
12571            StructType::OvfInvalidProperty => Ok(from.as_any_box().downcast::<OvfInvalidProperty>()?),
12572            StructType::TransitionFailed => Ok(from.as_any_box().downcast::<TransitionFailed>()?),
12573            StructType::VibIssue => Ok(from.as_any_box().downcast::<VibIssue>()?),
12574            StructType::ImmediateHostRebootRequired => Ok(from.as_any_box().downcast::<ImmediateHostRebootRequired>()?),
12575            StructType::VibCannotPutHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostInMaintenanceMode>()?),
12576            StructType::VibCannotPutHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostOutOfMaintenanceMode>()?),
12577            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
12578            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
12579            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
12580            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
12581            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
12582            StructType::VibRequiresHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibRequiresHostInMaintenanceMode>()?),
12583            StructType::VibRequiresHostReboot => Ok(from.as_any_box().downcast::<VibRequiresHostReboot>()?),
12584            StructType::VibRequiresManualInstallation => Ok(from.as_any_box().downcast::<VibRequiresManualInstallation>()?),
12585            StructType::VibRequiresManualUninstallation => Ok(from.as_any_box().downcast::<VibRequiresManualUninstallation>()?),
12586            StructType::VmIssue => Ok(from.as_any_box().downcast::<VmIssue>()?),
12587            StructType::InvalidConfig => Ok(from.as_any_box().downcast::<InvalidConfig>()?),
12588            StructType::VmCorrupted => Ok(from.as_any_box().downcast::<VmCorrupted>()?),
12589            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
12590            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
12591            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
12592            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
12593            StructType::VmHookFailed => Ok(from.as_any_box().downcast::<VmHookFailed>()?),
12594            StructType::VmHookTimedout => Ok(from.as_any_box().downcast::<VmHookTimedout>()?),
12595            StructType::VmInaccessible => Ok(from.as_any_box().downcast::<VmInaccessible>()?),
12596            StructType::VmMarkedAsTemplate => Ok(from.as_any_box().downcast::<VmMarkedAsTemplate>()?),
12597            StructType::VmOrphaned => Ok(from.as_any_box().downcast::<VmOrphaned>()?),
12598            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
12599            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
12600            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
12601            StructType::VmPoweredOn => Ok(from.as_any_box().downcast::<VmPoweredOn>()?),
12602            StructType::VmProtected => Ok(from.as_any_box().downcast::<VmProtected>()?),
12603            StructType::VmSuspended => Ok(from.as_any_box().downcast::<VmSuspended>()?),
12604            StructType::VmWrongFolder => Ok(from.as_any_box().downcast::<VmWrongFolder>()?),
12605            StructType::VmWrongResourcePool => Ok(from.as_any_box().downcast::<VmWrongResourcePool>()?),
12606            StructType::VmNotDeployed => Ok(from.as_any_box().downcast::<VmNotDeployed>()?),
12607            StructType::CannotAccessAgentOvf => Ok(from.as_any_box().downcast::<CannotAccessAgentOvf>()?),
12608            StructType::IncompatibleHostVersion => Ok(from.as_any_box().downcast::<IncompatibleHostVersion>()?),
12609            StructType::InsufficientResources => Ok(from.as_any_box().downcast::<InsufficientResources>()?),
12610            StructType::InsufficientSpace => Ok(from.as_any_box().downcast::<InsufficientSpace>()?),
12611            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
12612            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
12613            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
12614            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
12615            StructType::NoDiscoverableAgentVmDatastore => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmDatastore>()?),
12616            StructType::NoDiscoverableAgentVmNetwork => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmNetwork>()?),
12617            StructType::OvfInvalidFormat => Ok(from.as_any_box().downcast::<OvfInvalidFormat>()?),
12618            StructType::VmRequiresHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VmRequiresHostOutOfMaintenanceMode>()?),
12619            StructType::PersonalityAgentPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgentPmIssue>()?),
12620            StructType::PersonalityAgentAwaitingPmRemediation => Ok(from.as_any_box().downcast::<PersonalityAgentAwaitingPmRemediation>()?),
12621            StructType::PersonalityAgentBlockedByAgencyOperation => Ok(from.as_any_box().downcast::<PersonalityAgentBlockedByAgencyOperation>()?),
12622            StructType::OrphanedAgency => Ok(from.as_any_box().downcast::<OrphanedAgency>()?),
12623            StructType::ClusterAgentAgentIssue => Ok(from.as_any_box().downcast::<ClusterAgentAgentIssue>()?),
12624            StructType::ClusterAgentOvfInvalidProperty => Ok(from.as_any_box().downcast::<ClusterAgentOvfInvalidProperty>()?),
12625            StructType::ClusterAgentTransitionFailed => Ok(from.as_any_box().downcast::<ClusterAgentTransitionFailed>()?),
12626            StructType::ClusterAgentVmIssue => Ok(from.as_any_box().downcast::<ClusterAgentVmIssue>()?),
12627            StructType::ClusterAgentHostInMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInMaintenanceMode>()?),
12628            StructType::ClusterAgentHostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInPartialMaintenanceMode>()?),
12629            StructType::ClusterAgentInvalidConfig => Ok(from.as_any_box().downcast::<ClusterAgentInvalidConfig>()?),
12630            StructType::ClusterAgentVmHookFailed => Ok(from.as_any_box().downcast::<ClusterAgentVmHookFailed>()?),
12631            StructType::ClusterAgentVmHookTimedout => Ok(from.as_any_box().downcast::<ClusterAgentVmHookTimedout>()?),
12632            StructType::ClusterAgentVmInaccessible => Ok(from.as_any_box().downcast::<ClusterAgentVmInaccessible>()?),
12633            StructType::ClusterAgentVmNotRemoved => Ok(from.as_any_box().downcast::<ClusterAgentVmNotRemoved>()?),
12634            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
12635            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
12636            StructType::ClusterAgentVmPoweredOn => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOn>()?),
12637            StructType::ClusterAgentVmProtected => Ok(from.as_any_box().downcast::<ClusterAgentVmProtected>()?),
12638            StructType::ClusterAgentVmSuspended => Ok(from.as_any_box().downcast::<ClusterAgentVmSuspended>()?),
12639            StructType::ClusterAgentVmNotDeployed => Ok(from.as_any_box().downcast::<ClusterAgentVmNotDeployed>()?),
12640            StructType::ClusterAgentCertificateNotTrusted => Ok(from.as_any_box().downcast::<ClusterAgentCertificateNotTrusted>()?),
12641            StructType::ClusterAgentInsufficientClusterSpace => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterSpace>()?),
12642            StructType::ClusterAgentMissingClusterVmDatastore => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmDatastore>()?),
12643            StructType::ClusterAgentMissingClusterVmNetwork => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmNetwork>()?),
12644            StructType::IntegrityAgencyVumIssue => Ok(from.as_any_box().downcast::<IntegrityAgencyVumIssue>()?),
12645            StructType::IntegrityAgencyCannotDeleteSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotDeleteSoftware>()?),
12646            StructType::IntegrityAgencyCannotStageSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotStageSoftware>()?),
12647            StructType::IntegrityAgencyVumUnavailable => Ok(from.as_any_box().downcast::<IntegrityAgencyVumUnavailable>()?),
12648            StructType::PersonalityAgencyPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyPmIssue>()?),
12649            StructType::PersonalityAgencyCannotConfigureSolutions => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotConfigureSolutions>()?),
12650            StructType::PersonalityAgencyDepotIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyDepotIssue>()?),
12651            StructType::PersonalityAgencyCannotUploadDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotUploadDepot>()?),
12652            StructType::PersonalityAgencyInaccessibleDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInaccessibleDepot>()?),
12653            StructType::PersonalityAgencyInvalidDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInvalidDepot>()?),
12654            StructType::PersonalityAgencyPmUnavailable => Ok(from.as_any_box().downcast::<PersonalityAgencyPmUnavailable>()?),
12655            _ => Err(from.as_any_box()),
12656        }
12657    }
12658}
12659/// Base class for all agent issues.
12660/// 
12661/// This structure may be used only with operations rendered under `/eam`.
12662pub trait AgentIssueTrait : super::traits::AgencyIssueTrait {
12663    /// The agent that has this issue.
12664    /// 
12665    /// Refers instance of *Agent*.
12666    fn get_agent(&self) -> &super::structs::ManagedObjectReference;
12667    /// The name of the agent.
12668    fn get_agent_name(&self) -> &str;
12669    /// The managed object reference to the host on which this agent is located.
12670    /// 
12671    /// Refers instance of *HostSystem*.
12672    fn get_host(&self) -> &super::structs::ManagedObjectReference;
12673    /// The name of the host on which this agent is located.
12674    fn get_host_name(&self) -> &str;
12675}
12676impl<'s> serde::Serialize for dyn AgentIssueTrait + 's {
12677            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
12678            where
12679                S: serde::Serializer,
12680            {
12681                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
12682            }
12683        }
12684impl<'de> serde::Deserialize<'de> for Box<dyn AgentIssueTrait> {
12685            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
12686                deserializer.deserialize_map(AgentIssueVisitor)
12687            }
12688        }
12689
12690struct AgentIssueVisitor;
12691
12692impl<'de> de::Visitor<'de> for AgentIssueVisitor {
12693    type Value = Box<dyn AgentIssueTrait>;
12694
12695    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12696        formatter.write_str("a valid AgentIssueTrait JSON object with a _typeName field")
12697    }
12698
12699    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
12700    where
12701        A: de::MapAccess<'de>,
12702    {
12703        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
12704        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
12705        match any {
12706            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
12707                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
12708            VimAny::Value(value) => Err(de::Error::custom(format!(
12709                "expected object not wrapped value: {:?}",
12710                value))),
12711        }
12712    }
12713}
12714
12715impl AgentIssueTrait for AgentIssue {
12716    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12717    fn get_agent_name(&self) -> &str { &self.agent_name }
12718    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12719    fn get_host_name(&self) -> &str { &self.host_name }
12720}
12721impl AgentIssueTrait for EamCertificateNotTrusted {
12722    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12723    fn get_agent_name(&self) -> &str { &self.agent_name }
12724    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12725    fn get_host_name(&self) -> &str { &self.host_name }
12726}
12727impl AgentIssueTrait for HostInPartialMaintenanceMode {
12728    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12729    fn get_agent_name(&self) -> &str { &self.agent_name }
12730    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12731    fn get_host_name(&self) -> &str { &self.host_name }
12732}
12733impl AgentIssueTrait for ManagedHostNotReachable {
12734    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12735    fn get_agent_name(&self) -> &str { &self.agent_name }
12736    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12737    fn get_host_name(&self) -> &str { &self.host_name }
12738}
12739impl AgentIssueTrait for MissingDvFilterSwitch {
12740    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12741    fn get_agent_name(&self) -> &str { &self.agent_name }
12742    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12743    fn get_host_name(&self) -> &str { &self.host_name }
12744}
12745impl AgentIssueTrait for OvfInvalidProperty {
12746    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12747    fn get_agent_name(&self) -> &str { &self.agent_name }
12748    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12749    fn get_host_name(&self) -> &str { &self.host_name }
12750}
12751impl AgentIssueTrait for TransitionFailed {
12752    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12753    fn get_agent_name(&self) -> &str { &self.agent_name }
12754    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12755    fn get_host_name(&self) -> &str { &self.host_name }
12756}
12757impl AgentIssueTrait for VibIssue {
12758    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12759    fn get_agent_name(&self) -> &str { &self.agent_name }
12760    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12761    fn get_host_name(&self) -> &str { &self.host_name }
12762}
12763impl AgentIssueTrait for ImmediateHostRebootRequired {
12764    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12765    fn get_agent_name(&self) -> &str { &self.agent_name }
12766    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12767    fn get_host_name(&self) -> &str { &self.host_name }
12768}
12769impl AgentIssueTrait for VibCannotPutHostInMaintenanceMode {
12770    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12771    fn get_agent_name(&self) -> &str { &self.agent_name }
12772    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12773    fn get_host_name(&self) -> &str { &self.host_name }
12774}
12775impl AgentIssueTrait for VibCannotPutHostOutOfMaintenanceMode {
12776    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12777    fn get_agent_name(&self) -> &str { &self.agent_name }
12778    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12779    fn get_host_name(&self) -> &str { &self.host_name }
12780}
12781impl AgentIssueTrait for VibNotInstalled {
12782    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12783    fn get_agent_name(&self) -> &str { &self.agent_name }
12784    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12785    fn get_host_name(&self) -> &str { &self.host_name }
12786}
12787impl AgentIssueTrait for CannotAccessAgentVib {
12788    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12789    fn get_agent_name(&self) -> &str { &self.agent_name }
12790    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12791    fn get_host_name(&self) -> &str { &self.host_name }
12792}
12793impl AgentIssueTrait for VibDependenciesNotMetByHost {
12794    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12795    fn get_agent_name(&self) -> &str { &self.agent_name }
12796    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12797    fn get_host_name(&self) -> &str { &self.host_name }
12798}
12799impl AgentIssueTrait for VibInvalidFormat {
12800    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12801    fn get_agent_name(&self) -> &str { &self.agent_name }
12802    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12803    fn get_host_name(&self) -> &str { &self.host_name }
12804}
12805impl AgentIssueTrait for VibRequirementsNotMetByHost {
12806    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12807    fn get_agent_name(&self) -> &str { &self.agent_name }
12808    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12809    fn get_host_name(&self) -> &str { &self.host_name }
12810}
12811impl AgentIssueTrait for VibRequiresHostInMaintenanceMode {
12812    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12813    fn get_agent_name(&self) -> &str { &self.agent_name }
12814    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12815    fn get_host_name(&self) -> &str { &self.host_name }
12816}
12817impl AgentIssueTrait for VibRequiresHostReboot {
12818    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12819    fn get_agent_name(&self) -> &str { &self.agent_name }
12820    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12821    fn get_host_name(&self) -> &str { &self.host_name }
12822}
12823impl AgentIssueTrait for VibRequiresManualInstallation {
12824    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12825    fn get_agent_name(&self) -> &str { &self.agent_name }
12826    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12827    fn get_host_name(&self) -> &str { &self.host_name }
12828}
12829impl AgentIssueTrait for VibRequiresManualUninstallation {
12830    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12831    fn get_agent_name(&self) -> &str { &self.agent_name }
12832    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12833    fn get_host_name(&self) -> &str { &self.host_name }
12834}
12835impl AgentIssueTrait for VmIssue {
12836    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12837    fn get_agent_name(&self) -> &str { &self.agent_name }
12838    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12839    fn get_host_name(&self) -> &str { &self.host_name }
12840}
12841impl AgentIssueTrait for InvalidConfig {
12842    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12843    fn get_agent_name(&self) -> &str { &self.agent_name }
12844    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12845    fn get_host_name(&self) -> &str { &self.host_name }
12846}
12847impl AgentIssueTrait for VmCorrupted {
12848    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12849    fn get_agent_name(&self) -> &str { &self.agent_name }
12850    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12851    fn get_host_name(&self) -> &str { &self.host_name }
12852}
12853impl AgentIssueTrait for VmDeployed {
12854    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12855    fn get_agent_name(&self) -> &str { &self.agent_name }
12856    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12857    fn get_host_name(&self) -> &str { &self.host_name }
12858}
12859impl AgentIssueTrait for HostInMaintenanceMode {
12860    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12861    fn get_agent_name(&self) -> &str { &self.agent_name }
12862    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12863    fn get_host_name(&self) -> &str { &self.host_name }
12864}
12865impl AgentIssueTrait for HostInStandbyMode {
12866    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12867    fn get_agent_name(&self) -> &str { &self.agent_name }
12868    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12869    fn get_host_name(&self) -> &str { &self.host_name }
12870}
12871impl AgentIssueTrait for HostPoweredOff {
12872    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12873    fn get_agent_name(&self) -> &str { &self.agent_name }
12874    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12875    fn get_host_name(&self) -> &str { &self.host_name }
12876}
12877impl AgentIssueTrait for VmHookFailed {
12878    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12879    fn get_agent_name(&self) -> &str { &self.agent_name }
12880    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12881    fn get_host_name(&self) -> &str { &self.host_name }
12882}
12883impl AgentIssueTrait for VmHookTimedout {
12884    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12885    fn get_agent_name(&self) -> &str { &self.agent_name }
12886    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12887    fn get_host_name(&self) -> &str { &self.host_name }
12888}
12889impl AgentIssueTrait for VmInaccessible {
12890    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12891    fn get_agent_name(&self) -> &str { &self.agent_name }
12892    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12893    fn get_host_name(&self) -> &str { &self.host_name }
12894}
12895impl AgentIssueTrait for VmMarkedAsTemplate {
12896    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12897    fn get_agent_name(&self) -> &str { &self.agent_name }
12898    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12899    fn get_host_name(&self) -> &str { &self.host_name }
12900}
12901impl AgentIssueTrait for VmOrphaned {
12902    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12903    fn get_agent_name(&self) -> &str { &self.agent_name }
12904    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12905    fn get_host_name(&self) -> &str { &self.host_name }
12906}
12907impl AgentIssueTrait for VmPoweredOff {
12908    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12909    fn get_agent_name(&self) -> &str { &self.agent_name }
12910    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12911    fn get_host_name(&self) -> &str { &self.host_name }
12912}
12913impl AgentIssueTrait for InsufficientIpAddresses {
12914    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12915    fn get_agent_name(&self) -> &str { &self.agent_name }
12916    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12917    fn get_host_name(&self) -> &str { &self.host_name }
12918}
12919impl AgentIssueTrait for MissingAgentIpPool {
12920    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12921    fn get_agent_name(&self) -> &str { &self.agent_name }
12922    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12923    fn get_host_name(&self) -> &str { &self.host_name }
12924}
12925impl AgentIssueTrait for VmPoweredOn {
12926    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12927    fn get_agent_name(&self) -> &str { &self.agent_name }
12928    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12929    fn get_host_name(&self) -> &str { &self.host_name }
12930}
12931impl AgentIssueTrait for VmProtected {
12932    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12933    fn get_agent_name(&self) -> &str { &self.agent_name }
12934    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12935    fn get_host_name(&self) -> &str { &self.host_name }
12936}
12937impl AgentIssueTrait for VmSuspended {
12938    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12939    fn get_agent_name(&self) -> &str { &self.agent_name }
12940    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12941    fn get_host_name(&self) -> &str { &self.host_name }
12942}
12943impl AgentIssueTrait for VmWrongFolder {
12944    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12945    fn get_agent_name(&self) -> &str { &self.agent_name }
12946    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12947    fn get_host_name(&self) -> &str { &self.host_name }
12948}
12949impl AgentIssueTrait for VmWrongResourcePool {
12950    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12951    fn get_agent_name(&self) -> &str { &self.agent_name }
12952    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12953    fn get_host_name(&self) -> &str { &self.host_name }
12954}
12955impl AgentIssueTrait for VmNotDeployed {
12956    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12957    fn get_agent_name(&self) -> &str { &self.agent_name }
12958    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12959    fn get_host_name(&self) -> &str { &self.host_name }
12960}
12961impl AgentIssueTrait for CannotAccessAgentOvf {
12962    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12963    fn get_agent_name(&self) -> &str { &self.agent_name }
12964    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12965    fn get_host_name(&self) -> &str { &self.host_name }
12966}
12967impl AgentIssueTrait for IncompatibleHostVersion {
12968    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12969    fn get_agent_name(&self) -> &str { &self.agent_name }
12970    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12971    fn get_host_name(&self) -> &str { &self.host_name }
12972}
12973impl AgentIssueTrait for InsufficientResources {
12974    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12975    fn get_agent_name(&self) -> &str { &self.agent_name }
12976    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12977    fn get_host_name(&self) -> &str { &self.host_name }
12978}
12979impl AgentIssueTrait for InsufficientSpace {
12980    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12981    fn get_agent_name(&self) -> &str { &self.agent_name }
12982    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12983    fn get_host_name(&self) -> &str { &self.host_name }
12984}
12985impl AgentIssueTrait for NoAgentVmDatastore {
12986    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12987    fn get_agent_name(&self) -> &str { &self.agent_name }
12988    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12989    fn get_host_name(&self) -> &str { &self.host_name }
12990}
12991impl AgentIssueTrait for NoCustomAgentVmDatastore {
12992    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12993    fn get_agent_name(&self) -> &str { &self.agent_name }
12994    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
12995    fn get_host_name(&self) -> &str { &self.host_name }
12996}
12997impl AgentIssueTrait for NoAgentVmNetwork {
12998    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
12999    fn get_agent_name(&self) -> &str { &self.agent_name }
13000    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13001    fn get_host_name(&self) -> &str { &self.host_name }
13002}
13003impl AgentIssueTrait for NoCustomAgentVmNetwork {
13004    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13005    fn get_agent_name(&self) -> &str { &self.agent_name }
13006    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13007    fn get_host_name(&self) -> &str { &self.host_name }
13008}
13009impl AgentIssueTrait for NoDiscoverableAgentVmDatastore {
13010    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13011    fn get_agent_name(&self) -> &str { &self.agent_name }
13012    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13013    fn get_host_name(&self) -> &str { &self.host_name }
13014}
13015impl AgentIssueTrait for NoDiscoverableAgentVmNetwork {
13016    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13017    fn get_agent_name(&self) -> &str { &self.agent_name }
13018    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13019    fn get_host_name(&self) -> &str { &self.host_name }
13020}
13021impl AgentIssueTrait for OvfInvalidFormat {
13022    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13023    fn get_agent_name(&self) -> &str { &self.agent_name }
13024    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13025    fn get_host_name(&self) -> &str { &self.host_name }
13026}
13027impl AgentIssueTrait for VmRequiresHostOutOfMaintenanceMode {
13028    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13029    fn get_agent_name(&self) -> &str { &self.agent_name }
13030    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13031    fn get_host_name(&self) -> &str { &self.host_name }
13032}
13033impl AgentIssueTrait for PersonalityAgentPmIssue {
13034    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13035    fn get_agent_name(&self) -> &str { &self.agent_name }
13036    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13037    fn get_host_name(&self) -> &str { &self.host_name }
13038}
13039impl AgentIssueTrait for PersonalityAgentAwaitingPmRemediation {
13040    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13041    fn get_agent_name(&self) -> &str { &self.agent_name }
13042    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13043    fn get_host_name(&self) -> &str { &self.host_name }
13044}
13045impl AgentIssueTrait for PersonalityAgentBlockedByAgencyOperation {
13046    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
13047    fn get_agent_name(&self) -> &str { &self.agent_name }
13048    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
13049    fn get_host_name(&self) -> &str { &self.host_name }
13050}
13051impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AgentIssueTrait {
13052    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13053        let data_type = from.data_type();
13054        match data_type {
13055            StructType::AgentIssue => Some(from.as_any_ref().downcast_ref::<AgentIssue>()?),
13056            StructType::EamCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<EamCertificateNotTrusted>()?),
13057            StructType::HostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInPartialMaintenanceMode>()?),
13058            StructType::ManagedHostNotReachable => Some(from.as_any_ref().downcast_ref::<ManagedHostNotReachable>()?),
13059            StructType::MissingDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<MissingDvFilterSwitch>()?),
13060            StructType::OvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<OvfInvalidProperty>()?),
13061            StructType::TransitionFailed => Some(from.as_any_ref().downcast_ref::<TransitionFailed>()?),
13062            StructType::VibIssue => Some(from.as_any_ref().downcast_ref::<VibIssue>()?),
13063            StructType::ImmediateHostRebootRequired => Some(from.as_any_ref().downcast_ref::<ImmediateHostRebootRequired>()?),
13064            StructType::VibCannotPutHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostInMaintenanceMode>()?),
13065            StructType::VibCannotPutHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostOutOfMaintenanceMode>()?),
13066            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
13067            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
13068            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
13069            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
13070            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
13071            StructType::VibRequiresHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibRequiresHostInMaintenanceMode>()?),
13072            StructType::VibRequiresHostReboot => Some(from.as_any_ref().downcast_ref::<VibRequiresHostReboot>()?),
13073            StructType::VibRequiresManualInstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualInstallation>()?),
13074            StructType::VibRequiresManualUninstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualUninstallation>()?),
13075            StructType::VmIssue => Some(from.as_any_ref().downcast_ref::<VmIssue>()?),
13076            StructType::InvalidConfig => Some(from.as_any_ref().downcast_ref::<InvalidConfig>()?),
13077            StructType::VmCorrupted => Some(from.as_any_ref().downcast_ref::<VmCorrupted>()?),
13078            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
13079            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
13080            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
13081            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
13082            StructType::VmHookFailed => Some(from.as_any_ref().downcast_ref::<VmHookFailed>()?),
13083            StructType::VmHookTimedout => Some(from.as_any_ref().downcast_ref::<VmHookTimedout>()?),
13084            StructType::VmInaccessible => Some(from.as_any_ref().downcast_ref::<VmInaccessible>()?),
13085            StructType::VmMarkedAsTemplate => Some(from.as_any_ref().downcast_ref::<VmMarkedAsTemplate>()?),
13086            StructType::VmOrphaned => Some(from.as_any_ref().downcast_ref::<VmOrphaned>()?),
13087            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
13088            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
13089            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
13090            StructType::VmPoweredOn => Some(from.as_any_ref().downcast_ref::<VmPoweredOn>()?),
13091            StructType::VmProtected => Some(from.as_any_ref().downcast_ref::<VmProtected>()?),
13092            StructType::VmSuspended => Some(from.as_any_ref().downcast_ref::<VmSuspended>()?),
13093            StructType::VmWrongFolder => Some(from.as_any_ref().downcast_ref::<VmWrongFolder>()?),
13094            StructType::VmWrongResourcePool => Some(from.as_any_ref().downcast_ref::<VmWrongResourcePool>()?),
13095            StructType::VmNotDeployed => Some(from.as_any_ref().downcast_ref::<VmNotDeployed>()?),
13096            StructType::CannotAccessAgentOvf => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentOvf>()?),
13097            StructType::IncompatibleHostVersion => Some(from.as_any_ref().downcast_ref::<IncompatibleHostVersion>()?),
13098            StructType::InsufficientResources => Some(from.as_any_ref().downcast_ref::<InsufficientResources>()?),
13099            StructType::InsufficientSpace => Some(from.as_any_ref().downcast_ref::<InsufficientSpace>()?),
13100            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
13101            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
13102            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
13103            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
13104            StructType::NoDiscoverableAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmDatastore>()?),
13105            StructType::NoDiscoverableAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmNetwork>()?),
13106            StructType::OvfInvalidFormat => Some(from.as_any_ref().downcast_ref::<OvfInvalidFormat>()?),
13107            StructType::VmRequiresHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VmRequiresHostOutOfMaintenanceMode>()?),
13108            StructType::PersonalityAgentPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgentPmIssue>()?),
13109            StructType::PersonalityAgentAwaitingPmRemediation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentAwaitingPmRemediation>()?),
13110            StructType::PersonalityAgentBlockedByAgencyOperation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentBlockedByAgencyOperation>()?),
13111            _ => None,
13112        }
13113    }
13114    
13115    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13116        let data_type = from.data_type();
13117        match data_type {
13118            StructType::AgentIssue => Ok(from.as_any_box().downcast::<AgentIssue>()?),
13119            StructType::EamCertificateNotTrusted => Ok(from.as_any_box().downcast::<EamCertificateNotTrusted>()?),
13120            StructType::HostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<HostInPartialMaintenanceMode>()?),
13121            StructType::ManagedHostNotReachable => Ok(from.as_any_box().downcast::<ManagedHostNotReachable>()?),
13122            StructType::MissingDvFilterSwitch => Ok(from.as_any_box().downcast::<MissingDvFilterSwitch>()?),
13123            StructType::OvfInvalidProperty => Ok(from.as_any_box().downcast::<OvfInvalidProperty>()?),
13124            StructType::TransitionFailed => Ok(from.as_any_box().downcast::<TransitionFailed>()?),
13125            StructType::VibIssue => Ok(from.as_any_box().downcast::<VibIssue>()?),
13126            StructType::ImmediateHostRebootRequired => Ok(from.as_any_box().downcast::<ImmediateHostRebootRequired>()?),
13127            StructType::VibCannotPutHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostInMaintenanceMode>()?),
13128            StructType::VibCannotPutHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostOutOfMaintenanceMode>()?),
13129            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
13130            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
13131            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
13132            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
13133            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
13134            StructType::VibRequiresHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibRequiresHostInMaintenanceMode>()?),
13135            StructType::VibRequiresHostReboot => Ok(from.as_any_box().downcast::<VibRequiresHostReboot>()?),
13136            StructType::VibRequiresManualInstallation => Ok(from.as_any_box().downcast::<VibRequiresManualInstallation>()?),
13137            StructType::VibRequiresManualUninstallation => Ok(from.as_any_box().downcast::<VibRequiresManualUninstallation>()?),
13138            StructType::VmIssue => Ok(from.as_any_box().downcast::<VmIssue>()?),
13139            StructType::InvalidConfig => Ok(from.as_any_box().downcast::<InvalidConfig>()?),
13140            StructType::VmCorrupted => Ok(from.as_any_box().downcast::<VmCorrupted>()?),
13141            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
13142            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
13143            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
13144            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
13145            StructType::VmHookFailed => Ok(from.as_any_box().downcast::<VmHookFailed>()?),
13146            StructType::VmHookTimedout => Ok(from.as_any_box().downcast::<VmHookTimedout>()?),
13147            StructType::VmInaccessible => Ok(from.as_any_box().downcast::<VmInaccessible>()?),
13148            StructType::VmMarkedAsTemplate => Ok(from.as_any_box().downcast::<VmMarkedAsTemplate>()?),
13149            StructType::VmOrphaned => Ok(from.as_any_box().downcast::<VmOrphaned>()?),
13150            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
13151            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
13152            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
13153            StructType::VmPoweredOn => Ok(from.as_any_box().downcast::<VmPoweredOn>()?),
13154            StructType::VmProtected => Ok(from.as_any_box().downcast::<VmProtected>()?),
13155            StructType::VmSuspended => Ok(from.as_any_box().downcast::<VmSuspended>()?),
13156            StructType::VmWrongFolder => Ok(from.as_any_box().downcast::<VmWrongFolder>()?),
13157            StructType::VmWrongResourcePool => Ok(from.as_any_box().downcast::<VmWrongResourcePool>()?),
13158            StructType::VmNotDeployed => Ok(from.as_any_box().downcast::<VmNotDeployed>()?),
13159            StructType::CannotAccessAgentOvf => Ok(from.as_any_box().downcast::<CannotAccessAgentOvf>()?),
13160            StructType::IncompatibleHostVersion => Ok(from.as_any_box().downcast::<IncompatibleHostVersion>()?),
13161            StructType::InsufficientResources => Ok(from.as_any_box().downcast::<InsufficientResources>()?),
13162            StructType::InsufficientSpace => Ok(from.as_any_box().downcast::<InsufficientSpace>()?),
13163            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
13164            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
13165            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
13166            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
13167            StructType::NoDiscoverableAgentVmDatastore => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmDatastore>()?),
13168            StructType::NoDiscoverableAgentVmNetwork => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmNetwork>()?),
13169            StructType::OvfInvalidFormat => Ok(from.as_any_box().downcast::<OvfInvalidFormat>()?),
13170            StructType::VmRequiresHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VmRequiresHostOutOfMaintenanceMode>()?),
13171            StructType::PersonalityAgentPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgentPmIssue>()?),
13172            StructType::PersonalityAgentAwaitingPmRemediation => Ok(from.as_any_box().downcast::<PersonalityAgentAwaitingPmRemediation>()?),
13173            StructType::PersonalityAgentBlockedByAgencyOperation => Ok(from.as_any_box().downcast::<PersonalityAgentBlockedByAgencyOperation>()?),
13174            _ => Err(from.as_any_box()),
13175        }
13176    }
13177}
13178/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
13179/// 
13180/// Base class for all issues related to the VIB modules that belong to an agent.
13181/// 
13182/// This structure may be used only with operations rendered under `/eam`.
13183pub trait VibIssueTrait : super::traits::AgentIssueTrait {
13184}
13185impl<'s> serde::Serialize for dyn VibIssueTrait + 's {
13186            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13187            where
13188                S: serde::Serializer,
13189            {
13190                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13191            }
13192        }
13193impl<'de> serde::Deserialize<'de> for Box<dyn VibIssueTrait> {
13194            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13195                deserializer.deserialize_map(VibIssueVisitor)
13196            }
13197        }
13198
13199struct VibIssueVisitor;
13200
13201impl<'de> de::Visitor<'de> for VibIssueVisitor {
13202    type Value = Box<dyn VibIssueTrait>;
13203
13204    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13205        formatter.write_str("a valid VibIssueTrait JSON object with a _typeName field")
13206    }
13207
13208    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13209    where
13210        A: de::MapAccess<'de>,
13211    {
13212        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13213        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13214        match any {
13215            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13216                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13217            VimAny::Value(value) => Err(de::Error::custom(format!(
13218                "expected object not wrapped value: {:?}",
13219                value))),
13220        }
13221    }
13222}
13223
13224impl VibIssueTrait for VibIssue {
13225}
13226impl VibIssueTrait for ImmediateHostRebootRequired {
13227}
13228impl VibIssueTrait for VibCannotPutHostInMaintenanceMode {
13229}
13230impl VibIssueTrait for VibCannotPutHostOutOfMaintenanceMode {
13231}
13232impl VibIssueTrait for VibNotInstalled {
13233}
13234impl VibIssueTrait for CannotAccessAgentVib {
13235}
13236impl VibIssueTrait for VibDependenciesNotMetByHost {
13237}
13238impl VibIssueTrait for VibInvalidFormat {
13239}
13240impl VibIssueTrait for VibRequirementsNotMetByHost {
13241}
13242impl VibIssueTrait for VibRequiresHostInMaintenanceMode {
13243}
13244impl VibIssueTrait for VibRequiresHostReboot {
13245}
13246impl VibIssueTrait for VibRequiresManualInstallation {
13247}
13248impl VibIssueTrait for VibRequiresManualUninstallation {
13249}
13250impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VibIssueTrait {
13251    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13252        let data_type = from.data_type();
13253        match data_type {
13254            StructType::VibIssue => Some(from.as_any_ref().downcast_ref::<VibIssue>()?),
13255            StructType::ImmediateHostRebootRequired => Some(from.as_any_ref().downcast_ref::<ImmediateHostRebootRequired>()?),
13256            StructType::VibCannotPutHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostInMaintenanceMode>()?),
13257            StructType::VibCannotPutHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibCannotPutHostOutOfMaintenanceMode>()?),
13258            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
13259            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
13260            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
13261            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
13262            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
13263            StructType::VibRequiresHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VibRequiresHostInMaintenanceMode>()?),
13264            StructType::VibRequiresHostReboot => Some(from.as_any_ref().downcast_ref::<VibRequiresHostReboot>()?),
13265            StructType::VibRequiresManualInstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualInstallation>()?),
13266            StructType::VibRequiresManualUninstallation => Some(from.as_any_ref().downcast_ref::<VibRequiresManualUninstallation>()?),
13267            _ => None,
13268        }
13269    }
13270    
13271    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13272        let data_type = from.data_type();
13273        match data_type {
13274            StructType::VibIssue => Ok(from.as_any_box().downcast::<VibIssue>()?),
13275            StructType::ImmediateHostRebootRequired => Ok(from.as_any_box().downcast::<ImmediateHostRebootRequired>()?),
13276            StructType::VibCannotPutHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostInMaintenanceMode>()?),
13277            StructType::VibCannotPutHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VibCannotPutHostOutOfMaintenanceMode>()?),
13278            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
13279            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
13280            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
13281            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
13282            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
13283            StructType::VibRequiresHostInMaintenanceMode => Ok(from.as_any_box().downcast::<VibRequiresHostInMaintenanceMode>()?),
13284            StructType::VibRequiresHostReboot => Ok(from.as_any_box().downcast::<VibRequiresHostReboot>()?),
13285            StructType::VibRequiresManualInstallation => Ok(from.as_any_box().downcast::<VibRequiresManualInstallation>()?),
13286            StructType::VibRequiresManualUninstallation => Ok(from.as_any_box().downcast::<VibRequiresManualUninstallation>()?),
13287            _ => Err(from.as_any_box()),
13288        }
13289    }
13290}
13291/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
13292/// 
13293/// A VIB module is expected to be installed/removed on a host, but it has not
13294/// been installed/removed.
13295/// 
13296/// Typically, a more specific issue (a subclass of this
13297/// issue) indicates the particular reason why the VIB module operation failed.
13298/// 
13299/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager
13300/// attempts the VIB operation again.
13301/// In case of unreachable host vSphere ESX Agent Manager will remediate the
13302/// issue automatically when the host becomes reachable.
13303/// 
13304/// This structure may be used only with operations rendered under `/eam`.
13305pub trait VibNotInstalledTrait : super::traits::VibIssueTrait {
13306}
13307impl<'s> serde::Serialize for dyn VibNotInstalledTrait + 's {
13308            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13309            where
13310                S: serde::Serializer,
13311            {
13312                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13313            }
13314        }
13315impl<'de> serde::Deserialize<'de> for Box<dyn VibNotInstalledTrait> {
13316            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13317                deserializer.deserialize_map(VibNotInstalledVisitor)
13318            }
13319        }
13320
13321struct VibNotInstalledVisitor;
13322
13323impl<'de> de::Visitor<'de> for VibNotInstalledVisitor {
13324    type Value = Box<dyn VibNotInstalledTrait>;
13325
13326    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13327        formatter.write_str("a valid VibNotInstalledTrait JSON object with a _typeName field")
13328    }
13329
13330    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13331    where
13332        A: de::MapAccess<'de>,
13333    {
13334        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13335        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13336        match any {
13337            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13338                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13339            VimAny::Value(value) => Err(de::Error::custom(format!(
13340                "expected object not wrapped value: {:?}",
13341                value))),
13342        }
13343    }
13344}
13345
13346impl VibNotInstalledTrait for VibNotInstalled {
13347}
13348impl VibNotInstalledTrait for CannotAccessAgentVib {
13349}
13350impl VibNotInstalledTrait for VibDependenciesNotMetByHost {
13351}
13352impl VibNotInstalledTrait for VibInvalidFormat {
13353}
13354impl VibNotInstalledTrait for VibRequirementsNotMetByHost {
13355}
13356impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VibNotInstalledTrait {
13357    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13358        let data_type = from.data_type();
13359        match data_type {
13360            StructType::VibNotInstalled => Some(from.as_any_ref().downcast_ref::<VibNotInstalled>()?),
13361            StructType::CannotAccessAgentVib => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentVib>()?),
13362            StructType::VibDependenciesNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibDependenciesNotMetByHost>()?),
13363            StructType::VibInvalidFormat => Some(from.as_any_ref().downcast_ref::<VibInvalidFormat>()?),
13364            StructType::VibRequirementsNotMetByHost => Some(from.as_any_ref().downcast_ref::<VibRequirementsNotMetByHost>()?),
13365            _ => None,
13366        }
13367    }
13368    
13369    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13370        let data_type = from.data_type();
13371        match data_type {
13372            StructType::VibNotInstalled => Ok(from.as_any_box().downcast::<VibNotInstalled>()?),
13373            StructType::CannotAccessAgentVib => Ok(from.as_any_box().downcast::<CannotAccessAgentVib>()?),
13374            StructType::VibDependenciesNotMetByHost => Ok(from.as_any_box().downcast::<VibDependenciesNotMetByHost>()?),
13375            StructType::VibInvalidFormat => Ok(from.as_any_box().downcast::<VibInvalidFormat>()?),
13376            StructType::VibRequirementsNotMetByHost => Ok(from.as_any_box().downcast::<VibRequirementsNotMetByHost>()?),
13377            _ => Err(from.as_any_box()),
13378        }
13379    }
13380}
13381/// Base class for all issues related to the deployed virtual machine for a
13382/// particular agent.
13383/// 
13384/// This structure may be used only with operations rendered under `/eam`.
13385pub trait VmIssueTrait : super::traits::AgentIssueTrait {
13386    /// The virtual machine to which this issue is related.
13387    /// 
13388    /// Refers instance of *VirtualMachine*.
13389    fn get_vm(&self) -> &super::structs::ManagedObjectReference;
13390}
13391impl<'s> serde::Serialize for dyn VmIssueTrait + 's {
13392            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13393            where
13394                S: serde::Serializer,
13395            {
13396                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13397            }
13398        }
13399impl<'de> serde::Deserialize<'de> for Box<dyn VmIssueTrait> {
13400            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13401                deserializer.deserialize_map(VmIssueVisitor)
13402            }
13403        }
13404
13405struct VmIssueVisitor;
13406
13407impl<'de> de::Visitor<'de> for VmIssueVisitor {
13408    type Value = Box<dyn VmIssueTrait>;
13409
13410    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13411        formatter.write_str("a valid VmIssueTrait JSON object with a _typeName field")
13412    }
13413
13414    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13415    where
13416        A: de::MapAccess<'de>,
13417    {
13418        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13419        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13420        match any {
13421            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13422                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13423            VimAny::Value(value) => Err(de::Error::custom(format!(
13424                "expected object not wrapped value: {:?}",
13425                value))),
13426        }
13427    }
13428}
13429
13430impl VmIssueTrait for VmIssue {
13431    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13432}
13433impl VmIssueTrait for InvalidConfig {
13434    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13435}
13436impl VmIssueTrait for VmCorrupted {
13437    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13438}
13439impl VmIssueTrait for VmDeployed {
13440    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13441}
13442impl VmIssueTrait for HostInMaintenanceMode {
13443    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13444}
13445impl VmIssueTrait for HostInStandbyMode {
13446    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13447}
13448impl VmIssueTrait for HostPoweredOff {
13449    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13450}
13451impl VmIssueTrait for VmHookFailed {
13452    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13453}
13454impl VmIssueTrait for VmHookTimedout {
13455    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13456}
13457impl VmIssueTrait for VmInaccessible {
13458    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13459}
13460impl VmIssueTrait for VmMarkedAsTemplate {
13461    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13462}
13463impl VmIssueTrait for VmOrphaned {
13464    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13465}
13466impl VmIssueTrait for VmPoweredOff {
13467    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13468}
13469impl VmIssueTrait for InsufficientIpAddresses {
13470    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13471}
13472impl VmIssueTrait for MissingAgentIpPool {
13473    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13474}
13475impl VmIssueTrait for VmPoweredOn {
13476    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13477}
13478impl VmIssueTrait for VmProtected {
13479    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13480}
13481impl VmIssueTrait for VmSuspended {
13482    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13483}
13484impl VmIssueTrait for VmWrongFolder {
13485    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13486}
13487impl VmIssueTrait for VmWrongResourcePool {
13488    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
13489}
13490impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmIssueTrait {
13491    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13492        let data_type = from.data_type();
13493        match data_type {
13494            StructType::VmIssue => Some(from.as_any_ref().downcast_ref::<VmIssue>()?),
13495            StructType::InvalidConfig => Some(from.as_any_ref().downcast_ref::<InvalidConfig>()?),
13496            StructType::VmCorrupted => Some(from.as_any_ref().downcast_ref::<VmCorrupted>()?),
13497            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
13498            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
13499            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
13500            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
13501            StructType::VmHookFailed => Some(from.as_any_ref().downcast_ref::<VmHookFailed>()?),
13502            StructType::VmHookTimedout => Some(from.as_any_ref().downcast_ref::<VmHookTimedout>()?),
13503            StructType::VmInaccessible => Some(from.as_any_ref().downcast_ref::<VmInaccessible>()?),
13504            StructType::VmMarkedAsTemplate => Some(from.as_any_ref().downcast_ref::<VmMarkedAsTemplate>()?),
13505            StructType::VmOrphaned => Some(from.as_any_ref().downcast_ref::<VmOrphaned>()?),
13506            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
13507            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
13508            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
13509            StructType::VmPoweredOn => Some(from.as_any_ref().downcast_ref::<VmPoweredOn>()?),
13510            StructType::VmProtected => Some(from.as_any_ref().downcast_ref::<VmProtected>()?),
13511            StructType::VmSuspended => Some(from.as_any_ref().downcast_ref::<VmSuspended>()?),
13512            StructType::VmWrongFolder => Some(from.as_any_ref().downcast_ref::<VmWrongFolder>()?),
13513            StructType::VmWrongResourcePool => Some(from.as_any_ref().downcast_ref::<VmWrongResourcePool>()?),
13514            _ => None,
13515        }
13516    }
13517    
13518    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13519        let data_type = from.data_type();
13520        match data_type {
13521            StructType::VmIssue => Ok(from.as_any_box().downcast::<VmIssue>()?),
13522            StructType::InvalidConfig => Ok(from.as_any_box().downcast::<InvalidConfig>()?),
13523            StructType::VmCorrupted => Ok(from.as_any_box().downcast::<VmCorrupted>()?),
13524            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
13525            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
13526            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
13527            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
13528            StructType::VmHookFailed => Ok(from.as_any_box().downcast::<VmHookFailed>()?),
13529            StructType::VmHookTimedout => Ok(from.as_any_box().downcast::<VmHookTimedout>()?),
13530            StructType::VmInaccessible => Ok(from.as_any_box().downcast::<VmInaccessible>()?),
13531            StructType::VmMarkedAsTemplate => Ok(from.as_any_box().downcast::<VmMarkedAsTemplate>()?),
13532            StructType::VmOrphaned => Ok(from.as_any_box().downcast::<VmOrphaned>()?),
13533            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
13534            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
13535            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
13536            StructType::VmPoweredOn => Ok(from.as_any_box().downcast::<VmPoweredOn>()?),
13537            StructType::VmProtected => Ok(from.as_any_box().downcast::<VmProtected>()?),
13538            StructType::VmSuspended => Ok(from.as_any_box().downcast::<VmSuspended>()?),
13539            StructType::VmWrongFolder => Ok(from.as_any_box().downcast::<VmWrongFolder>()?),
13540            StructType::VmWrongResourcePool => Ok(from.as_any_box().downcast::<VmWrongResourcePool>()?),
13541            _ => Err(from.as_any_box()),
13542        }
13543    }
13544}
13545/// An agent virtual machine is expected to be removed from a host, but the agent virtual machine has not
13546/// been removed.
13547/// 
13548/// Typically, a more specific issue (a subclass of this issue)
13549/// indicates the particular reason why vSphere ESX Agent Manager was unable to remove the
13550/// agent virtual machine, such as the host is in maintenance mode, powered off or in standby
13551/// mode.
13552/// 
13553/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager redeploys the agent.
13554/// 
13555/// This structure may be used only with operations rendered under `/eam`.
13556pub trait VmDeployedTrait : super::traits::VmIssueTrait {
13557}
13558impl<'s> serde::Serialize for dyn VmDeployedTrait + 's {
13559            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13560            where
13561                S: serde::Serializer,
13562            {
13563                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13564            }
13565        }
13566impl<'de> serde::Deserialize<'de> for Box<dyn VmDeployedTrait> {
13567            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13568                deserializer.deserialize_map(VmDeployedVisitor)
13569            }
13570        }
13571
13572struct VmDeployedVisitor;
13573
13574impl<'de> de::Visitor<'de> for VmDeployedVisitor {
13575    type Value = Box<dyn VmDeployedTrait>;
13576
13577    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13578        formatter.write_str("a valid VmDeployedTrait JSON object with a _typeName field")
13579    }
13580
13581    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13582    where
13583        A: de::MapAccess<'de>,
13584    {
13585        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13586        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13587        match any {
13588            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13589                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13590            VimAny::Value(value) => Err(de::Error::custom(format!(
13591                "expected object not wrapped value: {:?}",
13592                value))),
13593        }
13594    }
13595}
13596
13597impl VmDeployedTrait for VmDeployed {
13598}
13599impl VmDeployedTrait for HostInMaintenanceMode {
13600}
13601impl VmDeployedTrait for HostInStandbyMode {
13602}
13603impl VmDeployedTrait for HostPoweredOff {
13604}
13605impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmDeployedTrait {
13606    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13607        let data_type = from.data_type();
13608        match data_type {
13609            StructType::VmDeployed => Some(from.as_any_ref().downcast_ref::<VmDeployed>()?),
13610            StructType::HostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<HostInMaintenanceMode>()?),
13611            StructType::HostInStandbyMode => Some(from.as_any_ref().downcast_ref::<HostInStandbyMode>()?),
13612            StructType::HostPoweredOff => Some(from.as_any_ref().downcast_ref::<HostPoweredOff>()?),
13613            _ => None,
13614        }
13615    }
13616    
13617    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13618        let data_type = from.data_type();
13619        match data_type {
13620            StructType::VmDeployed => Ok(from.as_any_box().downcast::<VmDeployed>()?),
13621            StructType::HostInMaintenanceMode => Ok(from.as_any_box().downcast::<HostInMaintenanceMode>()?),
13622            StructType::HostInStandbyMode => Ok(from.as_any_box().downcast::<HostInStandbyMode>()?),
13623            StructType::HostPoweredOff => Ok(from.as_any_box().downcast::<HostPoweredOff>()?),
13624            _ => Err(from.as_any_box()),
13625        }
13626    }
13627}
13628/// An agent virtual machine is expected to be powered on, but the agent virtual machine is powered off.
13629/// 
13630/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager
13631/// powers on the agent virtual machine.
13632/// 
13633/// This structure may be used only with operations rendered under `/eam`.
13634pub trait VmPoweredOffTrait : super::traits::VmIssueTrait {
13635}
13636impl<'s> serde::Serialize for dyn VmPoweredOffTrait + 's {
13637            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13638            where
13639                S: serde::Serializer,
13640            {
13641                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13642            }
13643        }
13644impl<'de> serde::Deserialize<'de> for Box<dyn VmPoweredOffTrait> {
13645            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13646                deserializer.deserialize_map(VmPoweredOffVisitor)
13647            }
13648        }
13649
13650struct VmPoweredOffVisitor;
13651
13652impl<'de> de::Visitor<'de> for VmPoweredOffVisitor {
13653    type Value = Box<dyn VmPoweredOffTrait>;
13654
13655    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13656        formatter.write_str("a valid VmPoweredOffTrait JSON object with a _typeName field")
13657    }
13658
13659    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13660    where
13661        A: de::MapAccess<'de>,
13662    {
13663        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13664        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13665        match any {
13666            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13667                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13668            VimAny::Value(value) => Err(de::Error::custom(format!(
13669                "expected object not wrapped value: {:?}",
13670                value))),
13671        }
13672    }
13673}
13674
13675impl VmPoweredOffTrait for VmPoweredOff {
13676}
13677impl VmPoweredOffTrait for InsufficientIpAddresses {
13678}
13679impl VmPoweredOffTrait for MissingAgentIpPool {
13680}
13681impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmPoweredOffTrait {
13682    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13683        let data_type = from.data_type();
13684        match data_type {
13685            StructType::VmPoweredOff => Some(from.as_any_ref().downcast_ref::<VmPoweredOff>()?),
13686            StructType::InsufficientIpAddresses => Some(from.as_any_ref().downcast_ref::<InsufficientIpAddresses>()?),
13687            StructType::MissingAgentIpPool => Some(from.as_any_ref().downcast_ref::<MissingAgentIpPool>()?),
13688            _ => None,
13689        }
13690    }
13691    
13692    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13693        let data_type = from.data_type();
13694        match data_type {
13695            StructType::VmPoweredOff => Ok(from.as_any_box().downcast::<VmPoweredOff>()?),
13696            StructType::InsufficientIpAddresses => Ok(from.as_any_box().downcast::<InsufficientIpAddresses>()?),
13697            StructType::MissingAgentIpPool => Ok(from.as_any_box().downcast::<MissingAgentIpPool>()?),
13698            _ => Err(from.as_any_box()),
13699        }
13700    }
13701}
13702/// An agent virtual machine is expected to be deployed on a host, but the agent virtual machine has not
13703/// been deployed.
13704/// 
13705/// Typically, a more specific issue (a subclass of this issue)
13706/// indicates the particular reason why vSphere ESX Agent Manager was unable to deploy the
13707/// agent, such as being unable to access the OVF package for the agent or a missing host
13708/// configuration. This issue can also happen if the agent virtual machine is explicitly deleted
13709/// from the host.
13710/// 
13711/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager redeploys the agent virtual machine.
13712/// 
13713/// This structure may be used only with operations rendered under `/eam`.
13714pub trait VmNotDeployedTrait : super::traits::AgentIssueTrait {
13715}
13716impl<'s> serde::Serialize for dyn VmNotDeployedTrait + 's {
13717            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13718            where
13719                S: serde::Serializer,
13720            {
13721                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13722            }
13723        }
13724impl<'de> serde::Deserialize<'de> for Box<dyn VmNotDeployedTrait> {
13725            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13726                deserializer.deserialize_map(VmNotDeployedVisitor)
13727            }
13728        }
13729
13730struct VmNotDeployedVisitor;
13731
13732impl<'de> de::Visitor<'de> for VmNotDeployedVisitor {
13733    type Value = Box<dyn VmNotDeployedTrait>;
13734
13735    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13736        formatter.write_str("a valid VmNotDeployedTrait JSON object with a _typeName field")
13737    }
13738
13739    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13740    where
13741        A: de::MapAccess<'de>,
13742    {
13743        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13744        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13745        match any {
13746            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13747                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13748            VimAny::Value(value) => Err(de::Error::custom(format!(
13749                "expected object not wrapped value: {:?}",
13750                value))),
13751        }
13752    }
13753}
13754
13755impl VmNotDeployedTrait for VmNotDeployed {
13756}
13757impl VmNotDeployedTrait for CannotAccessAgentOvf {
13758}
13759impl VmNotDeployedTrait for IncompatibleHostVersion {
13760}
13761impl VmNotDeployedTrait for InsufficientResources {
13762}
13763impl VmNotDeployedTrait for InsufficientSpace {
13764}
13765impl VmNotDeployedTrait for NoAgentVmDatastore {
13766}
13767impl VmNotDeployedTrait for NoCustomAgentVmDatastore {
13768}
13769impl VmNotDeployedTrait for NoAgentVmNetwork {
13770}
13771impl VmNotDeployedTrait for NoCustomAgentVmNetwork {
13772}
13773impl VmNotDeployedTrait for NoDiscoverableAgentVmDatastore {
13774}
13775impl VmNotDeployedTrait for NoDiscoverableAgentVmNetwork {
13776}
13777impl VmNotDeployedTrait for OvfInvalidFormat {
13778}
13779impl VmNotDeployedTrait for VmRequiresHostOutOfMaintenanceMode {
13780}
13781impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmNotDeployedTrait {
13782    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13783        let data_type = from.data_type();
13784        match data_type {
13785            StructType::VmNotDeployed => Some(from.as_any_ref().downcast_ref::<VmNotDeployed>()?),
13786            StructType::CannotAccessAgentOvf => Some(from.as_any_ref().downcast_ref::<CannotAccessAgentOvf>()?),
13787            StructType::IncompatibleHostVersion => Some(from.as_any_ref().downcast_ref::<IncompatibleHostVersion>()?),
13788            StructType::InsufficientResources => Some(from.as_any_ref().downcast_ref::<InsufficientResources>()?),
13789            StructType::InsufficientSpace => Some(from.as_any_ref().downcast_ref::<InsufficientSpace>()?),
13790            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
13791            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
13792            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
13793            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
13794            StructType::NoDiscoverableAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmDatastore>()?),
13795            StructType::NoDiscoverableAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoDiscoverableAgentVmNetwork>()?),
13796            StructType::OvfInvalidFormat => Some(from.as_any_ref().downcast_ref::<OvfInvalidFormat>()?),
13797            StructType::VmRequiresHostOutOfMaintenanceMode => Some(from.as_any_ref().downcast_ref::<VmRequiresHostOutOfMaintenanceMode>()?),
13798            _ => None,
13799        }
13800    }
13801    
13802    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13803        let data_type = from.data_type();
13804        match data_type {
13805            StructType::VmNotDeployed => Ok(from.as_any_box().downcast::<VmNotDeployed>()?),
13806            StructType::CannotAccessAgentOvf => Ok(from.as_any_box().downcast::<CannotAccessAgentOvf>()?),
13807            StructType::IncompatibleHostVersion => Ok(from.as_any_box().downcast::<IncompatibleHostVersion>()?),
13808            StructType::InsufficientResources => Ok(from.as_any_box().downcast::<InsufficientResources>()?),
13809            StructType::InsufficientSpace => Ok(from.as_any_box().downcast::<InsufficientSpace>()?),
13810            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
13811            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
13812            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
13813            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
13814            StructType::NoDiscoverableAgentVmDatastore => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmDatastore>()?),
13815            StructType::NoDiscoverableAgentVmNetwork => Ok(from.as_any_box().downcast::<NoDiscoverableAgentVmNetwork>()?),
13816            StructType::OvfInvalidFormat => Ok(from.as_any_box().downcast::<OvfInvalidFormat>()?),
13817            StructType::VmRequiresHostOutOfMaintenanceMode => Ok(from.as_any_box().downcast::<VmRequiresHostOutOfMaintenanceMode>()?),
13818            _ => Err(from.as_any_box()),
13819        }
13820    }
13821}
13822/// An agent virtual machine is expected to be deployed on a host, but the agent cannot be
13823/// deployed because the agent datastore has not been configured on the host.
13824/// 
13825/// This is a passive remediable issue. The administrator must configure
13826/// the agent virtual machine datastore on the host.
13827/// 
13828/// This structure may be used only with operations rendered under `/eam`.
13829pub trait NoAgentVmDatastoreTrait : super::traits::VmNotDeployedTrait {
13830}
13831impl<'s> serde::Serialize for dyn NoAgentVmDatastoreTrait + 's {
13832            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13833            where
13834                S: serde::Serializer,
13835            {
13836                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13837            }
13838        }
13839impl<'de> serde::Deserialize<'de> for Box<dyn NoAgentVmDatastoreTrait> {
13840            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13841                deserializer.deserialize_map(NoAgentVmDatastoreVisitor)
13842            }
13843        }
13844
13845struct NoAgentVmDatastoreVisitor;
13846
13847impl<'de> de::Visitor<'de> for NoAgentVmDatastoreVisitor {
13848    type Value = Box<dyn NoAgentVmDatastoreTrait>;
13849
13850    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13851        formatter.write_str("a valid NoAgentVmDatastoreTrait JSON object with a _typeName field")
13852    }
13853
13854    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13855    where
13856        A: de::MapAccess<'de>,
13857    {
13858        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13859        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13860        match any {
13861            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13862                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13863            VimAny::Value(value) => Err(de::Error::custom(format!(
13864                "expected object not wrapped value: {:?}",
13865                value))),
13866        }
13867    }
13868}
13869
13870impl NoAgentVmDatastoreTrait for NoAgentVmDatastore {
13871}
13872impl NoAgentVmDatastoreTrait for NoCustomAgentVmDatastore {
13873}
13874impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NoAgentVmDatastoreTrait {
13875    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13876        let data_type = from.data_type();
13877        match data_type {
13878            StructType::NoAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoAgentVmDatastore>()?),
13879            StructType::NoCustomAgentVmDatastore => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmDatastore>()?),
13880            _ => None,
13881        }
13882    }
13883    
13884    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13885        let data_type = from.data_type();
13886        match data_type {
13887            StructType::NoAgentVmDatastore => Ok(from.as_any_box().downcast::<NoAgentVmDatastore>()?),
13888            StructType::NoCustomAgentVmDatastore => Ok(from.as_any_box().downcast::<NoCustomAgentVmDatastore>()?),
13889            _ => Err(from.as_any_box()),
13890        }
13891    }
13892}
13893/// An agent virtual machine is expected to be deployed on a host, but the agent cannot be
13894/// deployed because the agent network has not been configured on the host.
13895/// 
13896/// This is a passive remediable issue. The administrator must configure
13897/// the agent virtual machine network on the host.
13898/// 
13899/// This structure may be used only with operations rendered under `/eam`.
13900pub trait NoAgentVmNetworkTrait : super::traits::VmNotDeployedTrait {
13901}
13902impl<'s> serde::Serialize for dyn NoAgentVmNetworkTrait + 's {
13903            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13904            where
13905                S: serde::Serializer,
13906            {
13907                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13908            }
13909        }
13910impl<'de> serde::Deserialize<'de> for Box<dyn NoAgentVmNetworkTrait> {
13911            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13912                deserializer.deserialize_map(NoAgentVmNetworkVisitor)
13913            }
13914        }
13915
13916struct NoAgentVmNetworkVisitor;
13917
13918impl<'de> de::Visitor<'de> for NoAgentVmNetworkVisitor {
13919    type Value = Box<dyn NoAgentVmNetworkTrait>;
13920
13921    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13922        formatter.write_str("a valid NoAgentVmNetworkTrait JSON object with a _typeName field")
13923    }
13924
13925    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13926    where
13927        A: de::MapAccess<'de>,
13928    {
13929        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
13930        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
13931        match any {
13932            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
13933                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
13934            VimAny::Value(value) => Err(de::Error::custom(format!(
13935                "expected object not wrapped value: {:?}",
13936                value))),
13937        }
13938    }
13939}
13940
13941impl NoAgentVmNetworkTrait for NoAgentVmNetwork {
13942}
13943impl NoAgentVmNetworkTrait for NoCustomAgentVmNetwork {
13944}
13945impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NoAgentVmNetworkTrait {
13946    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
13947        let data_type = from.data_type();
13948        match data_type {
13949            StructType::NoAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoAgentVmNetwork>()?),
13950            StructType::NoCustomAgentVmNetwork => Some(from.as_any_ref().downcast_ref::<NoCustomAgentVmNetwork>()?),
13951            _ => None,
13952        }
13953    }
13954    
13955    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
13956        let data_type = from.data_type();
13957        match data_type {
13958            StructType::NoAgentVmNetwork => Ok(from.as_any_box().downcast::<NoAgentVmNetwork>()?),
13959            StructType::NoCustomAgentVmNetwork => Ok(from.as_any_box().downcast::<NoCustomAgentVmNetwork>()?),
13960            _ => Err(from.as_any_box()),
13961        }
13962    }
13963}
13964/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
13965/// 
13966/// Base class for all issues which occurred during EAM communication with
13967/// Personality Manager.
13968/// 
13969/// This structure may be used only with operations rendered under `/eam`.
13970pub trait PersonalityAgentPmIssueTrait : super::traits::AgentIssueTrait {
13971}
13972impl<'s> serde::Serialize for dyn PersonalityAgentPmIssueTrait + 's {
13973            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
13974            where
13975                S: serde::Serializer,
13976            {
13977                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
13978            }
13979        }
13980impl<'de> serde::Deserialize<'de> for Box<dyn PersonalityAgentPmIssueTrait> {
13981            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
13982                deserializer.deserialize_map(PersonalityAgentPmIssueVisitor)
13983            }
13984        }
13985
13986struct PersonalityAgentPmIssueVisitor;
13987
13988impl<'de> de::Visitor<'de> for PersonalityAgentPmIssueVisitor {
13989    type Value = Box<dyn PersonalityAgentPmIssueTrait>;
13990
13991    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13992        formatter.write_str("a valid PersonalityAgentPmIssueTrait JSON object with a _typeName field")
13993    }
13994
13995    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
13996    where
13997        A: de::MapAccess<'de>,
13998    {
13999        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14000        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14001        match any {
14002            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14003                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14004            VimAny::Value(value) => Err(de::Error::custom(format!(
14005                "expected object not wrapped value: {:?}",
14006                value))),
14007        }
14008    }
14009}
14010
14011impl PersonalityAgentPmIssueTrait for PersonalityAgentPmIssue {
14012}
14013impl PersonalityAgentPmIssueTrait for PersonalityAgentAwaitingPmRemediation {
14014}
14015impl PersonalityAgentPmIssueTrait for PersonalityAgentBlockedByAgencyOperation {
14016}
14017impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PersonalityAgentPmIssueTrait {
14018    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14019        let data_type = from.data_type();
14020        match data_type {
14021            StructType::PersonalityAgentPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgentPmIssue>()?),
14022            StructType::PersonalityAgentAwaitingPmRemediation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentAwaitingPmRemediation>()?),
14023            StructType::PersonalityAgentBlockedByAgencyOperation => Some(from.as_any_ref().downcast_ref::<PersonalityAgentBlockedByAgencyOperation>()?),
14024            _ => None,
14025        }
14026    }
14027    
14028    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14029        let data_type = from.data_type();
14030        match data_type {
14031            StructType::PersonalityAgentPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgentPmIssue>()?),
14032            StructType::PersonalityAgentAwaitingPmRemediation => Ok(from.as_any_box().downcast::<PersonalityAgentAwaitingPmRemediation>()?),
14033            StructType::PersonalityAgentBlockedByAgencyOperation => Ok(from.as_any_box().downcast::<PersonalityAgentBlockedByAgencyOperation>()?),
14034            _ => Err(from.as_any_box()),
14035        }
14036    }
14037}
14038/// Base class for all cluster bound agents.
14039/// 
14040/// This structure may be used only with operations rendered under `/eam`.
14041pub trait ClusterAgentAgentIssueTrait : super::traits::AgencyIssueTrait {
14042    /// The agent that has this issue.
14043    /// 
14044    /// Refers instance of *Agent*.
14045    fn get_agent(&self) -> &super::structs::ManagedObjectReference;
14046    /// The cluster for which this issue is raised.
14047    /// 
14048    /// Migth be null if the cluster
14049    /// is missing in vCenter Server inventory.
14050    /// 
14051    /// Refers instance of *ComputeResource*.
14052    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference>;
14053}
14054impl<'s> serde::Serialize for dyn ClusterAgentAgentIssueTrait + 's {
14055            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14056            where
14057                S: serde::Serializer,
14058            {
14059                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14060            }
14061        }
14062impl<'de> serde::Deserialize<'de> for Box<dyn ClusterAgentAgentIssueTrait> {
14063            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14064                deserializer.deserialize_map(ClusterAgentAgentIssueVisitor)
14065            }
14066        }
14067
14068struct ClusterAgentAgentIssueVisitor;
14069
14070impl<'de> de::Visitor<'de> for ClusterAgentAgentIssueVisitor {
14071    type Value = Box<dyn ClusterAgentAgentIssueTrait>;
14072
14073    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14074        formatter.write_str("a valid ClusterAgentAgentIssueTrait JSON object with a _typeName field")
14075    }
14076
14077    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14078    where
14079        A: de::MapAccess<'de>,
14080    {
14081        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14082        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14083        match any {
14084            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14085                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14086            VimAny::Value(value) => Err(de::Error::custom(format!(
14087                "expected object not wrapped value: {:?}",
14088                value))),
14089        }
14090    }
14091}
14092
14093impl ClusterAgentAgentIssueTrait for ClusterAgentAgentIssue {
14094    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14095    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14096}
14097impl ClusterAgentAgentIssueTrait for ClusterAgentOvfInvalidProperty {
14098    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14099    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14100}
14101impl ClusterAgentAgentIssueTrait for ClusterAgentTransitionFailed {
14102    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14103    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14104}
14105impl ClusterAgentAgentIssueTrait for ClusterAgentVmIssue {
14106    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14107    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14108}
14109impl ClusterAgentAgentIssueTrait for ClusterAgentHostInMaintenanceMode {
14110    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14111    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14112}
14113impl ClusterAgentAgentIssueTrait for ClusterAgentHostInPartialMaintenanceMode {
14114    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14115    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14116}
14117impl ClusterAgentAgentIssueTrait for ClusterAgentInvalidConfig {
14118    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14119    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14120}
14121impl ClusterAgentAgentIssueTrait for ClusterAgentVmHookFailed {
14122    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14123    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14124}
14125impl ClusterAgentAgentIssueTrait for ClusterAgentVmHookTimedout {
14126    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14127    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14128}
14129impl ClusterAgentAgentIssueTrait for ClusterAgentVmInaccessible {
14130    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14131    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14132}
14133impl ClusterAgentAgentIssueTrait for ClusterAgentVmNotRemoved {
14134    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14135    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14136}
14137impl ClusterAgentAgentIssueTrait for ClusterAgentVmPoweredOff {
14138    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14139    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14140}
14141impl ClusterAgentAgentIssueTrait for ClusterAgentInsufficientClusterResources {
14142    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14143    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14144}
14145impl ClusterAgentAgentIssueTrait for ClusterAgentVmPoweredOn {
14146    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14147    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14148}
14149impl ClusterAgentAgentIssueTrait for ClusterAgentVmProtected {
14150    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14151    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14152}
14153impl ClusterAgentAgentIssueTrait for ClusterAgentVmSuspended {
14154    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14155    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14156}
14157impl ClusterAgentAgentIssueTrait for ClusterAgentVmNotDeployed {
14158    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14159    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14160}
14161impl ClusterAgentAgentIssueTrait for ClusterAgentCertificateNotTrusted {
14162    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14163    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14164}
14165impl ClusterAgentAgentIssueTrait for ClusterAgentInsufficientClusterSpace {
14166    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14167    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14168}
14169impl ClusterAgentAgentIssueTrait for ClusterAgentMissingClusterVmDatastore {
14170    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14171    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14172}
14173impl ClusterAgentAgentIssueTrait for ClusterAgentMissingClusterVmNetwork {
14174    fn get_agent(&self) -> &super::structs::ManagedObjectReference { &self.agent }
14175    fn get_cluster(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster }
14176}
14177impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterAgentAgentIssueTrait {
14178    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14179        let data_type = from.data_type();
14180        match data_type {
14181            StructType::ClusterAgentAgentIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentAgentIssue>()?),
14182            StructType::ClusterAgentOvfInvalidProperty => Some(from.as_any_ref().downcast_ref::<ClusterAgentOvfInvalidProperty>()?),
14183            StructType::ClusterAgentTransitionFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentTransitionFailed>()?),
14184            StructType::ClusterAgentVmIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmIssue>()?),
14185            StructType::ClusterAgentHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInMaintenanceMode>()?),
14186            StructType::ClusterAgentHostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInPartialMaintenanceMode>()?),
14187            StructType::ClusterAgentInvalidConfig => Some(from.as_any_ref().downcast_ref::<ClusterAgentInvalidConfig>()?),
14188            StructType::ClusterAgentVmHookFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookFailed>()?),
14189            StructType::ClusterAgentVmHookTimedout => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookTimedout>()?),
14190            StructType::ClusterAgentVmInaccessible => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmInaccessible>()?),
14191            StructType::ClusterAgentVmNotRemoved => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotRemoved>()?),
14192            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
14193            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
14194            StructType::ClusterAgentVmPoweredOn => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOn>()?),
14195            StructType::ClusterAgentVmProtected => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmProtected>()?),
14196            StructType::ClusterAgentVmSuspended => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmSuspended>()?),
14197            StructType::ClusterAgentVmNotDeployed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotDeployed>()?),
14198            StructType::ClusterAgentCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<ClusterAgentCertificateNotTrusted>()?),
14199            StructType::ClusterAgentInsufficientClusterSpace => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterSpace>()?),
14200            StructType::ClusterAgentMissingClusterVmDatastore => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmDatastore>()?),
14201            StructType::ClusterAgentMissingClusterVmNetwork => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmNetwork>()?),
14202            _ => None,
14203        }
14204    }
14205    
14206    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14207        let data_type = from.data_type();
14208        match data_type {
14209            StructType::ClusterAgentAgentIssue => Ok(from.as_any_box().downcast::<ClusterAgentAgentIssue>()?),
14210            StructType::ClusterAgentOvfInvalidProperty => Ok(from.as_any_box().downcast::<ClusterAgentOvfInvalidProperty>()?),
14211            StructType::ClusterAgentTransitionFailed => Ok(from.as_any_box().downcast::<ClusterAgentTransitionFailed>()?),
14212            StructType::ClusterAgentVmIssue => Ok(from.as_any_box().downcast::<ClusterAgentVmIssue>()?),
14213            StructType::ClusterAgentHostInMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInMaintenanceMode>()?),
14214            StructType::ClusterAgentHostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInPartialMaintenanceMode>()?),
14215            StructType::ClusterAgentInvalidConfig => Ok(from.as_any_box().downcast::<ClusterAgentInvalidConfig>()?),
14216            StructType::ClusterAgentVmHookFailed => Ok(from.as_any_box().downcast::<ClusterAgentVmHookFailed>()?),
14217            StructType::ClusterAgentVmHookTimedout => Ok(from.as_any_box().downcast::<ClusterAgentVmHookTimedout>()?),
14218            StructType::ClusterAgentVmInaccessible => Ok(from.as_any_box().downcast::<ClusterAgentVmInaccessible>()?),
14219            StructType::ClusterAgentVmNotRemoved => Ok(from.as_any_box().downcast::<ClusterAgentVmNotRemoved>()?),
14220            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
14221            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
14222            StructType::ClusterAgentVmPoweredOn => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOn>()?),
14223            StructType::ClusterAgentVmProtected => Ok(from.as_any_box().downcast::<ClusterAgentVmProtected>()?),
14224            StructType::ClusterAgentVmSuspended => Ok(from.as_any_box().downcast::<ClusterAgentVmSuspended>()?),
14225            StructType::ClusterAgentVmNotDeployed => Ok(from.as_any_box().downcast::<ClusterAgentVmNotDeployed>()?),
14226            StructType::ClusterAgentCertificateNotTrusted => Ok(from.as_any_box().downcast::<ClusterAgentCertificateNotTrusted>()?),
14227            StructType::ClusterAgentInsufficientClusterSpace => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterSpace>()?),
14228            StructType::ClusterAgentMissingClusterVmDatastore => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmDatastore>()?),
14229            StructType::ClusterAgentMissingClusterVmNetwork => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmNetwork>()?),
14230            _ => Err(from.as_any_box()),
14231        }
14232    }
14233}
14234/// Base class for all cluster bound Virtual Machines.
14235/// 
14236/// This structure may be used only with operations rendered under `/eam`.
14237pub trait ClusterAgentVmIssueTrait : super::traits::ClusterAgentAgentIssueTrait {
14238    /// The Virtual Machine to which this issue is related.
14239    /// 
14240    /// Refers instance of *VirtualMachine*.
14241    fn get_vm(&self) -> &super::structs::ManagedObjectReference;
14242}
14243impl<'s> serde::Serialize for dyn ClusterAgentVmIssueTrait + 's {
14244            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14245            where
14246                S: serde::Serializer,
14247            {
14248                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14249            }
14250        }
14251impl<'de> serde::Deserialize<'de> for Box<dyn ClusterAgentVmIssueTrait> {
14252            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14253                deserializer.deserialize_map(ClusterAgentVmIssueVisitor)
14254            }
14255        }
14256
14257struct ClusterAgentVmIssueVisitor;
14258
14259impl<'de> de::Visitor<'de> for ClusterAgentVmIssueVisitor {
14260    type Value = Box<dyn ClusterAgentVmIssueTrait>;
14261
14262    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14263        formatter.write_str("a valid ClusterAgentVmIssueTrait JSON object with a _typeName field")
14264    }
14265
14266    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14267    where
14268        A: de::MapAccess<'de>,
14269    {
14270        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14271        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14272        match any {
14273            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14274                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14275            VimAny::Value(value) => Err(de::Error::custom(format!(
14276                "expected object not wrapped value: {:?}",
14277                value))),
14278        }
14279    }
14280}
14281
14282impl ClusterAgentVmIssueTrait for ClusterAgentVmIssue {
14283    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14284}
14285impl ClusterAgentVmIssueTrait for ClusterAgentHostInMaintenanceMode {
14286    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14287}
14288impl ClusterAgentVmIssueTrait for ClusterAgentHostInPartialMaintenanceMode {
14289    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14290}
14291impl ClusterAgentVmIssueTrait for ClusterAgentInvalidConfig {
14292    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14293}
14294impl ClusterAgentVmIssueTrait for ClusterAgentVmHookFailed {
14295    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14296}
14297impl ClusterAgentVmIssueTrait for ClusterAgentVmHookTimedout {
14298    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14299}
14300impl ClusterAgentVmIssueTrait for ClusterAgentVmInaccessible {
14301    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14302}
14303impl ClusterAgentVmIssueTrait for ClusterAgentVmNotRemoved {
14304    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14305}
14306impl ClusterAgentVmIssueTrait for ClusterAgentVmPoweredOff {
14307    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14308}
14309impl ClusterAgentVmIssueTrait for ClusterAgentInsufficientClusterResources {
14310    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14311}
14312impl ClusterAgentVmIssueTrait for ClusterAgentVmPoweredOn {
14313    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14314}
14315impl ClusterAgentVmIssueTrait for ClusterAgentVmProtected {
14316    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14317}
14318impl ClusterAgentVmIssueTrait for ClusterAgentVmSuspended {
14319    fn get_vm(&self) -> &super::structs::ManagedObjectReference { &self.vm }
14320}
14321impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterAgentVmIssueTrait {
14322    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14323        let data_type = from.data_type();
14324        match data_type {
14325            StructType::ClusterAgentVmIssue => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmIssue>()?),
14326            StructType::ClusterAgentHostInMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInMaintenanceMode>()?),
14327            StructType::ClusterAgentHostInPartialMaintenanceMode => Some(from.as_any_ref().downcast_ref::<ClusterAgentHostInPartialMaintenanceMode>()?),
14328            StructType::ClusterAgentInvalidConfig => Some(from.as_any_ref().downcast_ref::<ClusterAgentInvalidConfig>()?),
14329            StructType::ClusterAgentVmHookFailed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookFailed>()?),
14330            StructType::ClusterAgentVmHookTimedout => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmHookTimedout>()?),
14331            StructType::ClusterAgentVmInaccessible => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmInaccessible>()?),
14332            StructType::ClusterAgentVmNotRemoved => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotRemoved>()?),
14333            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
14334            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
14335            StructType::ClusterAgentVmPoweredOn => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOn>()?),
14336            StructType::ClusterAgentVmProtected => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmProtected>()?),
14337            StructType::ClusterAgentVmSuspended => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmSuspended>()?),
14338            _ => None,
14339        }
14340    }
14341    
14342    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14343        let data_type = from.data_type();
14344        match data_type {
14345            StructType::ClusterAgentVmIssue => Ok(from.as_any_box().downcast::<ClusterAgentVmIssue>()?),
14346            StructType::ClusterAgentHostInMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInMaintenanceMode>()?),
14347            StructType::ClusterAgentHostInPartialMaintenanceMode => Ok(from.as_any_box().downcast::<ClusterAgentHostInPartialMaintenanceMode>()?),
14348            StructType::ClusterAgentInvalidConfig => Ok(from.as_any_box().downcast::<ClusterAgentInvalidConfig>()?),
14349            StructType::ClusterAgentVmHookFailed => Ok(from.as_any_box().downcast::<ClusterAgentVmHookFailed>()?),
14350            StructType::ClusterAgentVmHookTimedout => Ok(from.as_any_box().downcast::<ClusterAgentVmHookTimedout>()?),
14351            StructType::ClusterAgentVmInaccessible => Ok(from.as_any_box().downcast::<ClusterAgentVmInaccessible>()?),
14352            StructType::ClusterAgentVmNotRemoved => Ok(from.as_any_box().downcast::<ClusterAgentVmNotRemoved>()?),
14353            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
14354            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
14355            StructType::ClusterAgentVmPoweredOn => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOn>()?),
14356            StructType::ClusterAgentVmProtected => Ok(from.as_any_box().downcast::<ClusterAgentVmProtected>()?),
14357            StructType::ClusterAgentVmSuspended => Ok(from.as_any_box().downcast::<ClusterAgentVmSuspended>()?),
14358            _ => Err(from.as_any_box()),
14359        }
14360    }
14361}
14362/// A cluster agent Virtual Machine is expected to be powered on, but the agent
14363/// Virtual Machine is powered off.
14364/// 
14365/// Typically more specific issue (a subclass of
14366/// this issue) indicates the particular reason why vSphere ESX Agent Manager was
14367/// unable to power on the cluster agent Virtual Machine.
14368/// 
14369/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager
14370/// powers on the cluster agent Virtual Machine.
14371/// 
14372/// This structure may be used only with operations rendered under `/eam`.
14373pub trait ClusterAgentVmPoweredOffTrait : super::traits::ClusterAgentVmIssueTrait {
14374}
14375impl<'s> serde::Serialize for dyn ClusterAgentVmPoweredOffTrait + 's {
14376            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14377            where
14378                S: serde::Serializer,
14379            {
14380                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14381            }
14382        }
14383impl<'de> serde::Deserialize<'de> for Box<dyn ClusterAgentVmPoweredOffTrait> {
14384            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14385                deserializer.deserialize_map(ClusterAgentVmPoweredOffVisitor)
14386            }
14387        }
14388
14389struct ClusterAgentVmPoweredOffVisitor;
14390
14391impl<'de> de::Visitor<'de> for ClusterAgentVmPoweredOffVisitor {
14392    type Value = Box<dyn ClusterAgentVmPoweredOffTrait>;
14393
14394    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14395        formatter.write_str("a valid ClusterAgentVmPoweredOffTrait JSON object with a _typeName field")
14396    }
14397
14398    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14399    where
14400        A: de::MapAccess<'de>,
14401    {
14402        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14403        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14404        match any {
14405            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14406                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14407            VimAny::Value(value) => Err(de::Error::custom(format!(
14408                "expected object not wrapped value: {:?}",
14409                value))),
14410        }
14411    }
14412}
14413
14414impl ClusterAgentVmPoweredOffTrait for ClusterAgentVmPoweredOff {
14415}
14416impl ClusterAgentVmPoweredOffTrait for ClusterAgentInsufficientClusterResources {
14417}
14418impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterAgentVmPoweredOffTrait {
14419    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14420        let data_type = from.data_type();
14421        match data_type {
14422            StructType::ClusterAgentVmPoweredOff => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmPoweredOff>()?),
14423            StructType::ClusterAgentInsufficientClusterResources => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterResources>()?),
14424            _ => None,
14425        }
14426    }
14427    
14428    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14429        let data_type = from.data_type();
14430        match data_type {
14431            StructType::ClusterAgentVmPoweredOff => Ok(from.as_any_box().downcast::<ClusterAgentVmPoweredOff>()?),
14432            StructType::ClusterAgentInsufficientClusterResources => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterResources>()?),
14433            _ => Err(from.as_any_box()),
14434        }
14435    }
14436}
14437/// A cluster agent Virtual Machine is expected to be deployed on a cluster, but
14438/// the cluster agent Virtual Machine has not been deployed or has been exlicitly
14439/// deleted from the cluster.
14440/// 
14441/// Typically more specific issue (a subclass of this
14442/// issue) indicates the particular reason why vSphere ESX Agent Manager was
14443/// unable to deploy the cluster agent Virtual Machine.
14444/// 
14445/// This is an active remediable issue. To remediate, vSphere ESX Agent Manager
14446/// redeploys the cluster agent Virtual Machine.
14447/// 
14448/// This structure may be used only with operations rendered under `/eam`.
14449pub trait ClusterAgentVmNotDeployedTrait : super::traits::ClusterAgentAgentIssueTrait {
14450}
14451impl<'s> serde::Serialize for dyn ClusterAgentVmNotDeployedTrait + 's {
14452            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14453            where
14454                S: serde::Serializer,
14455            {
14456                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14457            }
14458        }
14459impl<'de> serde::Deserialize<'de> for Box<dyn ClusterAgentVmNotDeployedTrait> {
14460            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14461                deserializer.deserialize_map(ClusterAgentVmNotDeployedVisitor)
14462            }
14463        }
14464
14465struct ClusterAgentVmNotDeployedVisitor;
14466
14467impl<'de> de::Visitor<'de> for ClusterAgentVmNotDeployedVisitor {
14468    type Value = Box<dyn ClusterAgentVmNotDeployedTrait>;
14469
14470    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14471        formatter.write_str("a valid ClusterAgentVmNotDeployedTrait JSON object with a _typeName field")
14472    }
14473
14474    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14475    where
14476        A: de::MapAccess<'de>,
14477    {
14478        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14479        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14480        match any {
14481            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14482                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14483            VimAny::Value(value) => Err(de::Error::custom(format!(
14484                "expected object not wrapped value: {:?}",
14485                value))),
14486        }
14487    }
14488}
14489
14490impl ClusterAgentVmNotDeployedTrait for ClusterAgentVmNotDeployed {
14491}
14492impl ClusterAgentVmNotDeployedTrait for ClusterAgentCertificateNotTrusted {
14493}
14494impl ClusterAgentVmNotDeployedTrait for ClusterAgentInsufficientClusterSpace {
14495}
14496impl ClusterAgentVmNotDeployedTrait for ClusterAgentMissingClusterVmDatastore {
14497}
14498impl ClusterAgentVmNotDeployedTrait for ClusterAgentMissingClusterVmNetwork {
14499}
14500impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterAgentVmNotDeployedTrait {
14501    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14502        let data_type = from.data_type();
14503        match data_type {
14504            StructType::ClusterAgentVmNotDeployed => Some(from.as_any_ref().downcast_ref::<ClusterAgentVmNotDeployed>()?),
14505            StructType::ClusterAgentCertificateNotTrusted => Some(from.as_any_ref().downcast_ref::<ClusterAgentCertificateNotTrusted>()?),
14506            StructType::ClusterAgentInsufficientClusterSpace => Some(from.as_any_ref().downcast_ref::<ClusterAgentInsufficientClusterSpace>()?),
14507            StructType::ClusterAgentMissingClusterVmDatastore => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmDatastore>()?),
14508            StructType::ClusterAgentMissingClusterVmNetwork => Some(from.as_any_ref().downcast_ref::<ClusterAgentMissingClusterVmNetwork>()?),
14509            _ => None,
14510        }
14511    }
14512    
14513    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14514        let data_type = from.data_type();
14515        match data_type {
14516            StructType::ClusterAgentVmNotDeployed => Ok(from.as_any_box().downcast::<ClusterAgentVmNotDeployed>()?),
14517            StructType::ClusterAgentCertificateNotTrusted => Ok(from.as_any_box().downcast::<ClusterAgentCertificateNotTrusted>()?),
14518            StructType::ClusterAgentInsufficientClusterSpace => Ok(from.as_any_box().downcast::<ClusterAgentInsufficientClusterSpace>()?),
14519            StructType::ClusterAgentMissingClusterVmDatastore => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmDatastore>()?),
14520            StructType::ClusterAgentMissingClusterVmNetwork => Ok(from.as_any_box().downcast::<ClusterAgentMissingClusterVmNetwork>()?),
14521            _ => Err(from.as_any_box()),
14522        }
14523    }
14524}
14525/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
14526/// 
14527/// Base class for all issues which occurred during EAM communication with
14528/// vSphere Update Manager (VUM).
14529/// 
14530/// This structure may be used only with operations rendered under `/eam`.
14531pub trait IntegrityAgencyVumIssueTrait : super::traits::AgencyIssueTrait {
14532}
14533impl<'s> serde::Serialize for dyn IntegrityAgencyVumIssueTrait + 's {
14534            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14535            where
14536                S: serde::Serializer,
14537            {
14538                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14539            }
14540        }
14541impl<'de> serde::Deserialize<'de> for Box<dyn IntegrityAgencyVumIssueTrait> {
14542            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14543                deserializer.deserialize_map(IntegrityAgencyVumIssueVisitor)
14544            }
14545        }
14546
14547struct IntegrityAgencyVumIssueVisitor;
14548
14549impl<'de> de::Visitor<'de> for IntegrityAgencyVumIssueVisitor {
14550    type Value = Box<dyn IntegrityAgencyVumIssueTrait>;
14551
14552    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14553        formatter.write_str("a valid IntegrityAgencyVumIssueTrait JSON object with a _typeName field")
14554    }
14555
14556    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14557    where
14558        A: de::MapAccess<'de>,
14559    {
14560        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14561        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14562        match any {
14563            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14564                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14565            VimAny::Value(value) => Err(de::Error::custom(format!(
14566                "expected object not wrapped value: {:?}",
14567                value))),
14568        }
14569    }
14570}
14571
14572impl IntegrityAgencyVumIssueTrait for IntegrityAgencyVumIssue {
14573}
14574impl IntegrityAgencyVumIssueTrait for IntegrityAgencyCannotDeleteSoftware {
14575}
14576impl IntegrityAgencyVumIssueTrait for IntegrityAgencyCannotStageSoftware {
14577}
14578impl IntegrityAgencyVumIssueTrait for IntegrityAgencyVumUnavailable {
14579}
14580impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn IntegrityAgencyVumIssueTrait {
14581    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14582        let data_type = from.data_type();
14583        match data_type {
14584            StructType::IntegrityAgencyVumIssue => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumIssue>()?),
14585            StructType::IntegrityAgencyCannotDeleteSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotDeleteSoftware>()?),
14586            StructType::IntegrityAgencyCannotStageSoftware => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyCannotStageSoftware>()?),
14587            StructType::IntegrityAgencyVumUnavailable => Some(from.as_any_ref().downcast_ref::<IntegrityAgencyVumUnavailable>()?),
14588            _ => None,
14589        }
14590    }
14591    
14592    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14593        let data_type = from.data_type();
14594        match data_type {
14595            StructType::IntegrityAgencyVumIssue => Ok(from.as_any_box().downcast::<IntegrityAgencyVumIssue>()?),
14596            StructType::IntegrityAgencyCannotDeleteSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotDeleteSoftware>()?),
14597            StructType::IntegrityAgencyCannotStageSoftware => Ok(from.as_any_box().downcast::<IntegrityAgencyCannotStageSoftware>()?),
14598            StructType::IntegrityAgencyVumUnavailable => Ok(from.as_any_box().downcast::<IntegrityAgencyVumUnavailable>()?),
14599            _ => Err(from.as_any_box()),
14600        }
14601    }
14602}
14603/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
14604/// 
14605/// Base class for all issues which occurred during EAM communication with
14606/// Personality Manager.
14607/// 
14608/// This structure may be used only with operations rendered under `/eam`.
14609pub trait PersonalityAgencyPmIssueTrait : super::traits::AgencyIssueTrait {
14610}
14611impl<'s> serde::Serialize for dyn PersonalityAgencyPmIssueTrait + 's {
14612            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14613            where
14614                S: serde::Serializer,
14615            {
14616                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14617            }
14618        }
14619impl<'de> serde::Deserialize<'de> for Box<dyn PersonalityAgencyPmIssueTrait> {
14620            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14621                deserializer.deserialize_map(PersonalityAgencyPmIssueVisitor)
14622            }
14623        }
14624
14625struct PersonalityAgencyPmIssueVisitor;
14626
14627impl<'de> de::Visitor<'de> for PersonalityAgencyPmIssueVisitor {
14628    type Value = Box<dyn PersonalityAgencyPmIssueTrait>;
14629
14630    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14631        formatter.write_str("a valid PersonalityAgencyPmIssueTrait JSON object with a _typeName field")
14632    }
14633
14634    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14635    where
14636        A: de::MapAccess<'de>,
14637    {
14638        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14639        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14640        match any {
14641            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14642                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14643            VimAny::Value(value) => Err(de::Error::custom(format!(
14644                "expected object not wrapped value: {:?}",
14645                value))),
14646        }
14647    }
14648}
14649
14650impl PersonalityAgencyPmIssueTrait for PersonalityAgencyPmIssue {
14651}
14652impl PersonalityAgencyPmIssueTrait for PersonalityAgencyCannotConfigureSolutions {
14653}
14654impl PersonalityAgencyPmIssueTrait for PersonalityAgencyDepotIssue {
14655}
14656impl PersonalityAgencyPmIssueTrait for PersonalityAgencyCannotUploadDepot {
14657}
14658impl PersonalityAgencyPmIssueTrait for PersonalityAgencyInaccessibleDepot {
14659}
14660impl PersonalityAgencyPmIssueTrait for PersonalityAgencyInvalidDepot {
14661}
14662impl PersonalityAgencyPmIssueTrait for PersonalityAgencyPmUnavailable {
14663}
14664impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PersonalityAgencyPmIssueTrait {
14665    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14666        let data_type = from.data_type();
14667        match data_type {
14668            StructType::PersonalityAgencyPmIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmIssue>()?),
14669            StructType::PersonalityAgencyCannotConfigureSolutions => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotConfigureSolutions>()?),
14670            StructType::PersonalityAgencyDepotIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyDepotIssue>()?),
14671            StructType::PersonalityAgencyCannotUploadDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotUploadDepot>()?),
14672            StructType::PersonalityAgencyInaccessibleDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInaccessibleDepot>()?),
14673            StructType::PersonalityAgencyInvalidDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInvalidDepot>()?),
14674            StructType::PersonalityAgencyPmUnavailable => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyPmUnavailable>()?),
14675            _ => None,
14676        }
14677    }
14678    
14679    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14680        let data_type = from.data_type();
14681        match data_type {
14682            StructType::PersonalityAgencyPmIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyPmIssue>()?),
14683            StructType::PersonalityAgencyCannotConfigureSolutions => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotConfigureSolutions>()?),
14684            StructType::PersonalityAgencyDepotIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyDepotIssue>()?),
14685            StructType::PersonalityAgencyCannotUploadDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotUploadDepot>()?),
14686            StructType::PersonalityAgencyInaccessibleDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInaccessibleDepot>()?),
14687            StructType::PersonalityAgencyInvalidDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInvalidDepot>()?),
14688            StructType::PersonalityAgencyPmUnavailable => Ok(from.as_any_box().downcast::<PersonalityAgencyPmUnavailable>()?),
14689            _ => Err(from.as_any_box()),
14690        }
14691    }
14692}
14693/// Deprecated as of vSphere 9.0. Please refer to vLCM Image APIs.
14694/// 
14695/// Base class for all offline depot (VIB) issues while communicating with
14696/// Personality Manager.
14697/// 
14698/// This structure may be used only with operations rendered under `/eam`.
14699pub trait PersonalityAgencyDepotIssueTrait : super::traits::PersonalityAgencyPmIssueTrait {
14700    /// URL the offline bundle is configured in EAM.
14701    fn get_remote_depot_url(&self) -> &str;
14702}
14703impl<'s> serde::Serialize for dyn PersonalityAgencyDepotIssueTrait + 's {
14704            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14705            where
14706                S: serde::Serializer,
14707            {
14708                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14709            }
14710        }
14711impl<'de> serde::Deserialize<'de> for Box<dyn PersonalityAgencyDepotIssueTrait> {
14712            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14713                deserializer.deserialize_map(PersonalityAgencyDepotIssueVisitor)
14714            }
14715        }
14716
14717struct PersonalityAgencyDepotIssueVisitor;
14718
14719impl<'de> de::Visitor<'de> for PersonalityAgencyDepotIssueVisitor {
14720    type Value = Box<dyn PersonalityAgencyDepotIssueTrait>;
14721
14722    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14723        formatter.write_str("a valid PersonalityAgencyDepotIssueTrait JSON object with a _typeName field")
14724    }
14725
14726    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14727    where
14728        A: de::MapAccess<'de>,
14729    {
14730        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14731        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14732        match any {
14733            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14734                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14735            VimAny::Value(value) => Err(de::Error::custom(format!(
14736                "expected object not wrapped value: {:?}",
14737                value))),
14738        }
14739    }
14740}
14741
14742impl PersonalityAgencyDepotIssueTrait for PersonalityAgencyDepotIssue {
14743    fn get_remote_depot_url(&self) -> &str { &self.remote_depot_url }
14744}
14745impl PersonalityAgencyDepotIssueTrait for PersonalityAgencyCannotUploadDepot {
14746    fn get_remote_depot_url(&self) -> &str { &self.remote_depot_url }
14747}
14748impl PersonalityAgencyDepotIssueTrait for PersonalityAgencyInaccessibleDepot {
14749    fn get_remote_depot_url(&self) -> &str { &self.remote_depot_url }
14750}
14751impl PersonalityAgencyDepotIssueTrait for PersonalityAgencyInvalidDepot {
14752    fn get_remote_depot_url(&self) -> &str { &self.remote_depot_url }
14753}
14754impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PersonalityAgencyDepotIssueTrait {
14755    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14756        let data_type = from.data_type();
14757        match data_type {
14758            StructType::PersonalityAgencyDepotIssue => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyDepotIssue>()?),
14759            StructType::PersonalityAgencyCannotUploadDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyCannotUploadDepot>()?),
14760            StructType::PersonalityAgencyInaccessibleDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInaccessibleDepot>()?),
14761            StructType::PersonalityAgencyInvalidDepot => Some(from.as_any_ref().downcast_ref::<PersonalityAgencyInvalidDepot>()?),
14762            _ => None,
14763        }
14764    }
14765    
14766    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14767        let data_type = from.data_type();
14768        match data_type {
14769            StructType::PersonalityAgencyDepotIssue => Ok(from.as_any_box().downcast::<PersonalityAgencyDepotIssue>()?),
14770            StructType::PersonalityAgencyCannotUploadDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyCannotUploadDepot>()?),
14771            StructType::PersonalityAgencyInaccessibleDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInaccessibleDepot>()?),
14772            StructType::PersonalityAgencyInvalidDepot => Ok(from.as_any_box().downcast::<PersonalityAgencyInvalidDepot>()?),
14773            _ => Err(from.as_any_box()),
14774        }
14775    }
14776}
14777/// Deprecated all host issues were removed.
14778/// 
14779/// Base class for all host issues.
14780/// 
14781/// This structure may be used only with operations rendered under `/eam`.
14782pub trait HostIssueTrait : super::traits::IssueTrait {
14783    /// The host to which the issue is related.
14784    /// 
14785    /// Refers instance of *HostSystem*.
14786    fn get_host(&self) -> &super::structs::ManagedObjectReference;
14787}
14788impl<'s> serde::Serialize for dyn HostIssueTrait + 's {
14789            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14790            where
14791                S: serde::Serializer,
14792            {
14793                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14794            }
14795        }
14796impl<'de> serde::Deserialize<'de> for Box<dyn HostIssueTrait> {
14797            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14798                deserializer.deserialize_map(HostIssueVisitor)
14799            }
14800        }
14801
14802struct HostIssueVisitor;
14803
14804impl<'de> de::Visitor<'de> for HostIssueVisitor {
14805    type Value = Box<dyn HostIssueTrait>;
14806
14807    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14808        formatter.write_str("a valid HostIssueTrait JSON object with a _typeName field")
14809    }
14810
14811    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14812    where
14813        A: de::MapAccess<'de>,
14814    {
14815        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14816        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14817        match any {
14818            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14819                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14820            VimAny::Value(value) => Err(de::Error::custom(format!(
14821                "expected object not wrapped value: {:?}",
14822                value))),
14823        }
14824    }
14825}
14826
14827impl HostIssueTrait for HostIssue {
14828    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
14829}
14830impl HostIssueTrait for OrphanedDvFilterSwitch {
14831    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
14832}
14833impl HostIssueTrait for UnknownAgentVm {
14834    fn get_host(&self) -> &super::structs::ManagedObjectReference { &self.host }
14835}
14836impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostIssueTrait {
14837    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14838        let data_type = from.data_type();
14839        match data_type {
14840            StructType::HostIssue => Some(from.as_any_ref().downcast_ref::<HostIssue>()?),
14841            StructType::OrphanedDvFilterSwitch => Some(from.as_any_ref().downcast_ref::<OrphanedDvFilterSwitch>()?),
14842            StructType::UnknownAgentVm => Some(from.as_any_ref().downcast_ref::<UnknownAgentVm>()?),
14843            _ => None,
14844        }
14845    }
14846    
14847    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14848        let data_type = from.data_type();
14849        match data_type {
14850            StructType::HostIssue => Ok(from.as_any_box().downcast::<HostIssue>()?),
14851            StructType::OrphanedDvFilterSwitch => Ok(from.as_any_box().downcast::<OrphanedDvFilterSwitch>()?),
14852            StructType::UnknownAgentVm => Ok(from.as_any_box().downcast::<UnknownAgentVm>()?),
14853            _ => Err(from.as_any_box()),
14854        }
14855    }
14856}
14857/// Specifies the acknowledgement type of a configured System Virtual
14858/// Machine's lifecycle hook.
14859/// 
14860/// This structure may be used only with operations rendered under `/eam`.
14861pub trait SolutionsHookAcknowledgeConfigTrait : super::traits::DataObjectTrait {
14862}
14863impl<'s> serde::Serialize for dyn SolutionsHookAcknowledgeConfigTrait + 's {
14864            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14865            where
14866                S: serde::Serializer,
14867            {
14868                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14869            }
14870        }
14871impl<'de> serde::Deserialize<'de> for Box<dyn SolutionsHookAcknowledgeConfigTrait> {
14872            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14873                deserializer.deserialize_map(SolutionsHookAcknowledgeConfigVisitor)
14874            }
14875        }
14876
14877struct SolutionsHookAcknowledgeConfigVisitor;
14878
14879impl<'de> de::Visitor<'de> for SolutionsHookAcknowledgeConfigVisitor {
14880    type Value = Box<dyn SolutionsHookAcknowledgeConfigTrait>;
14881
14882    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14883        formatter.write_str("a valid SolutionsHookAcknowledgeConfigTrait JSON object with a _typeName field")
14884    }
14885
14886    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14887    where
14888        A: de::MapAccess<'de>,
14889    {
14890        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14891        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14892        match any {
14893            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14894                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14895            VimAny::Value(value) => Err(de::Error::custom(format!(
14896                "expected object not wrapped value: {:?}",
14897                value))),
14898        }
14899    }
14900}
14901
14902impl SolutionsHookAcknowledgeConfigTrait for SolutionsHookAcknowledgeConfig {
14903}
14904impl SolutionsHookAcknowledgeConfigTrait for SolutionsInteractiveHookAcknowledgeConfig {
14905}
14906impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SolutionsHookAcknowledgeConfigTrait {
14907    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14908        let data_type = from.data_type();
14909        match data_type {
14910            StructType::SolutionsHookAcknowledgeConfig => Some(from.as_any_ref().downcast_ref::<SolutionsHookAcknowledgeConfig>()?),
14911            StructType::SolutionsInteractiveHookAcknowledgeConfig => Some(from.as_any_ref().downcast_ref::<SolutionsInteractiveHookAcknowledgeConfig>()?),
14912            _ => None,
14913        }
14914    }
14915    
14916    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14917        let data_type = from.data_type();
14918        match data_type {
14919            StructType::SolutionsHookAcknowledgeConfig => Ok(from.as_any_box().downcast::<SolutionsHookAcknowledgeConfig>()?),
14920            StructType::SolutionsInteractiveHookAcknowledgeConfig => Ok(from.as_any_box().downcast::<SolutionsInteractiveHookAcknowledgeConfig>()?),
14921            _ => Err(from.as_any_box()),
14922        }
14923    }
14924}
14925/// Storage policy to be applied during system Virtual Machine creation.
14926/// 
14927/// This structure may be used only with operations rendered under `/eam`.
14928pub trait SolutionsStoragePolicyTrait : super::traits::DataObjectTrait {
14929}
14930impl<'s> serde::Serialize for dyn SolutionsStoragePolicyTrait + 's {
14931            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14932            where
14933                S: serde::Serializer,
14934            {
14935                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
14936            }
14937        }
14938impl<'de> serde::Deserialize<'de> for Box<dyn SolutionsStoragePolicyTrait> {
14939            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
14940                deserializer.deserialize_map(SolutionsStoragePolicyVisitor)
14941            }
14942        }
14943
14944struct SolutionsStoragePolicyVisitor;
14945
14946impl<'de> de::Visitor<'de> for SolutionsStoragePolicyVisitor {
14947    type Value = Box<dyn SolutionsStoragePolicyTrait>;
14948
14949    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14950        formatter.write_str("a valid SolutionsStoragePolicyTrait JSON object with a _typeName field")
14951    }
14952
14953    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
14954    where
14955        A: de::MapAccess<'de>,
14956    {
14957        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
14958        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
14959        match any {
14960            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
14961                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
14962            VimAny::Value(value) => Err(de::Error::custom(format!(
14963                "expected object not wrapped value: {:?}",
14964                value))),
14965        }
14966    }
14967}
14968
14969impl SolutionsStoragePolicyTrait for SolutionsStoragePolicy {
14970}
14971impl SolutionsStoragePolicyTrait for SolutionsProfileIdStoragePolicy {
14972}
14973impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SolutionsStoragePolicyTrait {
14974    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
14975        let data_type = from.data_type();
14976        match data_type {
14977            StructType::SolutionsStoragePolicy => Some(from.as_any_ref().downcast_ref::<SolutionsStoragePolicy>()?),
14978            StructType::SolutionsProfileIdStoragePolicy => Some(from.as_any_ref().downcast_ref::<SolutionsProfileIdStoragePolicy>()?),
14979            _ => None,
14980        }
14981    }
14982    
14983    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
14984        let data_type = from.data_type();
14985        match data_type {
14986            StructType::SolutionsStoragePolicy => Ok(from.as_any_box().downcast::<SolutionsStoragePolicy>()?),
14987            StructType::SolutionsProfileIdStoragePolicy => Ok(from.as_any_box().downcast::<SolutionsProfileIdStoragePolicy>()?),
14988            _ => Err(from.as_any_box()),
14989        }
14990    }
14991}
14992/// Specifies the specific solution configuration based on its type.
14993/// 
14994/// This structure may be used only with operations rendered under `/eam`.
14995pub trait SolutionsTypeSpecificSolutionConfigTrait : super::traits::DataObjectTrait {
14996}
14997impl<'s> serde::Serialize for dyn SolutionsTypeSpecificSolutionConfigTrait + 's {
14998            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
14999            where
15000                S: serde::Serializer,
15001            {
15002                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15003            }
15004        }
15005impl<'de> serde::Deserialize<'de> for Box<dyn SolutionsTypeSpecificSolutionConfigTrait> {
15006            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15007                deserializer.deserialize_map(SolutionsTypeSpecificSolutionConfigVisitor)
15008            }
15009        }
15010
15011struct SolutionsTypeSpecificSolutionConfigVisitor;
15012
15013impl<'de> de::Visitor<'de> for SolutionsTypeSpecificSolutionConfigVisitor {
15014    type Value = Box<dyn SolutionsTypeSpecificSolutionConfigTrait>;
15015
15016    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15017        formatter.write_str("a valid SolutionsTypeSpecificSolutionConfigTrait JSON object with a _typeName field")
15018    }
15019
15020    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15021    where
15022        A: de::MapAccess<'de>,
15023    {
15024        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15025        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15026        match any {
15027            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15028                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15029            VimAny::Value(value) => Err(de::Error::custom(format!(
15030                "expected object not wrapped value: {:?}",
15031                value))),
15032        }
15033    }
15034}
15035
15036impl SolutionsTypeSpecificSolutionConfigTrait for SolutionsTypeSpecificSolutionConfig {
15037}
15038impl SolutionsTypeSpecificSolutionConfigTrait for SolutionsClusterBoundSolutionConfig {
15039}
15040impl SolutionsTypeSpecificSolutionConfigTrait for SolutionsHostBoundSolutionConfig {
15041}
15042impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SolutionsTypeSpecificSolutionConfigTrait {
15043    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15044        let data_type = from.data_type();
15045        match data_type {
15046            StructType::SolutionsTypeSpecificSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsTypeSpecificSolutionConfig>()?),
15047            StructType::SolutionsClusterBoundSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsClusterBoundSolutionConfig>()?),
15048            StructType::SolutionsHostBoundSolutionConfig => Some(from.as_any_ref().downcast_ref::<SolutionsHostBoundSolutionConfig>()?),
15049            _ => None,
15050        }
15051    }
15052    
15053    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15054        let data_type = from.data_type();
15055        match data_type {
15056            StructType::SolutionsTypeSpecificSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsTypeSpecificSolutionConfig>()?),
15057            StructType::SolutionsClusterBoundSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsClusterBoundSolutionConfig>()?),
15058            StructType::SolutionsHostBoundSolutionConfig => Ok(from.as_any_box().downcast::<SolutionsHostBoundSolutionConfig>()?),
15059            _ => Err(from.as_any_box()),
15060        }
15061    }
15062}
15063/// Specifies how to find the files of the system Virtual Machine to be
15064/// created.
15065/// 
15066/// This structure may be used only with operations rendered under `/eam`.
15067pub trait SolutionsVmSourceTrait : super::traits::DataObjectTrait {
15068}
15069impl<'s> serde::Serialize for dyn SolutionsVmSourceTrait + 's {
15070            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15071            where
15072                S: serde::Serializer,
15073            {
15074                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15075            }
15076        }
15077impl<'de> serde::Deserialize<'de> for Box<dyn SolutionsVmSourceTrait> {
15078            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15079                deserializer.deserialize_map(SolutionsVmSourceVisitor)
15080            }
15081        }
15082
15083struct SolutionsVmSourceVisitor;
15084
15085impl<'de> de::Visitor<'de> for SolutionsVmSourceVisitor {
15086    type Value = Box<dyn SolutionsVmSourceTrait>;
15087
15088    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15089        formatter.write_str("a valid SolutionsVmSourceTrait JSON object with a _typeName field")
15090    }
15091
15092    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15093    where
15094        A: de::MapAccess<'de>,
15095    {
15096        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15097        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15098        match any {
15099            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15100                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15101            VimAny::Value(value) => Err(de::Error::custom(format!(
15102                "expected object not wrapped value: {:?}",
15103                value))),
15104        }
15105    }
15106}
15107
15108impl SolutionsVmSourceTrait for SolutionsVmSource {
15109}
15110impl SolutionsVmSourceTrait for SolutionsUrlVmSource {
15111}
15112impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SolutionsVmSourceTrait {
15113    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15114        let data_type = from.data_type();
15115        match data_type {
15116            StructType::SolutionsVmSource => Some(from.as_any_ref().downcast_ref::<SolutionsVmSource>()?),
15117            StructType::SolutionsUrlVmSource => Some(from.as_any_ref().downcast_ref::<SolutionsUrlVmSource>()?),
15118            _ => None,
15119        }
15120    }
15121    
15122    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15123        let data_type = from.data_type();
15124        match data_type {
15125            StructType::SolutionsVmSource => Ok(from.as_any_box().downcast::<SolutionsVmSource>()?),
15126            StructType::SolutionsUrlVmSource => Ok(from.as_any_box().downcast::<SolutionsUrlVmSource>()?),
15127            _ => Err(from.as_any_box()),
15128        }
15129    }
15130}
15131/// This structure may be used only with operations rendered under `/eam`.
15132/// 
15133/// ***Since:*** vEAM API 8.2
15134pub trait VibVibServicesSslTrustTrait : super::traits::DataObjectTrait {
15135}
15136impl<'s> serde::Serialize for dyn VibVibServicesSslTrustTrait + 's {
15137            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15138            where
15139                S: serde::Serializer,
15140            {
15141                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15142            }
15143        }
15144impl<'de> serde::Deserialize<'de> for Box<dyn VibVibServicesSslTrustTrait> {
15145            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15146                deserializer.deserialize_map(VibVibServicesSslTrustVisitor)
15147            }
15148        }
15149
15150struct VibVibServicesSslTrustVisitor;
15151
15152impl<'de> de::Visitor<'de> for VibVibServicesSslTrustVisitor {
15153    type Value = Box<dyn VibVibServicesSslTrustTrait>;
15154
15155    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15156        formatter.write_str("a valid VibVibServicesSslTrustTrait JSON object with a _typeName field")
15157    }
15158
15159    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15160    where
15161        A: de::MapAccess<'de>,
15162    {
15163        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15164        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15165        match any {
15166            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15167                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15168            VimAny::Value(value) => Err(de::Error::custom(format!(
15169                "expected object not wrapped value: {:?}",
15170                value))),
15171        }
15172    }
15173}
15174
15175impl VibVibServicesSslTrustTrait for VibVibServicesSslTrust {
15176}
15177impl VibVibServicesSslTrustTrait for VibVibServicesAnyCertificate {
15178}
15179impl VibVibServicesSslTrustTrait for VibVibServicesPinnedPemCertificate {
15180}
15181impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VibVibServicesSslTrustTrait {
15182    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15183        let data_type = from.data_type();
15184        match data_type {
15185            StructType::VibVibServicesSslTrust => Some(from.as_any_ref().downcast_ref::<VibVibServicesSslTrust>()?),
15186            StructType::VibVibServicesAnyCertificate => Some(from.as_any_ref().downcast_ref::<VibVibServicesAnyCertificate>()?),
15187            StructType::VibVibServicesPinnedPemCertificate => Some(from.as_any_ref().downcast_ref::<VibVibServicesPinnedPemCertificate>()?),
15188            _ => None,
15189        }
15190    }
15191    
15192    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15193        let data_type = from.data_type();
15194        match data_type {
15195            StructType::VibVibServicesSslTrust => Ok(from.as_any_box().downcast::<VibVibServicesSslTrust>()?),
15196            StructType::VibVibServicesAnyCertificate => Ok(from.as_any_box().downcast::<VibVibServicesAnyCertificate>()?),
15197            StructType::VibVibServicesPinnedPemCertificate => Ok(from.as_any_box().downcast::<VibVibServicesPinnedPemCertificate>()?),
15198            _ => Err(from.as_any_box()),
15199        }
15200    }
15201}
15202/// The *PbmCapabilityTypeInfo* data object defines the datatype for a requirement
15203/// or capability property.
15204/// 
15205/// See *PbmCapabilityPropertyMetadata*.
15206/// 
15207/// This structure may be used only with operations rendered under `/pbm`.
15208pub trait PbmCapabilityTypeInfoTrait : super::traits::DataObjectTrait {
15209    /// Datatype for a property.
15210    /// 
15211    /// Must be one of the types defined
15212    /// in *PbmBuiltinType_enum*.
15213    /// 
15214    /// A property value might consist of a collection of values of the specified
15215    /// datatype. The interpretation of the collection is determined by the
15216    /// generic type (*PbmCapabilityGenericTypeInfo.genericTypeName*).
15217    /// The generic type indicates how a collection of values
15218    /// of the specified datatype will be interpreted. See the descriptions of the
15219    /// *PbmBuiltinType_enum* definitions.
15220    fn get_type_name(&self) -> &str;
15221}
15222impl<'s> serde::Serialize for dyn PbmCapabilityTypeInfoTrait + 's {
15223            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15224            where
15225                S: serde::Serializer,
15226            {
15227                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15228            }
15229        }
15230impl<'de> serde::Deserialize<'de> for Box<dyn PbmCapabilityTypeInfoTrait> {
15231            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15232                deserializer.deserialize_map(PbmCapabilityTypeInfoVisitor)
15233            }
15234        }
15235
15236struct PbmCapabilityTypeInfoVisitor;
15237
15238impl<'de> de::Visitor<'de> for PbmCapabilityTypeInfoVisitor {
15239    type Value = Box<dyn PbmCapabilityTypeInfoTrait>;
15240
15241    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15242        formatter.write_str("a valid PbmCapabilityTypeInfoTrait JSON object with a _typeName field")
15243    }
15244
15245    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15246    where
15247        A: de::MapAccess<'de>,
15248    {
15249        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15250        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15251        match any {
15252            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15253                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15254            VimAny::Value(value) => Err(de::Error::custom(format!(
15255                "expected object not wrapped value: {:?}",
15256                value))),
15257        }
15258    }
15259}
15260
15261impl PbmCapabilityTypeInfoTrait for PbmCapabilityTypeInfo {
15262    fn get_type_name(&self) -> &str { &self.type_name }
15263}
15264impl PbmCapabilityTypeInfoTrait for PbmCapabilityGenericTypeInfo {
15265    fn get_type_name(&self) -> &str { &self.type_name }
15266}
15267impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmCapabilityTypeInfoTrait {
15268    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15269        let data_type = from.data_type();
15270        match data_type {
15271            StructType::PbmCapabilityTypeInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityTypeInfo>()?),
15272            StructType::PbmCapabilityGenericTypeInfo => Some(from.as_any_ref().downcast_ref::<PbmCapabilityGenericTypeInfo>()?),
15273            _ => None,
15274        }
15275    }
15276    
15277    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15278        let data_type = from.data_type();
15279        match data_type {
15280            StructType::PbmCapabilityTypeInfo => Ok(from.as_any_box().downcast::<PbmCapabilityTypeInfo>()?),
15281            StructType::PbmCapabilityGenericTypeInfo => Ok(from.as_any_box().downcast::<PbmCapabilityGenericTypeInfo>()?),
15282            _ => Err(from.as_any_box()),
15283        }
15284    }
15285}
15286/// Describes Line of Service of a capability provider.
15287/// 
15288/// This structure may be used only with operations rendered under `/pbm`.
15289pub trait PbmLineOfServiceInfoTrait : super::traits::DataObjectTrait {
15290    /// *PbmLineOfServiceInfoLineOfServiceEnum_enum* - must be one of the values
15291    /// for enum *PbmLineOfServiceInfoLineOfServiceEnum_enum*.
15292    fn get_line_of_service(&self) -> &str;
15293    /// Name of the service - for informational
15294    /// purposes only.
15295    fn get_name(&self) -> &super::structs::PbmExtendedElementDescription;
15296    /// Description of the service - for informational
15297    /// purposes only.
15298    fn get_description(&self) -> &Option<super::structs::PbmExtendedElementDescription>;
15299}
15300impl<'s> serde::Serialize for dyn PbmLineOfServiceInfoTrait + 's {
15301            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15302            where
15303                S: serde::Serializer,
15304            {
15305                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15306            }
15307        }
15308impl<'de> serde::Deserialize<'de> for Box<dyn PbmLineOfServiceInfoTrait> {
15309            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15310                deserializer.deserialize_map(PbmLineOfServiceInfoVisitor)
15311            }
15312        }
15313
15314struct PbmLineOfServiceInfoVisitor;
15315
15316impl<'de> de::Visitor<'de> for PbmLineOfServiceInfoVisitor {
15317    type Value = Box<dyn PbmLineOfServiceInfoTrait>;
15318
15319    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15320        formatter.write_str("a valid PbmLineOfServiceInfoTrait JSON object with a _typeName field")
15321    }
15322
15323    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15324    where
15325        A: de::MapAccess<'de>,
15326    {
15327        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15328        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15329        match any {
15330            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15331                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15332            VimAny::Value(value) => Err(de::Error::custom(format!(
15333                "expected object not wrapped value: {:?}",
15334                value))),
15335        }
15336    }
15337}
15338
15339impl PbmLineOfServiceInfoTrait for PbmLineOfServiceInfo {
15340    fn get_line_of_service(&self) -> &str { &self.line_of_service }
15341    fn get_name(&self) -> &super::structs::PbmExtendedElementDescription { &self.name }
15342    fn get_description(&self) -> &Option<super::structs::PbmExtendedElementDescription> { &self.description }
15343}
15344impl PbmLineOfServiceInfoTrait for PbmPersistenceBasedDataServiceInfo {
15345    fn get_line_of_service(&self) -> &str { &self.line_of_service }
15346    fn get_name(&self) -> &super::structs::PbmExtendedElementDescription { &self.name }
15347    fn get_description(&self) -> &Option<super::structs::PbmExtendedElementDescription> { &self.description }
15348}
15349impl PbmLineOfServiceInfoTrait for PbmVaioDataServiceInfo {
15350    fn get_line_of_service(&self) -> &str { &self.line_of_service }
15351    fn get_name(&self) -> &super::structs::PbmExtendedElementDescription { &self.name }
15352    fn get_description(&self) -> &Option<super::structs::PbmExtendedElementDescription> { &self.description }
15353}
15354impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmLineOfServiceInfoTrait {
15355    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15356        let data_type = from.data_type();
15357        match data_type {
15358            StructType::PbmLineOfServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmLineOfServiceInfo>()?),
15359            StructType::PbmPersistenceBasedDataServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmPersistenceBasedDataServiceInfo>()?),
15360            StructType::PbmVaioDataServiceInfo => Some(from.as_any_ref().downcast_ref::<PbmVaioDataServiceInfo>()?),
15361            _ => None,
15362        }
15363    }
15364    
15365    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15366        let data_type = from.data_type();
15367        match data_type {
15368            StructType::PbmLineOfServiceInfo => Ok(from.as_any_box().downcast::<PbmLineOfServiceInfo>()?),
15369            StructType::PbmPersistenceBasedDataServiceInfo => Ok(from.as_any_box().downcast::<PbmPersistenceBasedDataServiceInfo>()?),
15370            StructType::PbmVaioDataServiceInfo => Ok(from.as_any_box().downcast::<PbmVaioDataServiceInfo>()?),
15371            _ => Err(from.as_any_box()),
15372        }
15373    }
15374}
15375/// Describes the collection of resources (for example, hosts) that satisfy a
15376/// policy, for a specific datastore.
15377/// 
15378/// This structure may be used only with operations rendered under `/pbm`.
15379pub trait PbmPlacementMatchingResourcesTrait : super::traits::DataObjectTrait {
15380}
15381impl<'s> serde::Serialize for dyn PbmPlacementMatchingResourcesTrait + 's {
15382            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15383            where
15384                S: serde::Serializer,
15385            {
15386                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15387            }
15388        }
15389impl<'de> serde::Deserialize<'de> for Box<dyn PbmPlacementMatchingResourcesTrait> {
15390            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15391                deserializer.deserialize_map(PbmPlacementMatchingResourcesVisitor)
15392            }
15393        }
15394
15395struct PbmPlacementMatchingResourcesVisitor;
15396
15397impl<'de> de::Visitor<'de> for PbmPlacementMatchingResourcesVisitor {
15398    type Value = Box<dyn PbmPlacementMatchingResourcesTrait>;
15399
15400    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15401        formatter.write_str("a valid PbmPlacementMatchingResourcesTrait JSON object with a _typeName field")
15402    }
15403
15404    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15405    where
15406        A: de::MapAccess<'de>,
15407    {
15408        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15409        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15410        match any {
15411            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15412                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15413            VimAny::Value(value) => Err(de::Error::custom(format!(
15414                "expected object not wrapped value: {:?}",
15415                value))),
15416        }
15417    }
15418}
15419
15420impl PbmPlacementMatchingResourcesTrait for PbmPlacementMatchingResources {
15421}
15422impl PbmPlacementMatchingResourcesTrait for PbmPlacementMatchingReplicationResources {
15423}
15424impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmPlacementMatchingResourcesTrait {
15425    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15426        let data_type = from.data_type();
15427        match data_type {
15428            StructType::PbmPlacementMatchingResources => Some(from.as_any_ref().downcast_ref::<PbmPlacementMatchingResources>()?),
15429            StructType::PbmPlacementMatchingReplicationResources => Some(from.as_any_ref().downcast_ref::<PbmPlacementMatchingReplicationResources>()?),
15430            _ => None,
15431        }
15432    }
15433    
15434    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15435        let data_type = from.data_type();
15436        match data_type {
15437            StructType::PbmPlacementMatchingResources => Ok(from.as_any_box().downcast::<PbmPlacementMatchingResources>()?),
15438            StructType::PbmPlacementMatchingReplicationResources => Ok(from.as_any_box().downcast::<PbmPlacementMatchingReplicationResources>()?),
15439            _ => Err(from.as_any_box()),
15440        }
15441    }
15442}
15443/// Defines a constraint for placing objects onto *PbmPlacementHub*s.
15444/// 
15445/// This structure may be used only with operations rendered under `/pbm`.
15446pub trait PbmPlacementRequirementTrait : super::traits::DataObjectTrait {
15447}
15448impl<'s> serde::Serialize for dyn PbmPlacementRequirementTrait + 's {
15449            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15450            where
15451                S: serde::Serializer,
15452            {
15453                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15454            }
15455        }
15456impl<'de> serde::Deserialize<'de> for Box<dyn PbmPlacementRequirementTrait> {
15457            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15458                deserializer.deserialize_map(PbmPlacementRequirementVisitor)
15459            }
15460        }
15461
15462struct PbmPlacementRequirementVisitor;
15463
15464impl<'de> de::Visitor<'de> for PbmPlacementRequirementVisitor {
15465    type Value = Box<dyn PbmPlacementRequirementTrait>;
15466
15467    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15468        formatter.write_str("a valid PbmPlacementRequirementTrait JSON object with a _typeName field")
15469    }
15470
15471    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15472    where
15473        A: de::MapAccess<'de>,
15474    {
15475        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15476        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15477        match any {
15478            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15479                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15480            VimAny::Value(value) => Err(de::Error::custom(format!(
15481                "expected object not wrapped value: {:?}",
15482                value))),
15483        }
15484    }
15485}
15486
15487impl PbmPlacementRequirementTrait for PbmPlacementRequirement {
15488}
15489impl PbmPlacementRequirementTrait for PbmPlacementCapabilityConstraintsRequirement {
15490}
15491impl PbmPlacementRequirementTrait for PbmPlacementCapabilityProfileRequirement {
15492}
15493impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmPlacementRequirementTrait {
15494    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15495        let data_type = from.data_type();
15496        match data_type {
15497            StructType::PbmPlacementRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementRequirement>()?),
15498            StructType::PbmPlacementCapabilityConstraintsRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementCapabilityConstraintsRequirement>()?),
15499            StructType::PbmPlacementCapabilityProfileRequirement => Some(from.as_any_ref().downcast_ref::<PbmPlacementCapabilityProfileRequirement>()?),
15500            _ => None,
15501        }
15502    }
15503    
15504    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15505        let data_type = from.data_type();
15506        match data_type {
15507            StructType::PbmPlacementRequirement => Ok(from.as_any_box().downcast::<PbmPlacementRequirement>()?),
15508            StructType::PbmPlacementCapabilityConstraintsRequirement => Ok(from.as_any_box().downcast::<PbmPlacementCapabilityConstraintsRequirement>()?),
15509            StructType::PbmPlacementCapabilityProfileRequirement => Ok(from.as_any_box().downcast::<PbmPlacementCapabilityProfileRequirement>()?),
15510            _ => Err(from.as_any_box()),
15511        }
15512    }
15513}
15514/// The *PbmCapabilityConstraints* data object is the base
15515/// object for capability subprofile constraints.
15516/// 
15517/// This structure may be used only with operations rendered under `/pbm`.
15518pub trait PbmCapabilityConstraintsTrait : super::traits::DataObjectTrait {
15519}
15520impl<'s> serde::Serialize for dyn PbmCapabilityConstraintsTrait + 's {
15521            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15522            where
15523                S: serde::Serializer,
15524            {
15525                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15526            }
15527        }
15528impl<'de> serde::Deserialize<'de> for Box<dyn PbmCapabilityConstraintsTrait> {
15529            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15530                deserializer.deserialize_map(PbmCapabilityConstraintsVisitor)
15531            }
15532        }
15533
15534struct PbmCapabilityConstraintsVisitor;
15535
15536impl<'de> de::Visitor<'de> for PbmCapabilityConstraintsVisitor {
15537    type Value = Box<dyn PbmCapabilityConstraintsTrait>;
15538
15539    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15540        formatter.write_str("a valid PbmCapabilityConstraintsTrait JSON object with a _typeName field")
15541    }
15542
15543    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15544    where
15545        A: de::MapAccess<'de>,
15546    {
15547        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15548        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15549        match any {
15550            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15551                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15552            VimAny::Value(value) => Err(de::Error::custom(format!(
15553                "expected object not wrapped value: {:?}",
15554                value))),
15555        }
15556    }
15557}
15558
15559impl PbmCapabilityConstraintsTrait for PbmCapabilityConstraints {
15560}
15561impl PbmCapabilityConstraintsTrait for PbmCapabilitySubProfileConstraints {
15562}
15563impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmCapabilityConstraintsTrait {
15564    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15565        let data_type = from.data_type();
15566        match data_type {
15567            StructType::PbmCapabilityConstraints => Some(from.as_any_ref().downcast_ref::<PbmCapabilityConstraints>()?),
15568            StructType::PbmCapabilitySubProfileConstraints => Some(from.as_any_ref().downcast_ref::<PbmCapabilitySubProfileConstraints>()?),
15569            _ => None,
15570        }
15571    }
15572    
15573    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15574        let data_type = from.data_type();
15575        match data_type {
15576            StructType::PbmCapabilityConstraints => Ok(from.as_any_box().downcast::<PbmCapabilityConstraints>()?),
15577            StructType::PbmCapabilitySubProfileConstraints => Ok(from.as_any_box().downcast::<PbmCapabilitySubProfileConstraints>()?),
15578            _ => Err(from.as_any_box()),
15579        }
15580    }
15581}
15582/// The *PbmProfile* data object is the base object
15583/// for storage capability profiles.
15584/// 
15585/// This object defines metadata
15586/// for the profile. The derived capability profile represents the
15587/// user's intent for selection and configuration of storage resources
15588/// and/or services that support deployment of virtual machines
15589/// and virtual disks.
15590/// 
15591/// This structure may be used only with operations rendered under `/pbm`.
15592pub trait PbmProfileTrait : super::traits::DataObjectTrait {
15593    /// Unique identifier for the profile.
15594    fn get_profile_id(&self) -> &super::structs::PbmProfileId;
15595    fn get_name(&self) -> &str;
15596    /// Profile description.
15597    fn get_description(&self) -> &Option<String>;
15598    /// Time stamp of profile creation.
15599    fn get_creation_time(&self) -> &str;
15600    /// User name of the profile creator.
15601    /// 
15602    /// Set during creation time.
15603    fn get_created_by(&self) -> &str;
15604    /// Time stamp of latest modification to the profile.
15605    fn get_last_updated_time(&self) -> &str;
15606    /// Name of the user performing the latest modification of the profile.
15607    fn get_last_updated_by(&self) -> &str;
15608}
15609impl<'s> serde::Serialize for dyn PbmProfileTrait + 's {
15610            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15611            where
15612                S: serde::Serializer,
15613            {
15614                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15615            }
15616        }
15617impl<'de> serde::Deserialize<'de> for Box<dyn PbmProfileTrait> {
15618            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15619                deserializer.deserialize_map(PbmProfileVisitor)
15620            }
15621        }
15622
15623struct PbmProfileVisitor;
15624
15625impl<'de> de::Visitor<'de> for PbmProfileVisitor {
15626    type Value = Box<dyn PbmProfileTrait>;
15627
15628    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15629        formatter.write_str("a valid PbmProfileTrait JSON object with a _typeName field")
15630    }
15631
15632    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15633    where
15634        A: de::MapAccess<'de>,
15635    {
15636        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15637        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15638        match any {
15639            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15640                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15641            VimAny::Value(value) => Err(de::Error::custom(format!(
15642                "expected object not wrapped value: {:?}",
15643                value))),
15644        }
15645    }
15646}
15647
15648impl PbmProfileTrait for PbmProfile {
15649    fn get_profile_id(&self) -> &super::structs::PbmProfileId { &self.profile_id }
15650    fn get_name(&self) -> &str { &self.name }
15651    fn get_description(&self) -> &Option<String> { &self.description }
15652    fn get_creation_time(&self) -> &str { &self.creation_time }
15653    fn get_created_by(&self) -> &str { &self.created_by }
15654    fn get_last_updated_time(&self) -> &str { &self.last_updated_time }
15655    fn get_last_updated_by(&self) -> &str { &self.last_updated_by }
15656}
15657impl PbmProfileTrait for PbmCapabilityProfile {
15658    fn get_profile_id(&self) -> &super::structs::PbmProfileId { &self.profile_id }
15659    fn get_name(&self) -> &str { &self.name }
15660    fn get_description(&self) -> &Option<String> { &self.description }
15661    fn get_creation_time(&self) -> &str { &self.creation_time }
15662    fn get_created_by(&self) -> &str { &self.created_by }
15663    fn get_last_updated_time(&self) -> &str { &self.last_updated_time }
15664    fn get_last_updated_by(&self) -> &str { &self.last_updated_by }
15665}
15666impl PbmProfileTrait for PbmDefaultCapabilityProfile {
15667    fn get_profile_id(&self) -> &super::structs::PbmProfileId { &self.profile_id }
15668    fn get_name(&self) -> &str { &self.name }
15669    fn get_description(&self) -> &Option<String> { &self.description }
15670    fn get_creation_time(&self) -> &str { &self.creation_time }
15671    fn get_created_by(&self) -> &str { &self.created_by }
15672    fn get_last_updated_time(&self) -> &str { &self.last_updated_time }
15673    fn get_last_updated_by(&self) -> &str { &self.last_updated_by }
15674}
15675impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmProfileTrait {
15676    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15677        let data_type = from.data_type();
15678        match data_type {
15679            StructType::PbmProfile => Some(from.as_any_ref().downcast_ref::<PbmProfile>()?),
15680            StructType::PbmCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmCapabilityProfile>()?),
15681            StructType::PbmDefaultCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmDefaultCapabilityProfile>()?),
15682            _ => None,
15683        }
15684    }
15685    
15686    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15687        let data_type = from.data_type();
15688        match data_type {
15689            StructType::PbmProfile => Ok(from.as_any_box().downcast::<PbmProfile>()?),
15690            StructType::PbmCapabilityProfile => Ok(from.as_any_box().downcast::<PbmCapabilityProfile>()?),
15691            StructType::PbmDefaultCapabilityProfile => Ok(from.as_any_box().downcast::<PbmDefaultCapabilityProfile>()?),
15692            _ => Err(from.as_any_box()),
15693        }
15694    }
15695}
15696/// The *PbmCapabilityProfile* data object defines
15697/// capability-based profiles.
15698/// 
15699/// A capability-based profile is derived
15700/// from tag-based storage capabilities or from vSAN storage capabilities.
15701/// 
15702/// This structure may be used only with operations rendered under `/pbm`.
15703pub trait PbmCapabilityProfileTrait : super::traits::PbmProfileTrait {
15704    /// Indicates whether the profile is requirement
15705    /// profile, a resource profile or a data service profile.
15706    /// 
15707    /// The <code>profileCategory</code>
15708    /// is a string value that corresponds to one of the
15709    /// *PbmProfileCategoryEnum_enum* values.
15710    /// - REQUIREMENT profile - Defines the storage constraints applied
15711    ///   to virtual machine placement. Requirements are defined by
15712    ///   the user and can be associated with virtual machines and virtual
15713    ///   disks. During provisioning, you can use a requirements profile
15714    ///   for compliance and placement checking to support
15715    ///   selection and configuration of resources.
15716    /// - RESOURCE profile - Specifies system-defined storage capabilities.
15717    ///   You cannot modify a resource profile. You cannot associate a resource
15718    ///   profile with vSphere entities, use it during provisioning, or target
15719    ///   entities for resource selection or configuration.
15720    ///   This type of profile gives the user visibility into the capabilities
15721    ///   supported by the storage provider.
15722    /// - DATA\_SERVICE\_POLICY - Indicates a data service policy that can
15723    ///   be embedded into another storage policy. Policies of this type can't
15724    ///   be assigned to Virtual Machines or Virtual Disks. This policy cannot
15725    ///   be used for compliance checking.
15726    fn get_profile_category(&self) -> &str;
15727    /// Type of the target resource to which the capability information applies.
15728    /// 
15729    /// A fixed enum that defines resource types for which capabilities can be defined
15730    /// see *PbmProfileResourceType*, *PbmProfileResourceTypeEnum_enum*
15731    fn get_resource_type(&self) -> &super::structs::PbmProfileResourceType;
15732    /// Subprofiles that describe storage requirements or storage provider capabilities,
15733    /// depending on the profile category (REQUIREMENT or RESOURCE).
15734    fn get_constraints(&self) -> &Box<dyn super::traits::PbmCapabilityConstraintsTrait>;
15735    /// Generation ID is used to communicate the current version of the profile to VASA
15736    /// providers.
15737    /// 
15738    /// It is only applicable to REQUIREMENT profile types. Every time a
15739    /// requirement profile is edited, the Server will increment the generationId. You
15740    /// do not need to set the generationID. When an object is created (or
15741    /// reconfigured), the Server will send the requirement profile content, profile ID and
15742    /// the generationID to VASA provider.
15743    fn get_generation_id(&self) -> Option<i64>;
15744    /// Deprecated since it is not supported.
15745    /// 
15746    /// Not supported in this release.
15747    fn get_is_default(&self) -> bool;
15748    /// Indicates the type of system pre-created default profile.
15749    /// 
15750    /// This will be set only for system pre-created default profiles. And
15751    /// this is not set for RESOURCE profiles.
15752    fn get_system_created_profile_type(&self) -> &Option<String>;
15753    /// This property is set only for data service policy.
15754    /// 
15755    /// Indicates the line of service
15756    /// *PbmLineOfServiceInfoLineOfServiceEnum_enum* of the data service policy.
15757    fn get_line_of_service(&self) -> &Option<String>;
15758}
15759impl<'s> serde::Serialize for dyn PbmCapabilityProfileTrait + 's {
15760            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15761            where
15762                S: serde::Serializer,
15763            {
15764                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15765            }
15766        }
15767impl<'de> serde::Deserialize<'de> for Box<dyn PbmCapabilityProfileTrait> {
15768            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15769                deserializer.deserialize_map(PbmCapabilityProfileVisitor)
15770            }
15771        }
15772
15773struct PbmCapabilityProfileVisitor;
15774
15775impl<'de> de::Visitor<'de> for PbmCapabilityProfileVisitor {
15776    type Value = Box<dyn PbmCapabilityProfileTrait>;
15777
15778    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15779        formatter.write_str("a valid PbmCapabilityProfileTrait JSON object with a _typeName field")
15780    }
15781
15782    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15783    where
15784        A: de::MapAccess<'de>,
15785    {
15786        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15787        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15788        match any {
15789            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15790                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15791            VimAny::Value(value) => Err(de::Error::custom(format!(
15792                "expected object not wrapped value: {:?}",
15793                value))),
15794        }
15795    }
15796}
15797
15798impl PbmCapabilityProfileTrait for PbmCapabilityProfile {
15799    fn get_profile_category(&self) -> &str { &self.profile_category }
15800    fn get_resource_type(&self) -> &super::structs::PbmProfileResourceType { &self.resource_type }
15801    fn get_constraints(&self) -> &Box<dyn super::traits::PbmCapabilityConstraintsTrait> { &self.constraints }
15802    fn get_generation_id(&self) -> Option<i64> { self.generation_id }
15803    fn get_is_default(&self) -> bool { self.is_default }
15804    fn get_system_created_profile_type(&self) -> &Option<String> { &self.system_created_profile_type }
15805    fn get_line_of_service(&self) -> &Option<String> { &self.line_of_service }
15806}
15807impl PbmCapabilityProfileTrait for PbmDefaultCapabilityProfile {
15808    fn get_profile_category(&self) -> &str { &self.profile_category }
15809    fn get_resource_type(&self) -> &super::structs::PbmProfileResourceType { &self.resource_type }
15810    fn get_constraints(&self) -> &Box<dyn super::traits::PbmCapabilityConstraintsTrait> { &self.constraints }
15811    fn get_generation_id(&self) -> Option<i64> { self.generation_id }
15812    fn get_is_default(&self) -> bool { self.is_default }
15813    fn get_system_created_profile_type(&self) -> &Option<String> { &self.system_created_profile_type }
15814    fn get_line_of_service(&self) -> &Option<String> { &self.line_of_service }
15815}
15816impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PbmCapabilityProfileTrait {
15817    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15818        let data_type = from.data_type();
15819        match data_type {
15820            StructType::PbmCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmCapabilityProfile>()?),
15821            StructType::PbmDefaultCapabilityProfile => Some(from.as_any_ref().downcast_ref::<PbmDefaultCapabilityProfile>()?),
15822            _ => None,
15823        }
15824    }
15825    
15826    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15827        let data_type = from.data_type();
15828        match data_type {
15829            StructType::PbmCapabilityProfile => Ok(from.as_any_box().downcast::<PbmCapabilityProfile>()?),
15830            StructType::PbmDefaultCapabilityProfile => Ok(from.as_any_box().downcast::<PbmDefaultCapabilityProfile>()?),
15831            _ => Err(from.as_any_box()),
15832        }
15833    }
15834}
15835/// Information about Storage Monitoring Service (SMS)
15836/// providers.
15837/// 
15838/// This structure may be used only with operations rendered under `/sms`.
15839pub trait SmsProviderInfoTrait : super::traits::DataObjectTrait {
15840    /// Unique identifier
15841    fn get_uid(&self) -> &str;
15842    /// Name
15843    fn get_name(&self) -> &str;
15844    /// Description of the provider
15845    fn get_description(&self) -> &Option<String>;
15846    /// Version of the provider
15847    fn get_version(&self) -> &Option<String>;
15848}
15849impl<'s> serde::Serialize for dyn SmsProviderInfoTrait + 's {
15850            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15851            where
15852                S: serde::Serializer,
15853            {
15854                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15855            }
15856        }
15857impl<'de> serde::Deserialize<'de> for Box<dyn SmsProviderInfoTrait> {
15858            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15859                deserializer.deserialize_map(SmsProviderInfoVisitor)
15860            }
15861        }
15862
15863struct SmsProviderInfoVisitor;
15864
15865impl<'de> de::Visitor<'de> for SmsProviderInfoVisitor {
15866    type Value = Box<dyn SmsProviderInfoTrait>;
15867
15868    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15869        formatter.write_str("a valid SmsProviderInfoTrait JSON object with a _typeName field")
15870    }
15871
15872    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15873    where
15874        A: de::MapAccess<'de>,
15875    {
15876        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15877        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15878        match any {
15879            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15880                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15881            VimAny::Value(value) => Err(de::Error::custom(format!(
15882                "expected object not wrapped value: {:?}",
15883                value))),
15884        }
15885    }
15886}
15887
15888impl SmsProviderInfoTrait for SmsProviderInfo {
15889    fn get_uid(&self) -> &str { &self.uid }
15890    fn get_name(&self) -> &str { &self.name }
15891    fn get_description(&self) -> &Option<String> { &self.description }
15892    fn get_version(&self) -> &Option<String> { &self.version }
15893}
15894impl SmsProviderInfoTrait for VasaProviderInfo {
15895    fn get_uid(&self) -> &str { &self.uid }
15896    fn get_name(&self) -> &str { &self.name }
15897    fn get_description(&self) -> &Option<String> { &self.description }
15898    fn get_version(&self) -> &Option<String> { &self.version }
15899}
15900impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SmsProviderInfoTrait {
15901    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15902        let data_type = from.data_type();
15903        match data_type {
15904            StructType::SmsProviderInfo => Some(from.as_any_ref().downcast_ref::<SmsProviderInfo>()?),
15905            StructType::VasaProviderInfo => Some(from.as_any_ref().downcast_ref::<VasaProviderInfo>()?),
15906            _ => None,
15907        }
15908    }
15909    
15910    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15911        let data_type = from.data_type();
15912        match data_type {
15913            StructType::SmsProviderInfo => Ok(from.as_any_box().downcast::<SmsProviderInfo>()?),
15914            StructType::VasaProviderInfo => Ok(from.as_any_box().downcast::<VasaProviderInfo>()?),
15915            _ => Err(from.as_any_box()),
15916        }
15917    }
15918}
15919/// Specification for Storage Monitoring Service (SMS)
15920/// providers.
15921/// 
15922/// This structure may be used only with operations rendered under `/sms`.
15923pub trait SmsProviderSpecTrait : super::traits::DataObjectTrait {
15924    /// Name
15925    /// The maximum length of the name is 275 characters.
15926    fn get_name(&self) -> &str;
15927    /// Description of the provider
15928    fn get_description(&self) -> &Option<String>;
15929}
15930impl<'s> serde::Serialize for dyn SmsProviderSpecTrait + 's {
15931            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
15932            where
15933                S: serde::Serializer,
15934            {
15935                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
15936            }
15937        }
15938impl<'de> serde::Deserialize<'de> for Box<dyn SmsProviderSpecTrait> {
15939            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
15940                deserializer.deserialize_map(SmsProviderSpecVisitor)
15941            }
15942        }
15943
15944struct SmsProviderSpecVisitor;
15945
15946impl<'de> de::Visitor<'de> for SmsProviderSpecVisitor {
15947    type Value = Box<dyn SmsProviderSpecTrait>;
15948
15949    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15950        formatter.write_str("a valid SmsProviderSpecTrait JSON object with a _typeName field")
15951    }
15952
15953    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
15954    where
15955        A: de::MapAccess<'de>,
15956    {
15957        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
15958        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
15959        match any {
15960            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
15961                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
15962            VimAny::Value(value) => Err(de::Error::custom(format!(
15963                "expected object not wrapped value: {:?}",
15964                value))),
15965        }
15966    }
15967}
15968
15969impl SmsProviderSpecTrait for SmsProviderSpec {
15970    fn get_name(&self) -> &str { &self.name }
15971    fn get_description(&self) -> &Option<String> { &self.description }
15972}
15973impl SmsProviderSpecTrait for VasaProviderSpec {
15974    fn get_name(&self) -> &str { &self.name }
15975    fn get_description(&self) -> &Option<String> { &self.description }
15976}
15977impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SmsProviderSpecTrait {
15978    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
15979        let data_type = from.data_type();
15980        match data_type {
15981            StructType::SmsProviderSpec => Some(from.as_any_ref().downcast_ref::<SmsProviderSpec>()?),
15982            StructType::VasaProviderSpec => Some(from.as_any_ref().downcast_ref::<VasaProviderSpec>()?),
15983            _ => None,
15984        }
15985    }
15986    
15987    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
15988        let data_type = from.data_type();
15989        match data_type {
15990            StructType::SmsProviderSpec => Ok(from.as_any_box().downcast::<SmsProviderSpec>()?),
15991            StructType::VasaProviderSpec => Ok(from.as_any_box().downcast::<VasaProviderSpec>()?),
15992            _ => Err(from.as_any_box()),
15993        }
15994    }
15995}
15996/// This data object represents the storage port.
15997/// 
15998/// This structure may be used only with operations rendered under `/sms`.
15999pub trait StoragePortTrait : super::traits::DataObjectTrait {
16000    /// Unique identifier
16001    fn get_uuid(&self) -> &str;
16002    /// Storage Port Type
16003    fn get_type(&self) -> &str;
16004    /// Other identifiers which can help identify storage port
16005    fn get_alternate_name(&self) -> &Option<Vec<String>>;
16006}
16007impl<'s> serde::Serialize for dyn StoragePortTrait + 's {
16008            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16009            where
16010                S: serde::Serializer,
16011            {
16012                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16013            }
16014        }
16015impl<'de> serde::Deserialize<'de> for Box<dyn StoragePortTrait> {
16016            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16017                deserializer.deserialize_map(StoragePortVisitor)
16018            }
16019        }
16020
16021struct StoragePortVisitor;
16022
16023impl<'de> de::Visitor<'de> for StoragePortVisitor {
16024    type Value = Box<dyn StoragePortTrait>;
16025
16026    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16027        formatter.write_str("a valid StoragePortTrait JSON object with a _typeName field")
16028    }
16029
16030    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16031    where
16032        A: de::MapAccess<'de>,
16033    {
16034        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16035        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16036        match any {
16037            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16038                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16039            VimAny::Value(value) => Err(de::Error::custom(format!(
16040                "expected object not wrapped value: {:?}",
16041                value))),
16042        }
16043    }
16044}
16045
16046impl StoragePortTrait for StoragePort {
16047    fn get_uuid(&self) -> &str { &self.uuid }
16048    fn get_type(&self) -> &str { &self.r#type }
16049    fn get_alternate_name(&self) -> &Option<Vec<String>> { &self.alternate_name }
16050}
16051impl StoragePortTrait for FcStoragePort {
16052    fn get_uuid(&self) -> &str { &self.uuid }
16053    fn get_type(&self) -> &str { &self.r#type }
16054    fn get_alternate_name(&self) -> &Option<Vec<String>> { &self.alternate_name }
16055}
16056impl StoragePortTrait for FcoeStoragePort {
16057    fn get_uuid(&self) -> &str { &self.uuid }
16058    fn get_type(&self) -> &str { &self.r#type }
16059    fn get_alternate_name(&self) -> &Option<Vec<String>> { &self.alternate_name }
16060}
16061impl StoragePortTrait for IscsiStoragePort {
16062    fn get_uuid(&self) -> &str { &self.uuid }
16063    fn get_type(&self) -> &str { &self.r#type }
16064    fn get_alternate_name(&self) -> &Option<Vec<String>> { &self.alternate_name }
16065}
16066impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn StoragePortTrait {
16067    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16068        let data_type = from.data_type();
16069        match data_type {
16070            StructType::StoragePort => Some(from.as_any_ref().downcast_ref::<StoragePort>()?),
16071            StructType::FcStoragePort => Some(from.as_any_ref().downcast_ref::<FcStoragePort>()?),
16072            StructType::FcoeStoragePort => Some(from.as_any_ref().downcast_ref::<FcoeStoragePort>()?),
16073            StructType::IscsiStoragePort => Some(from.as_any_ref().downcast_ref::<IscsiStoragePort>()?),
16074            _ => None,
16075        }
16076    }
16077    
16078    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16079        let data_type = from.data_type();
16080        match data_type {
16081            StructType::StoragePort => Ok(from.as_any_box().downcast::<StoragePort>()?),
16082            StructType::FcStoragePort => Ok(from.as_any_box().downcast::<FcStoragePort>()?),
16083            StructType::FcoeStoragePort => Ok(from.as_any_box().downcast::<FcoeStoragePort>()?),
16084            StructType::IscsiStoragePort => Ok(from.as_any_box().downcast::<IscsiStoragePort>()?),
16085            _ => Err(from.as_any_box()),
16086        }
16087    }
16088}
16089/// Base class that represents a replicated device.
16090/// 
16091/// This structure may be used only with operations rendered under `/sms`.
16092pub trait DeviceIdTrait : super::traits::DataObjectTrait {
16093}
16094impl<'s> serde::Serialize for dyn DeviceIdTrait + 's {
16095            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16096            where
16097                S: serde::Serializer,
16098            {
16099                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16100            }
16101        }
16102impl<'de> serde::Deserialize<'de> for Box<dyn DeviceIdTrait> {
16103            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16104                deserializer.deserialize_map(DeviceIdVisitor)
16105            }
16106        }
16107
16108struct DeviceIdVisitor;
16109
16110impl<'de> de::Visitor<'de> for DeviceIdVisitor {
16111    type Value = Box<dyn DeviceIdTrait>;
16112
16113    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16114        formatter.write_str("a valid DeviceIdTrait JSON object with a _typeName field")
16115    }
16116
16117    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16118    where
16119        A: de::MapAccess<'de>,
16120    {
16121        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16122        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16123        match any {
16124            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16125                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16126            VimAny::Value(value) => Err(de::Error::custom(format!(
16127                "expected object not wrapped value: {:?}",
16128                value))),
16129        }
16130    }
16131}
16132
16133impl DeviceIdTrait for DeviceId {
16134}
16135impl DeviceIdTrait for VVolId {
16136}
16137impl DeviceIdTrait for VasaVirtualDiskId {
16138}
16139impl DeviceIdTrait for VirtualDiskKey {
16140}
16141impl DeviceIdTrait for VirtualDiskMoId {
16142}
16143impl DeviceIdTrait for VirtualMachineId {
16144}
16145impl DeviceIdTrait for VirtualMachineFilePath {
16146}
16147impl DeviceIdTrait for VirtualMachineMoId {
16148}
16149impl DeviceIdTrait for VirtualMachineUuid {
16150}
16151impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DeviceIdTrait {
16152    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16153        let data_type = from.data_type();
16154        match data_type {
16155            StructType::DeviceId => Some(from.as_any_ref().downcast_ref::<DeviceId>()?),
16156            StructType::VVolId => Some(from.as_any_ref().downcast_ref::<VVolId>()?),
16157            StructType::VasaVirtualDiskId => Some(from.as_any_ref().downcast_ref::<VasaVirtualDiskId>()?),
16158            StructType::VirtualDiskKey => Some(from.as_any_ref().downcast_ref::<VirtualDiskKey>()?),
16159            StructType::VirtualDiskMoId => Some(from.as_any_ref().downcast_ref::<VirtualDiskMoId>()?),
16160            StructType::VirtualMachineId => Some(from.as_any_ref().downcast_ref::<VirtualMachineId>()?),
16161            StructType::VirtualMachineFilePath => Some(from.as_any_ref().downcast_ref::<VirtualMachineFilePath>()?),
16162            StructType::VirtualMachineMoId => Some(from.as_any_ref().downcast_ref::<VirtualMachineMoId>()?),
16163            StructType::VirtualMachineUuid => Some(from.as_any_ref().downcast_ref::<VirtualMachineUuid>()?),
16164            _ => None,
16165        }
16166    }
16167    
16168    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16169        let data_type = from.data_type();
16170        match data_type {
16171            StructType::DeviceId => Ok(from.as_any_box().downcast::<DeviceId>()?),
16172            StructType::VVolId => Ok(from.as_any_box().downcast::<VVolId>()?),
16173            StructType::VasaVirtualDiskId => Ok(from.as_any_box().downcast::<VasaVirtualDiskId>()?),
16174            StructType::VirtualDiskKey => Ok(from.as_any_box().downcast::<VirtualDiskKey>()?),
16175            StructType::VirtualDiskMoId => Ok(from.as_any_box().downcast::<VirtualDiskMoId>()?),
16176            StructType::VirtualMachineId => Ok(from.as_any_box().downcast::<VirtualMachineId>()?),
16177            StructType::VirtualMachineFilePath => Ok(from.as_any_box().downcast::<VirtualMachineFilePath>()?),
16178            StructType::VirtualMachineMoId => Ok(from.as_any_box().downcast::<VirtualMachineMoId>()?),
16179            StructType::VirtualMachineUuid => Ok(from.as_any_box().downcast::<VirtualMachineUuid>()?),
16180            _ => Err(from.as_any_box()),
16181        }
16182    }
16183}
16184/// Abstracts the identity of a virtual machine.
16185/// 
16186/// This structure may be used only with operations rendered under `/sms`.
16187pub trait VirtualMachineIdTrait : super::traits::DeviceIdTrait {
16188}
16189impl<'s> serde::Serialize for dyn VirtualMachineIdTrait + 's {
16190            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16191            where
16192                S: serde::Serializer,
16193            {
16194                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16195            }
16196        }
16197impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineIdTrait> {
16198            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16199                deserializer.deserialize_map(VirtualMachineIdVisitor)
16200            }
16201        }
16202
16203struct VirtualMachineIdVisitor;
16204
16205impl<'de> de::Visitor<'de> for VirtualMachineIdVisitor {
16206    type Value = Box<dyn VirtualMachineIdTrait>;
16207
16208    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16209        formatter.write_str("a valid VirtualMachineIdTrait JSON object with a _typeName field")
16210    }
16211
16212    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16213    where
16214        A: de::MapAccess<'de>,
16215    {
16216        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16217        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16218        match any {
16219            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16220                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16221            VimAny::Value(value) => Err(de::Error::custom(format!(
16222                "expected object not wrapped value: {:?}",
16223                value))),
16224        }
16225    }
16226}
16227
16228impl VirtualMachineIdTrait for VirtualMachineId {
16229}
16230impl VirtualMachineIdTrait for VirtualMachineFilePath {
16231}
16232impl VirtualMachineIdTrait for VirtualMachineMoId {
16233}
16234impl VirtualMachineIdTrait for VirtualMachineUuid {
16235}
16236impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineIdTrait {
16237    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16238        let data_type = from.data_type();
16239        match data_type {
16240            StructType::VirtualMachineId => Some(from.as_any_ref().downcast_ref::<VirtualMachineId>()?),
16241            StructType::VirtualMachineFilePath => Some(from.as_any_ref().downcast_ref::<VirtualMachineFilePath>()?),
16242            StructType::VirtualMachineMoId => Some(from.as_any_ref().downcast_ref::<VirtualMachineMoId>()?),
16243            StructType::VirtualMachineUuid => Some(from.as_any_ref().downcast_ref::<VirtualMachineUuid>()?),
16244            _ => None,
16245        }
16246    }
16247    
16248    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16249        let data_type = from.data_type();
16250        match data_type {
16251            StructType::VirtualMachineId => Ok(from.as_any_box().downcast::<VirtualMachineId>()?),
16252            StructType::VirtualMachineFilePath => Ok(from.as_any_box().downcast::<VirtualMachineFilePath>()?),
16253            StructType::VirtualMachineMoId => Ok(from.as_any_box().downcast::<VirtualMachineMoId>()?),
16254            StructType::VirtualMachineUuid => Ok(from.as_any_box().downcast::<VirtualMachineUuid>()?),
16255            _ => Err(from.as_any_box()),
16256        }
16257    }
16258}
16259/// Input to the failover or testFailover methods.
16260/// 
16261/// This structure may be used only with operations rendered under `/sms`.
16262pub trait FailoverParamTrait : super::traits::DataObjectTrait {
16263    /// Whether the failover is a planned failover or not.
16264    /// 
16265    /// Note that testFailover
16266    /// can also be executed in an unplanned mode. When this flag is
16267    /// set to false, the recovery VASA provider must not try to connect
16268    /// to the primary VASA provider during the failover.
16269    fn get_is_planned(&self) -> bool;
16270    /// Do not execute the (test) failover but check if the configuration
16271    /// is correct to execute the (test) failover.
16272    /// 
16273    /// If set to <code>true</code>, the (test)failover result is an array where
16274    /// each element is either *GroupOperationResult* or *GroupErrorResult*.
16275    /// 
16276    /// If set to <code>false</code>, the (test)failover result is an array where
16277    /// each element is either *FailoverSuccessResult* or *GroupErrorResult*.
16278    fn get_check_only(&self) -> bool;
16279    /// The replication groups to failover.
16280    /// 
16281    /// It is OK for the VASA
16282    /// provider to successfully failover only some groups. The
16283    /// groups that did not complete will be retried.
16284    fn get_replication_groups_to_failover(&self) -> &Option<Vec<super::structs::ReplicationGroupData>>;
16285    /// Storage policies for the devices after (test)failover.
16286    /// 
16287    /// Failover should be done even if policies cannot be associated.
16288    /// Test failover, however, should fail if policies cannot be associated.
16289    /// 
16290    /// If policies cannot be associated, VASA provider can notify the client by
16291    /// doing either or both of these:
16292    /// 1\. Set the warning in the result for a replication group to indicate
16293    /// such a failure to set the policy.
16294    /// 2\. Raise a compliance alarm after the failover is done.
16295    /// 
16296    /// If not specified, the default policies are used. Callers may reassign
16297    /// policy later.
16298    fn get_policy_associations(&self) -> &Option<Vec<super::structs::PolicyAssociation>>;
16299}
16300impl<'s> serde::Serialize for dyn FailoverParamTrait + 's {
16301            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16302            where
16303                S: serde::Serializer,
16304            {
16305                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16306            }
16307        }
16308impl<'de> serde::Deserialize<'de> for Box<dyn FailoverParamTrait> {
16309            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16310                deserializer.deserialize_map(FailoverParamVisitor)
16311            }
16312        }
16313
16314struct FailoverParamVisitor;
16315
16316impl<'de> de::Visitor<'de> for FailoverParamVisitor {
16317    type Value = Box<dyn FailoverParamTrait>;
16318
16319    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16320        formatter.write_str("a valid FailoverParamTrait JSON object with a _typeName field")
16321    }
16322
16323    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16324    where
16325        A: de::MapAccess<'de>,
16326    {
16327        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16328        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16329        match any {
16330            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16331                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16332            VimAny::Value(value) => Err(de::Error::custom(format!(
16333                "expected object not wrapped value: {:?}",
16334                value))),
16335        }
16336    }
16337}
16338
16339impl FailoverParamTrait for FailoverParam {
16340    fn get_is_planned(&self) -> bool { self.is_planned }
16341    fn get_check_only(&self) -> bool { self.check_only }
16342    fn get_replication_groups_to_failover(&self) -> &Option<Vec<super::structs::ReplicationGroupData>> { &self.replication_groups_to_failover }
16343    fn get_policy_associations(&self) -> &Option<Vec<super::structs::PolicyAssociation>> { &self.policy_associations }
16344}
16345impl FailoverParamTrait for TestFailoverParam {
16346    fn get_is_planned(&self) -> bool { self.is_planned }
16347    fn get_check_only(&self) -> bool { self.check_only }
16348    fn get_replication_groups_to_failover(&self) -> &Option<Vec<super::structs::ReplicationGroupData>> { &self.replication_groups_to_failover }
16349    fn get_policy_associations(&self) -> &Option<Vec<super::structs::PolicyAssociation>> { &self.policy_associations }
16350}
16351impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FailoverParamTrait {
16352    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16353        let data_type = from.data_type();
16354        match data_type {
16355            StructType::FailoverParam => Some(from.as_any_ref().downcast_ref::<FailoverParam>()?),
16356            StructType::TestFailoverParam => Some(from.as_any_ref().downcast_ref::<TestFailoverParam>()?),
16357            _ => None,
16358        }
16359    }
16360    
16361    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16362        let data_type = from.data_type();
16363        match data_type {
16364            StructType::FailoverParam => Ok(from.as_any_box().downcast::<FailoverParam>()?),
16365            StructType::TestFailoverParam => Ok(from.as_any_box().downcast::<TestFailoverParam>()?),
16366            _ => Err(from.as_any_box()),
16367        }
16368    }
16369}
16370/// Replication group information.
16371/// 
16372/// May be either a *SourceGroupInfo* or
16373/// *TargetGroupInfo*.
16374/// 
16375/// This structure may be used only with operations rendered under `/sms`.
16376pub trait GroupInfoTrait : super::traits::DataObjectTrait {
16377    /// Identifier of the group + fault domain id.
16378    fn get_group_id(&self) -> &super::structs::ReplicationGroupId;
16379}
16380impl<'s> serde::Serialize for dyn GroupInfoTrait + 's {
16381            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16382            where
16383                S: serde::Serializer,
16384            {
16385                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16386            }
16387        }
16388impl<'de> serde::Deserialize<'de> for Box<dyn GroupInfoTrait> {
16389            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16390                deserializer.deserialize_map(GroupInfoVisitor)
16391            }
16392        }
16393
16394struct GroupInfoVisitor;
16395
16396impl<'de> de::Visitor<'de> for GroupInfoVisitor {
16397    type Value = Box<dyn GroupInfoTrait>;
16398
16399    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16400        formatter.write_str("a valid GroupInfoTrait JSON object with a _typeName field")
16401    }
16402
16403    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16404    where
16405        A: de::MapAccess<'de>,
16406    {
16407        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16408        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16409        match any {
16410            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16411                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16412            VimAny::Value(value) => Err(de::Error::custom(format!(
16413                "expected object not wrapped value: {:?}",
16414                value))),
16415        }
16416    }
16417}
16418
16419impl GroupInfoTrait for GroupInfo {
16420    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16421}
16422impl GroupInfoTrait for SourceGroupInfo {
16423    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16424}
16425impl GroupInfoTrait for TargetGroupInfo {
16426    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16427}
16428impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GroupInfoTrait {
16429    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16430        let data_type = from.data_type();
16431        match data_type {
16432            StructType::GroupInfo => Some(from.as_any_ref().downcast_ref::<GroupInfo>()?),
16433            StructType::SourceGroupInfo => Some(from.as_any_ref().downcast_ref::<SourceGroupInfo>()?),
16434            StructType::TargetGroupInfo => Some(from.as_any_ref().downcast_ref::<TargetGroupInfo>()?),
16435            _ => None,
16436        }
16437    }
16438    
16439    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16440        let data_type = from.data_type();
16441        match data_type {
16442            StructType::GroupInfo => Ok(from.as_any_box().downcast::<GroupInfo>()?),
16443            StructType::SourceGroupInfo => Ok(from.as_any_box().downcast::<SourceGroupInfo>()?),
16444            StructType::TargetGroupInfo => Ok(from.as_any_box().downcast::<TargetGroupInfo>()?),
16445            _ => Err(from.as_any_box()),
16446        }
16447    }
16448}
16449/// The base class for any operation on a replication group.
16450/// 
16451/// Usually, there is an
16452/// operation specific &lt;Operation&gt;SuccessResult
16453/// 
16454/// This structure may be used only with operations rendered under `/sms`.
16455pub trait GroupOperationResultTrait : super::traits::DataObjectTrait {
16456    /// Replication group Id.
16457    fn get_group_id(&self) -> &super::structs::ReplicationGroupId;
16458    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>>;
16459}
16460impl<'s> serde::Serialize for dyn GroupOperationResultTrait + 's {
16461            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16462            where
16463                S: serde::Serializer,
16464            {
16465                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16466            }
16467        }
16468impl<'de> serde::Deserialize<'de> for Box<dyn GroupOperationResultTrait> {
16469            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16470                deserializer.deserialize_map(GroupOperationResultVisitor)
16471            }
16472        }
16473
16474struct GroupOperationResultVisitor;
16475
16476impl<'de> de::Visitor<'de> for GroupOperationResultVisitor {
16477    type Value = Box<dyn GroupOperationResultTrait>;
16478
16479    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16480        formatter.write_str("a valid GroupOperationResultTrait JSON object with a _typeName field")
16481    }
16482
16483    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16484    where
16485        A: de::MapAccess<'de>,
16486    {
16487        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16488        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16489        match any {
16490            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16491                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16492            VimAny::Value(value) => Err(de::Error::custom(format!(
16493                "expected object not wrapped value: {:?}",
16494                value))),
16495        }
16496    }
16497}
16498
16499impl GroupOperationResultTrait for GroupOperationResult {
16500    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16501    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16502}
16503impl GroupOperationResultTrait for FailoverSuccessResult {
16504    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16505    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16506}
16507impl GroupOperationResultTrait for GroupErrorResult {
16508    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16509    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16510}
16511impl GroupOperationResultTrait for QueryPointInTimeReplicaSuccessResult {
16512    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16513    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16514}
16515impl GroupOperationResultTrait for QueryPointInTimeReplicaSummaryResult {
16516    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16517    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16518}
16519impl GroupOperationResultTrait for QueryReplicationGroupSuccessResult {
16520    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16521    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16522}
16523impl GroupOperationResultTrait for ReverseReplicationSuccessResult {
16524    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16525    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16526}
16527impl GroupOperationResultTrait for SyncReplicationGroupSuccessResult {
16528    fn get_group_id(&self) -> &super::structs::ReplicationGroupId { &self.group_id }
16529    fn get_warning(&self) -> &Option<Vec<super::structs::MethodFault>> { &self.warning }
16530}
16531impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GroupOperationResultTrait {
16532    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16533        let data_type = from.data_type();
16534        match data_type {
16535            StructType::GroupOperationResult => Some(from.as_any_ref().downcast_ref::<GroupOperationResult>()?),
16536            StructType::FailoverSuccessResult => Some(from.as_any_ref().downcast_ref::<FailoverSuccessResult>()?),
16537            StructType::GroupErrorResult => Some(from.as_any_ref().downcast_ref::<GroupErrorResult>()?),
16538            StructType::QueryPointInTimeReplicaSuccessResult => Some(from.as_any_ref().downcast_ref::<QueryPointInTimeReplicaSuccessResult>()?),
16539            StructType::QueryPointInTimeReplicaSummaryResult => Some(from.as_any_ref().downcast_ref::<QueryPointInTimeReplicaSummaryResult>()?),
16540            StructType::QueryReplicationGroupSuccessResult => Some(from.as_any_ref().downcast_ref::<QueryReplicationGroupSuccessResult>()?),
16541            StructType::ReverseReplicationSuccessResult => Some(from.as_any_ref().downcast_ref::<ReverseReplicationSuccessResult>()?),
16542            StructType::SyncReplicationGroupSuccessResult => Some(from.as_any_ref().downcast_ref::<SyncReplicationGroupSuccessResult>()?),
16543            _ => None,
16544        }
16545    }
16546    
16547    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16548        let data_type = from.data_type();
16549        match data_type {
16550            StructType::GroupOperationResult => Ok(from.as_any_box().downcast::<GroupOperationResult>()?),
16551            StructType::FailoverSuccessResult => Ok(from.as_any_box().downcast::<FailoverSuccessResult>()?),
16552            StructType::GroupErrorResult => Ok(from.as_any_box().downcast::<GroupErrorResult>()?),
16553            StructType::QueryPointInTimeReplicaSuccessResult => Ok(from.as_any_box().downcast::<QueryPointInTimeReplicaSuccessResult>()?),
16554            StructType::QueryPointInTimeReplicaSummaryResult => Ok(from.as_any_box().downcast::<QueryPointInTimeReplicaSummaryResult>()?),
16555            StructType::QueryReplicationGroupSuccessResult => Ok(from.as_any_box().downcast::<QueryReplicationGroupSuccessResult>()?),
16556            StructType::ReverseReplicationSuccessResult => Ok(from.as_any_box().downcast::<ReverseReplicationSuccessResult>()?),
16557            StructType::SyncReplicationGroupSuccessResult => Ok(from.as_any_box().downcast::<SyncReplicationGroupSuccessResult>()?),
16558            _ => Err(from.as_any_box()),
16559        }
16560    }
16561}
16562/// Information about member virtual volumes in a ReplicationGroup
16563/// on the target when the state is *TARGET*.
16564/// 
16565/// This need not include information about all the snapshots in
16566/// the ReplicationGroup.
16567/// 
16568/// This structure may be used only with operations rendered under `/sms`.
16569pub trait TargetGroupMemberInfoTrait : super::traits::DataObjectTrait {
16570    /// Identifier of the replica device.
16571    fn get_replica_id(&self) -> &super::structs::ReplicaId;
16572    /// Source device, since the device id can be the same in all the domains,
16573    /// this needs to supplemented with the domain id to identify the device.
16574    fn get_source_id(&self) -> &Box<dyn super::traits::DeviceIdTrait>;
16575    /// Datastore of the target device.
16576    /// 
16577    /// This may be used by CAM/SRM
16578    /// to notify the administrators to setup access paths for the hosts
16579    /// to access the recovered devices.
16580    /// 
16581    /// Refers instance of *Datastore*.
16582    fn get_target_datastore(&self) -> &super::structs::ManagedObjectReference;
16583}
16584impl<'s> serde::Serialize for dyn TargetGroupMemberInfoTrait + 's {
16585            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16586            where
16587                S: serde::Serializer,
16588            {
16589                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16590            }
16591        }
16592impl<'de> serde::Deserialize<'de> for Box<dyn TargetGroupMemberInfoTrait> {
16593            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16594                deserializer.deserialize_map(TargetGroupMemberInfoVisitor)
16595            }
16596        }
16597
16598struct TargetGroupMemberInfoVisitor;
16599
16600impl<'de> de::Visitor<'de> for TargetGroupMemberInfoVisitor {
16601    type Value = Box<dyn TargetGroupMemberInfoTrait>;
16602
16603    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16604        formatter.write_str("a valid TargetGroupMemberInfoTrait JSON object with a _typeName field")
16605    }
16606
16607    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16608    where
16609        A: de::MapAccess<'de>,
16610    {
16611        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16612        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16613        match any {
16614            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16615                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16616            VimAny::Value(value) => Err(de::Error::custom(format!(
16617                "expected object not wrapped value: {:?}",
16618                value))),
16619        }
16620    }
16621}
16622
16623impl TargetGroupMemberInfoTrait for TargetGroupMemberInfo {
16624    fn get_replica_id(&self) -> &super::structs::ReplicaId { &self.replica_id }
16625    fn get_source_id(&self) -> &Box<dyn super::traits::DeviceIdTrait> { &self.source_id }
16626    fn get_target_datastore(&self) -> &super::structs::ManagedObjectReference { &self.target_datastore }
16627}
16628impl TargetGroupMemberInfoTrait for RecoveredTargetGroupMemberInfo {
16629    fn get_replica_id(&self) -> &super::structs::ReplicaId { &self.replica_id }
16630    fn get_source_id(&self) -> &Box<dyn super::traits::DeviceIdTrait> { &self.source_id }
16631    fn get_target_datastore(&self) -> &super::structs::ManagedObjectReference { &self.target_datastore }
16632}
16633impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn TargetGroupMemberInfoTrait {
16634    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16635        let data_type = from.data_type();
16636        match data_type {
16637            StructType::TargetGroupMemberInfo => Some(from.as_any_ref().downcast_ref::<TargetGroupMemberInfo>()?),
16638            StructType::RecoveredTargetGroupMemberInfo => Some(from.as_any_ref().downcast_ref::<RecoveredTargetGroupMemberInfo>()?),
16639            _ => None,
16640        }
16641    }
16642    
16643    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16644        let data_type = from.data_type();
16645        match data_type {
16646            StructType::TargetGroupMemberInfo => Ok(from.as_any_box().downcast::<TargetGroupMemberInfo>()?),
16647            StructType::RecoveredTargetGroupMemberInfo => Ok(from.as_any_box().downcast::<RecoveredTargetGroupMemberInfo>()?),
16648            _ => Err(from.as_any_box()),
16649        }
16650    }
16651}
16652/// Describes the validation results.
16653pub trait ClusterComputeResourceValidationResultBaseTrait : super::traits::DataObjectTrait {
16654    /// Describes the messages relevant to the validation result
16655    fn get_info(&self) -> &Option<Vec<super::structs::LocalizableMessage>>;
16656}
16657impl<'s> serde::Serialize for dyn ClusterComputeResourceValidationResultBaseTrait + 's {
16658            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16659            where
16660                S: serde::Serializer,
16661            {
16662                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16663            }
16664        }
16665impl<'de> serde::Deserialize<'de> for Box<dyn ClusterComputeResourceValidationResultBaseTrait> {
16666            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16667                deserializer.deserialize_map(ClusterComputeResourceValidationResultBaseVisitor)
16668            }
16669        }
16670
16671struct ClusterComputeResourceValidationResultBaseVisitor;
16672
16673impl<'de> de::Visitor<'de> for ClusterComputeResourceValidationResultBaseVisitor {
16674    type Value = Box<dyn ClusterComputeResourceValidationResultBaseTrait>;
16675
16676    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16677        formatter.write_str("a valid ClusterComputeResourceValidationResultBaseTrait JSON object with a _typeName field")
16678    }
16679
16680    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16681    where
16682        A: de::MapAccess<'de>,
16683    {
16684        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16685        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16686        match any {
16687            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16688                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16689            VimAny::Value(value) => Err(de::Error::custom(format!(
16690                "expected object not wrapped value: {:?}",
16691                value))),
16692        }
16693    }
16694}
16695
16696impl ClusterComputeResourceValidationResultBaseTrait for ClusterComputeResourceValidationResultBase {
16697    fn get_info(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.info }
16698}
16699impl ClusterComputeResourceValidationResultBaseTrait for ClusterComputeResourceDvsConfigurationValidation {
16700    fn get_info(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.info }
16701}
16702impl ClusterComputeResourceValidationResultBaseTrait for ClusterComputeResourceHostConfigurationValidation {
16703    fn get_info(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.info }
16704}
16705impl ClusterComputeResourceValidationResultBaseTrait for VsanClusterConfigPrecheckItem {
16706    fn get_info(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.info }
16707}
16708impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterComputeResourceValidationResultBaseTrait {
16709    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16710        let data_type = from.data_type();
16711        match data_type {
16712            StructType::ClusterComputeResourceValidationResultBase => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceValidationResultBase>()?),
16713            StructType::ClusterComputeResourceDvsConfigurationValidation => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceDvsConfigurationValidation>()?),
16714            StructType::ClusterComputeResourceHostConfigurationValidation => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceHostConfigurationValidation>()?),
16715            StructType::VsanClusterConfigPrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanClusterConfigPrecheckItem>()?),
16716            _ => None,
16717        }
16718    }
16719    
16720    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16721        let data_type = from.data_type();
16722        match data_type {
16723            StructType::ClusterComputeResourceValidationResultBase => Ok(from.as_any_box().downcast::<ClusterComputeResourceValidationResultBase>()?),
16724            StructType::ClusterComputeResourceDvsConfigurationValidation => Ok(from.as_any_box().downcast::<ClusterComputeResourceDvsConfigurationValidation>()?),
16725            StructType::ClusterComputeResourceHostConfigurationValidation => Ok(from.as_any_box().downcast::<ClusterComputeResourceHostConfigurationValidation>()?),
16726            StructType::VsanClusterConfigPrecheckItem => Ok(from.as_any_box().downcast::<VsanClusterConfigPrecheckItem>()?),
16727            _ => Err(from.as_any_box()),
16728        }
16729    }
16730}
16731/// Configuration of the compute resource; applies to both standalone hosts
16732/// and clusters.
16733pub trait ComputeResourceConfigInfoTrait : super::traits::DataObjectTrait {
16734    /// Swapfile placement policy for virtual machines within this compute
16735    /// resource.
16736    /// 
16737    /// Any policy except for "inherit" is a valid value for this
16738    /// property; the default is "vmDirectory". This setting will be honored
16739    /// for each virtual machine within the compute resource for which the
16740    /// following is true:
16741    /// - The virtual machine is executing on a host that has the
16742    ///   *perVmSwapFiles* capability.
16743    /// - The virtual machine configuration's
16744    ///   *swapPlacement* property is set
16745    ///   to "inherit".
16746    ///   
16747    /// See also *VirtualMachineConfigInfoSwapPlacementType_enum*.
16748    fn get_vm_swap_placement(&self) -> &str;
16749    /// Flag indicating whether or not the SPBM(Storage Policy Based Management)
16750    /// feature is enabled on this compute resource
16751    fn get_spbm_enabled(&self) -> Option<bool>;
16752    /// Key for Default Hardware Version used on this compute resource
16753    /// in the format of *VirtualMachineConfigOptionDescriptor.key*.
16754    /// 
16755    /// This field affects
16756    /// *VirtualMachineConfigOptionDescriptor.defaultConfigOption* returned
16757    /// by *ComputeResource.environmentBrowser* of this object and all its children
16758    /// with this field unset.
16759    fn get_default_hardware_version_key(&self) -> &Option<String>;
16760    /// Key for Maximum Hardware Version used on this compute resource
16761    /// in the format of *VirtualMachineConfigOptionDescriptor.key*.
16762    /// 
16763    /// This field affects
16764    /// *VirtualMachineConfigOptionDescriptor.defaultConfigOption* returned
16765    /// by *ComputeResource.environmentBrowser* of this object and all its children
16766    /// with this field unset.
16767    /// 
16768    /// ***Since:*** vSphere API Release 7.0.2.0
16769    fn get_maximum_hardware_version_key(&self) -> &Option<String>;
16770}
16771impl<'s> serde::Serialize for dyn ComputeResourceConfigInfoTrait + 's {
16772            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16773            where
16774                S: serde::Serializer,
16775            {
16776                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16777            }
16778        }
16779impl<'de> serde::Deserialize<'de> for Box<dyn ComputeResourceConfigInfoTrait> {
16780            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16781                deserializer.deserialize_map(ComputeResourceConfigInfoVisitor)
16782            }
16783        }
16784
16785struct ComputeResourceConfigInfoVisitor;
16786
16787impl<'de> de::Visitor<'de> for ComputeResourceConfigInfoVisitor {
16788    type Value = Box<dyn ComputeResourceConfigInfoTrait>;
16789
16790    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16791        formatter.write_str("a valid ComputeResourceConfigInfoTrait JSON object with a _typeName field")
16792    }
16793
16794    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16795    where
16796        A: de::MapAccess<'de>,
16797    {
16798        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16799        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16800        match any {
16801            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16802                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16803            VimAny::Value(value) => Err(de::Error::custom(format!(
16804                "expected object not wrapped value: {:?}",
16805                value))),
16806        }
16807    }
16808}
16809
16810impl ComputeResourceConfigInfoTrait for ComputeResourceConfigInfo {
16811    fn get_vm_swap_placement(&self) -> &str { &self.vm_swap_placement }
16812    fn get_spbm_enabled(&self) -> Option<bool> { self.spbm_enabled }
16813    fn get_default_hardware_version_key(&self) -> &Option<String> { &self.default_hardware_version_key }
16814    fn get_maximum_hardware_version_key(&self) -> &Option<String> { &self.maximum_hardware_version_key }
16815}
16816impl ComputeResourceConfigInfoTrait for ClusterConfigInfoEx {
16817    fn get_vm_swap_placement(&self) -> &str { &self.vm_swap_placement }
16818    fn get_spbm_enabled(&self) -> Option<bool> { self.spbm_enabled }
16819    fn get_default_hardware_version_key(&self) -> &Option<String> { &self.default_hardware_version_key }
16820    fn get_maximum_hardware_version_key(&self) -> &Option<String> { &self.maximum_hardware_version_key }
16821}
16822impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ComputeResourceConfigInfoTrait {
16823    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16824        let data_type = from.data_type();
16825        match data_type {
16826            StructType::ComputeResourceConfigInfo => Some(from.as_any_ref().downcast_ref::<ComputeResourceConfigInfo>()?),
16827            StructType::ClusterConfigInfoEx => Some(from.as_any_ref().downcast_ref::<ClusterConfigInfoEx>()?),
16828            _ => None,
16829        }
16830    }
16831    
16832    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16833        let data_type = from.data_type();
16834        match data_type {
16835            StructType::ComputeResourceConfigInfo => Ok(from.as_any_box().downcast::<ComputeResourceConfigInfo>()?),
16836            StructType::ClusterConfigInfoEx => Ok(from.as_any_box().downcast::<ClusterConfigInfoEx>()?),
16837            _ => Err(from.as_any_box()),
16838        }
16839    }
16840}
16841/// Changes to apply to the compute resource configuration.
16842pub trait ComputeResourceConfigSpecTrait : super::traits::DataObjectTrait {
16843    /// New setting for the swapfile placement policy.
16844    /// 
16845    /// Any change to this
16846    /// policy will affect virtual machines that subsequently power on or
16847    /// resume from a suspended state in this compute resource, or that
16848    /// migrate to a host in this compute resource while powered on; virtual
16849    /// machines that are currently powered on in this compute resource will
16850    /// not yet be affected.
16851    /// 
16852    /// See also *VirtualMachineConfigInfoSwapPlacementType_enum*.
16853    fn get_vm_swap_placement(&self) -> &Option<String>;
16854    /// Flag indicating whether or not the SPBM(Storage Policy Based Management)
16855    /// feature is enabled on this compute resource
16856    fn get_spbm_enabled(&self) -> Option<bool>;
16857    /// Key for Default Hardware Version to be used on this compute resource
16858    /// in the format of *VirtualMachineConfigOptionDescriptor.key*.
16859    /// 
16860    /// Setting this field affects
16861    /// *VirtualMachineConfigOptionDescriptor.defaultConfigOption* returned
16862    /// by *ComputeResource.environmentBrowser* of this object and all its children
16863    /// with this field unset.
16864    fn get_default_hardware_version_key(&self) -> &Option<String>;
16865    /// Desired software spec for the set of physical compute resources.
16866    /// 
16867    /// This
16868    /// parameter is supported in vim.Folder#createClusterEx and
16869    /// vim.Folder#addStandaloneHost operations.
16870    /// If unset, this field will be initialized with the latest base image
16871    /// from the image depot on vSphere version 9.0 and later.
16872    fn get_desired_software_spec(&self) -> &Option<super::structs::DesiredSoftwareSpec>;
16873    /// Key for Maximum Hardware Version to be used on this compute resource
16874    /// in the format of *VirtualMachineConfigOptionDescriptor.key*.
16875    /// 
16876    /// Setting this field affects
16877    /// *VirtualMachineConfigOptionDescriptor.defaultConfigOption* returned
16878    /// by *ComputeResource.environmentBrowser* of this object and all its children
16879    /// with this field unset.
16880    /// 
16881    /// ***Since:*** vSphere API Release 7.0.2.0
16882    fn get_maximum_hardware_version_key(&self) -> &Option<String>;
16883    /// Flag indicating whether or not the vLCM (vSphere Lifecycle Manager)
16884    /// Config Manager feature is enabled on this compute resource.
16885    /// 
16886    /// If the
16887    /// flag is not set, the Config Manager feature will be disabled by
16888    /// default. This parameter is only supported in *Folder.CreateClusterEx*
16889    /// operation.
16890    /// 
16891    /// ***Since:*** vSphere API Release 7.0.3.1
16892    fn get_enable_config_manager(&self) -> Option<bool>;
16893    /// Specification for the host seeding operation.
16894    /// 
16895    /// ***Since:*** vSphere API Release 8.0.3.0
16896    fn get_host_seed_spec(&self) -> &Option<super::structs::ComputeResourceHostSeedSpec>;
16897    /// ID of a software specification from the repository.
16898    /// 
16899    /// This software specification is created in the repository before
16900    /// cluster creation operation or add standalone host operation.
16901    /// This desired state software specification will be applied to the
16902    /// cluster or the standalone host.
16903    /// The lifecycle of the created cluster or the added standalone host
16904    /// will be managed by vLCM.
16905    /// 
16906    /// ***Since:*** vSphere API Release 9.0.0.0
16907    fn get_software_spec_id(&self) -> &Option<String>;
16908    /// Enumeration indicating whether and what kind of netwoork boot mode
16909    /// should be configured for the compute resource.
16910    /// 
16911    /// Supported values are
16912    /// enumerated in *ComputeResourceNetworkBootMode_enum*. If the
16913    /// property is not set not network boot will not be supported by this
16914    /// compute resource.
16915    /// This property is only supported in *Folder.CreateClusterEx*
16916    /// operation.
16917    /// 
16918    /// ***Since:*** vSphere API Release 9.0.0.0
16919    fn get_network_boot_mode(&self) -> &Option<String>;
16920}
16921impl<'s> serde::Serialize for dyn ComputeResourceConfigSpecTrait + 's {
16922            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
16923            where
16924                S: serde::Serializer,
16925            {
16926                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
16927            }
16928        }
16929impl<'de> serde::Deserialize<'de> for Box<dyn ComputeResourceConfigSpecTrait> {
16930            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
16931                deserializer.deserialize_map(ComputeResourceConfigSpecVisitor)
16932            }
16933        }
16934
16935struct ComputeResourceConfigSpecVisitor;
16936
16937impl<'de> de::Visitor<'de> for ComputeResourceConfigSpecVisitor {
16938    type Value = Box<dyn ComputeResourceConfigSpecTrait>;
16939
16940    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16941        formatter.write_str("a valid ComputeResourceConfigSpecTrait JSON object with a _typeName field")
16942    }
16943
16944    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
16945    where
16946        A: de::MapAccess<'de>,
16947    {
16948        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
16949        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
16950        match any {
16951            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
16952                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
16953            VimAny::Value(value) => Err(de::Error::custom(format!(
16954                "expected object not wrapped value: {:?}",
16955                value))),
16956        }
16957    }
16958}
16959
16960impl ComputeResourceConfigSpecTrait for ComputeResourceConfigSpec {
16961    fn get_vm_swap_placement(&self) -> &Option<String> { &self.vm_swap_placement }
16962    fn get_spbm_enabled(&self) -> Option<bool> { self.spbm_enabled }
16963    fn get_default_hardware_version_key(&self) -> &Option<String> { &self.default_hardware_version_key }
16964    fn get_desired_software_spec(&self) -> &Option<super::structs::DesiredSoftwareSpec> { &self.desired_software_spec }
16965    fn get_maximum_hardware_version_key(&self) -> &Option<String> { &self.maximum_hardware_version_key }
16966    fn get_enable_config_manager(&self) -> Option<bool> { self.enable_config_manager }
16967    fn get_host_seed_spec(&self) -> &Option<super::structs::ComputeResourceHostSeedSpec> { &self.host_seed_spec }
16968    fn get_software_spec_id(&self) -> &Option<String> { &self.software_spec_id }
16969    fn get_network_boot_mode(&self) -> &Option<String> { &self.network_boot_mode }
16970}
16971impl ComputeResourceConfigSpecTrait for ClusterConfigSpecEx {
16972    fn get_vm_swap_placement(&self) -> &Option<String> { &self.vm_swap_placement }
16973    fn get_spbm_enabled(&self) -> Option<bool> { self.spbm_enabled }
16974    fn get_default_hardware_version_key(&self) -> &Option<String> { &self.default_hardware_version_key }
16975    fn get_desired_software_spec(&self) -> &Option<super::structs::DesiredSoftwareSpec> { &self.desired_software_spec }
16976    fn get_maximum_hardware_version_key(&self) -> &Option<String> { &self.maximum_hardware_version_key }
16977    fn get_enable_config_manager(&self) -> Option<bool> { self.enable_config_manager }
16978    fn get_host_seed_spec(&self) -> &Option<super::structs::ComputeResourceHostSeedSpec> { &self.host_seed_spec }
16979    fn get_software_spec_id(&self) -> &Option<String> { &self.software_spec_id }
16980    fn get_network_boot_mode(&self) -> &Option<String> { &self.network_boot_mode }
16981}
16982impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ComputeResourceConfigSpecTrait {
16983    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
16984        let data_type = from.data_type();
16985        match data_type {
16986            StructType::ComputeResourceConfigSpec => Some(from.as_any_ref().downcast_ref::<ComputeResourceConfigSpec>()?),
16987            StructType::ClusterConfigSpecEx => Some(from.as_any_ref().downcast_ref::<ClusterConfigSpecEx>()?),
16988            _ => None,
16989        }
16990    }
16991    
16992    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
16993        let data_type = from.data_type();
16994        match data_type {
16995            StructType::ComputeResourceConfigSpec => Ok(from.as_any_box().downcast::<ComputeResourceConfigSpec>()?),
16996            StructType::ClusterConfigSpecEx => Ok(from.as_any_box().downcast::<ClusterConfigSpecEx>()?),
16997            _ => Err(from.as_any_box()),
16998        }
16999    }
17000}
17001/// This data object type encapsulates a typical set of ComputeResource information
17002/// that is useful for list views and summary pages.
17003pub trait ComputeResourceSummaryTrait : super::traits::DataObjectTrait {
17004    /// Aggregated CPU resources of all hosts, in MHz.
17005    fn get_total_cpu(&self) -> i32;
17006    /// Aggregated memory resources of all hosts, in bytes.
17007    fn get_total_memory(&self) -> i64;
17008    /// Number of physical CPU cores.
17009    /// 
17010    /// Physical CPU cores are the processors contained
17011    /// by a CPU package.
17012    fn get_num_cpu_cores(&self) -> i16;
17013    /// Aggregated number of CPU threads.
17014    fn get_num_cpu_threads(&self) -> i16;
17015    /// Effective CPU resources (in MHz) available to run virtual machines.
17016    /// 
17017    /// This is the
17018    /// aggregated effective resource level from all running hosts. Hosts that are in
17019    /// maintenance mode or are unresponsive are not counted. Resources used by the
17020    /// VMware Service Console are not included in the aggregate. This value represents
17021    /// the amount of resources available for the root resource pool for running
17022    /// virtual machines.
17023    fn get_effective_cpu(&self) -> i32;
17024    /// Effective memory resources (in MB) available to run virtual machines.
17025    /// 
17026    /// This is the aggregated effective resource level from all running hosts. Hosts
17027    /// that are in maintenance mode or are unresponsive are not counted.
17028    /// Resources used by the VMware Service Console are not included in the aggregate.
17029    /// This value represents the amount of resources available for the root
17030    /// resource pool for running virtual machines.
17031    fn get_effective_memory(&self) -> i64;
17032    /// Total number of hosts.
17033    fn get_num_hosts(&self) -> i32;
17034    /// Total number of effective hosts.
17035    fn get_num_effective_hosts(&self) -> i32;
17036    /// Overall alarm status.
17037    /// 
17038    /// In releases after vSphere API 5.0, vSphere Servers might not
17039    /// generate property collector update notifications for this property.
17040    /// To obtain the latest value of the property, you can use
17041    /// PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx.
17042    /// If you use the PropertyCollector.WaitForUpdatesEx method, specify
17043    /// an empty string for the version parameter.
17044    /// Since this property is on a DataObject, an update returned by WaitForUpdatesEx may
17045    /// contain values for this property when some other property on the DataObject changes.
17046    /// If this update is a result of a call to WaitForUpdatesEx with a non-empty
17047    /// version parameter, the value for this property may not be current.
17048    fn get_overall_status(&self) -> &super::enums::ManagedEntityStatusEnum;
17049}
17050impl<'s> serde::Serialize for dyn ComputeResourceSummaryTrait + 's {
17051            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17052            where
17053                S: serde::Serializer,
17054            {
17055                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17056            }
17057        }
17058impl<'de> serde::Deserialize<'de> for Box<dyn ComputeResourceSummaryTrait> {
17059            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17060                deserializer.deserialize_map(ComputeResourceSummaryVisitor)
17061            }
17062        }
17063
17064struct ComputeResourceSummaryVisitor;
17065
17066impl<'de> de::Visitor<'de> for ComputeResourceSummaryVisitor {
17067    type Value = Box<dyn ComputeResourceSummaryTrait>;
17068
17069    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17070        formatter.write_str("a valid ComputeResourceSummaryTrait JSON object with a _typeName field")
17071    }
17072
17073    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17074    where
17075        A: de::MapAccess<'de>,
17076    {
17077        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17078        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17079        match any {
17080            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17081                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17082            VimAny::Value(value) => Err(de::Error::custom(format!(
17083                "expected object not wrapped value: {:?}",
17084                value))),
17085        }
17086    }
17087}
17088
17089impl ComputeResourceSummaryTrait for ComputeResourceSummary {
17090    fn get_total_cpu(&self) -> i32 { self.total_cpu }
17091    fn get_total_memory(&self) -> i64 { self.total_memory }
17092    fn get_num_cpu_cores(&self) -> i16 { self.num_cpu_cores }
17093    fn get_num_cpu_threads(&self) -> i16 { self.num_cpu_threads }
17094    fn get_effective_cpu(&self) -> i32 { self.effective_cpu }
17095    fn get_effective_memory(&self) -> i64 { self.effective_memory }
17096    fn get_num_hosts(&self) -> i32 { self.num_hosts }
17097    fn get_num_effective_hosts(&self) -> i32 { self.num_effective_hosts }
17098    fn get_overall_status(&self) -> &super::enums::ManagedEntityStatusEnum { &self.overall_status }
17099}
17100impl ComputeResourceSummaryTrait for ClusterComputeResourceSummary {
17101    fn get_total_cpu(&self) -> i32 { self.total_cpu }
17102    fn get_total_memory(&self) -> i64 { self.total_memory }
17103    fn get_num_cpu_cores(&self) -> i16 { self.num_cpu_cores }
17104    fn get_num_cpu_threads(&self) -> i16 { self.num_cpu_threads }
17105    fn get_effective_cpu(&self) -> i32 { self.effective_cpu }
17106    fn get_effective_memory(&self) -> i64 { self.effective_memory }
17107    fn get_num_hosts(&self) -> i32 { self.num_hosts }
17108    fn get_num_effective_hosts(&self) -> i32 { self.num_effective_hosts }
17109    fn get_overall_status(&self) -> &super::enums::ManagedEntityStatusEnum { &self.overall_status }
17110}
17111impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ComputeResourceSummaryTrait {
17112    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17113        let data_type = from.data_type();
17114        match data_type {
17115            StructType::ComputeResourceSummary => Some(from.as_any_ref().downcast_ref::<ComputeResourceSummary>()?),
17116            StructType::ClusterComputeResourceSummary => Some(from.as_any_ref().downcast_ref::<ClusterComputeResourceSummary>()?),
17117            _ => None,
17118        }
17119    }
17120    
17121    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17122        let data_type = from.data_type();
17123        match data_type {
17124            StructType::ComputeResourceSummary => Ok(from.as_any_box().downcast::<ComputeResourceSummary>()?),
17125            StructType::ClusterComputeResourceSummary => Ok(from.as_any_box().downcast::<ClusterComputeResourceSummary>()?),
17126            _ => Err(from.as_any_box()),
17127        }
17128    }
17129}
17130/// Base type for storing values.
17131pub trait CustomFieldValueTrait : super::traits::DataObjectTrait {
17132    /// The ID of the field to which this value belongs.
17133    fn get_key(&self) -> i32;
17134}
17135impl<'s> serde::Serialize for dyn CustomFieldValueTrait + 's {
17136            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17137            where
17138                S: serde::Serializer,
17139            {
17140                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17141            }
17142        }
17143impl<'de> serde::Deserialize<'de> for Box<dyn CustomFieldValueTrait> {
17144            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17145                deserializer.deserialize_map(CustomFieldValueVisitor)
17146            }
17147        }
17148
17149struct CustomFieldValueVisitor;
17150
17151impl<'de> de::Visitor<'de> for CustomFieldValueVisitor {
17152    type Value = Box<dyn CustomFieldValueTrait>;
17153
17154    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17155        formatter.write_str("a valid CustomFieldValueTrait JSON object with a _typeName field")
17156    }
17157
17158    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17159    where
17160        A: de::MapAccess<'de>,
17161    {
17162        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17163        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17164        match any {
17165            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17166                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17167            VimAny::Value(value) => Err(de::Error::custom(format!(
17168                "expected object not wrapped value: {:?}",
17169                value))),
17170        }
17171    }
17172}
17173
17174impl CustomFieldValueTrait for CustomFieldValue {
17175    fn get_key(&self) -> i32 { self.key }
17176}
17177impl CustomFieldValueTrait for CustomFieldStringValue {
17178    fn get_key(&self) -> i32 { self.key }
17179}
17180impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomFieldValueTrait {
17181    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17182        let data_type = from.data_type();
17183        match data_type {
17184            StructType::CustomFieldValue => Some(from.as_any_ref().downcast_ref::<CustomFieldValue>()?),
17185            StructType::CustomFieldStringValue => Some(from.as_any_ref().downcast_ref::<CustomFieldStringValue>()?),
17186            _ => None,
17187        }
17188    }
17189    
17190    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17191        let data_type = from.data_type();
17192        match data_type {
17193            StructType::CustomFieldValue => Ok(from.as_any_box().downcast::<CustomFieldValue>()?),
17194            StructType::CustomFieldStringValue => Ok(from.as_any_box().downcast::<CustomFieldStringValue>()?),
17195            _ => Err(from.as_any_box()),
17196        }
17197    }
17198}
17199/// Detailed information about a datastore.
17200/// 
17201/// This is a base type for derived types
17202/// that have more specific details about a datastore.
17203/// 
17204/// See also *HostVmfsVolume*, *HostNasVolume*, *HostLocalFileSystemVolume*.
17205pub trait DatastoreInfoTrait : super::traits::DataObjectTrait {
17206    /// The name of the datastore.
17207    fn get_name(&self) -> &str;
17208    /// The unique locator for the datastore.
17209    fn get_url(&self) -> &str;
17210    /// Free space of this datastore, in bytes.
17211    /// 
17212    /// The server periodically updates this
17213    /// value. It can be explicitly refreshed with the Refresh operation.
17214    fn get_free_space(&self) -> i64;
17215    /// The maximum size of a file that can reside on this file system volume.
17216    fn get_max_file_size(&self) -> i64;
17217    /// The maximum capacity of a virtual disk which can be created on this volume.
17218    fn get_max_virtual_disk_capacity(&self) -> Option<i64>;
17219    /// The maximum size of a snapshot or a swap file that can reside on this file system volume.
17220    fn get_max_memory_file_size(&self) -> i64;
17221    /// Time when the free-space and capacity values in *DatastoreInfo* and
17222    /// *DatastoreSummary* were updated.
17223    fn get_timestamp(&self) -> &Option<String>;
17224    /// The unique container ID of the datastore, if applicable.
17225    fn get_container_id(&self) -> &Option<String>;
17226    /// vSAN datastore container that this datastore is alias of.
17227    /// 
17228    /// If this
17229    /// field is unset then this datastore is not alias of any other vSAN
17230    /// datastore.
17231    /// See *DatastoreInfo.containerId*.
17232    fn get_alias_of(&self) -> &Option<String>;
17233    /// A list of virtual disk format type which can be supported
17234    /// on that datastore.
17235    /// 
17236    /// Supported values are *native_512* and
17237    /// *native_4k*.
17238    /// 
17239    /// ***Since:*** vSphere API Release 9.0.0.0
17240    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>>;
17241    /// The logical sector size of the datastore.
17242    /// 
17243    /// If not set,
17244    /// the default is 512 bytes.
17245    /// 
17246    /// ***Since:*** vSphere API Release 9.0.0.0
17247    fn get_logical_sector_size(&self) -> Option<i32>;
17248    /// The physical sector size of the datastore.
17249    /// 
17250    /// If not set,
17251    /// the default is 512 bytes.
17252    /// 
17253    /// ***Since:*** vSphere API Release 9.0.0.0
17254    fn get_physical_sector_size(&self) -> Option<i32>;
17255}
17256impl<'s> serde::Serialize for dyn DatastoreInfoTrait + 's {
17257            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17258            where
17259                S: serde::Serializer,
17260            {
17261                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17262            }
17263        }
17264impl<'de> serde::Deserialize<'de> for Box<dyn DatastoreInfoTrait> {
17265            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17266                deserializer.deserialize_map(DatastoreInfoVisitor)
17267            }
17268        }
17269
17270struct DatastoreInfoVisitor;
17271
17272impl<'de> de::Visitor<'de> for DatastoreInfoVisitor {
17273    type Value = Box<dyn DatastoreInfoTrait>;
17274
17275    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17276        formatter.write_str("a valid DatastoreInfoTrait JSON object with a _typeName field")
17277    }
17278
17279    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17280    where
17281        A: de::MapAccess<'de>,
17282    {
17283        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17284        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17285        match any {
17286            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17287                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17288            VimAny::Value(value) => Err(de::Error::custom(format!(
17289                "expected object not wrapped value: {:?}",
17290                value))),
17291        }
17292    }
17293}
17294
17295impl DatastoreInfoTrait for DatastoreInfo {
17296    fn get_name(&self) -> &str { &self.name }
17297    fn get_url(&self) -> &str { &self.url }
17298    fn get_free_space(&self) -> i64 { self.free_space }
17299    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17300    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17301    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17302    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17303    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17304    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17305    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17306    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17307    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17308}
17309impl DatastoreInfoTrait for LocalDatastoreInfo {
17310    fn get_name(&self) -> &str { &self.name }
17311    fn get_url(&self) -> &str { &self.url }
17312    fn get_free_space(&self) -> i64 { self.free_space }
17313    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17314    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17315    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17316    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17317    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17318    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17319    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17320    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17321    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17322}
17323impl DatastoreInfoTrait for NasDatastoreInfo {
17324    fn get_name(&self) -> &str { &self.name }
17325    fn get_url(&self) -> &str { &self.url }
17326    fn get_free_space(&self) -> i64 { self.free_space }
17327    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17328    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17329    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17330    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17331    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17332    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17333    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17334    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17335    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17336}
17337impl DatastoreInfoTrait for PMemDatastoreInfo {
17338    fn get_name(&self) -> &str { &self.name }
17339    fn get_url(&self) -> &str { &self.url }
17340    fn get_free_space(&self) -> i64 { self.free_space }
17341    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17342    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17343    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17344    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17345    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17346    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17347    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17348    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17349    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17350}
17351impl DatastoreInfoTrait for VmfsDatastoreInfo {
17352    fn get_name(&self) -> &str { &self.name }
17353    fn get_url(&self) -> &str { &self.url }
17354    fn get_free_space(&self) -> i64 { self.free_space }
17355    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17356    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17357    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17358    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17359    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17360    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17361    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17362    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17363    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17364}
17365impl DatastoreInfoTrait for VsanDatastoreInfo {
17366    fn get_name(&self) -> &str { &self.name }
17367    fn get_url(&self) -> &str { &self.url }
17368    fn get_free_space(&self) -> i64 { self.free_space }
17369    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17370    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17371    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17372    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17373    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17374    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17375    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17376    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17377    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17378}
17379impl DatastoreInfoTrait for VvolDatastoreInfo {
17380    fn get_name(&self) -> &str { &self.name }
17381    fn get_url(&self) -> &str { &self.url }
17382    fn get_free_space(&self) -> i64 { self.free_space }
17383    fn get_max_file_size(&self) -> i64 { self.max_file_size }
17384    fn get_max_virtual_disk_capacity(&self) -> Option<i64> { self.max_virtual_disk_capacity }
17385    fn get_max_memory_file_size(&self) -> i64 { self.max_memory_file_size }
17386    fn get_timestamp(&self) -> &Option<String> { &self.timestamp }
17387    fn get_container_id(&self) -> &Option<String> { &self.container_id }
17388    fn get_alias_of(&self) -> &Option<String> { &self.alias_of }
17389    fn get_supported_v_disk_formats(&self) -> &Option<Vec<String>> { &self.supported_v_disk_formats }
17390    fn get_logical_sector_size(&self) -> Option<i32> { self.logical_sector_size }
17391    fn get_physical_sector_size(&self) -> Option<i32> { self.physical_sector_size }
17392}
17393impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DatastoreInfoTrait {
17394    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17395        let data_type = from.data_type();
17396        match data_type {
17397            StructType::DatastoreInfo => Some(from.as_any_ref().downcast_ref::<DatastoreInfo>()?),
17398            StructType::LocalDatastoreInfo => Some(from.as_any_ref().downcast_ref::<LocalDatastoreInfo>()?),
17399            StructType::NasDatastoreInfo => Some(from.as_any_ref().downcast_ref::<NasDatastoreInfo>()?),
17400            StructType::PMemDatastoreInfo => Some(from.as_any_ref().downcast_ref::<PMemDatastoreInfo>()?),
17401            StructType::VmfsDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreInfo>()?),
17402            StructType::VsanDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VsanDatastoreInfo>()?),
17403            StructType::VvolDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VvolDatastoreInfo>()?),
17404            _ => None,
17405        }
17406    }
17407    
17408    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17409        let data_type = from.data_type();
17410        match data_type {
17411            StructType::DatastoreInfo => Ok(from.as_any_box().downcast::<DatastoreInfo>()?),
17412            StructType::LocalDatastoreInfo => Ok(from.as_any_box().downcast::<LocalDatastoreInfo>()?),
17413            StructType::NasDatastoreInfo => Ok(from.as_any_box().downcast::<NasDatastoreInfo>()?),
17414            StructType::PMemDatastoreInfo => Ok(from.as_any_box().downcast::<PMemDatastoreInfo>()?),
17415            StructType::VmfsDatastoreInfo => Ok(from.as_any_box().downcast::<VmfsDatastoreInfo>()?),
17416            StructType::VsanDatastoreInfo => Ok(from.as_any_box().downcast::<VsanDatastoreInfo>()?),
17417            StructType::VvolDatastoreInfo => Ok(from.as_any_box().downcast::<VvolDatastoreInfo>()?),
17418            _ => Err(from.as_any_box()),
17419        }
17420    }
17421}
17422/// Static strings used for describing an object or property.
17423pub trait DescriptionTrait : super::traits::DataObjectTrait {
17424    /// Display label.
17425    fn get_label(&self) -> &str;
17426    /// Summary description.
17427    fn get_summary(&self) -> &str;
17428}
17429impl<'s> serde::Serialize for dyn DescriptionTrait + 's {
17430            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17431            where
17432                S: serde::Serializer,
17433            {
17434                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17435            }
17436        }
17437impl<'de> serde::Deserialize<'de> for Box<dyn DescriptionTrait> {
17438            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17439                deserializer.deserialize_map(DescriptionVisitor)
17440            }
17441        }
17442
17443struct DescriptionVisitor;
17444
17445impl<'de> de::Visitor<'de> for DescriptionVisitor {
17446    type Value = Box<dyn DescriptionTrait>;
17447
17448    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17449        formatter.write_str("a valid DescriptionTrait JSON object with a _typeName field")
17450    }
17451
17452    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17453    where
17454        A: de::MapAccess<'de>,
17455    {
17456        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17457        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17458        match any {
17459            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17460                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17461            VimAny::Value(value) => Err(de::Error::custom(format!(
17462                "expected object not wrapped value: {:?}",
17463                value))),
17464        }
17465    }
17466}
17467
17468impl DescriptionTrait for Description {
17469    fn get_label(&self) -> &str { &self.label }
17470    fn get_summary(&self) -> &str { &self.summary }
17471}
17472impl DescriptionTrait for ElementDescription {
17473    fn get_label(&self) -> &str { &self.label }
17474    fn get_summary(&self) -> &str { &self.summary }
17475}
17476impl DescriptionTrait for EvcMode {
17477    fn get_label(&self) -> &str { &self.label }
17478    fn get_summary(&self) -> &str { &self.summary }
17479}
17480impl DescriptionTrait for ExtendedElementDescription {
17481    fn get_label(&self) -> &str { &self.label }
17482    fn get_summary(&self) -> &str { &self.summary }
17483}
17484impl DescriptionTrait for FeatureEvcMode {
17485    fn get_label(&self) -> &str { &self.label }
17486    fn get_summary(&self) -> &str { &self.summary }
17487}
17488impl DescriptionTrait for OptionDef {
17489    fn get_label(&self) -> &str { &self.label }
17490    fn get_summary(&self) -> &str { &self.summary }
17491}
17492impl DescriptionTrait for ExtendedDescription {
17493    fn get_label(&self) -> &str { &self.label }
17494    fn get_summary(&self) -> &str { &self.summary }
17495}
17496impl DescriptionTrait for MethodDescription {
17497    fn get_label(&self) -> &str { &self.label }
17498    fn get_summary(&self) -> &str { &self.summary }
17499}
17500impl DescriptionTrait for TypeDescription {
17501    fn get_label(&self) -> &str { &self.label }
17502    fn get_summary(&self) -> &str { &self.summary }
17503}
17504impl DescriptionTrait for ScheduledTaskDetail {
17505    fn get_label(&self) -> &str { &self.label }
17506    fn get_summary(&self) -> &str { &self.summary }
17507}
17508impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DescriptionTrait {
17509    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17510        let data_type = from.data_type();
17511        match data_type {
17512            StructType::Description => Some(from.as_any_ref().downcast_ref::<Description>()?),
17513            StructType::ElementDescription => Some(from.as_any_ref().downcast_ref::<ElementDescription>()?),
17514            StructType::EvcMode => Some(from.as_any_ref().downcast_ref::<EvcMode>()?),
17515            StructType::ExtendedElementDescription => Some(from.as_any_ref().downcast_ref::<ExtendedElementDescription>()?),
17516            StructType::FeatureEvcMode => Some(from.as_any_ref().downcast_ref::<FeatureEvcMode>()?),
17517            StructType::OptionDef => Some(from.as_any_ref().downcast_ref::<OptionDef>()?),
17518            StructType::ExtendedDescription => Some(from.as_any_ref().downcast_ref::<ExtendedDescription>()?),
17519            StructType::MethodDescription => Some(from.as_any_ref().downcast_ref::<MethodDescription>()?),
17520            StructType::TypeDescription => Some(from.as_any_ref().downcast_ref::<TypeDescription>()?),
17521            StructType::ScheduledTaskDetail => Some(from.as_any_ref().downcast_ref::<ScheduledTaskDetail>()?),
17522            _ => None,
17523        }
17524    }
17525    
17526    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17527        let data_type = from.data_type();
17528        match data_type {
17529            StructType::Description => Ok(from.as_any_box().downcast::<Description>()?),
17530            StructType::ElementDescription => Ok(from.as_any_box().downcast::<ElementDescription>()?),
17531            StructType::EvcMode => Ok(from.as_any_box().downcast::<EvcMode>()?),
17532            StructType::ExtendedElementDescription => Ok(from.as_any_box().downcast::<ExtendedElementDescription>()?),
17533            StructType::FeatureEvcMode => Ok(from.as_any_box().downcast::<FeatureEvcMode>()?),
17534            StructType::OptionDef => Ok(from.as_any_box().downcast::<OptionDef>()?),
17535            StructType::ExtendedDescription => Ok(from.as_any_box().downcast::<ExtendedDescription>()?),
17536            StructType::MethodDescription => Ok(from.as_any_box().downcast::<MethodDescription>()?),
17537            StructType::TypeDescription => Ok(from.as_any_box().downcast::<TypeDescription>()?),
17538            StructType::ScheduledTaskDetail => Ok(from.as_any_box().downcast::<ScheduledTaskDetail>()?),
17539            _ => Err(from.as_any_box()),
17540        }
17541    }
17542}
17543/// Static strings used for describing an object model string or enumeration.
17544pub trait ElementDescriptionTrait : super::traits::DescriptionTrait {
17545    /// Enumeration or literal ID being described.
17546    fn get_key(&self) -> &str;
17547}
17548impl<'s> serde::Serialize for dyn ElementDescriptionTrait + 's {
17549            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17550            where
17551                S: serde::Serializer,
17552            {
17553                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17554            }
17555        }
17556impl<'de> serde::Deserialize<'de> for Box<dyn ElementDescriptionTrait> {
17557            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17558                deserializer.deserialize_map(ElementDescriptionVisitor)
17559            }
17560        }
17561
17562struct ElementDescriptionVisitor;
17563
17564impl<'de> de::Visitor<'de> for ElementDescriptionVisitor {
17565    type Value = Box<dyn ElementDescriptionTrait>;
17566
17567    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17568        formatter.write_str("a valid ElementDescriptionTrait JSON object with a _typeName field")
17569    }
17570
17571    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17572    where
17573        A: de::MapAccess<'de>,
17574    {
17575        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17576        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17577        match any {
17578            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17579                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17580            VimAny::Value(value) => Err(de::Error::custom(format!(
17581                "expected object not wrapped value: {:?}",
17582                value))),
17583        }
17584    }
17585}
17586
17587impl ElementDescriptionTrait for ElementDescription {
17588    fn get_key(&self) -> &str { &self.key }
17589}
17590impl ElementDescriptionTrait for EvcMode {
17591    fn get_key(&self) -> &str { &self.key }
17592}
17593impl ElementDescriptionTrait for ExtendedElementDescription {
17594    fn get_key(&self) -> &str { &self.key }
17595}
17596impl ElementDescriptionTrait for FeatureEvcMode {
17597    fn get_key(&self) -> &str { &self.key }
17598}
17599impl ElementDescriptionTrait for OptionDef {
17600    fn get_key(&self) -> &str { &self.key }
17601}
17602impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ElementDescriptionTrait {
17603    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17604        let data_type = from.data_type();
17605        match data_type {
17606            StructType::ElementDescription => Some(from.as_any_ref().downcast_ref::<ElementDescription>()?),
17607            StructType::EvcMode => Some(from.as_any_ref().downcast_ref::<EvcMode>()?),
17608            StructType::ExtendedElementDescription => Some(from.as_any_ref().downcast_ref::<ExtendedElementDescription>()?),
17609            StructType::FeatureEvcMode => Some(from.as_any_ref().downcast_ref::<FeatureEvcMode>()?),
17610            StructType::OptionDef => Some(from.as_any_ref().downcast_ref::<OptionDef>()?),
17611            _ => None,
17612        }
17613    }
17614    
17615    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17616        let data_type = from.data_type();
17617        match data_type {
17618            StructType::ElementDescription => Ok(from.as_any_box().downcast::<ElementDescription>()?),
17619            StructType::EvcMode => Ok(from.as_any_box().downcast::<EvcMode>()?),
17620            StructType::ExtendedElementDescription => Ok(from.as_any_box().downcast::<ExtendedElementDescription>()?),
17621            StructType::FeatureEvcMode => Ok(from.as_any_box().downcast::<FeatureEvcMode>()?),
17622            StructType::OptionDef => Ok(from.as_any_box().downcast::<OptionDef>()?),
17623            _ => Err(from.as_any_box()),
17624        }
17625    }
17626}
17627/// Static strings used for describing an object type.
17628pub trait TypeDescriptionTrait : super::traits::DescriptionTrait {
17629    /// Type being described
17630    fn get_key(&self) -> &str;
17631}
17632impl<'s> serde::Serialize for dyn TypeDescriptionTrait + 's {
17633            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17634            where
17635                S: serde::Serializer,
17636            {
17637                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17638            }
17639        }
17640impl<'de> serde::Deserialize<'de> for Box<dyn TypeDescriptionTrait> {
17641            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17642                deserializer.deserialize_map(TypeDescriptionVisitor)
17643            }
17644        }
17645
17646struct TypeDescriptionVisitor;
17647
17648impl<'de> de::Visitor<'de> for TypeDescriptionVisitor {
17649    type Value = Box<dyn TypeDescriptionTrait>;
17650
17651    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17652        formatter.write_str("a valid TypeDescriptionTrait JSON object with a _typeName field")
17653    }
17654
17655    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17656    where
17657        A: de::MapAccess<'de>,
17658    {
17659        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17660        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17661        match any {
17662            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17663                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17664            VimAny::Value(value) => Err(de::Error::custom(format!(
17665                "expected object not wrapped value: {:?}",
17666                value))),
17667        }
17668    }
17669}
17670
17671impl TypeDescriptionTrait for TypeDescription {
17672    fn get_key(&self) -> &str { &self.key }
17673}
17674impl TypeDescriptionTrait for ScheduledTaskDetail {
17675    fn get_key(&self) -> &str { &self.key }
17676}
17677impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn TypeDescriptionTrait {
17678    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17679        let data_type = from.data_type();
17680        match data_type {
17681            StructType::TypeDescription => Some(from.as_any_ref().downcast_ref::<TypeDescription>()?),
17682            StructType::ScheduledTaskDetail => Some(from.as_any_ref().downcast_ref::<ScheduledTaskDetail>()?),
17683            _ => None,
17684        }
17685    }
17686    
17687    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17688        let data_type = from.data_type();
17689        match data_type {
17690            StructType::TypeDescription => Ok(from.as_any_box().downcast::<TypeDescription>()?),
17691            StructType::ScheduledTaskDetail => Ok(from.as_any_box().downcast::<ScheduledTaskDetail>()?),
17692            _ => Err(from.as_any_box()),
17693        }
17694    }
17695}
17696/// Base specification describing information about a DirectPath profile
17697/// for which capacity needs to be queried using
17698/// *DirectPathProfileManager.DirectPathProfileManagerQueryCapacity*.
17699/// 
17700/// ***Since:*** vSphere API Release 9.0.0.0
17701pub trait DirectPathProfileManagerCapacityQuerySpecTrait : super::traits::DataObjectTrait {
17702}
17703impl<'s> serde::Serialize for dyn DirectPathProfileManagerCapacityQuerySpecTrait + 's {
17704            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17705            where
17706                S: serde::Serializer,
17707            {
17708                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17709            }
17710        }
17711impl<'de> serde::Deserialize<'de> for Box<dyn DirectPathProfileManagerCapacityQuerySpecTrait> {
17712            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17713                deserializer.deserialize_map(DirectPathProfileManagerCapacityQuerySpecVisitor)
17714            }
17715        }
17716
17717struct DirectPathProfileManagerCapacityQuerySpecVisitor;
17718
17719impl<'de> de::Visitor<'de> for DirectPathProfileManagerCapacityQuerySpecVisitor {
17720    type Value = Box<dyn DirectPathProfileManagerCapacityQuerySpecTrait>;
17721
17722    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17723        formatter.write_str("a valid DirectPathProfileManagerCapacityQuerySpecTrait JSON object with a _typeName field")
17724    }
17725
17726    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17727    where
17728        A: de::MapAccess<'de>,
17729    {
17730        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17731        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17732        match any {
17733            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17734                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17735            VimAny::Value(value) => Err(de::Error::custom(format!(
17736                "expected object not wrapped value: {:?}",
17737                value))),
17738        }
17739    }
17740}
17741
17742impl DirectPathProfileManagerCapacityQuerySpecTrait for DirectPathProfileManagerCapacityQuerySpec {
17743}
17744impl DirectPathProfileManagerCapacityQuerySpecTrait for DirectPathProfileManagerCapacityQueryByDeviceConfig {
17745}
17746impl DirectPathProfileManagerCapacityQuerySpecTrait for DirectPathProfileManagerCapacityQueryById {
17747}
17748impl DirectPathProfileManagerCapacityQuerySpecTrait for DirectPathProfileManagerCapacityQueryByName {
17749}
17750impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DirectPathProfileManagerCapacityQuerySpecTrait {
17751    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17752        let data_type = from.data_type();
17753        match data_type {
17754            StructType::DirectPathProfileManagerCapacityQuerySpec => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQuerySpec>()?),
17755            StructType::DirectPathProfileManagerCapacityQueryByDeviceConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryByDeviceConfig>()?),
17756            StructType::DirectPathProfileManagerCapacityQueryById => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryById>()?),
17757            StructType::DirectPathProfileManagerCapacityQueryByName => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityQueryByName>()?),
17758            _ => None,
17759        }
17760    }
17761    
17762    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17763        let data_type = from.data_type();
17764        match data_type {
17765            StructType::DirectPathProfileManagerCapacityQuerySpec => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQuerySpec>()?),
17766            StructType::DirectPathProfileManagerCapacityQueryByDeviceConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryByDeviceConfig>()?),
17767            StructType::DirectPathProfileManagerCapacityQueryById => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryById>()?),
17768            StructType::DirectPathProfileManagerCapacityQueryByName => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityQueryByName>()?),
17769            _ => Err(from.as_any_box()),
17770        }
17771    }
17772}
17773/// Base specification for capacity query result returned from
17774/// *DirectPathProfileManager.DirectPathProfileManagerQueryCapacity*.
17775/// 
17776/// Each of the result object
17777/// corresponds to each of the specification described in
17778/// *DirectPathProfileManagerCapacityQuerySpec*.
17779/// 
17780/// ***Since:*** vSphere API Release 9.0.0.0
17781pub trait DirectPathProfileManagerCapacityResultTrait : super::traits::DataObjectTrait {
17782}
17783impl<'s> serde::Serialize for dyn DirectPathProfileManagerCapacityResultTrait + 's {
17784            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17785            where
17786                S: serde::Serializer,
17787            {
17788                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17789            }
17790        }
17791impl<'de> serde::Deserialize<'de> for Box<dyn DirectPathProfileManagerCapacityResultTrait> {
17792            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17793                deserializer.deserialize_map(DirectPathProfileManagerCapacityResultVisitor)
17794            }
17795        }
17796
17797struct DirectPathProfileManagerCapacityResultVisitor;
17798
17799impl<'de> de::Visitor<'de> for DirectPathProfileManagerCapacityResultVisitor {
17800    type Value = Box<dyn DirectPathProfileManagerCapacityResultTrait>;
17801
17802    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17803        formatter.write_str("a valid DirectPathProfileManagerCapacityResultTrait JSON object with a _typeName field")
17804    }
17805
17806    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17807    where
17808        A: de::MapAccess<'de>,
17809    {
17810        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17811        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17812        match any {
17813            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17814                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17815            VimAny::Value(value) => Err(de::Error::custom(format!(
17816                "expected object not wrapped value: {:?}",
17817                value))),
17818        }
17819    }
17820}
17821
17822impl DirectPathProfileManagerCapacityResultTrait for DirectPathProfileManagerCapacityResult {
17823}
17824impl DirectPathProfileManagerCapacityResultTrait for DirectPathProfileManagerCapacityInfo {
17825}
17826impl DirectPathProfileManagerCapacityResultTrait for DirectPathProfileManagerCapacityUnknown {
17827}
17828impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DirectPathProfileManagerCapacityResultTrait {
17829    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17830        let data_type = from.data_type();
17831        match data_type {
17832            StructType::DirectPathProfileManagerCapacityResult => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityResult>()?),
17833            StructType::DirectPathProfileManagerCapacityInfo => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityInfo>()?),
17834            StructType::DirectPathProfileManagerCapacityUnknown => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerCapacityUnknown>()?),
17835            _ => None,
17836        }
17837    }
17838    
17839    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17840        let data_type = from.data_type();
17841        match data_type {
17842            StructType::DirectPathProfileManagerCapacityResult => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityResult>()?),
17843            StructType::DirectPathProfileManagerCapacityInfo => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityInfo>()?),
17844            StructType::DirectPathProfileManagerCapacityUnknown => Ok(from.as_any_box().downcast::<DirectPathProfileManagerCapacityUnknown>()?),
17845            _ => Err(from.as_any_box()),
17846        }
17847    }
17848}
17849/// Base configuration of a DirectPath device.
17850/// 
17851/// This contains the information
17852/// about a DirectPath device that is needed for representing the device via
17853/// a DirectPath profile. A DirectPath device can be of different sub-types.
17854/// Each sub-type extends from this base configuration and further defines
17855/// its own properties.
17856/// 
17857/// ***Since:*** vSphere API Release 9.0.0.0
17858pub trait DirectPathProfileManagerDirectPathConfigTrait : super::traits::DataObjectTrait {
17859}
17860impl<'s> serde::Serialize for dyn DirectPathProfileManagerDirectPathConfigTrait + 's {
17861            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17862            where
17863                S: serde::Serializer,
17864            {
17865                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17866            }
17867        }
17868impl<'de> serde::Deserialize<'de> for Box<dyn DirectPathProfileManagerDirectPathConfigTrait> {
17869            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17870                deserializer.deserialize_map(DirectPathProfileManagerDirectPathConfigVisitor)
17871            }
17872        }
17873
17874struct DirectPathProfileManagerDirectPathConfigVisitor;
17875
17876impl<'de> de::Visitor<'de> for DirectPathProfileManagerDirectPathConfigVisitor {
17877    type Value = Box<dyn DirectPathProfileManagerDirectPathConfigTrait>;
17878
17879    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17880        formatter.write_str("a valid DirectPathProfileManagerDirectPathConfigTrait JSON object with a _typeName field")
17881    }
17882
17883    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17884    where
17885        A: de::MapAccess<'de>,
17886    {
17887        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17888        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17889        match any {
17890            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17891                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17892            VimAny::Value(value) => Err(de::Error::custom(format!(
17893                "expected object not wrapped value: {:?}",
17894                value))),
17895        }
17896    }
17897}
17898
17899impl DirectPathProfileManagerDirectPathConfigTrait for DirectPathProfileManagerDirectPathConfig {
17900}
17901impl DirectPathProfileManagerDirectPathConfigTrait for DirectPathProfileManagerDvxDirectPathConfig {
17902}
17903impl DirectPathProfileManagerDirectPathConfigTrait for DirectPathProfileManagerDynamicDirectPathConfig {
17904}
17905impl DirectPathProfileManagerDirectPathConfigTrait for DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig {
17906}
17907impl DirectPathProfileManagerDirectPathConfigTrait for DirectPathProfileManagerVmiopDirectPathConfig {
17908}
17909impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DirectPathProfileManagerDirectPathConfigTrait {
17910    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17911        let data_type = from.data_type();
17912        match data_type {
17913            StructType::DirectPathProfileManagerDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDirectPathConfig>()?),
17914            StructType::DirectPathProfileManagerDvxDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDvxDirectPathConfig>()?),
17915            StructType::DirectPathProfileManagerDynamicDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerDynamicDirectPathConfig>()?),
17916            StructType::DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig>()?),
17917            StructType::DirectPathProfileManagerVmiopDirectPathConfig => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerVmiopDirectPathConfig>()?),
17918            _ => None,
17919        }
17920    }
17921    
17922    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17923        let data_type = from.data_type();
17924        match data_type {
17925            StructType::DirectPathProfileManagerDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDirectPathConfig>()?),
17926            StructType::DirectPathProfileManagerDvxDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDvxDirectPathConfig>()?),
17927            StructType::DirectPathProfileManagerDynamicDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerDynamicDirectPathConfig>()?),
17928            StructType::DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerVirtualDeviceGroupDirectPathConfig>()?),
17929            StructType::DirectPathProfileManagerVmiopDirectPathConfig => Ok(from.as_any_box().downcast::<DirectPathProfileManagerVmiopDirectPathConfig>()?),
17930            _ => Err(from.as_any_box()),
17931        }
17932    }
17933}
17934/// Base specification describing the target entity against which the
17935/// capacity of a DirectPath profile can be queried using
17936/// *DirectPathProfileManager.DirectPathProfileManagerQueryCapacity*.
17937/// 
17938/// ***Since:*** vSphere API Release 9.0.0.0
17939pub trait DirectPathProfileManagerTargetEntityTrait : super::traits::DataObjectTrait {
17940}
17941impl<'s> serde::Serialize for dyn DirectPathProfileManagerTargetEntityTrait + 's {
17942            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
17943            where
17944                S: serde::Serializer,
17945            {
17946                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
17947            }
17948        }
17949impl<'de> serde::Deserialize<'de> for Box<dyn DirectPathProfileManagerTargetEntityTrait> {
17950            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
17951                deserializer.deserialize_map(DirectPathProfileManagerTargetEntityVisitor)
17952            }
17953        }
17954
17955struct DirectPathProfileManagerTargetEntityVisitor;
17956
17957impl<'de> de::Visitor<'de> for DirectPathProfileManagerTargetEntityVisitor {
17958    type Value = Box<dyn DirectPathProfileManagerTargetEntityTrait>;
17959
17960    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17961        formatter.write_str("a valid DirectPathProfileManagerTargetEntityTrait JSON object with a _typeName field")
17962    }
17963
17964    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
17965    where
17966        A: de::MapAccess<'de>,
17967    {
17968        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
17969        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
17970        match any {
17971            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
17972                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
17973            VimAny::Value(value) => Err(de::Error::custom(format!(
17974                "expected object not wrapped value: {:?}",
17975                value))),
17976        }
17977    }
17978}
17979
17980impl DirectPathProfileManagerTargetEntityTrait for DirectPathProfileManagerTargetEntity {
17981}
17982impl DirectPathProfileManagerTargetEntityTrait for DirectPathProfileManagerTargetCluster {
17983}
17984impl DirectPathProfileManagerTargetEntityTrait for DirectPathProfileManagerTargetHost {
17985}
17986impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DirectPathProfileManagerTargetEntityTrait {
17987    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
17988        let data_type = from.data_type();
17989        match data_type {
17990            StructType::DirectPathProfileManagerTargetEntity => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetEntity>()?),
17991            StructType::DirectPathProfileManagerTargetCluster => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetCluster>()?),
17992            StructType::DirectPathProfileManagerTargetHost => Some(from.as_any_ref().downcast_ref::<DirectPathProfileManagerTargetHost>()?),
17993            _ => None,
17994        }
17995    }
17996    
17997    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
17998        let data_type = from.data_type();
17999        match data_type {
18000            StructType::DirectPathProfileManagerTargetEntity => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetEntity>()?),
18001            StructType::DirectPathProfileManagerTargetCluster => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetCluster>()?),
18002            StructType::DirectPathProfileManagerTargetHost => Ok(from.as_any_box().downcast::<DirectPathProfileManagerTargetHost>()?),
18003            _ => Err(from.as_any_box()),
18004        }
18005    }
18006}
18007/// Configuration of a *DistributedVirtualSwitch*.
18008pub trait DvsConfigInfoTrait : super::traits::DataObjectTrait {
18009    /// Generated UUID of the switch.
18010    /// 
18011    /// Unique across vCenter Server
18012    /// inventory and instances.
18013    fn get_uuid(&self) -> &str;
18014    /// Name of the switch.
18015    fn get_name(&self) -> &str;
18016    /// Number of standalone ports in the switch.
18017    /// 
18018    /// Standalone ports are
18019    /// ports that do not belong to any portgroup.
18020    fn get_num_standalone_ports(&self) -> i32;
18021    /// Current number of ports, not including conflict ports.
18022    fn get_num_ports(&self) -> i32;
18023    /// Maximum number of ports allowed in the switch,
18024    /// not including conflict ports.
18025    fn get_max_ports(&self) -> i32;
18026    /// Uplink port policy.
18027    fn get_uplink_port_policy(&self) -> &Box<dyn super::traits::DvsUplinkPortPolicyTrait>;
18028    /// List of uplink portgroups.
18029    /// 
18030    /// When adding host members, the server
18031    /// uses the *DVSConfigInfo.uplinkPortPolicy* to create a number of
18032    /// uplink ports for the host. If portgroups are shown here,
18033    /// those uplink ports will be added to the portgroups, with uplink ports
18034    /// evenly spread among the portgroups.
18035    /// 
18036    /// Refers instances of *DistributedVirtualPortgroup*.
18037    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>>;
18038    /// Default configuration for the ports in the switch, if the port
18039    /// does not inherit configuration from the parent portgroup or has
18040    /// its own configuration.
18041    fn get_default_port_config(&self) -> &Box<dyn super::traits::DvPortSettingTrait>;
18042    /// Hosts that join the switch.
18043    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMember>>;
18044    /// Vendor, product, and version information for the implementation
18045    /// module of the switch.
18046    fn get_product_info(&self) -> &super::structs::DistributedVirtualSwitchProductSpec;
18047    /// Intended vendor, product, and version information for the
18048    /// implementation module of the switch.
18049    fn get_target_info(&self) -> &Option<super::structs::DistributedVirtualSwitchProductSpec>;
18050    /// Key of the extension registered by the remote server that
18051    /// controls the switch.
18052    fn get_extension_key(&self) -> &Option<String>;
18053    /// Opaque binary blob that stores vendor specific configuration.
18054    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>>;
18055    /// Usage policy of the switch.
18056    fn get_policy(&self) -> &Option<super::structs::DvsPolicy>;
18057    /// Description string for the switch.
18058    fn get_description(&self) -> &Option<String>;
18059    /// Version string of the configuration.
18060    fn get_config_version(&self) -> &str;
18061    /// Human operator contact information.
18062    fn get_contact(&self) -> &super::structs::DvsContactInfo;
18063    /// IP address for the switch, specified using IPv4 dot notation.
18064    /// 
18065    /// The
18066    /// utility of this address is defined by other switch features.
18067    fn get_switch_ip_address(&self) -> &Option<String>;
18068    /// Create time of the switch.
18069    fn get_create_time(&self) -> &str;
18070    /// Boolean to indicate if network I/O control is enabled on the
18071    /// switch.
18072    fn get_network_resource_management_enabled(&self) -> bool;
18073    /// Default host proxy switch maximum port number
18074    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32>;
18075    /// VDS health check configuration.
18076    fn get_health_check_config(&self) -> &Option<Vec<Box<dyn super::traits::DvsHealthCheckConfigTrait>>>;
18077    /// Host infrastructure traffic class resource configuration.
18078    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>>;
18079    /// Dynamic Host infrastructure traffic class resource configuration.
18080    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>>;
18081    /// Network resource control version of the switch.
18082    /// 
18083    /// Possible value can be of
18084    /// *DistributedVirtualSwitchNetworkResourceControlVersion_enum*.
18085    fn get_network_resource_control_version(&self) -> &Option<String>;
18086    /// The Virtual NIC network resource pool information for the switch.
18087    fn get_vm_vnic_network_resource_pool(&self) -> &Option<Vec<super::structs::DvsVmVnicNetworkResourcePool>>;
18088    /// The percentage of physical nic link speed
18089    /// *PhysicalNicLinkInfo.speedMb*
18090    /// available for infrastructure traffic reservation.
18091    /// 
18092    /// If this value is 75, then for a 1Gbps physical nic, only
18093    /// 750Mbps is allowed for all infrastructure traffic reservations.
18094    fn get_pnic_capacity_ratio_for_reservation(&self) -> Option<i32>;
18095}
18096impl<'s> serde::Serialize for dyn DvsConfigInfoTrait + 's {
18097            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18098            where
18099                S: serde::Serializer,
18100            {
18101                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18102            }
18103        }
18104impl<'de> serde::Deserialize<'de> for Box<dyn DvsConfigInfoTrait> {
18105            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18106                deserializer.deserialize_map(DvsConfigInfoVisitor)
18107            }
18108        }
18109
18110struct DvsConfigInfoVisitor;
18111
18112impl<'de> de::Visitor<'de> for DvsConfigInfoVisitor {
18113    type Value = Box<dyn DvsConfigInfoTrait>;
18114
18115    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18116        formatter.write_str("a valid DvsConfigInfoTrait JSON object with a _typeName field")
18117    }
18118
18119    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18120    where
18121        A: de::MapAccess<'de>,
18122    {
18123        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18124        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18125        match any {
18126            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18127                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18128            VimAny::Value(value) => Err(de::Error::custom(format!(
18129                "expected object not wrapped value: {:?}",
18130                value))),
18131        }
18132    }
18133}
18134
18135impl DvsConfigInfoTrait for DvsConfigInfo {
18136    fn get_uuid(&self) -> &str { &self.uuid }
18137    fn get_name(&self) -> &str { &self.name }
18138    fn get_num_standalone_ports(&self) -> i32 { self.num_standalone_ports }
18139    fn get_num_ports(&self) -> i32 { self.num_ports }
18140    fn get_max_ports(&self) -> i32 { self.max_ports }
18141    fn get_uplink_port_policy(&self) -> &Box<dyn super::traits::DvsUplinkPortPolicyTrait> { &self.uplink_port_policy }
18142    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.uplink_portgroup }
18143    fn get_default_port_config(&self) -> &Box<dyn super::traits::DvPortSettingTrait> { &self.default_port_config }
18144    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMember>> { &self.host }
18145    fn get_product_info(&self) -> &super::structs::DistributedVirtualSwitchProductSpec { &self.product_info }
18146    fn get_target_info(&self) -> &Option<super::structs::DistributedVirtualSwitchProductSpec> { &self.target_info }
18147    fn get_extension_key(&self) -> &Option<String> { &self.extension_key }
18148    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>> { &self.vendor_specific_config }
18149    fn get_policy(&self) -> &Option<super::structs::DvsPolicy> { &self.policy }
18150    fn get_description(&self) -> &Option<String> { &self.description }
18151    fn get_config_version(&self) -> &str { &self.config_version }
18152    fn get_contact(&self) -> &super::structs::DvsContactInfo { &self.contact }
18153    fn get_switch_ip_address(&self) -> &Option<String> { &self.switch_ip_address }
18154    fn get_create_time(&self) -> &str { &self.create_time }
18155    fn get_network_resource_management_enabled(&self) -> bool { self.network_resource_management_enabled }
18156    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32> { self.default_proxy_switch_max_num_ports }
18157    fn get_health_check_config(&self) -> &Option<Vec<Box<dyn super::traits::DvsHealthCheckConfigTrait>>> { &self.health_check_config }
18158    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.infrastructure_traffic_resource_config }
18159    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.net_resource_pool_traffic_resource_config }
18160    fn get_network_resource_control_version(&self) -> &Option<String> { &self.network_resource_control_version }
18161    fn get_vm_vnic_network_resource_pool(&self) -> &Option<Vec<super::structs::DvsVmVnicNetworkResourcePool>> { &self.vm_vnic_network_resource_pool }
18162    fn get_pnic_capacity_ratio_for_reservation(&self) -> Option<i32> { self.pnic_capacity_ratio_for_reservation }
18163}
18164impl DvsConfigInfoTrait for VMwareDvsConfigInfo {
18165    fn get_uuid(&self) -> &str { &self.uuid }
18166    fn get_name(&self) -> &str { &self.name }
18167    fn get_num_standalone_ports(&self) -> i32 { self.num_standalone_ports }
18168    fn get_num_ports(&self) -> i32 { self.num_ports }
18169    fn get_max_ports(&self) -> i32 { self.max_ports }
18170    fn get_uplink_port_policy(&self) -> &Box<dyn super::traits::DvsUplinkPortPolicyTrait> { &self.uplink_port_policy }
18171    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.uplink_portgroup }
18172    fn get_default_port_config(&self) -> &Box<dyn super::traits::DvPortSettingTrait> { &self.default_port_config }
18173    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMember>> { &self.host }
18174    fn get_product_info(&self) -> &super::structs::DistributedVirtualSwitchProductSpec { &self.product_info }
18175    fn get_target_info(&self) -> &Option<super::structs::DistributedVirtualSwitchProductSpec> { &self.target_info }
18176    fn get_extension_key(&self) -> &Option<String> { &self.extension_key }
18177    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>> { &self.vendor_specific_config }
18178    fn get_policy(&self) -> &Option<super::structs::DvsPolicy> { &self.policy }
18179    fn get_description(&self) -> &Option<String> { &self.description }
18180    fn get_config_version(&self) -> &str { &self.config_version }
18181    fn get_contact(&self) -> &super::structs::DvsContactInfo { &self.contact }
18182    fn get_switch_ip_address(&self) -> &Option<String> { &self.switch_ip_address }
18183    fn get_create_time(&self) -> &str { &self.create_time }
18184    fn get_network_resource_management_enabled(&self) -> bool { self.network_resource_management_enabled }
18185    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32> { self.default_proxy_switch_max_num_ports }
18186    fn get_health_check_config(&self) -> &Option<Vec<Box<dyn super::traits::DvsHealthCheckConfigTrait>>> { &self.health_check_config }
18187    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.infrastructure_traffic_resource_config }
18188    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.net_resource_pool_traffic_resource_config }
18189    fn get_network_resource_control_version(&self) -> &Option<String> { &self.network_resource_control_version }
18190    fn get_vm_vnic_network_resource_pool(&self) -> &Option<Vec<super::structs::DvsVmVnicNetworkResourcePool>> { &self.vm_vnic_network_resource_pool }
18191    fn get_pnic_capacity_ratio_for_reservation(&self) -> Option<i32> { self.pnic_capacity_ratio_for_reservation }
18192}
18193impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsConfigInfoTrait {
18194    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18195        let data_type = from.data_type();
18196        match data_type {
18197            StructType::DvsConfigInfo => Some(from.as_any_ref().downcast_ref::<DvsConfigInfo>()?),
18198            StructType::VMwareDvsConfigInfo => Some(from.as_any_ref().downcast_ref::<VMwareDvsConfigInfo>()?),
18199            _ => None,
18200        }
18201    }
18202    
18203    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18204        let data_type = from.data_type();
18205        match data_type {
18206            StructType::DvsConfigInfo => Ok(from.as_any_box().downcast::<DvsConfigInfo>()?),
18207            StructType::VMwareDvsConfigInfo => Ok(from.as_any_box().downcast::<VMwareDvsConfigInfo>()?),
18208            _ => Err(from.as_any_box()),
18209        }
18210    }
18211}
18212/// The *DVSConfigSpec*
18213/// data object contains configuration data for a
18214/// *DistributedVirtualSwitch*.
18215/// 
18216/// Use the *DistributedVirtualSwitch.ReconfigureDvs_Task*
18217/// method to apply the configuration to the
18218/// switch.
18219pub trait DvsConfigSpecTrait : super::traits::DataObjectTrait {
18220    /// Set of dynamic properties.
18221    /// 
18222    /// This property is optional because only the
18223    /// properties of an object that are unknown to a client will be part of this set.
18224    /// This property is not readonly just in case we want to send such properties
18225    /// from a client in the future.
18226    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>>;
18227    /// The version string of the configuration that this spec is trying to
18228    /// change.
18229    /// 
18230    /// This property is required in reconfiguring a switch
18231    /// and should be set to the same value as
18232    /// *DVSConfigInfo.configVersion*.
18233    /// This property is ignored during switch creation.
18234    fn get_config_version(&self) -> &Option<String>;
18235    /// The name of the switch.
18236    /// 
18237    /// Must be unique in the parent folder.
18238    fn get_name(&self) -> &Option<String>;
18239    /// The number of standalone ports in the switch.
18240    /// 
18241    /// Standalone ports are
18242    /// ports that do not belong to any portgroup. If set to a number larger
18243    /// than number of existing standalone ports in the switch, new ports get
18244    /// created to meet the number. If set to a number smaller than the number
18245    /// of existing standalone ports, free ports (uplink ports excluded) are
18246    /// deleted to meet the number. If the set number cannot be met by
18247    /// deleting free standalone ports, a fault is raised.
18248    fn get_num_standalone_ports(&self) -> Option<i32>;
18249    /// Deprecated as of vSphere API 5.0
18250    /// The default value of this propoerty is maxint and there is no reason
18251    /// for users to change it to a lower value.
18252    /// 
18253    /// The maximum number of DistributedVirtualPorts allowed in the switch.
18254    /// 
18255    /// If specified in a reconfigure operation, this number cannot be smaller
18256    /// than the number of existing DistributedVirtualPorts.
18257    fn get_max_ports(&self) -> Option<i32>;
18258    /// The uplink port policy.
18259    fn get_uplink_port_policy(&self) -> &Option<Box<dyn super::traits::DvsUplinkPortPolicyTrait>>;
18260    /// The uplink portgroups.
18261    /// 
18262    /// Refers instances of *DistributedVirtualPortgroup*.
18263    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>>;
18264    /// The default configuration for ports.
18265    fn get_default_port_config(&self) -> &Option<Box<dyn super::traits::DvPortSettingTrait>>;
18266    /// The host member specification.
18267    /// 
18268    /// A particular host should have only one entry
18269    /// in this array. Duplicate entries for the same host will raise a fault.
18270    /// The host version should be compatible with the version of
18271    /// *DistributedVirtualSwitch*. Use
18272    /// *DistributedVirtualSwitchManager.QueryDvsCheckCompatibility*
18273    /// to check for compatibility.
18274    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMemberConfigSpec>>;
18275    /// The key of the extension registered by a remote server that
18276    /// controls the switch.
18277    fn get_extension_key(&self) -> &Option<String>;
18278    /// Set the description string of the switch.
18279    fn get_description(&self) -> &Option<String>;
18280    /// The usage policy of the switch.
18281    fn get_policy(&self) -> &Option<super::structs::DvsPolicy>;
18282    /// Set the opaque blob that stores vendor specific configuration.
18283    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>>;
18284    /// Set the human operator contact information.
18285    fn get_contact(&self) -> &Option<super::structs::DvsContactInfo>;
18286    /// IP address for the switch, specified using IPv4 dot notation.
18287    /// 
18288    /// IPv6 address is not supported for this property.
18289    /// The utility of this address is defined by other switch features.
18290    /// switchIpAddress would be ignored when IPFIX collector uses IPv6.
18291    fn get_switch_ip_address(&self) -> &Option<String>;
18292    /// The default host proxy switch maximum port number
18293    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32>;
18294    /// The host infrastructure traffic resource allocation specification.
18295    /// 
18296    /// Only the traffic class resource allocations identified in the list
18297    /// will be updated. The other traffic class resource allocations that are not
18298    /// specified will not change.
18299    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>>;
18300    /// The dynamic host infrastructure traffic resource allocation
18301    /// specification.
18302    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>>;
18303    /// Indicates the Network Resource Control APIs that are supported on the switch.
18304    /// 
18305    /// Possible value can be of
18306    /// *DistributedVirtualSwitchNetworkResourceControlVersion_enum*.
18307    fn get_network_resource_control_version(&self) -> &Option<String>;
18308}
18309impl<'s> serde::Serialize for dyn DvsConfigSpecTrait + 's {
18310            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18311            where
18312                S: serde::Serializer,
18313            {
18314                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18315            }
18316        }
18317impl<'de> serde::Deserialize<'de> for Box<dyn DvsConfigSpecTrait> {
18318            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18319                deserializer.deserialize_map(DvsConfigSpecVisitor)
18320            }
18321        }
18322
18323struct DvsConfigSpecVisitor;
18324
18325impl<'de> de::Visitor<'de> for DvsConfigSpecVisitor {
18326    type Value = Box<dyn DvsConfigSpecTrait>;
18327
18328    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18329        formatter.write_str("a valid DvsConfigSpecTrait JSON object with a _typeName field")
18330    }
18331
18332    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18333    where
18334        A: de::MapAccess<'de>,
18335    {
18336        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18337        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18338        match any {
18339            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18340                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18341            VimAny::Value(value) => Err(de::Error::custom(format!(
18342                "expected object not wrapped value: {:?}",
18343                value))),
18344        }
18345    }
18346}
18347
18348impl DvsConfigSpecTrait for DvsConfigSpec {
18349    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
18350    fn get_config_version(&self) -> &Option<String> { &self.config_version }
18351    fn get_name(&self) -> &Option<String> { &self.name }
18352    fn get_num_standalone_ports(&self) -> Option<i32> { self.num_standalone_ports }
18353    fn get_max_ports(&self) -> Option<i32> { self.max_ports }
18354    fn get_uplink_port_policy(&self) -> &Option<Box<dyn super::traits::DvsUplinkPortPolicyTrait>> { &self.uplink_port_policy }
18355    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.uplink_portgroup }
18356    fn get_default_port_config(&self) -> &Option<Box<dyn super::traits::DvPortSettingTrait>> { &self.default_port_config }
18357    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMemberConfigSpec>> { &self.host }
18358    fn get_extension_key(&self) -> &Option<String> { &self.extension_key }
18359    fn get_description(&self) -> &Option<String> { &self.description }
18360    fn get_policy(&self) -> &Option<super::structs::DvsPolicy> { &self.policy }
18361    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>> { &self.vendor_specific_config }
18362    fn get_contact(&self) -> &Option<super::structs::DvsContactInfo> { &self.contact }
18363    fn get_switch_ip_address(&self) -> &Option<String> { &self.switch_ip_address }
18364    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32> { self.default_proxy_switch_max_num_ports }
18365    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.infrastructure_traffic_resource_config }
18366    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.net_resource_pool_traffic_resource_config }
18367    fn get_network_resource_control_version(&self) -> &Option<String> { &self.network_resource_control_version }
18368}
18369impl DvsConfigSpecTrait for VMwareDvsConfigSpec {
18370    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
18371    fn get_config_version(&self) -> &Option<String> { &self.config_version }
18372    fn get_name(&self) -> &Option<String> { &self.name }
18373    fn get_num_standalone_ports(&self) -> Option<i32> { self.num_standalone_ports }
18374    fn get_max_ports(&self) -> Option<i32> { self.max_ports }
18375    fn get_uplink_port_policy(&self) -> &Option<Box<dyn super::traits::DvsUplinkPortPolicyTrait>> { &self.uplink_port_policy }
18376    fn get_uplink_portgroup(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.uplink_portgroup }
18377    fn get_default_port_config(&self) -> &Option<Box<dyn super::traits::DvPortSettingTrait>> { &self.default_port_config }
18378    fn get_host(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchHostMemberConfigSpec>> { &self.host }
18379    fn get_extension_key(&self) -> &Option<String> { &self.extension_key }
18380    fn get_description(&self) -> &Option<String> { &self.description }
18381    fn get_policy(&self) -> &Option<super::structs::DvsPolicy> { &self.policy }
18382    fn get_vendor_specific_config(&self) -> &Option<Vec<super::structs::DistributedVirtualSwitchKeyedOpaqueBlob>> { &self.vendor_specific_config }
18383    fn get_contact(&self) -> &Option<super::structs::DvsContactInfo> { &self.contact }
18384    fn get_switch_ip_address(&self) -> &Option<String> { &self.switch_ip_address }
18385    fn get_default_proxy_switch_max_num_ports(&self) -> Option<i32> { self.default_proxy_switch_max_num_ports }
18386    fn get_infrastructure_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.infrastructure_traffic_resource_config }
18387    fn get_net_resource_pool_traffic_resource_config(&self) -> &Option<Vec<super::structs::DvsHostInfrastructureTrafficResource>> { &self.net_resource_pool_traffic_resource_config }
18388    fn get_network_resource_control_version(&self) -> &Option<String> { &self.network_resource_control_version }
18389}
18390impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsConfigSpecTrait {
18391    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18392        let data_type = from.data_type();
18393        match data_type {
18394            StructType::DvsConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsConfigSpec>()?),
18395            StructType::VMwareDvsConfigSpec => Some(from.as_any_ref().downcast_ref::<VMwareDvsConfigSpec>()?),
18396            _ => None,
18397        }
18398    }
18399    
18400    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18401        let data_type = from.data_type();
18402        match data_type {
18403            StructType::DvsConfigSpec => Ok(from.as_any_box().downcast::<DvsConfigSpec>()?),
18404            StructType::VMwareDvsConfigSpec => Ok(from.as_any_box().downcast::<VMwareDvsConfigSpec>()?),
18405            _ => Err(from.as_any_box()),
18406        }
18407    }
18408}
18409/// The *DVSFeatureCapability* data object
18410/// represents the capabilities supported by a
18411/// *DistributedVirtualSwitch*.
18412/// 
18413/// These properties are read-only with
18414/// the exception of
18415/// *DVSFeatureCapability.vmDirectPathGen2Supported*.
18416pub trait DvsFeatureCapabilityTrait : super::traits::DataObjectTrait {
18417    /// Deprecated as of vSphere API 5.0, use
18418    /// <code>networkResourceManagementCapability</code>.*DVSNetworkResourceManagementCapability.networkResourceManagementSupported*.
18419    /// 
18420    /// Indicates whether network I/O control is
18421    /// supported on the vSphere Distributed Switch.
18422    fn get_network_resource_management_supported(&self) -> bool;
18423    /// Deprecated as of vSphere API 8.0. VMDirectPath Gen 2 is no longer supported and
18424    /// there is no replacement.
18425    /// 
18426    /// Indicates whether VMDirectPath Gen 2 is supported on the
18427    /// distributed virtual switch.
18428    /// 
18429    /// See
18430    /// *HostCapability*.*HostCapability.vmDirectPathGen2Supported*
18431    /// and *PhysicalNic*.*PhysicalNic.vmDirectPathGen2Supported*.
18432    /// 
18433    /// For a third-party distributed switch implementation, you can
18434    /// specify this property during switch creation or when you call the
18435    /// *DistributedVirtualSwitch.UpdateDvsCapability* method.
18436    /// 
18437    /// VMDirectPath Gen 2 is supported in
18438    /// vSphere Distributed Switch Version 4.1 or later.
18439    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool>;
18440    /// The available teaming modes for the vSphere Distributed Switch.
18441    /// 
18442    /// The
18443    /// value can be one or more of
18444    /// *DistributedVirtualSwitchNicTeamingPolicyMode_enum*.
18445    fn get_nic_teaming_policy(&self) -> &Option<Vec<String>>;
18446    /// Deprecated as of vSphere API 5.0, use
18447    /// <code>networkResourceManagementCapability</code>.*DVSNetworkResourceManagementCapability.networkResourcePoolHighShareValue*.
18448    /// 
18449    /// This is the value for *high*
18450    /// in *DVSNetworkResourcePoolAllocationInfo.shares*.
18451    /// 
18452    /// This
18453    /// implicitly defines the legal range of share values to be between 1 and this.
18454    /// This also defines values for other level types, such as
18455    /// *normal* being one half of this value and
18456    /// *low* being one fourth of this value.
18457    fn get_network_resource_pool_high_share_value(&self) -> Option<i32>;
18458    /// Network resource management capabilities supported by a
18459    /// distributed virtual switch.
18460    fn get_network_resource_management_capability(&self) -> &Option<super::structs::DvsNetworkResourceManagementCapability>;
18461    /// Health check capabilities supported by a *VmwareDistributedVirtualSwitch*.
18462    fn get_health_check_capability(&self) -> &Option<Box<dyn super::traits::DvsHealthCheckCapabilityTrait>>;
18463    /// Host rollback capability.
18464    /// 
18465    /// If <code>rollbackCapability</code>.*DVSRollbackCapability.rollbackSupported*
18466    /// is true, network operations that disconnect the the host are rolled back.
18467    fn get_rollback_capability(&self) -> &Option<super::structs::DvsRollbackCapability>;
18468    /// Backup, restore, and rollback capabilities.
18469    /// 
18470    /// Backup and restore
18471    /// are supported only for *VmwareDistributedVirtualSwitch*.
18472    /// Rollback is supported for *VmwareDistributedVirtualSwitch*
18473    /// and *DistributedVirtualPortgroup*.
18474    /// For information about backup and restore, see the
18475    /// *DistributedVirtualSwitchManager* methods
18476    /// *DistributedVirtualSwitchManager.DVSManagerExportEntity_Task* and
18477    /// *DistributedVirtualSwitchManager.DVSManagerImportEntity_Task*.
18478    /// For information about rollback, see the
18479    /// *DistributedVirtualSwitch*.*DistributedVirtualSwitch.DVSRollback_Task*
18480    /// and *DistributedVirtualPortgroup*.*DistributedVirtualPortgroup.DVPortgroupRollback_Task*
18481    /// methods.
18482    fn get_backup_restore_capability(&self) -> &Option<super::structs::DvsBackupRestoreCapability>;
18483    /// Indicates whether Network Filter feature is
18484    /// supported in vSphere Distributed Switch.
18485    fn get_network_filter_supported(&self) -> Option<bool>;
18486    /// Indicates whether MAC learning feature is
18487    /// supported in vSphere Distributed Switch.
18488    fn get_mac_learning_supported(&self) -> Option<bool>;
18489}
18490impl<'s> serde::Serialize for dyn DvsFeatureCapabilityTrait + 's {
18491            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18492            where
18493                S: serde::Serializer,
18494            {
18495                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18496            }
18497        }
18498impl<'de> serde::Deserialize<'de> for Box<dyn DvsFeatureCapabilityTrait> {
18499            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18500                deserializer.deserialize_map(DvsFeatureCapabilityVisitor)
18501            }
18502        }
18503
18504struct DvsFeatureCapabilityVisitor;
18505
18506impl<'de> de::Visitor<'de> for DvsFeatureCapabilityVisitor {
18507    type Value = Box<dyn DvsFeatureCapabilityTrait>;
18508
18509    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18510        formatter.write_str("a valid DvsFeatureCapabilityTrait JSON object with a _typeName field")
18511    }
18512
18513    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18514    where
18515        A: de::MapAccess<'de>,
18516    {
18517        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18518        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18519        match any {
18520            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18521                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18522            VimAny::Value(value) => Err(de::Error::custom(format!(
18523                "expected object not wrapped value: {:?}",
18524                value))),
18525        }
18526    }
18527}
18528
18529impl DvsFeatureCapabilityTrait for DvsFeatureCapability {
18530    fn get_network_resource_management_supported(&self) -> bool { self.network_resource_management_supported }
18531    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
18532    fn get_nic_teaming_policy(&self) -> &Option<Vec<String>> { &self.nic_teaming_policy }
18533    fn get_network_resource_pool_high_share_value(&self) -> Option<i32> { self.network_resource_pool_high_share_value }
18534    fn get_network_resource_management_capability(&self) -> &Option<super::structs::DvsNetworkResourceManagementCapability> { &self.network_resource_management_capability }
18535    fn get_health_check_capability(&self) -> &Option<Box<dyn super::traits::DvsHealthCheckCapabilityTrait>> { &self.health_check_capability }
18536    fn get_rollback_capability(&self) -> &Option<super::structs::DvsRollbackCapability> { &self.rollback_capability }
18537    fn get_backup_restore_capability(&self) -> &Option<super::structs::DvsBackupRestoreCapability> { &self.backup_restore_capability }
18538    fn get_network_filter_supported(&self) -> Option<bool> { self.network_filter_supported }
18539    fn get_mac_learning_supported(&self) -> Option<bool> { self.mac_learning_supported }
18540}
18541impl DvsFeatureCapabilityTrait for VMwareDvsFeatureCapability {
18542    fn get_network_resource_management_supported(&self) -> bool { self.network_resource_management_supported }
18543    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
18544    fn get_nic_teaming_policy(&self) -> &Option<Vec<String>> { &self.nic_teaming_policy }
18545    fn get_network_resource_pool_high_share_value(&self) -> Option<i32> { self.network_resource_pool_high_share_value }
18546    fn get_network_resource_management_capability(&self) -> &Option<super::structs::DvsNetworkResourceManagementCapability> { &self.network_resource_management_capability }
18547    fn get_health_check_capability(&self) -> &Option<Box<dyn super::traits::DvsHealthCheckCapabilityTrait>> { &self.health_check_capability }
18548    fn get_rollback_capability(&self) -> &Option<super::structs::DvsRollbackCapability> { &self.rollback_capability }
18549    fn get_backup_restore_capability(&self) -> &Option<super::structs::DvsBackupRestoreCapability> { &self.backup_restore_capability }
18550    fn get_network_filter_supported(&self) -> Option<bool> { self.network_filter_supported }
18551    fn get_mac_learning_supported(&self) -> Option<bool> { self.mac_learning_supported }
18552}
18553impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsFeatureCapabilityTrait {
18554    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18555        let data_type = from.data_type();
18556        match data_type {
18557            StructType::DvsFeatureCapability => Some(from.as_any_ref().downcast_ref::<DvsFeatureCapability>()?),
18558            StructType::VMwareDvsFeatureCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsFeatureCapability>()?),
18559            _ => None,
18560        }
18561    }
18562    
18563    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18564        let data_type = from.data_type();
18565        match data_type {
18566            StructType::DvsFeatureCapability => Ok(from.as_any_box().downcast::<DvsFeatureCapability>()?),
18567            StructType::VMwareDvsFeatureCapability => Ok(from.as_any_box().downcast::<VMwareDvsFeatureCapability>()?),
18568            _ => Err(from.as_any_box()),
18569        }
18570    }
18571}
18572/// The *DVSHealthCheckConfig* data object
18573/// defines vSphere Distributed Switch health check configuration.
18574pub trait DvsHealthCheckConfigTrait : super::traits::DataObjectTrait {
18575    /// True if enable health check.
18576    fn get_enable(&self) -> Option<bool>;
18577    /// Interval of health check, in minutes.
18578    fn get_interval(&self) -> Option<i32>;
18579}
18580impl<'s> serde::Serialize for dyn DvsHealthCheckConfigTrait + 's {
18581            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18582            where
18583                S: serde::Serializer,
18584            {
18585                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18586            }
18587        }
18588impl<'de> serde::Deserialize<'de> for Box<dyn DvsHealthCheckConfigTrait> {
18589            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18590                deserializer.deserialize_map(DvsHealthCheckConfigVisitor)
18591            }
18592        }
18593
18594struct DvsHealthCheckConfigVisitor;
18595
18596impl<'de> de::Visitor<'de> for DvsHealthCheckConfigVisitor {
18597    type Value = Box<dyn DvsHealthCheckConfigTrait>;
18598
18599    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18600        formatter.write_str("a valid DvsHealthCheckConfigTrait JSON object with a _typeName field")
18601    }
18602
18603    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18604    where
18605        A: de::MapAccess<'de>,
18606    {
18607        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18608        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18609        match any {
18610            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18611                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18612            VimAny::Value(value) => Err(de::Error::custom(format!(
18613                "expected object not wrapped value: {:?}",
18614                value))),
18615        }
18616    }
18617}
18618
18619impl DvsHealthCheckConfigTrait for DvsHealthCheckConfig {
18620    fn get_enable(&self) -> Option<bool> { self.enable }
18621    fn get_interval(&self) -> Option<i32> { self.interval }
18622}
18623impl DvsHealthCheckConfigTrait for VMwareDvsHealthCheckConfig {
18624    fn get_enable(&self) -> Option<bool> { self.enable }
18625    fn get_interval(&self) -> Option<i32> { self.interval }
18626}
18627impl DvsHealthCheckConfigTrait for VMwareDvsTeamingHealthCheckConfig {
18628    fn get_enable(&self) -> Option<bool> { self.enable }
18629    fn get_interval(&self) -> Option<i32> { self.interval }
18630}
18631impl DvsHealthCheckConfigTrait for VMwareDvsVlanMtuHealthCheckConfig {
18632    fn get_enable(&self) -> Option<bool> { self.enable }
18633    fn get_interval(&self) -> Option<i32> { self.interval }
18634}
18635impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsHealthCheckConfigTrait {
18636    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18637        let data_type = from.data_type();
18638        match data_type {
18639            StructType::DvsHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<DvsHealthCheckConfig>()?),
18640            StructType::VMwareDvsHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsHealthCheckConfig>()?),
18641            StructType::VMwareDvsTeamingHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsTeamingHealthCheckConfig>()?),
18642            StructType::VMwareDvsVlanMtuHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanMtuHealthCheckConfig>()?),
18643            _ => None,
18644        }
18645    }
18646    
18647    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18648        let data_type = from.data_type();
18649        match data_type {
18650            StructType::DvsHealthCheckConfig => Ok(from.as_any_box().downcast::<DvsHealthCheckConfig>()?),
18651            StructType::VMwareDvsHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsHealthCheckConfig>()?),
18652            StructType::VMwareDvsTeamingHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsTeamingHealthCheckConfig>()?),
18653            StructType::VMwareDvsVlanMtuHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsVlanMtuHealthCheckConfig>()?),
18654            _ => Err(from.as_any_box()),
18655        }
18656    }
18657}
18658/// This class defines health check configuration for
18659/// VMware vSphere Distributed Switch.
18660pub trait VMwareDvsHealthCheckConfigTrait : super::traits::DvsHealthCheckConfigTrait {
18661}
18662impl<'s> serde::Serialize for dyn VMwareDvsHealthCheckConfigTrait + 's {
18663            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18664            where
18665                S: serde::Serializer,
18666            {
18667                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18668            }
18669        }
18670impl<'de> serde::Deserialize<'de> for Box<dyn VMwareDvsHealthCheckConfigTrait> {
18671            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18672                deserializer.deserialize_map(VMwareDvsHealthCheckConfigVisitor)
18673            }
18674        }
18675
18676struct VMwareDvsHealthCheckConfigVisitor;
18677
18678impl<'de> de::Visitor<'de> for VMwareDvsHealthCheckConfigVisitor {
18679    type Value = Box<dyn VMwareDvsHealthCheckConfigTrait>;
18680
18681    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18682        formatter.write_str("a valid VMwareDvsHealthCheckConfigTrait JSON object with a _typeName field")
18683    }
18684
18685    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18686    where
18687        A: de::MapAccess<'de>,
18688    {
18689        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18690        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18691        match any {
18692            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18693                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18694            VimAny::Value(value) => Err(de::Error::custom(format!(
18695                "expected object not wrapped value: {:?}",
18696                value))),
18697        }
18698    }
18699}
18700
18701impl VMwareDvsHealthCheckConfigTrait for VMwareDvsHealthCheckConfig {
18702}
18703impl VMwareDvsHealthCheckConfigTrait for VMwareDvsTeamingHealthCheckConfig {
18704}
18705impl VMwareDvsHealthCheckConfigTrait for VMwareDvsVlanMtuHealthCheckConfig {
18706}
18707impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VMwareDvsHealthCheckConfigTrait {
18708    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18709        let data_type = from.data_type();
18710        match data_type {
18711            StructType::VMwareDvsHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsHealthCheckConfig>()?),
18712            StructType::VMwareDvsTeamingHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsTeamingHealthCheckConfig>()?),
18713            StructType::VMwareDvsVlanMtuHealthCheckConfig => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanMtuHealthCheckConfig>()?),
18714            _ => None,
18715        }
18716    }
18717    
18718    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18719        let data_type = from.data_type();
18720        match data_type {
18721            StructType::VMwareDvsHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsHealthCheckConfig>()?),
18722            StructType::VMwareDvsTeamingHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsTeamingHealthCheckConfig>()?),
18723            StructType::VMwareDvsVlanMtuHealthCheckConfig => Ok(from.as_any_box().downcast::<VMwareDvsVlanMtuHealthCheckConfig>()?),
18724            _ => Err(from.as_any_box()),
18725        }
18726    }
18727}
18728/// Health check capabilities of health check supported by the
18729/// vSphere Distributed Switch
18730pub trait DvsHealthCheckCapabilityTrait : super::traits::DataObjectTrait {
18731}
18732impl<'s> serde::Serialize for dyn DvsHealthCheckCapabilityTrait + 's {
18733            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18734            where
18735                S: serde::Serializer,
18736            {
18737                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18738            }
18739        }
18740impl<'de> serde::Deserialize<'de> for Box<dyn DvsHealthCheckCapabilityTrait> {
18741            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18742                deserializer.deserialize_map(DvsHealthCheckCapabilityVisitor)
18743            }
18744        }
18745
18746struct DvsHealthCheckCapabilityVisitor;
18747
18748impl<'de> de::Visitor<'de> for DvsHealthCheckCapabilityVisitor {
18749    type Value = Box<dyn DvsHealthCheckCapabilityTrait>;
18750
18751    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18752        formatter.write_str("a valid DvsHealthCheckCapabilityTrait JSON object with a _typeName field")
18753    }
18754
18755    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18756    where
18757        A: de::MapAccess<'de>,
18758    {
18759        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18760        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18761        match any {
18762            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18763                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18764            VimAny::Value(value) => Err(de::Error::custom(format!(
18765                "expected object not wrapped value: {:?}",
18766                value))),
18767        }
18768    }
18769}
18770
18771impl DvsHealthCheckCapabilityTrait for DvsHealthCheckCapability {
18772}
18773impl DvsHealthCheckCapabilityTrait for VMwareDvsHealthCheckCapability {
18774}
18775impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsHealthCheckCapabilityTrait {
18776    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18777        let data_type = from.data_type();
18778        match data_type {
18779            StructType::DvsHealthCheckCapability => Some(from.as_any_ref().downcast_ref::<DvsHealthCheckCapability>()?),
18780            StructType::VMwareDvsHealthCheckCapability => Some(from.as_any_ref().downcast_ref::<VMwareDvsHealthCheckCapability>()?),
18781            _ => None,
18782        }
18783    }
18784    
18785    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18786        let data_type = from.data_type();
18787        match data_type {
18788            StructType::DvsHealthCheckCapability => Ok(from.as_any_box().downcast::<DvsHealthCheckCapability>()?),
18789            StructType::VMwareDvsHealthCheckCapability => Ok(from.as_any_box().downcast::<VMwareDvsHealthCheckCapability>()?),
18790            _ => Err(from.as_any_box()),
18791        }
18792    }
18793}
18794/// The base class for uplink port policy.
18795pub trait DvsUplinkPortPolicyTrait : super::traits::DataObjectTrait {
18796}
18797impl<'s> serde::Serialize for dyn DvsUplinkPortPolicyTrait + 's {
18798            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18799            where
18800                S: serde::Serializer,
18801            {
18802                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18803            }
18804        }
18805impl<'de> serde::Deserialize<'de> for Box<dyn DvsUplinkPortPolicyTrait> {
18806            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18807                deserializer.deserialize_map(DvsUplinkPortPolicyVisitor)
18808            }
18809        }
18810
18811struct DvsUplinkPortPolicyVisitor;
18812
18813impl<'de> de::Visitor<'de> for DvsUplinkPortPolicyVisitor {
18814    type Value = Box<dyn DvsUplinkPortPolicyTrait>;
18815
18816    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18817        formatter.write_str("a valid DvsUplinkPortPolicyTrait JSON object with a _typeName field")
18818    }
18819
18820    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18821    where
18822        A: de::MapAccess<'de>,
18823    {
18824        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18825        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18826        match any {
18827            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18828                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18829            VimAny::Value(value) => Err(de::Error::custom(format!(
18830                "expected object not wrapped value: {:?}",
18831                value))),
18832        }
18833    }
18834}
18835
18836impl DvsUplinkPortPolicyTrait for DvsUplinkPortPolicy {
18837}
18838impl DvsUplinkPortPolicyTrait for DvsNameArrayUplinkPortPolicy {
18839}
18840impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsUplinkPortPolicyTrait {
18841    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18842        let data_type = from.data_type();
18843        match data_type {
18844            StructType::DvsUplinkPortPolicy => Some(from.as_any_ref().downcast_ref::<DvsUplinkPortPolicy>()?),
18845            StructType::DvsNameArrayUplinkPortPolicy => Some(from.as_any_ref().downcast_ref::<DvsNameArrayUplinkPortPolicy>()?),
18846            _ => None,
18847        }
18848    }
18849    
18850    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18851        let data_type = from.data_type();
18852        match data_type {
18853            StructType::DvsUplinkPortPolicy => Ok(from.as_any_box().downcast::<DvsUplinkPortPolicy>()?),
18854            StructType::DvsNameArrayUplinkPortPolicy => Ok(from.as_any_box().downcast::<DvsNameArrayUplinkPortPolicy>()?),
18855            _ => Err(from.as_any_box()),
18856        }
18857    }
18858}
18859/// The base data type for all different spec operations.
18860/// 
18861/// ***Since:*** vSphere API Release 9.0.0.0
18862pub trait HbrReplicationTargetSpecTrait : super::traits::DataObjectTrait {
18863}
18864impl<'s> serde::Serialize for dyn HbrReplicationTargetSpecTrait + 's {
18865            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18866            where
18867                S: serde::Serializer,
18868            {
18869                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18870            }
18871        }
18872impl<'de> serde::Deserialize<'de> for Box<dyn HbrReplicationTargetSpecTrait> {
18873            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18874                deserializer.deserialize_map(HbrReplicationTargetSpecVisitor)
18875            }
18876        }
18877
18878struct HbrReplicationTargetSpecVisitor;
18879
18880impl<'de> de::Visitor<'de> for HbrReplicationTargetSpecVisitor {
18881    type Value = Box<dyn HbrReplicationTargetSpecTrait>;
18882
18883    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18884        formatter.write_str("a valid HbrReplicationTargetSpecTrait JSON object with a _typeName field")
18885    }
18886
18887    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18888    where
18889        A: de::MapAccess<'de>,
18890    {
18891        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18892        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18893        match any {
18894            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18895                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18896            VimAny::Value(value) => Err(de::Error::custom(format!(
18897                "expected object not wrapped value: {:?}",
18898                value))),
18899        }
18900    }
18901}
18902
18903impl HbrReplicationTargetSpecTrait for HbrReplicationTargetSpec {
18904}
18905impl HbrReplicationTargetSpecTrait for HbrTargetSpecReplacement {
18906}
18907impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HbrReplicationTargetSpecTrait {
18908    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18909        let data_type = from.data_type();
18910        match data_type {
18911            StructType::HbrReplicationTargetSpec => Some(from.as_any_ref().downcast_ref::<HbrReplicationTargetSpec>()?),
18912            StructType::HbrTargetSpecReplacement => Some(from.as_any_ref().downcast_ref::<HbrTargetSpecReplacement>()?),
18913            _ => None,
18914        }
18915    }
18916    
18917    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
18918        let data_type = from.data_type();
18919        match data_type {
18920            StructType::HbrReplicationTargetSpec => Ok(from.as_any_box().downcast::<HbrReplicationTargetSpec>()?),
18921            StructType::HbrTargetSpecReplacement => Ok(from.as_any_box().downcast::<HbrTargetSpecReplacement>()?),
18922            _ => Err(from.as_any_box()),
18923        }
18924    }
18925}
18926/// An ImportSpec is used when importing VMs or vApps.
18927/// 
18928/// It can be built from scratch, or it can be generated from an OVF descriptor using the
18929/// service interface *OvfManager*.
18930/// 
18931/// This class is the abstract base for *VirtualMachineImportSpec* and
18932/// *VirtualAppImportSpec*. These three classes form a composite structure
18933/// that allows us to contain arbitrarily complex entitites in a single ImportSpec.
18934pub trait ImportSpecTrait : super::traits::DataObjectTrait {
18935    /// Configuration of sub-entities (virtual machine or vApp).
18936    /// 
18937    /// This is used for
18938    /// sub-entities of a vApp that could be a virtual machine or a vApp.
18939    fn get_entity_config(&self) -> &Option<super::structs::VAppEntityConfigInfo>;
18940    /// The instantiation OST (see *OvfConsumer* ) to be consumed by OVF
18941    /// consumers.
18942    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode>;
18943}
18944impl<'s> serde::Serialize for dyn ImportSpecTrait + 's {
18945            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
18946            where
18947                S: serde::Serializer,
18948            {
18949                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
18950            }
18951        }
18952impl<'de> serde::Deserialize<'de> for Box<dyn ImportSpecTrait> {
18953            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
18954                deserializer.deserialize_map(ImportSpecVisitor)
18955            }
18956        }
18957
18958struct ImportSpecVisitor;
18959
18960impl<'de> de::Visitor<'de> for ImportSpecVisitor {
18961    type Value = Box<dyn ImportSpecTrait>;
18962
18963    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18964        formatter.write_str("a valid ImportSpecTrait JSON object with a _typeName field")
18965    }
18966
18967    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
18968    where
18969        A: de::MapAccess<'de>,
18970    {
18971        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
18972        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
18973        match any {
18974            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
18975                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
18976            VimAny::Value(value) => Err(de::Error::custom(format!(
18977                "expected object not wrapped value: {:?}",
18978                value))),
18979        }
18980    }
18981}
18982
18983impl ImportSpecTrait for ImportSpec {
18984    fn get_entity_config(&self) -> &Option<super::structs::VAppEntityConfigInfo> { &self.entity_config }
18985    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode> { &self.instantiation_ost }
18986}
18987impl ImportSpecTrait for VirtualAppImportSpec {
18988    fn get_entity_config(&self) -> &Option<super::structs::VAppEntityConfigInfo> { &self.entity_config }
18989    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode> { &self.instantiation_ost }
18990}
18991impl ImportSpecTrait for VirtualMachineImportSpec {
18992    fn get_entity_config(&self) -> &Option<super::structs::VAppEntityConfigInfo> { &self.entity_config }
18993    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode> { &self.instantiation_ost }
18994}
18995impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ImportSpecTrait {
18996    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
18997        let data_type = from.data_type();
18998        match data_type {
18999            StructType::ImportSpec => Some(from.as_any_ref().downcast_ref::<ImportSpec>()?),
19000            StructType::VirtualAppImportSpec => Some(from.as_any_ref().downcast_ref::<VirtualAppImportSpec>()?),
19001            StructType::VirtualMachineImportSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineImportSpec>()?),
19002            _ => None,
19003        }
19004    }
19005    
19006    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19007        let data_type = from.data_type();
19008        match data_type {
19009            StructType::ImportSpec => Ok(from.as_any_box().downcast::<ImportSpec>()?),
19010            StructType::VirtualAppImportSpec => Ok(from.as_any_box().downcast::<VirtualAppImportSpec>()?),
19011            StructType::VirtualMachineImportSpec => Ok(from.as_any_box().downcast::<VirtualMachineImportSpec>()?),
19012            _ => Err(from.as_any_box()),
19013        }
19014    }
19015}
19016/// The base class for any type of setting or configuration that may get a
19017/// inherited value.
19018/// 
19019/// When used in a reconfigure operation specification, if *InheritablePolicy.inherited* is true,
19020/// it specifies the intention to change the values of subclass's properties to the
19021/// inherited values from the level above. In this case, users don't need to specify
19022/// the values and any set property in the subclass will be ignored.
19023/// if *InheritablePolicy.inherited* is false, it specifies the intention to explicitly set
19024/// subclass's properties to user specified values. Users should set the properties in
19025/// the subclass with the desired values.
19026/// 
19027/// When used in a configuration information object, The values of the properties in
19028/// the subclass are the effective values. if *InheritablePolicy.inherited* is true, the object
19029/// is getting the effective values from upper level. If false, the values are
19030/// explicitly set by a user.
19031pub trait InheritablePolicyTrait : super::traits::DataObjectTrait {
19032    /// Whether the configuration is set to inherited value.
19033    fn get_inherited(&self) -> bool;
19034}
19035impl<'s> serde::Serialize for dyn InheritablePolicyTrait + 's {
19036            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19037            where
19038                S: serde::Serializer,
19039            {
19040                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19041            }
19042        }
19043impl<'de> serde::Deserialize<'de> for Box<dyn InheritablePolicyTrait> {
19044            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19045                deserializer.deserialize_map(InheritablePolicyVisitor)
19046            }
19047        }
19048
19049struct InheritablePolicyVisitor;
19050
19051impl<'de> de::Visitor<'de> for InheritablePolicyVisitor {
19052    type Value = Box<dyn InheritablePolicyTrait>;
19053
19054    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19055        formatter.write_str("a valid InheritablePolicyTrait JSON object with a _typeName field")
19056    }
19057
19058    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19059    where
19060        A: de::MapAccess<'de>,
19061    {
19062        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19063        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19064        match any {
19065            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19066                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19067            VimAny::Value(value) => Err(de::Error::custom(format!(
19068                "expected object not wrapped value: {:?}",
19069                value))),
19070        }
19071    }
19072}
19073
19074impl InheritablePolicyTrait for InheritablePolicy {
19075    fn get_inherited(&self) -> bool { self.inherited }
19076}
19077impl InheritablePolicyTrait for BoolPolicy {
19078    fn get_inherited(&self) -> bool { self.inherited }
19079}
19080impl InheritablePolicyTrait for IntPolicy {
19081    fn get_inherited(&self) -> bool { self.inherited }
19082}
19083impl InheritablePolicyTrait for LongPolicy {
19084    fn get_inherited(&self) -> bool { self.inherited }
19085}
19086impl InheritablePolicyTrait for StringPolicy {
19087    fn get_inherited(&self) -> bool { self.inherited }
19088}
19089impl InheritablePolicyTrait for DvsFilterConfig {
19090    fn get_inherited(&self) -> bool { self.inherited }
19091}
19092impl InheritablePolicyTrait for DvsFilterConfigSpec {
19093    fn get_inherited(&self) -> bool { self.inherited }
19094}
19095impl InheritablePolicyTrait for DvsTrafficFilterConfig {
19096    fn get_inherited(&self) -> bool { self.inherited }
19097}
19098impl InheritablePolicyTrait for DvsTrafficFilterConfigSpec {
19099    fn get_inherited(&self) -> bool { self.inherited }
19100}
19101impl InheritablePolicyTrait for DvsFilterPolicy {
19102    fn get_inherited(&self) -> bool { self.inherited }
19103}
19104impl InheritablePolicyTrait for DvsTrafficShapingPolicy {
19105    fn get_inherited(&self) -> bool { self.inherited }
19106}
19107impl InheritablePolicyTrait for DvsVendorSpecificConfig {
19108    fn get_inherited(&self) -> bool { self.inherited }
19109}
19110impl InheritablePolicyTrait for DvsFailureCriteria {
19111    fn get_inherited(&self) -> bool { self.inherited }
19112}
19113impl InheritablePolicyTrait for DvsMacLearningPolicy {
19114    fn get_inherited(&self) -> bool { self.inherited }
19115}
19116impl InheritablePolicyTrait for DvsMacManagementPolicy {
19117    fn get_inherited(&self) -> bool { self.inherited }
19118}
19119impl InheritablePolicyTrait for DvsSecurityPolicy {
19120    fn get_inherited(&self) -> bool { self.inherited }
19121}
19122impl InheritablePolicyTrait for VMwareUplinkLacpPolicy {
19123    fn get_inherited(&self) -> bool { self.inherited }
19124}
19125impl InheritablePolicyTrait for VMwareUplinkPortOrderPolicy {
19126    fn get_inherited(&self) -> bool { self.inherited }
19127}
19128impl InheritablePolicyTrait for VmwareUplinkPortTeamingPolicy {
19129    fn get_inherited(&self) -> bool { self.inherited }
19130}
19131impl InheritablePolicyTrait for VmwareDistributedVirtualSwitchVlanSpec {
19132    fn get_inherited(&self) -> bool { self.inherited }
19133}
19134impl InheritablePolicyTrait for VmwareDistributedVirtualSwitchPvlanSpec {
19135    fn get_inherited(&self) -> bool { self.inherited }
19136}
19137impl InheritablePolicyTrait for VmwareDistributedVirtualSwitchTrunkVlanSpec {
19138    fn get_inherited(&self) -> bool { self.inherited }
19139}
19140impl InheritablePolicyTrait for VmwareDistributedVirtualSwitchVlanIdSpec {
19141    fn get_inherited(&self) -> bool { self.inherited }
19142}
19143impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn InheritablePolicyTrait {
19144    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19145        let data_type = from.data_type();
19146        match data_type {
19147            StructType::InheritablePolicy => Some(from.as_any_ref().downcast_ref::<InheritablePolicy>()?),
19148            StructType::BoolPolicy => Some(from.as_any_ref().downcast_ref::<BoolPolicy>()?),
19149            StructType::IntPolicy => Some(from.as_any_ref().downcast_ref::<IntPolicy>()?),
19150            StructType::LongPolicy => Some(from.as_any_ref().downcast_ref::<LongPolicy>()?),
19151            StructType::StringPolicy => Some(from.as_any_ref().downcast_ref::<StringPolicy>()?),
19152            StructType::DvsFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsFilterConfig>()?),
19153            StructType::DvsFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterConfigSpec>()?),
19154            StructType::DvsTrafficFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfig>()?),
19155            StructType::DvsTrafficFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfigSpec>()?),
19156            StructType::DvsFilterPolicy => Some(from.as_any_ref().downcast_ref::<DvsFilterPolicy>()?),
19157            StructType::DvsTrafficShapingPolicy => Some(from.as_any_ref().downcast_ref::<DvsTrafficShapingPolicy>()?),
19158            StructType::DvsVendorSpecificConfig => Some(from.as_any_ref().downcast_ref::<DvsVendorSpecificConfig>()?),
19159            StructType::DvsFailureCriteria => Some(from.as_any_ref().downcast_ref::<DvsFailureCriteria>()?),
19160            StructType::DvsMacLearningPolicy => Some(from.as_any_ref().downcast_ref::<DvsMacLearningPolicy>()?),
19161            StructType::DvsMacManagementPolicy => Some(from.as_any_ref().downcast_ref::<DvsMacManagementPolicy>()?),
19162            StructType::DvsSecurityPolicy => Some(from.as_any_ref().downcast_ref::<DvsSecurityPolicy>()?),
19163            StructType::VMwareUplinkLacpPolicy => Some(from.as_any_ref().downcast_ref::<VMwareUplinkLacpPolicy>()?),
19164            StructType::VMwareUplinkPortOrderPolicy => Some(from.as_any_ref().downcast_ref::<VMwareUplinkPortOrderPolicy>()?),
19165            StructType::VmwareUplinkPortTeamingPolicy => Some(from.as_any_ref().downcast_ref::<VmwareUplinkPortTeamingPolicy>()?),
19166            StructType::VmwareDistributedVirtualSwitchVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanSpec>()?),
19167            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
19168            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
19169            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
19170            _ => None,
19171        }
19172    }
19173    
19174    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19175        let data_type = from.data_type();
19176        match data_type {
19177            StructType::InheritablePolicy => Ok(from.as_any_box().downcast::<InheritablePolicy>()?),
19178            StructType::BoolPolicy => Ok(from.as_any_box().downcast::<BoolPolicy>()?),
19179            StructType::IntPolicy => Ok(from.as_any_box().downcast::<IntPolicy>()?),
19180            StructType::LongPolicy => Ok(from.as_any_box().downcast::<LongPolicy>()?),
19181            StructType::StringPolicy => Ok(from.as_any_box().downcast::<StringPolicy>()?),
19182            StructType::DvsFilterConfig => Ok(from.as_any_box().downcast::<DvsFilterConfig>()?),
19183            StructType::DvsFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsFilterConfigSpec>()?),
19184            StructType::DvsTrafficFilterConfig => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfig>()?),
19185            StructType::DvsTrafficFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfigSpec>()?),
19186            StructType::DvsFilterPolicy => Ok(from.as_any_box().downcast::<DvsFilterPolicy>()?),
19187            StructType::DvsTrafficShapingPolicy => Ok(from.as_any_box().downcast::<DvsTrafficShapingPolicy>()?),
19188            StructType::DvsVendorSpecificConfig => Ok(from.as_any_box().downcast::<DvsVendorSpecificConfig>()?),
19189            StructType::DvsFailureCriteria => Ok(from.as_any_box().downcast::<DvsFailureCriteria>()?),
19190            StructType::DvsMacLearningPolicy => Ok(from.as_any_box().downcast::<DvsMacLearningPolicy>()?),
19191            StructType::DvsMacManagementPolicy => Ok(from.as_any_box().downcast::<DvsMacManagementPolicy>()?),
19192            StructType::DvsSecurityPolicy => Ok(from.as_any_box().downcast::<DvsSecurityPolicy>()?),
19193            StructType::VMwareUplinkLacpPolicy => Ok(from.as_any_box().downcast::<VMwareUplinkLacpPolicy>()?),
19194            StructType::VMwareUplinkPortOrderPolicy => Ok(from.as_any_box().downcast::<VMwareUplinkPortOrderPolicy>()?),
19195            StructType::VmwareUplinkPortTeamingPolicy => Ok(from.as_any_box().downcast::<VmwareUplinkPortTeamingPolicy>()?),
19196            StructType::VmwareDistributedVirtualSwitchVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanSpec>()?),
19197            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
19198            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
19199            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
19200            _ => Err(from.as_any_box()),
19201        }
19202    }
19203}
19204/// This class defines Network Filter configuration.
19205/// 
19206/// ** Supported Qualifier and Actions **
19207/// <table border="1"width="100%">
19208/// <tr>
19209/// <th>Network Filter Config</th>
19210/// <th>Supported classes</th>
19211/// </tr>
19212/// <tr>
19213/// <td>Qualifiers supported</td>
19214/// <td>*SingleIp*, *IpRange*,
19215/// *SingleMac*, *MacRange*,
19216/// *DvsSingleIpPort*,
19217/// *DvsSystemTrafficNetworkRuleQualifier*
19218/// </td>
19219/// </tr>
19220/// <tr>
19221/// <td>Actions Supported</td>
19222/// <td>*DvsDropNetworkRuleAction*,
19223/// *DvsAcceptNetworkRuleAction*,
19224/// *DvsPuntNetworkRuleAction*,
19225/// *DvsCopyNetworkRuleAction*,
19226/// *DvsMacRewriteNetworkRuleAction*,
19227/// *DvsGreEncapNetworkRuleAction*,
19228/// *DvsLogNetworkRuleAction*,
19229/// *DvsUpdateTagNetworkRuleAction*,
19230/// *DvsRateLimitNetworkRuleAction*
19231/// </td>
19232/// </tr>
19233pub trait DvsFilterConfigTrait : super::traits::InheritablePolicyTrait {
19234    /// The key of Network Filter Config.
19235    fn get_key(&self) -> &Option<String>;
19236    /// The name of the network traffic filter agent.
19237    fn get_agent_name(&self) -> &Option<String>;
19238    /// The slot number of the network filter agent.
19239    fn get_slot_number(&self) -> &Option<String>;
19240    /// Network Filter Parameter
19241    fn get_parameters(&self) -> &Option<super::structs::DvsFilterParameter>;
19242    /// This property specifies whether to allow all traffic or to deny all
19243    /// traffic when a Network Filter fails to configure.
19244    /// 
19245    /// Please see *DvsFilterOnFailure_enum*
19246    /// for more details.
19247    fn get_on_failure(&self) -> &Option<String>;
19248}
19249impl<'s> serde::Serialize for dyn DvsFilterConfigTrait + 's {
19250            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19251            where
19252                S: serde::Serializer,
19253            {
19254                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19255            }
19256        }
19257impl<'de> serde::Deserialize<'de> for Box<dyn DvsFilterConfigTrait> {
19258            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19259                deserializer.deserialize_map(DvsFilterConfigVisitor)
19260            }
19261        }
19262
19263struct DvsFilterConfigVisitor;
19264
19265impl<'de> de::Visitor<'de> for DvsFilterConfigVisitor {
19266    type Value = Box<dyn DvsFilterConfigTrait>;
19267
19268    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19269        formatter.write_str("a valid DvsFilterConfigTrait JSON object with a _typeName field")
19270    }
19271
19272    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19273    where
19274        A: de::MapAccess<'de>,
19275    {
19276        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19277        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19278        match any {
19279            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19280                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19281            VimAny::Value(value) => Err(de::Error::custom(format!(
19282                "expected object not wrapped value: {:?}",
19283                value))),
19284        }
19285    }
19286}
19287
19288impl DvsFilterConfigTrait for DvsFilterConfig {
19289    fn get_key(&self) -> &Option<String> { &self.key }
19290    fn get_agent_name(&self) -> &Option<String> { &self.agent_name }
19291    fn get_slot_number(&self) -> &Option<String> { &self.slot_number }
19292    fn get_parameters(&self) -> &Option<super::structs::DvsFilterParameter> { &self.parameters }
19293    fn get_on_failure(&self) -> &Option<String> { &self.on_failure }
19294}
19295impl DvsFilterConfigTrait for DvsFilterConfigSpec {
19296    fn get_key(&self) -> &Option<String> { &self.key }
19297    fn get_agent_name(&self) -> &Option<String> { &self.agent_name }
19298    fn get_slot_number(&self) -> &Option<String> { &self.slot_number }
19299    fn get_parameters(&self) -> &Option<super::structs::DvsFilterParameter> { &self.parameters }
19300    fn get_on_failure(&self) -> &Option<String> { &self.on_failure }
19301}
19302impl DvsFilterConfigTrait for DvsTrafficFilterConfig {
19303    fn get_key(&self) -> &Option<String> { &self.key }
19304    fn get_agent_name(&self) -> &Option<String> { &self.agent_name }
19305    fn get_slot_number(&self) -> &Option<String> { &self.slot_number }
19306    fn get_parameters(&self) -> &Option<super::structs::DvsFilterParameter> { &self.parameters }
19307    fn get_on_failure(&self) -> &Option<String> { &self.on_failure }
19308}
19309impl DvsFilterConfigTrait for DvsTrafficFilterConfigSpec {
19310    fn get_key(&self) -> &Option<String> { &self.key }
19311    fn get_agent_name(&self) -> &Option<String> { &self.agent_name }
19312    fn get_slot_number(&self) -> &Option<String> { &self.slot_number }
19313    fn get_parameters(&self) -> &Option<super::structs::DvsFilterParameter> { &self.parameters }
19314    fn get_on_failure(&self) -> &Option<String> { &self.on_failure }
19315}
19316impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsFilterConfigTrait {
19317    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19318        let data_type = from.data_type();
19319        match data_type {
19320            StructType::DvsFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsFilterConfig>()?),
19321            StructType::DvsFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterConfigSpec>()?),
19322            StructType::DvsTrafficFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfig>()?),
19323            StructType::DvsTrafficFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfigSpec>()?),
19324            _ => None,
19325        }
19326    }
19327    
19328    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19329        let data_type = from.data_type();
19330        match data_type {
19331            StructType::DvsFilterConfig => Ok(from.as_any_box().downcast::<DvsFilterConfig>()?),
19332            StructType::DvsFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsFilterConfigSpec>()?),
19333            StructType::DvsTrafficFilterConfig => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfig>()?),
19334            StructType::DvsTrafficFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfigSpec>()?),
19335            _ => Err(from.as_any_box()),
19336        }
19337    }
19338}
19339/// This class defines Traffic Filter configuration.
19340/// 
19341/// ** Supported Qualifier and Actions **
19342/// <table border="1"width="100%">
19343/// <tr>
19344/// <th>Traffic Filter Config</th>
19345/// <th>Supported classes</th>
19346/// </tr>
19347/// <tr>
19348/// <td>Qualifiers supported</td>
19349/// <td>*SingleIp*, *IpRange*,
19350/// *SingleMac*, *MacRange*,
19351/// *DvsSingleIpPort*,
19352/// *DvsSystemTrafficNetworkRuleQualifier*
19353/// </td>
19354/// </tr>
19355/// <tr>
19356/// <td>Actions Supported</td>
19357/// <td>*DvsDropNetworkRuleAction*,
19358/// *DvsAcceptNetworkRuleAction*,
19359/// *DvsPuntNetworkRuleAction*,
19360/// *DvsCopyNetworkRuleAction*,
19361/// *DvsMacRewriteNetworkRuleAction*,
19362/// *DvsGreEncapNetworkRuleAction*,
19363/// *DvsLogNetworkRuleAction*,
19364/// *DvsUpdateTagNetworkRuleAction*,
19365/// *DvsRateLimitNetworkRuleAction*
19366/// </td>
19367/// </tr>
19368pub trait DvsTrafficFilterConfigTrait : super::traits::DvsFilterConfigTrait {
19369    /// Network Traffic Ruleset
19370    fn get_traffic_ruleset(&self) -> &Option<super::structs::DvsTrafficRuleset>;
19371}
19372impl<'s> serde::Serialize for dyn DvsTrafficFilterConfigTrait + 's {
19373            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19374            where
19375                S: serde::Serializer,
19376            {
19377                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19378            }
19379        }
19380impl<'de> serde::Deserialize<'de> for Box<dyn DvsTrafficFilterConfigTrait> {
19381            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19382                deserializer.deserialize_map(DvsTrafficFilterConfigVisitor)
19383            }
19384        }
19385
19386struct DvsTrafficFilterConfigVisitor;
19387
19388impl<'de> de::Visitor<'de> for DvsTrafficFilterConfigVisitor {
19389    type Value = Box<dyn DvsTrafficFilterConfigTrait>;
19390
19391    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19392        formatter.write_str("a valid DvsTrafficFilterConfigTrait JSON object with a _typeName field")
19393    }
19394
19395    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19396    where
19397        A: de::MapAccess<'de>,
19398    {
19399        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19400        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19401        match any {
19402            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19403                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19404            VimAny::Value(value) => Err(de::Error::custom(format!(
19405                "expected object not wrapped value: {:?}",
19406                value))),
19407        }
19408    }
19409}
19410
19411impl DvsTrafficFilterConfigTrait for DvsTrafficFilterConfig {
19412    fn get_traffic_ruleset(&self) -> &Option<super::structs::DvsTrafficRuleset> { &self.traffic_ruleset }
19413}
19414impl DvsTrafficFilterConfigTrait for DvsTrafficFilterConfigSpec {
19415    fn get_traffic_ruleset(&self) -> &Option<super::structs::DvsTrafficRuleset> { &self.traffic_ruleset }
19416}
19417impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsTrafficFilterConfigTrait {
19418    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19419        let data_type = from.data_type();
19420        match data_type {
19421            StructType::DvsTrafficFilterConfig => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfig>()?),
19422            StructType::DvsTrafficFilterConfigSpec => Some(from.as_any_ref().downcast_ref::<DvsTrafficFilterConfigSpec>()?),
19423            _ => None,
19424        }
19425    }
19426    
19427    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19428        let data_type = from.data_type();
19429        match data_type {
19430            StructType::DvsTrafficFilterConfig => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfig>()?),
19431            StructType::DvsTrafficFilterConfigSpec => Ok(from.as_any_box().downcast::<DvsTrafficFilterConfigSpec>()?),
19432            _ => Err(from.as_any_box()),
19433        }
19434    }
19435}
19436/// Base class for Vlan Specifiation for ports.
19437pub trait VmwareDistributedVirtualSwitchVlanSpecTrait : super::traits::InheritablePolicyTrait {
19438}
19439impl<'s> serde::Serialize for dyn VmwareDistributedVirtualSwitchVlanSpecTrait + 's {
19440            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19441            where
19442                S: serde::Serializer,
19443            {
19444                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19445            }
19446        }
19447impl<'de> serde::Deserialize<'de> for Box<dyn VmwareDistributedVirtualSwitchVlanSpecTrait> {
19448            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19449                deserializer.deserialize_map(VmwareDistributedVirtualSwitchVlanSpecVisitor)
19450            }
19451        }
19452
19453struct VmwareDistributedVirtualSwitchVlanSpecVisitor;
19454
19455impl<'de> de::Visitor<'de> for VmwareDistributedVirtualSwitchVlanSpecVisitor {
19456    type Value = Box<dyn VmwareDistributedVirtualSwitchVlanSpecTrait>;
19457
19458    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19459        formatter.write_str("a valid VmwareDistributedVirtualSwitchVlanSpecTrait JSON object with a _typeName field")
19460    }
19461
19462    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19463    where
19464        A: de::MapAccess<'de>,
19465    {
19466        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19467        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19468        match any {
19469            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19470                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19471            VimAny::Value(value) => Err(de::Error::custom(format!(
19472                "expected object not wrapped value: {:?}",
19473                value))),
19474        }
19475    }
19476}
19477
19478impl VmwareDistributedVirtualSwitchVlanSpecTrait for VmwareDistributedVirtualSwitchVlanSpec {
19479}
19480impl VmwareDistributedVirtualSwitchVlanSpecTrait for VmwareDistributedVirtualSwitchPvlanSpec {
19481}
19482impl VmwareDistributedVirtualSwitchVlanSpecTrait for VmwareDistributedVirtualSwitchTrunkVlanSpec {
19483}
19484impl VmwareDistributedVirtualSwitchVlanSpecTrait for VmwareDistributedVirtualSwitchVlanIdSpec {
19485}
19486impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmwareDistributedVirtualSwitchVlanSpecTrait {
19487    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19488        let data_type = from.data_type();
19489        match data_type {
19490            StructType::VmwareDistributedVirtualSwitchVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanSpec>()?),
19491            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
19492            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
19493            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Some(from.as_any_ref().downcast_ref::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
19494            _ => None,
19495        }
19496    }
19497    
19498    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19499        let data_type = from.data_type();
19500        match data_type {
19501            StructType::VmwareDistributedVirtualSwitchVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanSpec>()?),
19502            StructType::VmwareDistributedVirtualSwitchPvlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchPvlanSpec>()?),
19503            StructType::VmwareDistributedVirtualSwitchTrunkVlanSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchTrunkVlanSpec>()?),
19504            StructType::VmwareDistributedVirtualSwitchVlanIdSpec => Ok(from.as_any_box().downcast::<VmwareDistributedVirtualSwitchVlanIdSpec>()?),
19505            _ => Err(from.as_any_box()),
19506        }
19507    }
19508}
19509/// Information about an IO Filter.
19510pub trait IoFilterInfoTrait : super::traits::DataObjectTrait {
19511    /// IO Filter identifier.
19512    fn get_id(&self) -> &str;
19513    /// Name of the IO Filter.
19514    fn get_name(&self) -> &str;
19515    /// Vendor of the IO Filter.
19516    fn get_vendor(&self) -> &str;
19517    /// Version of the IO Filter.
19518    fn get_version(&self) -> &str;
19519    /// Type of the IO Filter.
19520    /// 
19521    /// The set of possible values are listed in
19522    /// *IoFilterType_enum*.
19523    /// The property is unset if the information is not available.
19524    fn get_type(&self) -> &Option<String>;
19525    /// Short description of the IO Filter.
19526    /// 
19527    /// The property is unset if the information is not available.
19528    fn get_summary(&self) -> &Option<String>;
19529    /// Release date of the IO Filter.
19530    /// 
19531    /// The property is unset if the information is not available.
19532    fn get_release_date(&self) -> &Option<String>;
19533}
19534impl<'s> serde::Serialize for dyn IoFilterInfoTrait + 's {
19535            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19536            where
19537                S: serde::Serializer,
19538            {
19539                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19540            }
19541        }
19542impl<'de> serde::Deserialize<'de> for Box<dyn IoFilterInfoTrait> {
19543            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19544                deserializer.deserialize_map(IoFilterInfoVisitor)
19545            }
19546        }
19547
19548struct IoFilterInfoVisitor;
19549
19550impl<'de> de::Visitor<'de> for IoFilterInfoVisitor {
19551    type Value = Box<dyn IoFilterInfoTrait>;
19552
19553    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19554        formatter.write_str("a valid IoFilterInfoTrait JSON object with a _typeName field")
19555    }
19556
19557    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19558    where
19559        A: de::MapAccess<'de>,
19560    {
19561        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19562        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19563        match any {
19564            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19565                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19566            VimAny::Value(value) => Err(de::Error::custom(format!(
19567                "expected object not wrapped value: {:?}",
19568                value))),
19569        }
19570    }
19571}
19572
19573impl IoFilterInfoTrait for IoFilterInfo {
19574    fn get_id(&self) -> &str { &self.id }
19575    fn get_name(&self) -> &str { &self.name }
19576    fn get_vendor(&self) -> &str { &self.vendor }
19577    fn get_version(&self) -> &str { &self.version }
19578    fn get_type(&self) -> &Option<String> { &self.r#type }
19579    fn get_summary(&self) -> &Option<String> { &self.summary }
19580    fn get_release_date(&self) -> &Option<String> { &self.release_date }
19581}
19582impl IoFilterInfoTrait for ClusterIoFilterInfo {
19583    fn get_id(&self) -> &str { &self.id }
19584    fn get_name(&self) -> &str { &self.name }
19585    fn get_vendor(&self) -> &str { &self.vendor }
19586    fn get_version(&self) -> &str { &self.version }
19587    fn get_type(&self) -> &Option<String> { &self.r#type }
19588    fn get_summary(&self) -> &Option<String> { &self.summary }
19589    fn get_release_date(&self) -> &Option<String> { &self.release_date }
19590}
19591impl IoFilterInfoTrait for HostIoFilterInfo {
19592    fn get_id(&self) -> &str { &self.id }
19593    fn get_name(&self) -> &str { &self.name }
19594    fn get_vendor(&self) -> &str { &self.vendor }
19595    fn get_version(&self) -> &str { &self.version }
19596    fn get_type(&self) -> &Option<String> { &self.r#type }
19597    fn get_summary(&self) -> &Option<String> { &self.summary }
19598    fn get_release_date(&self) -> &Option<String> { &self.release_date }
19599}
19600impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn IoFilterInfoTrait {
19601    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19602        let data_type = from.data_type();
19603        match data_type {
19604            StructType::IoFilterInfo => Some(from.as_any_ref().downcast_ref::<IoFilterInfo>()?),
19605            StructType::ClusterIoFilterInfo => Some(from.as_any_ref().downcast_ref::<ClusterIoFilterInfo>()?),
19606            StructType::HostIoFilterInfo => Some(from.as_any_ref().downcast_ref::<HostIoFilterInfo>()?),
19607            _ => None,
19608        }
19609    }
19610    
19611    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19612        let data_type = from.data_type();
19613        match data_type {
19614            StructType::IoFilterInfo => Ok(from.as_any_box().downcast::<IoFilterInfo>()?),
19615            StructType::ClusterIoFilterInfo => Ok(from.as_any_box().downcast::<ClusterIoFilterInfo>()?),
19616            StructType::HostIoFilterInfo => Ok(from.as_any_box().downcast::<HostIoFilterInfo>()?),
19617            _ => Err(from.as_any_box()),
19618        }
19619    }
19620}
19621/// Specifies an SSL trust policy.
19622/// 
19623/// ***Since:*** vSphere API Release 8.0.3.0
19624pub trait IoFilterManagerSslTrustTrait : super::traits::DataObjectTrait {
19625}
19626impl<'s> serde::Serialize for dyn IoFilterManagerSslTrustTrait + 's {
19627            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19628            where
19629                S: serde::Serializer,
19630            {
19631                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19632            }
19633        }
19634impl<'de> serde::Deserialize<'de> for Box<dyn IoFilterManagerSslTrustTrait> {
19635            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19636                deserializer.deserialize_map(IoFilterManagerSslTrustVisitor)
19637            }
19638        }
19639
19640struct IoFilterManagerSslTrustVisitor;
19641
19642impl<'de> de::Visitor<'de> for IoFilterManagerSslTrustVisitor {
19643    type Value = Box<dyn IoFilterManagerSslTrustTrait>;
19644
19645    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19646        formatter.write_str("a valid IoFilterManagerSslTrustTrait JSON object with a _typeName field")
19647    }
19648
19649    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19650    where
19651        A: de::MapAccess<'de>,
19652    {
19653        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19654        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19655        match any {
19656            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19657                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19658            VimAny::Value(value) => Err(de::Error::custom(format!(
19659                "expected object not wrapped value: {:?}",
19660                value))),
19661        }
19662    }
19663}
19664
19665impl IoFilterManagerSslTrustTrait for IoFilterManagerSslTrust {
19666}
19667impl IoFilterManagerSslTrustTrait for PinnedCertificate {
19668}
19669impl IoFilterManagerSslTrustTrait for UntrustedCertificate {
19670}
19671impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn IoFilterManagerSslTrustTrait {
19672    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19673        let data_type = from.data_type();
19674        match data_type {
19675            StructType::IoFilterManagerSslTrust => Some(from.as_any_ref().downcast_ref::<IoFilterManagerSslTrust>()?),
19676            StructType::PinnedCertificate => Some(from.as_any_ref().downcast_ref::<PinnedCertificate>()?),
19677            StructType::UntrustedCertificate => Some(from.as_any_ref().downcast_ref::<UntrustedCertificate>()?),
19678            _ => None,
19679        }
19680    }
19681    
19682    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19683        let data_type = from.data_type();
19684        match data_type {
19685            StructType::IoFilterManagerSslTrust => Ok(from.as_any_box().downcast::<IoFilterManagerSslTrust>()?),
19686            StructType::PinnedCertificate => Ok(from.as_any_box().downcast::<PinnedCertificate>()?),
19687            StructType::UntrustedCertificate => Ok(from.as_any_box().downcast::<UntrustedCertificate>()?),
19688            _ => Err(from.as_any_box()),
19689        }
19690    }
19691}
19692/// Deprecated as of vSphere API 4.0, this is not used by the system.
19693/// 
19694/// This data object type is used to communicate configuration about
19695/// where to find licenses to use for this system.
19696pub trait LicenseSourceTrait : super::traits::DataObjectTrait {
19697}
19698impl<'s> serde::Serialize for dyn LicenseSourceTrait + 's {
19699            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19700            where
19701                S: serde::Serializer,
19702            {
19703                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19704            }
19705        }
19706impl<'de> serde::Deserialize<'de> for Box<dyn LicenseSourceTrait> {
19707            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19708                deserializer.deserialize_map(LicenseSourceVisitor)
19709            }
19710        }
19711
19712struct LicenseSourceVisitor;
19713
19714impl<'de> de::Visitor<'de> for LicenseSourceVisitor {
19715    type Value = Box<dyn LicenseSourceTrait>;
19716
19717    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19718        formatter.write_str("a valid LicenseSourceTrait JSON object with a _typeName field")
19719    }
19720
19721    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19722    where
19723        A: de::MapAccess<'de>,
19724    {
19725        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19726        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19727        match any {
19728            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19729                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19730            VimAny::Value(value) => Err(de::Error::custom(format!(
19731                "expected object not wrapped value: {:?}",
19732                value))),
19733        }
19734    }
19735}
19736
19737impl LicenseSourceTrait for LicenseSource {
19738}
19739impl LicenseSourceTrait for EvaluationLicenseSource {
19740}
19741impl LicenseSourceTrait for LicenseServerSource {
19742}
19743impl LicenseSourceTrait for LocalLicenseSource {
19744}
19745impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn LicenseSourceTrait {
19746    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19747        let data_type = from.data_type();
19748        match data_type {
19749            StructType::LicenseSource => Some(from.as_any_ref().downcast_ref::<LicenseSource>()?),
19750            StructType::EvaluationLicenseSource => Some(from.as_any_ref().downcast_ref::<EvaluationLicenseSource>()?),
19751            StructType::LicenseServerSource => Some(from.as_any_ref().downcast_ref::<LicenseServerSource>()?),
19752            StructType::LocalLicenseSource => Some(from.as_any_ref().downcast_ref::<LocalLicenseSource>()?),
19753            _ => None,
19754        }
19755    }
19756    
19757    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19758        let data_type = from.data_type();
19759        match data_type {
19760            StructType::LicenseSource => Ok(from.as_any_box().downcast::<LicenseSource>()?),
19761            StructType::EvaluationLicenseSource => Ok(from.as_any_box().downcast::<EvaluationLicenseSource>()?),
19762            StructType::LicenseServerSource => Ok(from.as_any_box().downcast::<LicenseServerSource>()?),
19763            StructType::LocalLicenseSource => Ok(from.as_any_box().downcast::<LocalLicenseSource>()?),
19764            _ => Err(from.as_any_box()),
19765        }
19766    }
19767}
19768/// The base class for any type of setting or configuration to which negation
19769/// can be applied.
19770/// 
19771/// When used in a configuration information object:
19772/// if *NegatableExpression.negate* is true, then ~(objectValue) will be used for the
19773/// configuration. If false, then objectValue will be used as it is.
19774pub trait NegatableExpressionTrait : super::traits::DataObjectTrait {
19775    /// Whether the configuration needs to be negated or not.
19776    fn get_negate(&self) -> Option<bool>;
19777}
19778impl<'s> serde::Serialize for dyn NegatableExpressionTrait + 's {
19779            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19780            where
19781                S: serde::Serializer,
19782            {
19783                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19784            }
19785        }
19786impl<'de> serde::Deserialize<'de> for Box<dyn NegatableExpressionTrait> {
19787            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19788                deserializer.deserialize_map(NegatableExpressionVisitor)
19789            }
19790        }
19791
19792struct NegatableExpressionVisitor;
19793
19794impl<'de> de::Visitor<'de> for NegatableExpressionVisitor {
19795    type Value = Box<dyn NegatableExpressionTrait>;
19796
19797    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19798        formatter.write_str("a valid NegatableExpressionTrait JSON object with a _typeName field")
19799    }
19800
19801    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19802    where
19803        A: de::MapAccess<'de>,
19804    {
19805        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19806        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19807        match any {
19808            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19809                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19810            VimAny::Value(value) => Err(de::Error::custom(format!(
19811                "expected object not wrapped value: {:?}",
19812                value))),
19813        }
19814    }
19815}
19816
19817impl NegatableExpressionTrait for NegatableExpression {
19818    fn get_negate(&self) -> Option<bool> { self.negate }
19819}
19820impl NegatableExpressionTrait for IntExpression {
19821    fn get_negate(&self) -> Option<bool> { self.negate }
19822}
19823impl NegatableExpressionTrait for IpAddress {
19824    fn get_negate(&self) -> Option<bool> { self.negate }
19825}
19826impl NegatableExpressionTrait for IpRange {
19827    fn get_negate(&self) -> Option<bool> { self.negate }
19828}
19829impl NegatableExpressionTrait for SingleIp {
19830    fn get_negate(&self) -> Option<bool> { self.negate }
19831}
19832impl NegatableExpressionTrait for MacAddress {
19833    fn get_negate(&self) -> Option<bool> { self.negate }
19834}
19835impl NegatableExpressionTrait for MacRange {
19836    fn get_negate(&self) -> Option<bool> { self.negate }
19837}
19838impl NegatableExpressionTrait for SingleMac {
19839    fn get_negate(&self) -> Option<bool> { self.negate }
19840}
19841impl NegatableExpressionTrait for StringExpression {
19842    fn get_negate(&self) -> Option<bool> { self.negate }
19843}
19844impl NegatableExpressionTrait for DvsIpPort {
19845    fn get_negate(&self) -> Option<bool> { self.negate }
19846}
19847impl NegatableExpressionTrait for DvsIpPortRange {
19848    fn get_negate(&self) -> Option<bool> { self.negate }
19849}
19850impl NegatableExpressionTrait for DvsSingleIpPort {
19851    fn get_negate(&self) -> Option<bool> { self.negate }
19852}
19853impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NegatableExpressionTrait {
19854    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19855        let data_type = from.data_type();
19856        match data_type {
19857            StructType::NegatableExpression => Some(from.as_any_ref().downcast_ref::<NegatableExpression>()?),
19858            StructType::IntExpression => Some(from.as_any_ref().downcast_ref::<IntExpression>()?),
19859            StructType::IpAddress => Some(from.as_any_ref().downcast_ref::<IpAddress>()?),
19860            StructType::IpRange => Some(from.as_any_ref().downcast_ref::<IpRange>()?),
19861            StructType::SingleIp => Some(from.as_any_ref().downcast_ref::<SingleIp>()?),
19862            StructType::MacAddress => Some(from.as_any_ref().downcast_ref::<MacAddress>()?),
19863            StructType::MacRange => Some(from.as_any_ref().downcast_ref::<MacRange>()?),
19864            StructType::SingleMac => Some(from.as_any_ref().downcast_ref::<SingleMac>()?),
19865            StructType::StringExpression => Some(from.as_any_ref().downcast_ref::<StringExpression>()?),
19866            StructType::DvsIpPort => Some(from.as_any_ref().downcast_ref::<DvsIpPort>()?),
19867            StructType::DvsIpPortRange => Some(from.as_any_ref().downcast_ref::<DvsIpPortRange>()?),
19868            StructType::DvsSingleIpPort => Some(from.as_any_ref().downcast_ref::<DvsSingleIpPort>()?),
19869            _ => None,
19870        }
19871    }
19872    
19873    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19874        let data_type = from.data_type();
19875        match data_type {
19876            StructType::NegatableExpression => Ok(from.as_any_box().downcast::<NegatableExpression>()?),
19877            StructType::IntExpression => Ok(from.as_any_box().downcast::<IntExpression>()?),
19878            StructType::IpAddress => Ok(from.as_any_box().downcast::<IpAddress>()?),
19879            StructType::IpRange => Ok(from.as_any_box().downcast::<IpRange>()?),
19880            StructType::SingleIp => Ok(from.as_any_box().downcast::<SingleIp>()?),
19881            StructType::MacAddress => Ok(from.as_any_box().downcast::<MacAddress>()?),
19882            StructType::MacRange => Ok(from.as_any_box().downcast::<MacRange>()?),
19883            StructType::SingleMac => Ok(from.as_any_box().downcast::<SingleMac>()?),
19884            StructType::StringExpression => Ok(from.as_any_box().downcast::<StringExpression>()?),
19885            StructType::DvsIpPort => Ok(from.as_any_box().downcast::<DvsIpPort>()?),
19886            StructType::DvsIpPortRange => Ok(from.as_any_box().downcast::<DvsIpPortRange>()?),
19887            StructType::DvsSingleIpPort => Ok(from.as_any_box().downcast::<DvsSingleIpPort>()?),
19888            _ => Err(from.as_any_box()),
19889        }
19890    }
19891}
19892/// This is the abstract base class for IP address.
19893pub trait IpAddressTrait : super::traits::NegatableExpressionTrait {
19894}
19895impl<'s> serde::Serialize for dyn IpAddressTrait + 's {
19896            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19897            where
19898                S: serde::Serializer,
19899            {
19900                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19901            }
19902        }
19903impl<'de> serde::Deserialize<'de> for Box<dyn IpAddressTrait> {
19904            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19905                deserializer.deserialize_map(IpAddressVisitor)
19906            }
19907        }
19908
19909struct IpAddressVisitor;
19910
19911impl<'de> de::Visitor<'de> for IpAddressVisitor {
19912    type Value = Box<dyn IpAddressTrait>;
19913
19914    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19915        formatter.write_str("a valid IpAddressTrait JSON object with a _typeName field")
19916    }
19917
19918    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19919    where
19920        A: de::MapAccess<'de>,
19921    {
19922        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19923        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19924        match any {
19925            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19926                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19927            VimAny::Value(value) => Err(de::Error::custom(format!(
19928                "expected object not wrapped value: {:?}",
19929                value))),
19930        }
19931    }
19932}
19933
19934impl IpAddressTrait for IpAddress {
19935}
19936impl IpAddressTrait for IpRange {
19937}
19938impl IpAddressTrait for SingleIp {
19939}
19940impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn IpAddressTrait {
19941    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
19942        let data_type = from.data_type();
19943        match data_type {
19944            StructType::IpAddress => Some(from.as_any_ref().downcast_ref::<IpAddress>()?),
19945            StructType::IpRange => Some(from.as_any_ref().downcast_ref::<IpRange>()?),
19946            StructType::SingleIp => Some(from.as_any_ref().downcast_ref::<SingleIp>()?),
19947            _ => None,
19948        }
19949    }
19950    
19951    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
19952        let data_type = from.data_type();
19953        match data_type {
19954            StructType::IpAddress => Ok(from.as_any_box().downcast::<IpAddress>()?),
19955            StructType::IpRange => Ok(from.as_any_box().downcast::<IpRange>()?),
19956            StructType::SingleIp => Ok(from.as_any_box().downcast::<SingleIp>()?),
19957            _ => Err(from.as_any_box()),
19958        }
19959    }
19960}
19961/// Base class for specifying MAC addresses.
19962pub trait MacAddressTrait : super::traits::NegatableExpressionTrait {
19963}
19964impl<'s> serde::Serialize for dyn MacAddressTrait + 's {
19965            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
19966            where
19967                S: serde::Serializer,
19968            {
19969                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
19970            }
19971        }
19972impl<'de> serde::Deserialize<'de> for Box<dyn MacAddressTrait> {
19973            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
19974                deserializer.deserialize_map(MacAddressVisitor)
19975            }
19976        }
19977
19978struct MacAddressVisitor;
19979
19980impl<'de> de::Visitor<'de> for MacAddressVisitor {
19981    type Value = Box<dyn MacAddressTrait>;
19982
19983    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19984        formatter.write_str("a valid MacAddressTrait JSON object with a _typeName field")
19985    }
19986
19987    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
19988    where
19989        A: de::MapAccess<'de>,
19990    {
19991        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
19992        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
19993        match any {
19994            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
19995                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
19996            VimAny::Value(value) => Err(de::Error::custom(format!(
19997                "expected object not wrapped value: {:?}",
19998                value))),
19999        }
20000    }
20001}
20002
20003impl MacAddressTrait for MacAddress {
20004}
20005impl MacAddressTrait for MacRange {
20006}
20007impl MacAddressTrait for SingleMac {
20008}
20009impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn MacAddressTrait {
20010    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20011        let data_type = from.data_type();
20012        match data_type {
20013            StructType::MacAddress => Some(from.as_any_ref().downcast_ref::<MacAddress>()?),
20014            StructType::MacRange => Some(from.as_any_ref().downcast_ref::<MacRange>()?),
20015            StructType::SingleMac => Some(from.as_any_ref().downcast_ref::<SingleMac>()?),
20016            _ => None,
20017        }
20018    }
20019    
20020    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20021        let data_type = from.data_type();
20022        match data_type {
20023            StructType::MacAddress => Ok(from.as_any_box().downcast::<MacAddress>()?),
20024            StructType::MacRange => Ok(from.as_any_box().downcast::<MacRange>()?),
20025            StructType::SingleMac => Ok(from.as_any_box().downcast::<SingleMac>()?),
20026            _ => Err(from.as_any_box()),
20027        }
20028    }
20029}
20030/// Base class for specifying Ports.
20031/// 
20032/// Objects of the base class represent any port (single/range/list).
20033pub trait DvsIpPortTrait : super::traits::NegatableExpressionTrait {
20034}
20035impl<'s> serde::Serialize for dyn DvsIpPortTrait + 's {
20036            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20037            where
20038                S: serde::Serializer,
20039            {
20040                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20041            }
20042        }
20043impl<'de> serde::Deserialize<'de> for Box<dyn DvsIpPortTrait> {
20044            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20045                deserializer.deserialize_map(DvsIpPortVisitor)
20046            }
20047        }
20048
20049struct DvsIpPortVisitor;
20050
20051impl<'de> de::Visitor<'de> for DvsIpPortVisitor {
20052    type Value = Box<dyn DvsIpPortTrait>;
20053
20054    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20055        formatter.write_str("a valid DvsIpPortTrait JSON object with a _typeName field")
20056    }
20057
20058    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20059    where
20060        A: de::MapAccess<'de>,
20061    {
20062        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20063        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20064        match any {
20065            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20066                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20067            VimAny::Value(value) => Err(de::Error::custom(format!(
20068                "expected object not wrapped value: {:?}",
20069                value))),
20070        }
20071    }
20072}
20073
20074impl DvsIpPortTrait for DvsIpPort {
20075}
20076impl DvsIpPortTrait for DvsIpPortRange {
20077}
20078impl DvsIpPortTrait for DvsSingleIpPort {
20079}
20080impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsIpPortTrait {
20081    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20082        let data_type = from.data_type();
20083        match data_type {
20084            StructType::DvsIpPort => Some(from.as_any_ref().downcast_ref::<DvsIpPort>()?),
20085            StructType::DvsIpPortRange => Some(from.as_any_ref().downcast_ref::<DvsIpPortRange>()?),
20086            StructType::DvsSingleIpPort => Some(from.as_any_ref().downcast_ref::<DvsSingleIpPort>()?),
20087            _ => None,
20088        }
20089    }
20090    
20091    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20092        let data_type = from.data_type();
20093        match data_type {
20094            StructType::DvsIpPort => Ok(from.as_any_box().downcast::<DvsIpPort>()?),
20095            StructType::DvsIpPortRange => Ok(from.as_any_box().downcast::<DvsIpPortRange>()?),
20096            StructType::DvsSingleIpPort => Ok(from.as_any_box().downcast::<DvsSingleIpPort>()?),
20097            _ => Err(from.as_any_box()),
20098        }
20099    }
20100}
20101/// General information about a network.
20102pub trait NetworkSummaryTrait : super::traits::DataObjectTrait {
20103    /// Reference to the associated managed object.
20104    /// 
20105    /// Refers instance of *Network*.
20106    fn get_network(&self) -> &Option<super::structs::ManagedObjectReference>;
20107    /// Name of the network.
20108    fn get_name(&self) -> &str;
20109    /// At least one host is configured to provide this network.
20110    fn get_accessible(&self) -> bool;
20111    /// Name of the associated IP pool.
20112    /// 
20113    /// Empty if the network is not associated with an
20114    /// IP pool.
20115    fn get_ip_pool_name(&self) -> &str;
20116    /// Identifier of the associated IP pool.
20117    /// 
20118    /// Zero if the network is not associated
20119    /// with an IP pool.
20120    fn get_ip_pool_id(&self) -> Option<i32>;
20121}
20122impl<'s> serde::Serialize for dyn NetworkSummaryTrait + 's {
20123            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20124            where
20125                S: serde::Serializer,
20126            {
20127                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20128            }
20129        }
20130impl<'de> serde::Deserialize<'de> for Box<dyn NetworkSummaryTrait> {
20131            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20132                deserializer.deserialize_map(NetworkSummaryVisitor)
20133            }
20134        }
20135
20136struct NetworkSummaryVisitor;
20137
20138impl<'de> de::Visitor<'de> for NetworkSummaryVisitor {
20139    type Value = Box<dyn NetworkSummaryTrait>;
20140
20141    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20142        formatter.write_str("a valid NetworkSummaryTrait JSON object with a _typeName field")
20143    }
20144
20145    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20146    where
20147        A: de::MapAccess<'de>,
20148    {
20149        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20150        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20151        match any {
20152            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20153                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20154            VimAny::Value(value) => Err(de::Error::custom(format!(
20155                "expected object not wrapped value: {:?}",
20156                value))),
20157        }
20158    }
20159}
20160
20161impl NetworkSummaryTrait for NetworkSummary {
20162    fn get_network(&self) -> &Option<super::structs::ManagedObjectReference> { &self.network }
20163    fn get_name(&self) -> &str { &self.name }
20164    fn get_accessible(&self) -> bool { self.accessible }
20165    fn get_ip_pool_name(&self) -> &str { &self.ip_pool_name }
20166    fn get_ip_pool_id(&self) -> Option<i32> { self.ip_pool_id }
20167}
20168impl NetworkSummaryTrait for OpaqueNetworkSummary {
20169    fn get_network(&self) -> &Option<super::structs::ManagedObjectReference> { &self.network }
20170    fn get_name(&self) -> &str { &self.name }
20171    fn get_accessible(&self) -> bool { self.accessible }
20172    fn get_ip_pool_name(&self) -> &str { &self.ip_pool_name }
20173    fn get_ip_pool_id(&self) -> Option<i32> { self.ip_pool_id }
20174}
20175impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NetworkSummaryTrait {
20176    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20177        let data_type = from.data_type();
20178        match data_type {
20179            StructType::NetworkSummary => Some(from.as_any_ref().downcast_ref::<NetworkSummary>()?),
20180            StructType::OpaqueNetworkSummary => Some(from.as_any_ref().downcast_ref::<OpaqueNetworkSummary>()?),
20181            _ => None,
20182        }
20183    }
20184    
20185    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20186        let data_type = from.data_type();
20187        match data_type {
20188            StructType::NetworkSummary => Ok(from.as_any_box().downcast::<NetworkSummary>()?),
20189            StructType::OpaqueNetworkSummary => Ok(from.as_any_box().downcast::<OpaqueNetworkSummary>()?),
20190            _ => Err(from.as_any_box()),
20191        }
20192    }
20193}
20194/// A common super-class for basic OVF descriptor parameters
20195pub trait OvfManagerCommonParamsTrait : super::traits::DataObjectTrait {
20196    /// The locale-identifier to choose from the descriptor.
20197    /// 
20198    /// If empty, the
20199    /// default locale on the server is used.
20200    fn get_locale(&self) -> &str;
20201    /// The key of the chosen deployment option.
20202    /// 
20203    /// If empty, the default option is
20204    /// chosen. The list of possible deployment options is returned in the result of
20205    /// parseDescriptor.
20206    fn get_deployment_option(&self) -> &str;
20207    /// An optional set of localization strings to be used.
20208    /// 
20209    /// The server will use
20210    /// these message strings to localize information in the result and in
20211    /// error and warning messages.
20212    /// 
20213    /// This argument allows a client to pass messages from external
20214    /// string bundles. The client is responsible for selecting the right string
20215    /// bundle (based on locale) and parsing the external string bundle. The
20216    /// passed in key/value pairs are looked up before any messages
20217    /// included in the OVF descriptor itself.
20218    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>>;
20219    /// An optional argument for modifing the OVF parsing.
20220    /// 
20221    /// When the server parses an OVF
20222    /// descriptor a set of options can be used to modify the parsing. The argument is a list
20223    /// of keywords.
20224    /// 
20225    /// To get a list of supported keywords see *OvfManager.ovfImportOption*. Unknown
20226    /// options will be ignored by the server.
20227    fn get_import_option(&self) -> &Option<Vec<String>>;
20228}
20229impl<'s> serde::Serialize for dyn OvfManagerCommonParamsTrait + 's {
20230            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20231            where
20232                S: serde::Serializer,
20233            {
20234                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20235            }
20236        }
20237impl<'de> serde::Deserialize<'de> for Box<dyn OvfManagerCommonParamsTrait> {
20238            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20239                deserializer.deserialize_map(OvfManagerCommonParamsVisitor)
20240            }
20241        }
20242
20243struct OvfManagerCommonParamsVisitor;
20244
20245impl<'de> de::Visitor<'de> for OvfManagerCommonParamsVisitor {
20246    type Value = Box<dyn OvfManagerCommonParamsTrait>;
20247
20248    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20249        formatter.write_str("a valid OvfManagerCommonParamsTrait JSON object with a _typeName field")
20250    }
20251
20252    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20253    where
20254        A: de::MapAccess<'de>,
20255    {
20256        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20257        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20258        match any {
20259            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20260                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20261            VimAny::Value(value) => Err(de::Error::custom(format!(
20262                "expected object not wrapped value: {:?}",
20263                value))),
20264        }
20265    }
20266}
20267
20268impl OvfManagerCommonParamsTrait for OvfManagerCommonParams {
20269    fn get_locale(&self) -> &str { &self.locale }
20270    fn get_deployment_option(&self) -> &str { &self.deployment_option }
20271    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.msg_bundle }
20272    fn get_import_option(&self) -> &Option<Vec<String>> { &self.import_option }
20273}
20274impl OvfManagerCommonParamsTrait for OvfCreateImportSpecParams {
20275    fn get_locale(&self) -> &str { &self.locale }
20276    fn get_deployment_option(&self) -> &str { &self.deployment_option }
20277    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.msg_bundle }
20278    fn get_import_option(&self) -> &Option<Vec<String>> { &self.import_option }
20279}
20280impl OvfManagerCommonParamsTrait for OvfImportParams {
20281    fn get_locale(&self) -> &str { &self.locale }
20282    fn get_deployment_option(&self) -> &str { &self.deployment_option }
20283    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.msg_bundle }
20284    fn get_import_option(&self) -> &Option<Vec<String>> { &self.import_option }
20285}
20286impl OvfManagerCommonParamsTrait for OvfParseDescriptorParams {
20287    fn get_locale(&self) -> &str { &self.locale }
20288    fn get_deployment_option(&self) -> &str { &self.deployment_option }
20289    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.msg_bundle }
20290    fn get_import_option(&self) -> &Option<Vec<String>> { &self.import_option }
20291}
20292impl OvfManagerCommonParamsTrait for OvfValidateHostParams {
20293    fn get_locale(&self) -> &str { &self.locale }
20294    fn get_deployment_option(&self) -> &str { &self.deployment_option }
20295    fn get_msg_bundle(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.msg_bundle }
20296    fn get_import_option(&self) -> &Option<Vec<String>> { &self.import_option }
20297}
20298impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn OvfManagerCommonParamsTrait {
20299    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20300        let data_type = from.data_type();
20301        match data_type {
20302            StructType::OvfManagerCommonParams => Some(from.as_any_ref().downcast_ref::<OvfManagerCommonParams>()?),
20303            StructType::OvfCreateImportSpecParams => Some(from.as_any_ref().downcast_ref::<OvfCreateImportSpecParams>()?),
20304            StructType::OvfImportParams => Some(from.as_any_ref().downcast_ref::<OvfImportParams>()?),
20305            StructType::OvfParseDescriptorParams => Some(from.as_any_ref().downcast_ref::<OvfParseDescriptorParams>()?),
20306            StructType::OvfValidateHostParams => Some(from.as_any_ref().downcast_ref::<OvfValidateHostParams>()?),
20307            _ => None,
20308        }
20309    }
20310    
20311    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20312        let data_type = from.data_type();
20313        match data_type {
20314            StructType::OvfManagerCommonParams => Ok(from.as_any_box().downcast::<OvfManagerCommonParams>()?),
20315            StructType::OvfCreateImportSpecParams => Ok(from.as_any_box().downcast::<OvfCreateImportSpecParams>()?),
20316            StructType::OvfImportParams => Ok(from.as_any_box().downcast::<OvfImportParams>()?),
20317            StructType::OvfParseDescriptorParams => Ok(from.as_any_box().downcast::<OvfParseDescriptorParams>()?),
20318            StructType::OvfValidateHostParams => Ok(from.as_any_box().downcast::<OvfValidateHostParams>()?),
20319            _ => Err(from.as_any_box()),
20320        }
20321    }
20322}
20323/// Parameters for deploying an OVF.
20324pub trait OvfCreateImportSpecParamsTrait : super::traits::OvfManagerCommonParamsTrait {
20325    /// The name to set on the entity (more precisely, on the top-level vApp or
20326    /// VM of the entity) as it appears in VI.
20327    /// 
20328    /// If empty, the product name is obtained
20329    /// from the ProductSection of the descriptor. If that name is not specified, the
20330    /// ovf:id of the top-level entity is used.
20331    fn get_entity_name(&self) -> &str;
20332    /// The host to validate the OVF descriptor against, if it cannot be deduced from
20333    /// the resource pool.
20334    /// 
20335    /// The privilege System.Read is required on the host.
20336    /// 
20337    /// Refers instance of *HostSystem*.
20338    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference>;
20339    /// The mapping of network identifiers from the descriptor to networks in the VI
20340    /// infrastructure.
20341    /// 
20342    /// The privilege Network.Assign is required on all networks in the list.
20343    fn get_network_mapping(&self) -> &Option<Vec<super::structs::OvfNetworkMapping>>;
20344    /// The IP allocation policy chosen by the caller.
20345    /// 
20346    /// See *VAppIPAssignmentInfo*.
20347    fn get_ip_allocation_policy(&self) -> &Option<String>;
20348    /// The IP protocol chosen by the caller.
20349    /// 
20350    /// See *VAppIPAssignmentInfo*.
20351    fn get_ip_protocol(&self) -> &Option<String>;
20352    /// The assignment of values to the properties found in the descriptor.
20353    /// 
20354    /// If no value
20355    /// is specified for an option, the default value from the descriptor is used.
20356    fn get_property_mapping(&self) -> &Option<Vec<super::structs::KeyValue>>;
20357    /// Deprecated as of vSphere API 5.1.
20358    /// 
20359    /// The resource configuration for the created vApp.
20360    /// 
20361    /// This can be used to distribute
20362    /// a vApp across multiple resource pools (and create linked children).
20363    fn get_resource_mapping(&self) -> &Option<Vec<super::structs::OvfResourceMap>>;
20364    /// An optional disk provisioning.
20365    /// 
20366    /// If set, all the disks in the deployed OVF will
20367    /// have get the same specified disk type (e.g., thin provisioned).
20368    /// The valide values for disk provisioning are:
20369    /// - *monolithicSparse*
20370    /// - *monolithicFlat*
20371    /// - *twoGbMaxExtentSparse*
20372    /// - *twoGbMaxExtentFlat*
20373    /// - *thin*
20374    /// - *thick*
20375    /// - *sparse*
20376    /// - *flat*
20377    /// - *seSparse*
20378    ///   
20379    /// See also *VirtualDiskMode_enum*.
20380    fn get_disk_provisioning(&self) -> &Option<String>;
20381    /// The instantiation OST to configure OVF consumers.
20382    /// 
20383    /// This is created by the client
20384    /// from the annotated OST. See *OvfConsumer* for details.
20385    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode>;
20386}
20387impl<'s> serde::Serialize for dyn OvfCreateImportSpecParamsTrait + 's {
20388            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20389            where
20390                S: serde::Serializer,
20391            {
20392                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20393            }
20394        }
20395impl<'de> serde::Deserialize<'de> for Box<dyn OvfCreateImportSpecParamsTrait> {
20396            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20397                deserializer.deserialize_map(OvfCreateImportSpecParamsVisitor)
20398            }
20399        }
20400
20401struct OvfCreateImportSpecParamsVisitor;
20402
20403impl<'de> de::Visitor<'de> for OvfCreateImportSpecParamsVisitor {
20404    type Value = Box<dyn OvfCreateImportSpecParamsTrait>;
20405
20406    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20407        formatter.write_str("a valid OvfCreateImportSpecParamsTrait JSON object with a _typeName field")
20408    }
20409
20410    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20411    where
20412        A: de::MapAccess<'de>,
20413    {
20414        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20415        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20416        match any {
20417            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20418                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20419            VimAny::Value(value) => Err(de::Error::custom(format!(
20420                "expected object not wrapped value: {:?}",
20421                value))),
20422        }
20423    }
20424}
20425
20426impl OvfCreateImportSpecParamsTrait for OvfCreateImportSpecParams {
20427    fn get_entity_name(&self) -> &str { &self.entity_name }
20428    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host_system }
20429    fn get_network_mapping(&self) -> &Option<Vec<super::structs::OvfNetworkMapping>> { &self.network_mapping }
20430    fn get_ip_allocation_policy(&self) -> &Option<String> { &self.ip_allocation_policy }
20431    fn get_ip_protocol(&self) -> &Option<String> { &self.ip_protocol }
20432    fn get_property_mapping(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.property_mapping }
20433    fn get_resource_mapping(&self) -> &Option<Vec<super::structs::OvfResourceMap>> { &self.resource_mapping }
20434    fn get_disk_provisioning(&self) -> &Option<String> { &self.disk_provisioning }
20435    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode> { &self.instantiation_ost }
20436}
20437impl OvfCreateImportSpecParamsTrait for OvfImportParams {
20438    fn get_entity_name(&self) -> &str { &self.entity_name }
20439    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host_system }
20440    fn get_network_mapping(&self) -> &Option<Vec<super::structs::OvfNetworkMapping>> { &self.network_mapping }
20441    fn get_ip_allocation_policy(&self) -> &Option<String> { &self.ip_allocation_policy }
20442    fn get_ip_protocol(&self) -> &Option<String> { &self.ip_protocol }
20443    fn get_property_mapping(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.property_mapping }
20444    fn get_resource_mapping(&self) -> &Option<Vec<super::structs::OvfResourceMap>> { &self.resource_mapping }
20445    fn get_disk_provisioning(&self) -> &Option<String> { &self.disk_provisioning }
20446    fn get_instantiation_ost(&self) -> &Option<super::structs::OvfConsumerOstNode> { &self.instantiation_ost }
20447}
20448impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn OvfCreateImportSpecParamsTrait {
20449    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20450        let data_type = from.data_type();
20451        match data_type {
20452            StructType::OvfCreateImportSpecParams => Some(from.as_any_ref().downcast_ref::<OvfCreateImportSpecParams>()?),
20453            StructType::OvfImportParams => Some(from.as_any_ref().downcast_ref::<OvfImportParams>()?),
20454            _ => None,
20455        }
20456    }
20457    
20458    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20459        let data_type = from.data_type();
20460        match data_type {
20461            StructType::OvfCreateImportSpecParams => Ok(from.as_any_box().downcast::<OvfCreateImportSpecParams>()?),
20462            StructType::OvfImportParams => Ok(from.as_any_box().downcast::<OvfImportParams>()?),
20463            _ => Err(from.as_any_box()),
20464        }
20465    }
20466}
20467/// Base type for the various *PerfEntityMetric*
20468/// encodings.
20469pub trait PerfEntityMetricBaseTrait : super::traits::DataObjectTrait {
20470    /// Performance provider ID.
20471    fn get_entity(&self) -> &super::structs::ManagedObjectReference;
20472}
20473impl<'s> serde::Serialize for dyn PerfEntityMetricBaseTrait + 's {
20474            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20475            where
20476                S: serde::Serializer,
20477            {
20478                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20479            }
20480        }
20481impl<'de> serde::Deserialize<'de> for Box<dyn PerfEntityMetricBaseTrait> {
20482            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20483                deserializer.deserialize_map(PerfEntityMetricBaseVisitor)
20484            }
20485        }
20486
20487struct PerfEntityMetricBaseVisitor;
20488
20489impl<'de> de::Visitor<'de> for PerfEntityMetricBaseVisitor {
20490    type Value = Box<dyn PerfEntityMetricBaseTrait>;
20491
20492    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20493        formatter.write_str("a valid PerfEntityMetricBaseTrait JSON object with a _typeName field")
20494    }
20495
20496    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20497    where
20498        A: de::MapAccess<'de>,
20499    {
20500        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20501        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20502        match any {
20503            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20504                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20505            VimAny::Value(value) => Err(de::Error::custom(format!(
20506                "expected object not wrapped value: {:?}",
20507                value))),
20508        }
20509    }
20510}
20511
20512impl PerfEntityMetricBaseTrait for PerfEntityMetricBase {
20513    fn get_entity(&self) -> &super::structs::ManagedObjectReference { &self.entity }
20514}
20515impl PerfEntityMetricBaseTrait for PerfEntityMetric {
20516    fn get_entity(&self) -> &super::structs::ManagedObjectReference { &self.entity }
20517}
20518impl PerfEntityMetricBaseTrait for PerfEntityMetricCsv {
20519    fn get_entity(&self) -> &super::structs::ManagedObjectReference { &self.entity }
20520}
20521impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PerfEntityMetricBaseTrait {
20522    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20523        let data_type = from.data_type();
20524        match data_type {
20525            StructType::PerfEntityMetricBase => Some(from.as_any_ref().downcast_ref::<PerfEntityMetricBase>()?),
20526            StructType::PerfEntityMetric => Some(from.as_any_ref().downcast_ref::<PerfEntityMetric>()?),
20527            StructType::PerfEntityMetricCsv => Some(from.as_any_ref().downcast_ref::<PerfEntityMetricCsv>()?),
20528            _ => None,
20529        }
20530    }
20531    
20532    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20533        let data_type = from.data_type();
20534        match data_type {
20535            StructType::PerfEntityMetricBase => Ok(from.as_any_box().downcast::<PerfEntityMetricBase>()?),
20536            StructType::PerfEntityMetric => Ok(from.as_any_box().downcast::<PerfEntityMetric>()?),
20537            StructType::PerfEntityMetricCsv => Ok(from.as_any_box().downcast::<PerfEntityMetricCsv>()?),
20538            _ => Err(from.as_any_box()),
20539        }
20540    }
20541}
20542/// This is a generic data object type that stores values for a specific
20543/// performance metric.
20544/// 
20545/// Useful data objects that store actual metric values
20546/// extend this data object (see *PerfMetricIntSeries*).
20547pub trait PerfMetricSeriesTrait : super::traits::DataObjectTrait {
20548    /// An identifier for the performance metric.
20549    fn get_id(&self) -> &super::structs::PerfMetricId;
20550}
20551impl<'s> serde::Serialize for dyn PerfMetricSeriesTrait + 's {
20552            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20553            where
20554                S: serde::Serializer,
20555            {
20556                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20557            }
20558        }
20559impl<'de> serde::Deserialize<'de> for Box<dyn PerfMetricSeriesTrait> {
20560            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20561                deserializer.deserialize_map(PerfMetricSeriesVisitor)
20562            }
20563        }
20564
20565struct PerfMetricSeriesVisitor;
20566
20567impl<'de> de::Visitor<'de> for PerfMetricSeriesVisitor {
20568    type Value = Box<dyn PerfMetricSeriesTrait>;
20569
20570    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20571        formatter.write_str("a valid PerfMetricSeriesTrait JSON object with a _typeName field")
20572    }
20573
20574    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20575    where
20576        A: de::MapAccess<'de>,
20577    {
20578        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20579        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20580        match any {
20581            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20582                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20583            VimAny::Value(value) => Err(de::Error::custom(format!(
20584                "expected object not wrapped value: {:?}",
20585                value))),
20586        }
20587    }
20588}
20589
20590impl PerfMetricSeriesTrait for PerfMetricSeries {
20591    fn get_id(&self) -> &super::structs::PerfMetricId { &self.id }
20592}
20593impl PerfMetricSeriesTrait for PerfMetricIntSeries {
20594    fn get_id(&self) -> &super::structs::PerfMetricId { &self.id }
20595}
20596impl PerfMetricSeriesTrait for PerfMetricSeriesCsv {
20597    fn get_id(&self) -> &super::structs::PerfMetricId { &self.id }
20598}
20599impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PerfMetricSeriesTrait {
20600    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20601        let data_type = from.data_type();
20602        match data_type {
20603            StructType::PerfMetricSeries => Some(from.as_any_ref().downcast_ref::<PerfMetricSeries>()?),
20604            StructType::PerfMetricIntSeries => Some(from.as_any_ref().downcast_ref::<PerfMetricIntSeries>()?),
20605            StructType::PerfMetricSeriesCsv => Some(from.as_any_ref().downcast_ref::<PerfMetricSeriesCsv>()?),
20606            _ => None,
20607        }
20608    }
20609    
20610    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20611        let data_type = from.data_type();
20612        match data_type {
20613            StructType::PerfMetricSeries => Ok(from.as_any_box().downcast::<PerfMetricSeries>()?),
20614            StructType::PerfMetricIntSeries => Ok(from.as_any_box().downcast::<PerfMetricIntSeries>()?),
20615            StructType::PerfMetricSeriesCsv => Ok(from.as_any_box().downcast::<PerfMetricSeriesCsv>()?),
20616            _ => Err(from.as_any_box()),
20617        }
20618    }
20619}
20620/// This data object type encapsulates a typical set of resource
20621/// pool information that is useful for list views and summary pages.
20622pub trait ResourcePoolSummaryTrait : super::traits::DataObjectTrait {
20623    /// Name of resource pool.
20624    fn get_name(&self) -> &str;
20625    /// Current configuration of the resource pool.
20626    fn get_config(&self) -> &super::structs::ResourceConfigSpec;
20627    /// Current runtime state of the resource pool.
20628    fn get_runtime(&self) -> &super::structs::ResourcePoolRuntimeInfo;
20629    /// A set of statistics that are typically updated with near real-time regularity.
20630    /// 
20631    /// This data object type does not support notification, for scalability reasons.
20632    /// Therefore, changes in QuickStats do not generate property collector updates.
20633    /// To monitor statistics values, use the statistics and alarms modules instead.
20634    fn get_quick_stats(&self) -> &Option<super::structs::ResourcePoolQuickStats>;
20635    /// Total configured memory of all virtual machines in the resource pool, in MB.
20636    fn get_configured_memory_mb(&self) -> Option<i32>;
20637}
20638impl<'s> serde::Serialize for dyn ResourcePoolSummaryTrait + 's {
20639            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20640            where
20641                S: serde::Serializer,
20642            {
20643                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20644            }
20645        }
20646impl<'de> serde::Deserialize<'de> for Box<dyn ResourcePoolSummaryTrait> {
20647            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20648                deserializer.deserialize_map(ResourcePoolSummaryVisitor)
20649            }
20650        }
20651
20652struct ResourcePoolSummaryVisitor;
20653
20654impl<'de> de::Visitor<'de> for ResourcePoolSummaryVisitor {
20655    type Value = Box<dyn ResourcePoolSummaryTrait>;
20656
20657    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20658        formatter.write_str("a valid ResourcePoolSummaryTrait JSON object with a _typeName field")
20659    }
20660
20661    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20662    where
20663        A: de::MapAccess<'de>,
20664    {
20665        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20666        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20667        match any {
20668            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20669                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20670            VimAny::Value(value) => Err(de::Error::custom(format!(
20671                "expected object not wrapped value: {:?}",
20672                value))),
20673        }
20674    }
20675}
20676
20677impl ResourcePoolSummaryTrait for ResourcePoolSummary {
20678    fn get_name(&self) -> &str { &self.name }
20679    fn get_config(&self) -> &super::structs::ResourceConfigSpec { &self.config }
20680    fn get_runtime(&self) -> &super::structs::ResourcePoolRuntimeInfo { &self.runtime }
20681    fn get_quick_stats(&self) -> &Option<super::structs::ResourcePoolQuickStats> { &self.quick_stats }
20682    fn get_configured_memory_mb(&self) -> Option<i32> { self.configured_memory_mb }
20683}
20684impl ResourcePoolSummaryTrait for VirtualAppSummary {
20685    fn get_name(&self) -> &str { &self.name }
20686    fn get_config(&self) -> &super::structs::ResourceConfigSpec { &self.config }
20687    fn get_runtime(&self) -> &super::structs::ResourcePoolRuntimeInfo { &self.runtime }
20688    fn get_quick_stats(&self) -> &Option<super::structs::ResourcePoolQuickStats> { &self.quick_stats }
20689    fn get_configured_memory_mb(&self) -> Option<i32> { self.configured_memory_mb }
20690}
20691impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ResourcePoolSummaryTrait {
20692    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20693        let data_type = from.data_type();
20694        match data_type {
20695            StructType::ResourcePoolSummary => Some(from.as_any_ref().downcast_ref::<ResourcePoolSummary>()?),
20696            StructType::VirtualAppSummary => Some(from.as_any_ref().downcast_ref::<VirtualAppSummary>()?),
20697            _ => None,
20698        }
20699    }
20700    
20701    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20702        let data_type = from.data_type();
20703        match data_type {
20704            StructType::ResourcePoolSummary => Ok(from.as_any_box().downcast::<ResourcePoolSummary>()?),
20705            StructType::VirtualAppSummary => Ok(from.as_any_box().downcast::<VirtualAppSummary>()?),
20706            _ => Err(from.as_any_box()),
20707        }
20708    }
20709}
20710/// An empty data object which can be used as the base class for data objects
20711/// outside VIM namespace which have to be proxied through vCenter opaquely.
20712/// 
20713/// For example, vSan configuration spec will extend from this which will
20714/// allow HCI API to pass the spec to set up vSan on the cluster.
20715pub trait SddcBaseTrait : super::traits::DataObjectTrait {
20716}
20717impl<'s> serde::Serialize for dyn SddcBaseTrait + 's {
20718            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20719            where
20720                S: serde::Serializer,
20721            {
20722                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20723            }
20724        }
20725impl<'de> serde::Deserialize<'de> for Box<dyn SddcBaseTrait> {
20726            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20727                deserializer.deserialize_map(SddcBaseVisitor)
20728            }
20729        }
20730
20731struct SddcBaseVisitor;
20732
20733impl<'de> de::Visitor<'de> for SddcBaseVisitor {
20734    type Value = Box<dyn SddcBaseTrait>;
20735
20736    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20737        formatter.write_str("a valid SddcBaseTrait JSON object with a _typeName field")
20738    }
20739
20740    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20741    where
20742        A: de::MapAccess<'de>,
20743    {
20744        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20745        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20746        match any {
20747            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20748                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20749            VimAny::Value(value) => Err(de::Error::custom(format!(
20750                "expected object not wrapped value: {:?}",
20751                value))),
20752        }
20753    }
20754}
20755
20756impl SddcBaseTrait for SddcBase {
20757}
20758impl SddcBaseTrait for VimVsanReconfigSpec {
20759}
20760impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SddcBaseTrait {
20761    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20762        let data_type = from.data_type();
20763        match data_type {
20764            StructType::SddcBase => Some(from.as_any_ref().downcast_ref::<SddcBase>()?),
20765            StructType::VimVsanReconfigSpec => Some(from.as_any_ref().downcast_ref::<VimVsanReconfigSpec>()?),
20766            _ => None,
20767        }
20768    }
20769    
20770    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20771        let data_type = from.data_type();
20772        match data_type {
20773            StructType::SddcBase => Ok(from.as_any_box().downcast::<SddcBase>()?),
20774            StructType::VimVsanReconfigSpec => Ok(from.as_any_box().downcast::<VimVsanReconfigSpec>()?),
20775            _ => Err(from.as_any_box()),
20776        }
20777    }
20778}
20779/// Base class for selecting entities
20780pub trait SelectionSetTrait : super::traits::DataObjectTrait {
20781}
20782impl<'s> serde::Serialize for dyn SelectionSetTrait + 's {
20783            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20784            where
20785                S: serde::Serializer,
20786            {
20787                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20788            }
20789        }
20790impl<'de> serde::Deserialize<'de> for Box<dyn SelectionSetTrait> {
20791            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20792                deserializer.deserialize_map(SelectionSetVisitor)
20793            }
20794        }
20795
20796struct SelectionSetVisitor;
20797
20798impl<'de> de::Visitor<'de> for SelectionSetVisitor {
20799    type Value = Box<dyn SelectionSetTrait>;
20800
20801    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20802        formatter.write_str("a valid SelectionSetTrait JSON object with a _typeName field")
20803    }
20804
20805    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20806    where
20807        A: de::MapAccess<'de>,
20808    {
20809        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20810        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20811        match any {
20812            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20813                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20814            VimAny::Value(value) => Err(de::Error::custom(format!(
20815                "expected object not wrapped value: {:?}",
20816                value))),
20817        }
20818    }
20819}
20820
20821impl SelectionSetTrait for SelectionSet {
20822}
20823impl SelectionSetTrait for DvPortgroupSelection {
20824}
20825impl SelectionSetTrait for DvsSelection {
20826}
20827impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SelectionSetTrait {
20828    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20829        let data_type = from.data_type();
20830        match data_type {
20831            StructType::SelectionSet => Some(from.as_any_ref().downcast_ref::<SelectionSet>()?),
20832            StructType::DvPortgroupSelection => Some(from.as_any_ref().downcast_ref::<DvPortgroupSelection>()?),
20833            StructType::DvsSelection => Some(from.as_any_ref().downcast_ref::<DvsSelection>()?),
20834            _ => None,
20835        }
20836    }
20837    
20838    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20839        let data_type = from.data_type();
20840        match data_type {
20841            StructType::SelectionSet => Ok(from.as_any_box().downcast::<SelectionSet>()?),
20842            StructType::DvPortgroupSelection => Ok(from.as_any_box().downcast::<DvPortgroupSelection>()?),
20843            StructType::DvsSelection => Ok(from.as_any_box().downcast::<DvsSelection>()?),
20844            _ => Err(from.as_any_box()),
20845        }
20846    }
20847}
20848/// The data object type is a base type of credential for authentication such
20849/// as username/password or SAML token.
20850pub trait ServiceLocatorCredentialTrait : super::traits::DataObjectTrait {
20851}
20852impl<'s> serde::Serialize for dyn ServiceLocatorCredentialTrait + 's {
20853            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20854            where
20855                S: serde::Serializer,
20856            {
20857                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20858            }
20859        }
20860impl<'de> serde::Deserialize<'de> for Box<dyn ServiceLocatorCredentialTrait> {
20861            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20862                deserializer.deserialize_map(ServiceLocatorCredentialVisitor)
20863            }
20864        }
20865
20866struct ServiceLocatorCredentialVisitor;
20867
20868impl<'de> de::Visitor<'de> for ServiceLocatorCredentialVisitor {
20869    type Value = Box<dyn ServiceLocatorCredentialTrait>;
20870
20871    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20872        formatter.write_str("a valid ServiceLocatorCredentialTrait JSON object with a _typeName field")
20873    }
20874
20875    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20876    where
20877        A: de::MapAccess<'de>,
20878    {
20879        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20880        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20881        match any {
20882            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20883                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20884            VimAny::Value(value) => Err(de::Error::custom(format!(
20885                "expected object not wrapped value: {:?}",
20886                value))),
20887        }
20888    }
20889}
20890
20891impl ServiceLocatorCredentialTrait for ServiceLocatorCredential {
20892}
20893impl ServiceLocatorCredentialTrait for ServiceLocatorNamePassword {
20894}
20895impl ServiceLocatorCredentialTrait for ServiceLocatorSamlCredential {
20896}
20897impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ServiceLocatorCredentialTrait {
20898    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20899        let data_type = from.data_type();
20900        match data_type {
20901            StructType::ServiceLocatorCredential => Some(from.as_any_ref().downcast_ref::<ServiceLocatorCredential>()?),
20902            StructType::ServiceLocatorNamePassword => Some(from.as_any_ref().downcast_ref::<ServiceLocatorNamePassword>()?),
20903            StructType::ServiceLocatorSamlCredential => Some(from.as_any_ref().downcast_ref::<ServiceLocatorSamlCredential>()?),
20904            _ => None,
20905        }
20906    }
20907    
20908    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20909        let data_type = from.data_type();
20910        match data_type {
20911            StructType::ServiceLocatorCredential => Ok(from.as_any_box().downcast::<ServiceLocatorCredential>()?),
20912            StructType::ServiceLocatorNamePassword => Ok(from.as_any_box().downcast::<ServiceLocatorNamePassword>()?),
20913            StructType::ServiceLocatorSamlCredential => Ok(from.as_any_box().downcast::<ServiceLocatorSamlCredential>()?),
20914            _ => Err(from.as_any_box()),
20915        }
20916    }
20917}
20918/// This data object type describes a request to a service.
20919/// 
20920/// It is used as argument to
20921/// *SessionManager.AcquireGenericServiceTicket*.
20922/// This is the base class for more specific service request specifications.
20923/// E.g. for HTTP services the derived class will provide a URL property.
20924pub trait SessionManagerServiceRequestSpecTrait : super::traits::DataObjectTrait {
20925}
20926impl<'s> serde::Serialize for dyn SessionManagerServiceRequestSpecTrait + 's {
20927            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
20928            where
20929                S: serde::Serializer,
20930            {
20931                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
20932            }
20933        }
20934impl<'de> serde::Deserialize<'de> for Box<dyn SessionManagerServiceRequestSpecTrait> {
20935            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
20936                deserializer.deserialize_map(SessionManagerServiceRequestSpecVisitor)
20937            }
20938        }
20939
20940struct SessionManagerServiceRequestSpecVisitor;
20941
20942impl<'de> de::Visitor<'de> for SessionManagerServiceRequestSpecVisitor {
20943    type Value = Box<dyn SessionManagerServiceRequestSpecTrait>;
20944
20945    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20946        formatter.write_str("a valid SessionManagerServiceRequestSpecTrait JSON object with a _typeName field")
20947    }
20948
20949    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
20950    where
20951        A: de::MapAccess<'de>,
20952    {
20953        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
20954        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
20955        match any {
20956            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
20957                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
20958            VimAny::Value(value) => Err(de::Error::custom(format!(
20959                "expected object not wrapped value: {:?}",
20960                value))),
20961        }
20962    }
20963}
20964
20965impl SessionManagerServiceRequestSpecTrait for SessionManagerServiceRequestSpec {
20966}
20967impl SessionManagerServiceRequestSpecTrait for SessionManagerHttpServiceRequestSpec {
20968}
20969impl SessionManagerServiceRequestSpecTrait for SessionManagerVmomiServiceRequestSpec {
20970}
20971impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SessionManagerServiceRequestSpecTrait {
20972    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
20973        let data_type = from.data_type();
20974        match data_type {
20975            StructType::SessionManagerServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerServiceRequestSpec>()?),
20976            StructType::SessionManagerHttpServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerHttpServiceRequestSpec>()?),
20977            StructType::SessionManagerVmomiServiceRequestSpec => Some(from.as_any_ref().downcast_ref::<SessionManagerVmomiServiceRequestSpec>()?),
20978            _ => None,
20979        }
20980    }
20981    
20982    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
20983        let data_type = from.data_type();
20984        match data_type {
20985            StructType::SessionManagerServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerServiceRequestSpec>()?),
20986            StructType::SessionManagerHttpServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerHttpServiceRequestSpec>()?),
20987            StructType::SessionManagerVmomiServiceRequestSpec => Ok(from.as_any_box().downcast::<SessionManagerVmomiServiceRequestSpec>()?),
20988            _ => Err(from.as_any_box()),
20989        }
20990    }
20991}
20992/// *TaskManagerTaskViewSpec* provides the specifications
20993/// for returning the set of tasks in the
20994/// Task Console.
20995/// 
20996/// ***Since:*** vSphere API Release 9.0.0.0
20997pub trait TaskManagerTaskViewSpecTrait : super::traits::DataObjectTrait {
20998}
20999impl<'s> serde::Serialize for dyn TaskManagerTaskViewSpecTrait + 's {
21000            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21001            where
21002                S: serde::Serializer,
21003            {
21004                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21005            }
21006        }
21007impl<'de> serde::Deserialize<'de> for Box<dyn TaskManagerTaskViewSpecTrait> {
21008            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21009                deserializer.deserialize_map(TaskManagerTaskViewSpecVisitor)
21010            }
21011        }
21012
21013struct TaskManagerTaskViewSpecVisitor;
21014
21015impl<'de> de::Visitor<'de> for TaskManagerTaskViewSpecVisitor {
21016    type Value = Box<dyn TaskManagerTaskViewSpecTrait>;
21017
21018    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21019        formatter.write_str("a valid TaskManagerTaskViewSpecTrait JSON object with a _typeName field")
21020    }
21021
21022    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21023    where
21024        A: de::MapAccess<'de>,
21025    {
21026        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21027        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21028        match any {
21029            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21030                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21031            VimAny::Value(value) => Err(de::Error::custom(format!(
21032                "expected object not wrapped value: {:?}",
21033                value))),
21034        }
21035    }
21036}
21037
21038impl TaskManagerTaskViewSpecTrait for TaskManagerTaskViewSpec {
21039}
21040impl TaskManagerTaskViewSpecTrait for TaskManagerViewByStartId {
21041}
21042impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn TaskManagerTaskViewSpecTrait {
21043    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21044        let data_type = from.data_type();
21045        match data_type {
21046            StructType::TaskManagerTaskViewSpec => Some(from.as_any_ref().downcast_ref::<TaskManagerTaskViewSpec>()?),
21047            StructType::TaskManagerViewByStartId => Some(from.as_any_ref().downcast_ref::<TaskManagerViewByStartId>()?),
21048            _ => None,
21049        }
21050    }
21051    
21052    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21053        let data_type = from.data_type();
21054        match data_type {
21055            StructType::TaskManagerTaskViewSpec => Ok(from.as_any_box().downcast::<TaskManagerTaskViewSpec>()?),
21056            StructType::TaskManagerViewByStartId => Ok(from.as_any_box().downcast::<TaskManagerViewByStartId>()?),
21057            _ => Err(from.as_any_box()),
21058        }
21059    }
21060}
21061/// Base type for all task reasons.
21062/// 
21063/// Task reasons represent the kind of entity responsible for a task's creation.
21064pub trait TaskReasonTrait : super::traits::DataObjectTrait {
21065}
21066impl<'s> serde::Serialize for dyn TaskReasonTrait + 's {
21067            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21068            where
21069                S: serde::Serializer,
21070            {
21071                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21072            }
21073        }
21074impl<'de> serde::Deserialize<'de> for Box<dyn TaskReasonTrait> {
21075            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21076                deserializer.deserialize_map(TaskReasonVisitor)
21077            }
21078        }
21079
21080struct TaskReasonVisitor;
21081
21082impl<'de> de::Visitor<'de> for TaskReasonVisitor {
21083    type Value = Box<dyn TaskReasonTrait>;
21084
21085    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21086        formatter.write_str("a valid TaskReasonTrait JSON object with a _typeName field")
21087    }
21088
21089    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21090    where
21091        A: de::MapAccess<'de>,
21092    {
21093        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21094        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21095        match any {
21096            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21097                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21098            VimAny::Value(value) => Err(de::Error::custom(format!(
21099                "expected object not wrapped value: {:?}",
21100                value))),
21101        }
21102    }
21103}
21104
21105impl TaskReasonTrait for TaskReason {
21106}
21107impl TaskReasonTrait for TaskReasonAlarm {
21108}
21109impl TaskReasonTrait for TaskReasonSchedule {
21110}
21111impl TaskReasonTrait for TaskReasonSystem {
21112}
21113impl TaskReasonTrait for TaskReasonUser {
21114}
21115impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn TaskReasonTrait {
21116    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21117        let data_type = from.data_type();
21118        match data_type {
21119            StructType::TaskReason => Some(from.as_any_ref().downcast_ref::<TaskReason>()?),
21120            StructType::TaskReasonAlarm => Some(from.as_any_ref().downcast_ref::<TaskReasonAlarm>()?),
21121            StructType::TaskReasonSchedule => Some(from.as_any_ref().downcast_ref::<TaskReasonSchedule>()?),
21122            StructType::TaskReasonSystem => Some(from.as_any_ref().downcast_ref::<TaskReasonSystem>()?),
21123            StructType::TaskReasonUser => Some(from.as_any_ref().downcast_ref::<TaskReasonUser>()?),
21124            _ => None,
21125        }
21126    }
21127    
21128    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21129        let data_type = from.data_type();
21130        match data_type {
21131            StructType::TaskReason => Ok(from.as_any_box().downcast::<TaskReason>()?),
21132            StructType::TaskReasonAlarm => Ok(from.as_any_box().downcast::<TaskReasonAlarm>()?),
21133            StructType::TaskReasonSchedule => Ok(from.as_any_box().downcast::<TaskReasonSchedule>()?),
21134            StructType::TaskReasonSystem => Ok(from.as_any_box().downcast::<TaskReasonSystem>()?),
21135            StructType::TaskReasonUser => Ok(from.as_any_box().downcast::<TaskReasonUser>()?),
21136            _ => Err(from.as_any_box()),
21137        }
21138    }
21139}
21140/// When searching for users, the search results in
21141/// some additional information.
21142/// 
21143/// This object describes
21144/// the additional information.
21145pub trait UserSearchResultTrait : super::traits::DataObjectTrait {
21146    /// Login name of a user or the name of a group.
21147    /// 
21148    /// This key is
21149    /// the user within the searched domain.
21150    fn get_principal(&self) -> &str;
21151    /// Full name of the user found by the search, or the description
21152    /// of a group, if available.
21153    fn get_full_name(&self) -> &Option<String>;
21154    /// If this is true, then the result is a group.
21155    /// 
21156    /// If this is false, then the
21157    /// result is a user.
21158    fn get_group(&self) -> bool;
21159}
21160impl<'s> serde::Serialize for dyn UserSearchResultTrait + 's {
21161            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21162            where
21163                S: serde::Serializer,
21164            {
21165                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21166            }
21167        }
21168impl<'de> serde::Deserialize<'de> for Box<dyn UserSearchResultTrait> {
21169            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21170                deserializer.deserialize_map(UserSearchResultVisitor)
21171            }
21172        }
21173
21174struct UserSearchResultVisitor;
21175
21176impl<'de> de::Visitor<'de> for UserSearchResultVisitor {
21177    type Value = Box<dyn UserSearchResultTrait>;
21178
21179    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21180        formatter.write_str("a valid UserSearchResultTrait JSON object with a _typeName field")
21181    }
21182
21183    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21184    where
21185        A: de::MapAccess<'de>,
21186    {
21187        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21188        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21189        match any {
21190            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21191                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21192            VimAny::Value(value) => Err(de::Error::custom(format!(
21193                "expected object not wrapped value: {:?}",
21194                value))),
21195        }
21196    }
21197}
21198
21199impl UserSearchResultTrait for UserSearchResult {
21200    fn get_principal(&self) -> &str { &self.principal }
21201    fn get_full_name(&self) -> &Option<String> { &self.full_name }
21202    fn get_group(&self) -> bool { self.group }
21203}
21204impl UserSearchResultTrait for PosixUserSearchResult {
21205    fn get_principal(&self) -> &str { &self.principal }
21206    fn get_full_name(&self) -> &Option<String> { &self.full_name }
21207    fn get_group(&self) -> bool { self.group }
21208}
21209impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn UserSearchResultTrait {
21210    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21211        let data_type = from.data_type();
21212        match data_type {
21213            StructType::UserSearchResult => Some(from.as_any_ref().downcast_ref::<UserSearchResult>()?),
21214            StructType::PosixUserSearchResult => Some(from.as_any_ref().downcast_ref::<PosixUserSearchResult>()?),
21215            _ => None,
21216        }
21217    }
21218    
21219    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21220        let data_type = from.data_type();
21221        match data_type {
21222            StructType::UserSearchResult => Ok(from.as_any_box().downcast::<UserSearchResult>()?),
21223            StructType::PosixUserSearchResult => Ok(from.as_any_box().downcast::<PosixUserSearchResult>()?),
21224            _ => Err(from.as_any_box()),
21225        }
21226    }
21227}
21228/// Specification used to create or clone a virtual disk
21229pub trait VirtualDiskSpecTrait : super::traits::DataObjectTrait {
21230    /// The type of the new virtual disk.
21231    /// 
21232    /// See also *VirtualDiskType_enum*.
21233    fn get_disk_type(&self) -> &str;
21234    /// The type of the virtual disk adapter for the new virtual disk.
21235    /// 
21236    /// See also *VirtualDiskAdapterType_enum*.
21237    fn get_adapter_type(&self) -> &str;
21238}
21239impl<'s> serde::Serialize for dyn VirtualDiskSpecTrait + 's {
21240            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21241            where
21242                S: serde::Serializer,
21243            {
21244                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21245            }
21246        }
21247impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDiskSpecTrait> {
21248            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21249                deserializer.deserialize_map(VirtualDiskSpecVisitor)
21250            }
21251        }
21252
21253struct VirtualDiskSpecVisitor;
21254
21255impl<'de> de::Visitor<'de> for VirtualDiskSpecVisitor {
21256    type Value = Box<dyn VirtualDiskSpecTrait>;
21257
21258    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21259        formatter.write_str("a valid VirtualDiskSpecTrait JSON object with a _typeName field")
21260    }
21261
21262    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21263    where
21264        A: de::MapAccess<'de>,
21265    {
21266        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21267        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21268        match any {
21269            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21270                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21271            VimAny::Value(value) => Err(de::Error::custom(format!(
21272                "expected object not wrapped value: {:?}",
21273                value))),
21274        }
21275    }
21276}
21277
21278impl VirtualDiskSpecTrait for VirtualDiskSpec {
21279    fn get_disk_type(&self) -> &str { &self.disk_type }
21280    fn get_adapter_type(&self) -> &str { &self.adapter_type }
21281}
21282impl VirtualDiskSpecTrait for DeviceBackedVirtualDiskSpec {
21283    fn get_disk_type(&self) -> &str { &self.disk_type }
21284    fn get_adapter_type(&self) -> &str { &self.adapter_type }
21285}
21286impl VirtualDiskSpecTrait for FileBackedVirtualDiskSpec {
21287    fn get_disk_type(&self) -> &str { &self.disk_type }
21288    fn get_adapter_type(&self) -> &str { &self.adapter_type }
21289}
21290impl VirtualDiskSpecTrait for SeSparseVirtualDiskSpec {
21291    fn get_disk_type(&self) -> &str { &self.disk_type }
21292    fn get_adapter_type(&self) -> &str { &self.adapter_type }
21293}
21294impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDiskSpecTrait {
21295    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21296        let data_type = from.data_type();
21297        match data_type {
21298            StructType::VirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskSpec>()?),
21299            StructType::DeviceBackedVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<DeviceBackedVirtualDiskSpec>()?),
21300            StructType::FileBackedVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<FileBackedVirtualDiskSpec>()?),
21301            StructType::SeSparseVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<SeSparseVirtualDiskSpec>()?),
21302            _ => None,
21303        }
21304    }
21305    
21306    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21307        let data_type = from.data_type();
21308        match data_type {
21309            StructType::VirtualDiskSpec => Ok(from.as_any_box().downcast::<VirtualDiskSpec>()?),
21310            StructType::DeviceBackedVirtualDiskSpec => Ok(from.as_any_box().downcast::<DeviceBackedVirtualDiskSpec>()?),
21311            StructType::FileBackedVirtualDiskSpec => Ok(from.as_any_box().downcast::<FileBackedVirtualDiskSpec>()?),
21312            StructType::SeSparseVirtualDiskSpec => Ok(from.as_any_box().downcast::<SeSparseVirtualDiskSpec>()?),
21313            _ => Err(from.as_any_box()),
21314        }
21315    }
21316}
21317/// Specification used to create a file based virtual disk
21318pub trait FileBackedVirtualDiskSpecTrait : super::traits::VirtualDiskSpecTrait {
21319    /// Specify the capacity of the virtual disk in Kb.
21320    fn get_capacity_kb(&self) -> i64;
21321    /// Virtual Disk Profile requirement.
21322    /// 
21323    /// Profiles are solution specifics.
21324    /// Profile Based Storage Management is a vSphere server extension.
21325    /// The API users who want to provision VMs using Storage Profiles, need to
21326    /// interact with it.
21327    /// This is an optional parameter and if user doesn't specify profile,
21328    /// the default behavior will apply.
21329    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>>;
21330    /// Encryption options for the new virtual disk.
21331    fn get_crypto(&self) -> &Option<Box<dyn super::traits::CryptoSpecTrait>>;
21332    /// Optional sector format.
21333    /// 
21334    /// If not specified, an appropriate default format will be choosen by
21335    /// the storage system. If available, native\_512 is preferred.
21336    /// For the list of supported values, see *DatastoreSectorFormat_enum*.
21337    /// 
21338    /// ***Since:*** vSphere API Release 9.0.0.0
21339    fn get_sector_format(&self) -> &Option<String>;
21340}
21341impl<'s> serde::Serialize for dyn FileBackedVirtualDiskSpecTrait + 's {
21342            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21343            where
21344                S: serde::Serializer,
21345            {
21346                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21347            }
21348        }
21349impl<'de> serde::Deserialize<'de> for Box<dyn FileBackedVirtualDiskSpecTrait> {
21350            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21351                deserializer.deserialize_map(FileBackedVirtualDiskSpecVisitor)
21352            }
21353        }
21354
21355struct FileBackedVirtualDiskSpecVisitor;
21356
21357impl<'de> de::Visitor<'de> for FileBackedVirtualDiskSpecVisitor {
21358    type Value = Box<dyn FileBackedVirtualDiskSpecTrait>;
21359
21360    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21361        formatter.write_str("a valid FileBackedVirtualDiskSpecTrait JSON object with a _typeName field")
21362    }
21363
21364    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21365    where
21366        A: de::MapAccess<'de>,
21367    {
21368        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21369        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21370        match any {
21371            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21372                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21373            VimAny::Value(value) => Err(de::Error::custom(format!(
21374                "expected object not wrapped value: {:?}",
21375                value))),
21376        }
21377    }
21378}
21379
21380impl FileBackedVirtualDiskSpecTrait for FileBackedVirtualDiskSpec {
21381    fn get_capacity_kb(&self) -> i64 { self.capacity_kb }
21382    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
21383    fn get_crypto(&self) -> &Option<Box<dyn super::traits::CryptoSpecTrait>> { &self.crypto }
21384    fn get_sector_format(&self) -> &Option<String> { &self.sector_format }
21385}
21386impl FileBackedVirtualDiskSpecTrait for SeSparseVirtualDiskSpec {
21387    fn get_capacity_kb(&self) -> i64 { self.capacity_kb }
21388    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
21389    fn get_crypto(&self) -> &Option<Box<dyn super::traits::CryptoSpecTrait>> { &self.crypto }
21390    fn get_sector_format(&self) -> &Option<String> { &self.sector_format }
21391}
21392impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FileBackedVirtualDiskSpecTrait {
21393    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21394        let data_type = from.data_type();
21395        match data_type {
21396            StructType::FileBackedVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<FileBackedVirtualDiskSpec>()?),
21397            StructType::SeSparseVirtualDiskSpec => Some(from.as_any_ref().downcast_ref::<SeSparseVirtualDiskSpec>()?),
21398            _ => None,
21399        }
21400    }
21401    
21402    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21403        let data_type = from.data_type();
21404        match data_type {
21405            StructType::FileBackedVirtualDiskSpec => Ok(from.as_any_box().downcast::<FileBackedVirtualDiskSpec>()?),
21406            StructType::SeSparseVirtualDiskSpec => Ok(from.as_any_box().downcast::<SeSparseVirtualDiskSpec>()?),
21407            _ => Err(from.as_any_box()),
21408        }
21409    }
21410}
21411/// The *VirtualMachineConnection* object describes a connection to the virtual
21412/// machine.
21413/// 
21414/// ***Since:*** vSphere API Release 7.0.1.0
21415pub trait VirtualMachineConnectionTrait : super::traits::DataObjectTrait {
21416    /// The unique identifier associated with the connection.
21417    /// 
21418    /// The label is a UTF-8 string which specifies a unique identifier for
21419    /// a connection.
21420    fn get_label(&self) -> &str;
21421    /// The client identifer.
21422    /// 
21423    /// This identifier is a UTF-8 string which is semantically meaningful
21424    /// for the connection. Examples of the client identifier are an IP
21425    /// address (V4 or V6) with or without a port specification, a machine
21426    /// name that requires a DNS lookup, or any other network oriented
21427    /// identification scheme.
21428    fn get_client(&self) -> &str;
21429    /// The name of the user authorizing the connection.
21430    /// 
21431    /// This is used for auditing.
21432    fn get_user_name(&self) -> &str;
21433}
21434impl<'s> serde::Serialize for dyn VirtualMachineConnectionTrait + 's {
21435            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21436            where
21437                S: serde::Serializer,
21438            {
21439                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21440            }
21441        }
21442impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineConnectionTrait> {
21443            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21444                deserializer.deserialize_map(VirtualMachineConnectionVisitor)
21445            }
21446        }
21447
21448struct VirtualMachineConnectionVisitor;
21449
21450impl<'de> de::Visitor<'de> for VirtualMachineConnectionVisitor {
21451    type Value = Box<dyn VirtualMachineConnectionTrait>;
21452
21453    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21454        formatter.write_str("a valid VirtualMachineConnectionTrait JSON object with a _typeName field")
21455    }
21456
21457    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21458    where
21459        A: de::MapAccess<'de>,
21460    {
21461        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21462        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21463        match any {
21464            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21465                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21466            VimAny::Value(value) => Err(de::Error::custom(format!(
21467                "expected object not wrapped value: {:?}",
21468                value))),
21469        }
21470    }
21471}
21472
21473impl VirtualMachineConnectionTrait for VirtualMachineConnection {
21474    fn get_label(&self) -> &str { &self.label }
21475    fn get_client(&self) -> &str { &self.client }
21476    fn get_user_name(&self) -> &str { &self.user_name }
21477}
21478impl VirtualMachineConnectionTrait for VirtualMachineMksConnection {
21479    fn get_label(&self) -> &str { &self.label }
21480    fn get_client(&self) -> &str { &self.client }
21481    fn get_user_name(&self) -> &str { &self.user_name }
21482}
21483impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineConnectionTrait {
21484    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21485        let data_type = from.data_type();
21486        match data_type {
21487            StructType::VirtualMachineConnection => Some(from.as_any_ref().downcast_ref::<VirtualMachineConnection>()?),
21488            StructType::VirtualMachineMksConnection => Some(from.as_any_ref().downcast_ref::<VirtualMachineMksConnection>()?),
21489            _ => None,
21490        }
21491    }
21492    
21493    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21494        let data_type = from.data_type();
21495        match data_type {
21496            StructType::VirtualMachineConnection => Ok(from.as_any_box().downcast::<VirtualMachineConnection>()?),
21497            StructType::VirtualMachineMksConnection => Ok(from.as_any_box().downcast::<VirtualMachineMksConnection>()?),
21498            _ => Err(from.as_any_box()),
21499        }
21500    }
21501}
21502/// Defines the base criteria for data Comparator.
21503/// 
21504/// This structure may be used only with operations rendered under `/vsan`.
21505pub trait VsanComparatorTrait : super::traits::DataObjectTrait {
21506}
21507impl<'s> serde::Serialize for dyn VsanComparatorTrait + 's {
21508            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21509            where
21510                S: serde::Serializer,
21511            {
21512                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21513            }
21514        }
21515impl<'de> serde::Deserialize<'de> for Box<dyn VsanComparatorTrait> {
21516            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21517                deserializer.deserialize_map(VsanComparatorVisitor)
21518            }
21519        }
21520
21521struct VsanComparatorVisitor;
21522
21523impl<'de> de::Visitor<'de> for VsanComparatorVisitor {
21524    type Value = Box<dyn VsanComparatorTrait>;
21525
21526    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21527        formatter.write_str("a valid VsanComparatorTrait JSON object with a _typeName field")
21528    }
21529
21530    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21531    where
21532        A: de::MapAccess<'de>,
21533    {
21534        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21535        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21536        match any {
21537            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21538                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21539            VimAny::Value(value) => Err(de::Error::custom(format!(
21540                "expected object not wrapped value: {:?}",
21541                value))),
21542        }
21543    }
21544}
21545
21546impl VsanComparatorTrait for VsanComparator {
21547}
21548impl VsanComparatorTrait for VsanJsonComparator {
21549}
21550impl VsanComparatorTrait for VsanNestJsonComparator {
21551}
21552impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanComparatorTrait {
21553    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21554        let data_type = from.data_type();
21555        match data_type {
21556            StructType::VsanComparator => Some(from.as_any_ref().downcast_ref::<VsanComparator>()?),
21557            StructType::VsanJsonComparator => Some(from.as_any_ref().downcast_ref::<VsanJsonComparator>()?),
21558            StructType::VsanNestJsonComparator => Some(from.as_any_ref().downcast_ref::<VsanNestJsonComparator>()?),
21559            _ => None,
21560        }
21561    }
21562    
21563    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21564        let data_type = from.data_type();
21565        match data_type {
21566            StructType::VsanComparator => Ok(from.as_any_box().downcast::<VsanComparator>()?),
21567            StructType::VsanJsonComparator => Ok(from.as_any_box().downcast::<VsanJsonComparator>()?),
21568            StructType::VsanNestJsonComparator => Ok(from.as_any_box().downcast::<VsanNestJsonComparator>()?),
21569            _ => Err(from.as_any_box()),
21570        }
21571    }
21572}
21573/// Defines the base criteria for matching resources based on their types.
21574/// 
21575/// This structure may be used only with operations rendered under `/vsan`.
21576pub trait VsanResourceConstraintTrait : super::traits::DataObjectTrait {
21577    /// The type of the resources targeted by this constraint.
21578    /// 
21579    /// If a value is not specified, the constraint will match all resource
21580    /// types.
21581    /// 
21582    /// Note that explicitly setting the <code>targetType</code> property may
21583    /// lead to a more optimal processing of the data request.
21584    fn get_target_type(&self) -> &Option<String>;
21585}
21586impl<'s> serde::Serialize for dyn VsanResourceConstraintTrait + 's {
21587            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21588            where
21589                S: serde::Serializer,
21590            {
21591                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21592            }
21593        }
21594impl<'de> serde::Deserialize<'de> for Box<dyn VsanResourceConstraintTrait> {
21595            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21596                deserializer.deserialize_map(VsanResourceConstraintVisitor)
21597            }
21598        }
21599
21600struct VsanResourceConstraintVisitor;
21601
21602impl<'de> de::Visitor<'de> for VsanResourceConstraintVisitor {
21603    type Value = Box<dyn VsanResourceConstraintTrait>;
21604
21605    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21606        formatter.write_str("a valid VsanResourceConstraintTrait JSON object with a _typeName field")
21607    }
21608
21609    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21610    where
21611        A: de::MapAccess<'de>,
21612    {
21613        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21614        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21615        match any {
21616            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21617                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21618            VimAny::Value(value) => Err(de::Error::custom(format!(
21619                "expected object not wrapped value: {:?}",
21620                value))),
21621        }
21622    }
21623}
21624
21625impl VsanResourceConstraintTrait for VsanResourceConstraint {
21626    fn get_target_type(&self) -> &Option<String> { &self.target_type }
21627}
21628impl VsanResourceConstraintTrait for VsanCompositeConstraint {
21629    fn get_target_type(&self) -> &Option<String> { &self.target_type }
21630}
21631impl VsanResourceConstraintTrait for VsanPropertyConstraint {
21632    fn get_target_type(&self) -> &Option<String> { &self.target_type }
21633}
21634impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanResourceConstraintTrait {
21635    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21636        let data_type = from.data_type();
21637        match data_type {
21638            StructType::VsanResourceConstraint => Some(from.as_any_ref().downcast_ref::<VsanResourceConstraint>()?),
21639            StructType::VsanCompositeConstraint => Some(from.as_any_ref().downcast_ref::<VsanCompositeConstraint>()?),
21640            StructType::VsanPropertyConstraint => Some(from.as_any_ref().downcast_ref::<VsanPropertyConstraint>()?),
21641            _ => None,
21642        }
21643    }
21644    
21645    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21646        let data_type = from.data_type();
21647        match data_type {
21648            StructType::VsanResourceConstraint => Ok(from.as_any_box().downcast::<VsanResourceConstraint>()?),
21649            StructType::VsanCompositeConstraint => Ok(from.as_any_box().downcast::<VsanCompositeConstraint>()?),
21650            StructType::VsanPropertyConstraint => Ok(from.as_any_box().downcast::<VsanPropertyConstraint>()?),
21651            _ => Err(from.as_any_box()),
21652        }
21653    }
21654}
21655/// Base class for a pre-flight check issue.
21656/// 
21657/// Can be used directly
21658/// but usually a derived class with a specific issue type is used.
21659pub trait VsanUpgradeSystemPreflightCheckIssueTrait : super::traits::DataObjectTrait {
21660    /// Message describing the issue.
21661    fn get_msg(&self) -> &str;
21662}
21663impl<'s> serde::Serialize for dyn VsanUpgradeSystemPreflightCheckIssueTrait + 's {
21664            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21665            where
21666                S: serde::Serializer,
21667            {
21668                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21669            }
21670        }
21671impl<'de> serde::Deserialize<'de> for Box<dyn VsanUpgradeSystemPreflightCheckIssueTrait> {
21672            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21673                deserializer.deserialize_map(VsanUpgradeSystemPreflightCheckIssueVisitor)
21674            }
21675        }
21676
21677struct VsanUpgradeSystemPreflightCheckIssueVisitor;
21678
21679impl<'de> de::Visitor<'de> for VsanUpgradeSystemPreflightCheckIssueVisitor {
21680    type Value = Box<dyn VsanUpgradeSystemPreflightCheckIssueTrait>;
21681
21682    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21683        formatter.write_str("a valid VsanUpgradeSystemPreflightCheckIssueTrait JSON object with a _typeName field")
21684    }
21685
21686    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21687    where
21688        A: de::MapAccess<'de>,
21689    {
21690        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21691        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21692        match any {
21693            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21694                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21695            VimAny::Value(value) => Err(de::Error::custom(format!(
21696                "expected object not wrapped value: {:?}",
21697                value))),
21698        }
21699    }
21700}
21701
21702impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemPreflightCheckIssue {
21703    fn get_msg(&self) -> &str { &self.msg }
21704}
21705impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemApiBrokenIssue {
21706    fn get_msg(&self) -> &str { &self.msg }
21707}
21708impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemAutoClaimEnabledOnHostsIssue {
21709    fn get_msg(&self) -> &str { &self.msg }
21710}
21711impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemHostsDisconnectedIssue {
21712    fn get_msg(&self) -> &str { &self.msg }
21713}
21714impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemMissingHostsInClusterIssue {
21715    fn get_msg(&self) -> &str { &self.msg }
21716}
21717impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemNetworkPartitionIssue {
21718    fn get_msg(&self) -> &str { &self.msg }
21719}
21720impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemNotEnoughFreeCapacityIssue {
21721    fn get_msg(&self) -> &str { &self.msg }
21722}
21723impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemRogueHostsInClusterIssue {
21724    fn get_msg(&self) -> &str { &self.msg }
21725}
21726impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue {
21727    fn get_msg(&self) -> &str { &self.msg }
21728}
21729impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUpgradeSystemWrongEsxVersionIssue {
21730    fn get_msg(&self) -> &str { &self.msg }
21731}
21732impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanBrokenDiskChainIssue {
21733    fn get_msg(&self) -> &str { &self.msg }
21734}
21735impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanDisallowDataMovementIssue {
21736    fn get_msg(&self) -> &str { &self.msg }
21737}
21738impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanDisallowEvacuateDataIssue {
21739    fn get_msg(&self) -> &str { &self.msg }
21740}
21741impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanDiskUnhealthIssue {
21742    fn get_msg(&self) -> &str { &self.msg }
21743}
21744impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanHigherObjectsPresentDuringDowngradeIssue {
21745    fn get_msg(&self) -> &str { &self.msg }
21746}
21747impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanHostPropertyRetrieveIssue {
21748    fn get_msg(&self) -> &str { &self.msg }
21749}
21750impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanHostWithHybridDiskgroupIssue {
21751    fn get_msg(&self) -> &str { &self.msg }
21752}
21753impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanHostsCompressionOnlyNotSupported {
21754    fn get_msg(&self) -> &str { &self.msg }
21755}
21756impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanMixedEsxVersionInClientIssue {
21757    fn get_msg(&self) -> &str { &self.msg }
21758}
21759impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanMixedEsxVersionIssue {
21760    fn get_msg(&self) -> &str { &self.msg }
21761}
21762impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanObjectInaccessibleIssue {
21763    fn get_msg(&self) -> &str { &self.msg }
21764}
21765impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanObjectPolicyIssue {
21766    fn get_msg(&self) -> &str { &self.msg }
21767}
21768impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanRemoteClusterNotCompatible {
21769    fn get_msg(&self) -> &str { &self.msg }
21770}
21771impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUnknownScanIssue {
21772    fn get_msg(&self) -> &str { &self.msg }
21773}
21774impl VsanUpgradeSystemPreflightCheckIssueTrait for VsanUnsupportedHighDiskVersionIssue {
21775    fn get_msg(&self) -> &str { &self.msg }
21776}
21777impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanUpgradeSystemPreflightCheckIssueTrait {
21778    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21779        let data_type = from.data_type();
21780        match data_type {
21781            StructType::VsanUpgradeSystemPreflightCheckIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemPreflightCheckIssue>()?),
21782            StructType::VsanUpgradeSystemApiBrokenIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemApiBrokenIssue>()?),
21783            StructType::VsanUpgradeSystemAutoClaimEnabledOnHostsIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemAutoClaimEnabledOnHostsIssue>()?),
21784            StructType::VsanUpgradeSystemHostsDisconnectedIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemHostsDisconnectedIssue>()?),
21785            StructType::VsanUpgradeSystemMissingHostsInClusterIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemMissingHostsInClusterIssue>()?),
21786            StructType::VsanUpgradeSystemNetworkPartitionIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemNetworkPartitionIssue>()?),
21787            StructType::VsanUpgradeSystemNotEnoughFreeCapacityIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemNotEnoughFreeCapacityIssue>()?),
21788            StructType::VsanUpgradeSystemRogueHostsInClusterIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemRogueHostsInClusterIssue>()?),
21789            StructType::VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue>()?),
21790            StructType::VsanUpgradeSystemWrongEsxVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemWrongEsxVersionIssue>()?),
21791            StructType::VsanBrokenDiskChainIssue => Some(from.as_any_ref().downcast_ref::<VsanBrokenDiskChainIssue>()?),
21792            StructType::VsanDisallowDataMovementIssue => Some(from.as_any_ref().downcast_ref::<VsanDisallowDataMovementIssue>()?),
21793            StructType::VsanDisallowEvacuateDataIssue => Some(from.as_any_ref().downcast_ref::<VsanDisallowEvacuateDataIssue>()?),
21794            StructType::VsanDiskUnhealthIssue => Some(from.as_any_ref().downcast_ref::<VsanDiskUnhealthIssue>()?),
21795            StructType::VsanHigherObjectsPresentDuringDowngradeIssue => Some(from.as_any_ref().downcast_ref::<VsanHigherObjectsPresentDuringDowngradeIssue>()?),
21796            StructType::VsanHostPropertyRetrieveIssue => Some(from.as_any_ref().downcast_ref::<VsanHostPropertyRetrieveIssue>()?),
21797            StructType::VsanHostWithHybridDiskgroupIssue => Some(from.as_any_ref().downcast_ref::<VsanHostWithHybridDiskgroupIssue>()?),
21798            StructType::VsanHostsCompressionOnlyNotSupported => Some(from.as_any_ref().downcast_ref::<VsanHostsCompressionOnlyNotSupported>()?),
21799            StructType::VsanMixedEsxVersionInClientIssue => Some(from.as_any_ref().downcast_ref::<VsanMixedEsxVersionInClientIssue>()?),
21800            StructType::VsanMixedEsxVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanMixedEsxVersionIssue>()?),
21801            StructType::VsanObjectInaccessibleIssue => Some(from.as_any_ref().downcast_ref::<VsanObjectInaccessibleIssue>()?),
21802            StructType::VsanObjectPolicyIssue => Some(from.as_any_ref().downcast_ref::<VsanObjectPolicyIssue>()?),
21803            StructType::VsanRemoteClusterNotCompatible => Some(from.as_any_ref().downcast_ref::<VsanRemoteClusterNotCompatible>()?),
21804            StructType::VsanUnknownScanIssue => Some(from.as_any_ref().downcast_ref::<VsanUnknownScanIssue>()?),
21805            StructType::VsanUnsupportedHighDiskVersionIssue => Some(from.as_any_ref().downcast_ref::<VsanUnsupportedHighDiskVersionIssue>()?),
21806            _ => None,
21807        }
21808    }
21809    
21810    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21811        let data_type = from.data_type();
21812        match data_type {
21813            StructType::VsanUpgradeSystemPreflightCheckIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemPreflightCheckIssue>()?),
21814            StructType::VsanUpgradeSystemApiBrokenIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemApiBrokenIssue>()?),
21815            StructType::VsanUpgradeSystemAutoClaimEnabledOnHostsIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemAutoClaimEnabledOnHostsIssue>()?),
21816            StructType::VsanUpgradeSystemHostsDisconnectedIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemHostsDisconnectedIssue>()?),
21817            StructType::VsanUpgradeSystemMissingHostsInClusterIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemMissingHostsInClusterIssue>()?),
21818            StructType::VsanUpgradeSystemNetworkPartitionIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemNetworkPartitionIssue>()?),
21819            StructType::VsanUpgradeSystemNotEnoughFreeCapacityIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemNotEnoughFreeCapacityIssue>()?),
21820            StructType::VsanUpgradeSystemRogueHostsInClusterIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemRogueHostsInClusterIssue>()?),
21821            StructType::VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemV2ObjectsPresentDuringDowngradeIssue>()?),
21822            StructType::VsanUpgradeSystemWrongEsxVersionIssue => Ok(from.as_any_box().downcast::<VsanUpgradeSystemWrongEsxVersionIssue>()?),
21823            StructType::VsanBrokenDiskChainIssue => Ok(from.as_any_box().downcast::<VsanBrokenDiskChainIssue>()?),
21824            StructType::VsanDisallowDataMovementIssue => Ok(from.as_any_box().downcast::<VsanDisallowDataMovementIssue>()?),
21825            StructType::VsanDisallowEvacuateDataIssue => Ok(from.as_any_box().downcast::<VsanDisallowEvacuateDataIssue>()?),
21826            StructType::VsanDiskUnhealthIssue => Ok(from.as_any_box().downcast::<VsanDiskUnhealthIssue>()?),
21827            StructType::VsanHigherObjectsPresentDuringDowngradeIssue => Ok(from.as_any_box().downcast::<VsanHigherObjectsPresentDuringDowngradeIssue>()?),
21828            StructType::VsanHostPropertyRetrieveIssue => Ok(from.as_any_box().downcast::<VsanHostPropertyRetrieveIssue>()?),
21829            StructType::VsanHostWithHybridDiskgroupIssue => Ok(from.as_any_box().downcast::<VsanHostWithHybridDiskgroupIssue>()?),
21830            StructType::VsanHostsCompressionOnlyNotSupported => Ok(from.as_any_box().downcast::<VsanHostsCompressionOnlyNotSupported>()?),
21831            StructType::VsanMixedEsxVersionInClientIssue => Ok(from.as_any_box().downcast::<VsanMixedEsxVersionInClientIssue>()?),
21832            StructType::VsanMixedEsxVersionIssue => Ok(from.as_any_box().downcast::<VsanMixedEsxVersionIssue>()?),
21833            StructType::VsanObjectInaccessibleIssue => Ok(from.as_any_box().downcast::<VsanObjectInaccessibleIssue>()?),
21834            StructType::VsanObjectPolicyIssue => Ok(from.as_any_box().downcast::<VsanObjectPolicyIssue>()?),
21835            StructType::VsanRemoteClusterNotCompatible => Ok(from.as_any_box().downcast::<VsanRemoteClusterNotCompatible>()?),
21836            StructType::VsanUnknownScanIssue => Ok(from.as_any_box().downcast::<VsanUnknownScanIssue>()?),
21837            StructType::VsanUnsupportedHighDiskVersionIssue => Ok(from.as_any_box().downcast::<VsanUnsupportedHighDiskVersionIssue>()?),
21838            _ => Err(from.as_any_box()),
21839        }
21840    }
21841}
21842/// Captures the result of a VSAN upgrade pre-flight check.
21843pub trait VsanUpgradeSystemPreflightCheckResultTrait : super::traits::DataObjectTrait {
21844    /// Detected issues.
21845    /// 
21846    /// In some cases, not all possible issues are captured,
21847    /// i.e. only the first (few) issues may be captured, and only once those
21848    /// are resolved would additional issues be reported.
21849    /// Absence of issues means the pre-flight check passed.
21850    fn get_issues(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemPreflightCheckIssueTrait>>>;
21851    /// If the upgrade process was previously interrupted, it may have
21852    /// removed VSAN from a disk group, but not added the disk group back
21853    /// into VSAN.
21854    /// 
21855    /// If such a situation is detected, this field will be set
21856    /// and contains information about this disk group.
21857    fn get_disk_mapping_to_restore(&self) -> &Option<super::structs::VsanHostDiskMapping>;
21858}
21859impl<'s> serde::Serialize for dyn VsanUpgradeSystemPreflightCheckResultTrait + 's {
21860            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21861            where
21862                S: serde::Serializer,
21863            {
21864                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21865            }
21866        }
21867impl<'de> serde::Deserialize<'de> for Box<dyn VsanUpgradeSystemPreflightCheckResultTrait> {
21868            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21869                deserializer.deserialize_map(VsanUpgradeSystemPreflightCheckResultVisitor)
21870            }
21871        }
21872
21873struct VsanUpgradeSystemPreflightCheckResultVisitor;
21874
21875impl<'de> de::Visitor<'de> for VsanUpgradeSystemPreflightCheckResultVisitor {
21876    type Value = Box<dyn VsanUpgradeSystemPreflightCheckResultTrait>;
21877
21878    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21879        formatter.write_str("a valid VsanUpgradeSystemPreflightCheckResultTrait JSON object with a _typeName field")
21880    }
21881
21882    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21883    where
21884        A: de::MapAccess<'de>,
21885    {
21886        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21887        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21888        match any {
21889            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21890                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21891            VimAny::Value(value) => Err(de::Error::custom(format!(
21892                "expected object not wrapped value: {:?}",
21893                value))),
21894        }
21895    }
21896}
21897
21898impl VsanUpgradeSystemPreflightCheckResultTrait for VsanUpgradeSystemPreflightCheckResult {
21899    fn get_issues(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemPreflightCheckIssueTrait>>> { &self.issues }
21900    fn get_disk_mapping_to_restore(&self) -> &Option<super::structs::VsanHostDiskMapping> { &self.disk_mapping_to_restore }
21901}
21902impl VsanUpgradeSystemPreflightCheckResultTrait for VsanDiskFormatConversionCheckResult {
21903    fn get_issues(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemPreflightCheckIssueTrait>>> { &self.issues }
21904    fn get_disk_mapping_to_restore(&self) -> &Option<super::structs::VsanHostDiskMapping> { &self.disk_mapping_to_restore }
21905}
21906impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanUpgradeSystemPreflightCheckResultTrait {
21907    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
21908        let data_type = from.data_type();
21909        match data_type {
21910            StructType::VsanUpgradeSystemPreflightCheckResult => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemPreflightCheckResult>()?),
21911            StructType::VsanDiskFormatConversionCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskFormatConversionCheckResult>()?),
21912            _ => None,
21913        }
21914    }
21915    
21916    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
21917        let data_type = from.data_type();
21918        match data_type {
21919            StructType::VsanUpgradeSystemPreflightCheckResult => Ok(from.as_any_box().downcast::<VsanUpgradeSystemPreflightCheckResult>()?),
21920            StructType::VsanDiskFormatConversionCheckResult => Ok(from.as_any_box().downcast::<VsanDiskFormatConversionCheckResult>()?),
21921            _ => Err(from.as_any_box()),
21922        }
21923    }
21924}
21925/// Captures one "log entry" of an upgrade process.
21926pub trait VsanUpgradeSystemUpgradeHistoryItemTrait : super::traits::DataObjectTrait {
21927    /// Time stamp when the history is record.
21928    fn get_timestamp(&self) -> &str;
21929    /// The host a history item pertains to.
21930    /// 
21931    /// May be unset when item related
21932    /// to no particular host.
21933    /// 
21934    /// Refers instance of *HostSystem*.
21935    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference>;
21936    /// Description of the history item.
21937    fn get_message(&self) -> &str;
21938    /// A task associated with the history item.
21939    /// 
21940    /// May be unset if no task is
21941    /// associated.
21942    /// 
21943    /// Refers instance of *Task*.
21944    fn get_task(&self) -> &Option<super::structs::ManagedObjectReference>;
21945}
21946impl<'s> serde::Serialize for dyn VsanUpgradeSystemUpgradeHistoryItemTrait + 's {
21947            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
21948            where
21949                S: serde::Serializer,
21950            {
21951                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
21952            }
21953        }
21954impl<'de> serde::Deserialize<'de> for Box<dyn VsanUpgradeSystemUpgradeHistoryItemTrait> {
21955            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
21956                deserializer.deserialize_map(VsanUpgradeSystemUpgradeHistoryItemVisitor)
21957            }
21958        }
21959
21960struct VsanUpgradeSystemUpgradeHistoryItemVisitor;
21961
21962impl<'de> de::Visitor<'de> for VsanUpgradeSystemUpgradeHistoryItemVisitor {
21963    type Value = Box<dyn VsanUpgradeSystemUpgradeHistoryItemTrait>;
21964
21965    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21966        formatter.write_str("a valid VsanUpgradeSystemUpgradeHistoryItemTrait JSON object with a _typeName field")
21967    }
21968
21969    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
21970    where
21971        A: de::MapAccess<'de>,
21972    {
21973        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
21974        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
21975        match any {
21976            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
21977                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
21978            VimAny::Value(value) => Err(de::Error::custom(format!(
21979                "expected object not wrapped value: {:?}",
21980                value))),
21981        }
21982    }
21983}
21984
21985impl VsanUpgradeSystemUpgradeHistoryItemTrait for VsanUpgradeSystemUpgradeHistoryItem {
21986    fn get_timestamp(&self) -> &str { &self.timestamp }
21987    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
21988    fn get_message(&self) -> &str { &self.message }
21989    fn get_task(&self) -> &Option<super::structs::ManagedObjectReference> { &self.task }
21990}
21991impl VsanUpgradeSystemUpgradeHistoryItemTrait for VsanUpgradeSystemUpgradeHistoryDiskGroupOp {
21992    fn get_timestamp(&self) -> &str { &self.timestamp }
21993    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
21994    fn get_message(&self) -> &str { &self.message }
21995    fn get_task(&self) -> &Option<super::structs::ManagedObjectReference> { &self.task }
21996}
21997impl VsanUpgradeSystemUpgradeHistoryItemTrait for VsanUpgradeSystemUpgradeHistoryPreflightFail {
21998    fn get_timestamp(&self) -> &str { &self.timestamp }
21999    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
22000    fn get_message(&self) -> &str { &self.message }
22001    fn get_task(&self) -> &Option<super::structs::ManagedObjectReference> { &self.task }
22002}
22003impl VsanUpgradeSystemUpgradeHistoryItemTrait for VsanUpgradeSystemUpgradeHistoryStoragePoolOp {
22004    fn get_timestamp(&self) -> &str { &self.timestamp }
22005    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
22006    fn get_message(&self) -> &str { &self.message }
22007    fn get_task(&self) -> &Option<super::structs::ManagedObjectReference> { &self.task }
22008}
22009impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanUpgradeSystemUpgradeHistoryItemTrait {
22010    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22011        let data_type = from.data_type();
22012        match data_type {
22013            StructType::VsanUpgradeSystemUpgradeHistoryItem => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryItem>()?),
22014            StructType::VsanUpgradeSystemUpgradeHistoryDiskGroupOp => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryDiskGroupOp>()?),
22015            StructType::VsanUpgradeSystemUpgradeHistoryPreflightFail => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryPreflightFail>()?),
22016            StructType::VsanUpgradeSystemUpgradeHistoryStoragePoolOp => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeHistoryStoragePoolOp>()?),
22017            _ => None,
22018        }
22019    }
22020    
22021    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22022        let data_type = from.data_type();
22023        match data_type {
22024            StructType::VsanUpgradeSystemUpgradeHistoryItem => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryItem>()?),
22025            StructType::VsanUpgradeSystemUpgradeHistoryDiskGroupOp => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryDiskGroupOp>()?),
22026            StructType::VsanUpgradeSystemUpgradeHistoryPreflightFail => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryPreflightFail>()?),
22027            StructType::VsanUpgradeSystemUpgradeHistoryStoragePoolOp => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeHistoryStoragePoolOp>()?),
22028            _ => Err(from.as_any_box()),
22029        }
22030    }
22031}
22032/// Captures the status of a VSAN cluster on-disk format upgrade.
22033/// 
22034/// Contains
22035/// information about progress, result, and a detailed log of operations.
22036pub trait VsanUpgradeSystemUpgradeStatusTrait : super::traits::DataObjectTrait {
22037    /// True if there is an active upgrade process.
22038    /// 
22039    /// If true, other fields
22040    /// are guaranteed to be populated. If false, other fields may reflect
22041    /// a previous upgrade process run, or they may be unset.
22042    fn get_in_progress(&self) -> bool;
22043    /// Log of a single upgrade task.
22044    /// 
22045    /// Lists all operations performed by the
22046    /// upgrade process in chronological order.
22047    fn get_history(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemUpgradeHistoryItemTrait>>>;
22048    /// Set if the upgrade process was aborted.
22049    fn get_aborted(&self) -> Option<bool>;
22050    /// Set if the upgrade process has completed successfully.
22051    fn get_completed(&self) -> Option<bool>;
22052    /// Progress in percent.
22053    fn get_progress(&self) -> Option<i32>;
22054}
22055impl<'s> serde::Serialize for dyn VsanUpgradeSystemUpgradeStatusTrait + 's {
22056            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22057            where
22058                S: serde::Serializer,
22059            {
22060                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22061            }
22062        }
22063impl<'de> serde::Deserialize<'de> for Box<dyn VsanUpgradeSystemUpgradeStatusTrait> {
22064            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22065                deserializer.deserialize_map(VsanUpgradeSystemUpgradeStatusVisitor)
22066            }
22067        }
22068
22069struct VsanUpgradeSystemUpgradeStatusVisitor;
22070
22071impl<'de> de::Visitor<'de> for VsanUpgradeSystemUpgradeStatusVisitor {
22072    type Value = Box<dyn VsanUpgradeSystemUpgradeStatusTrait>;
22073
22074    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22075        formatter.write_str("a valid VsanUpgradeSystemUpgradeStatusTrait JSON object with a _typeName field")
22076    }
22077
22078    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22079    where
22080        A: de::MapAccess<'de>,
22081    {
22082        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22083        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22084        match any {
22085            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22086                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22087            VimAny::Value(value) => Err(de::Error::custom(format!(
22088                "expected object not wrapped value: {:?}",
22089                value))),
22090        }
22091    }
22092}
22093
22094impl VsanUpgradeSystemUpgradeStatusTrait for VsanUpgradeSystemUpgradeStatus {
22095    fn get_in_progress(&self) -> bool { self.in_progress }
22096    fn get_history(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemUpgradeHistoryItemTrait>>> { &self.history }
22097    fn get_aborted(&self) -> Option<bool> { self.aborted }
22098    fn get_completed(&self) -> Option<bool> { self.completed }
22099    fn get_progress(&self) -> Option<i32> { self.progress }
22100}
22101impl VsanUpgradeSystemUpgradeStatusTrait for VsanUpgradeStatusEx {
22102    fn get_in_progress(&self) -> bool { self.in_progress }
22103    fn get_history(&self) -> &Option<Vec<Box<dyn super::traits::VsanUpgradeSystemUpgradeHistoryItemTrait>>> { &self.history }
22104    fn get_aborted(&self) -> Option<bool> { self.aborted }
22105    fn get_completed(&self) -> Option<bool> { self.completed }
22106    fn get_progress(&self) -> Option<i32> { self.progress }
22107}
22108impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanUpgradeSystemUpgradeStatusTrait {
22109    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22110        let data_type = from.data_type();
22111        match data_type {
22112            StructType::VsanUpgradeSystemUpgradeStatus => Some(from.as_any_ref().downcast_ref::<VsanUpgradeSystemUpgradeStatus>()?),
22113            StructType::VsanUpgradeStatusEx => Some(from.as_any_ref().downcast_ref::<VsanUpgradeStatusEx>()?),
22114            _ => None,
22115        }
22116    }
22117    
22118    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22119        let data_type = from.data_type();
22120        match data_type {
22121            StructType::VsanUpgradeSystemUpgradeStatus => Ok(from.as_any_box().downcast::<VsanUpgradeSystemUpgradeStatus>()?),
22122            StructType::VsanUpgradeStatusEx => Ok(from.as_any_box().downcast::<VsanUpgradeStatusEx>()?),
22123            _ => Err(from.as_any_box()),
22124        }
22125    }
22126}
22127/// This data object type defines the action initiated by a scheduled task or alarm.
22128/// 
22129/// This is an abstract type.
22130/// A client creates a scheduled task or an alarm each of which triggers
22131/// an action, defined by a subclass of this type.
22132pub trait ActionTrait : super::traits::DataObjectTrait {
22133}
22134impl<'s> serde::Serialize for dyn ActionTrait + 's {
22135            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22136            where
22137                S: serde::Serializer,
22138            {
22139                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22140            }
22141        }
22142impl<'de> serde::Deserialize<'de> for Box<dyn ActionTrait> {
22143            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22144                deserializer.deserialize_map(ActionVisitor)
22145            }
22146        }
22147
22148struct ActionVisitor;
22149
22150impl<'de> de::Visitor<'de> for ActionVisitor {
22151    type Value = Box<dyn ActionTrait>;
22152
22153    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22154        formatter.write_str("a valid ActionTrait JSON object with a _typeName field")
22155    }
22156
22157    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22158    where
22159        A: de::MapAccess<'de>,
22160    {
22161        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22162        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22163        match any {
22164            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22165                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22166            VimAny::Value(value) => Err(de::Error::custom(format!(
22167                "expected object not wrapped value: {:?}",
22168                value))),
22169        }
22170    }
22171}
22172
22173impl ActionTrait for Action {
22174}
22175impl ActionTrait for CreateTaskAction {
22176}
22177impl ActionTrait for MethodAction {
22178}
22179impl ActionTrait for RunScriptAction {
22180}
22181impl ActionTrait for SendEmailAction {
22182}
22183impl ActionTrait for SendSnmpAction {
22184}
22185impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ActionTrait {
22186    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22187        let data_type = from.data_type();
22188        match data_type {
22189            StructType::Action => Some(from.as_any_ref().downcast_ref::<Action>()?),
22190            StructType::CreateTaskAction => Some(from.as_any_ref().downcast_ref::<CreateTaskAction>()?),
22191            StructType::MethodAction => Some(from.as_any_ref().downcast_ref::<MethodAction>()?),
22192            StructType::RunScriptAction => Some(from.as_any_ref().downcast_ref::<RunScriptAction>()?),
22193            StructType::SendEmailAction => Some(from.as_any_ref().downcast_ref::<SendEmailAction>()?),
22194            StructType::SendSnmpAction => Some(from.as_any_ref().downcast_ref::<SendSnmpAction>()?),
22195            _ => None,
22196        }
22197    }
22198    
22199    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22200        let data_type = from.data_type();
22201        match data_type {
22202            StructType::Action => Ok(from.as_any_box().downcast::<Action>()?),
22203            StructType::CreateTaskAction => Ok(from.as_any_box().downcast::<CreateTaskAction>()?),
22204            StructType::MethodAction => Ok(from.as_any_box().downcast::<MethodAction>()?),
22205            StructType::RunScriptAction => Ok(from.as_any_box().downcast::<RunScriptAction>()?),
22206            StructType::SendEmailAction => Ok(from.as_any_box().downcast::<SendEmailAction>()?),
22207            StructType::SendSnmpAction => Ok(from.as_any_box().downcast::<SendSnmpAction>()?),
22208            _ => Err(from.as_any_box()),
22209        }
22210    }
22211}
22212/// Action invoked by triggered alarm.
22213/// 
22214/// This is an abstract type.
22215pub trait AlarmActionTrait : super::traits::DataObjectTrait {
22216}
22217impl<'s> serde::Serialize for dyn AlarmActionTrait + 's {
22218            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22219            where
22220                S: serde::Serializer,
22221            {
22222                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22223            }
22224        }
22225impl<'de> serde::Deserialize<'de> for Box<dyn AlarmActionTrait> {
22226            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22227                deserializer.deserialize_map(AlarmActionVisitor)
22228            }
22229        }
22230
22231struct AlarmActionVisitor;
22232
22233impl<'de> de::Visitor<'de> for AlarmActionVisitor {
22234    type Value = Box<dyn AlarmActionTrait>;
22235
22236    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22237        formatter.write_str("a valid AlarmActionTrait JSON object with a _typeName field")
22238    }
22239
22240    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22241    where
22242        A: de::MapAccess<'de>,
22243    {
22244        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22245        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22246        match any {
22247            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22248                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22249            VimAny::Value(value) => Err(de::Error::custom(format!(
22250                "expected object not wrapped value: {:?}",
22251                value))),
22252        }
22253    }
22254}
22255
22256impl AlarmActionTrait for AlarmAction {
22257}
22258impl AlarmActionTrait for AlarmTriggeringAction {
22259}
22260impl AlarmActionTrait for GroupAlarmAction {
22261}
22262impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AlarmActionTrait {
22263    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22264        let data_type = from.data_type();
22265        match data_type {
22266            StructType::AlarmAction => Some(from.as_any_ref().downcast_ref::<AlarmAction>()?),
22267            StructType::AlarmTriggeringAction => Some(from.as_any_ref().downcast_ref::<AlarmTriggeringAction>()?),
22268            StructType::GroupAlarmAction => Some(from.as_any_ref().downcast_ref::<GroupAlarmAction>()?),
22269            _ => None,
22270        }
22271    }
22272    
22273    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22274        let data_type = from.data_type();
22275        match data_type {
22276            StructType::AlarmAction => Ok(from.as_any_box().downcast::<AlarmAction>()?),
22277            StructType::AlarmTriggeringAction => Ok(from.as_any_box().downcast::<AlarmTriggeringAction>()?),
22278            StructType::GroupAlarmAction => Ok(from.as_any_box().downcast::<GroupAlarmAction>()?),
22279            _ => Err(from.as_any_box()),
22280        }
22281    }
22282}
22283/// Base type for the expressions specifying the conditions that define
22284/// the status of an alarm.
22285pub trait AlarmExpressionTrait : super::traits::DataObjectTrait {
22286}
22287impl<'s> serde::Serialize for dyn AlarmExpressionTrait + 's {
22288            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22289            where
22290                S: serde::Serializer,
22291            {
22292                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22293            }
22294        }
22295impl<'de> serde::Deserialize<'de> for Box<dyn AlarmExpressionTrait> {
22296            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22297                deserializer.deserialize_map(AlarmExpressionVisitor)
22298            }
22299        }
22300
22301struct AlarmExpressionVisitor;
22302
22303impl<'de> de::Visitor<'de> for AlarmExpressionVisitor {
22304    type Value = Box<dyn AlarmExpressionTrait>;
22305
22306    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22307        formatter.write_str("a valid AlarmExpressionTrait JSON object with a _typeName field")
22308    }
22309
22310    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22311    where
22312        A: de::MapAccess<'de>,
22313    {
22314        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22315        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22316        match any {
22317            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22318                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22319            VimAny::Value(value) => Err(de::Error::custom(format!(
22320                "expected object not wrapped value: {:?}",
22321                value))),
22322        }
22323    }
22324}
22325
22326impl AlarmExpressionTrait for AlarmExpression {
22327}
22328impl AlarmExpressionTrait for AndAlarmExpression {
22329}
22330impl AlarmExpressionTrait for EventAlarmExpression {
22331}
22332impl AlarmExpressionTrait for MetricAlarmExpression {
22333}
22334impl AlarmExpressionTrait for OrAlarmExpression {
22335}
22336impl AlarmExpressionTrait for StateAlarmExpression {
22337}
22338impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AlarmExpressionTrait {
22339    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22340        let data_type = from.data_type();
22341        match data_type {
22342            StructType::AlarmExpression => Some(from.as_any_ref().downcast_ref::<AlarmExpression>()?),
22343            StructType::AndAlarmExpression => Some(from.as_any_ref().downcast_ref::<AndAlarmExpression>()?),
22344            StructType::EventAlarmExpression => Some(from.as_any_ref().downcast_ref::<EventAlarmExpression>()?),
22345            StructType::MetricAlarmExpression => Some(from.as_any_ref().downcast_ref::<MetricAlarmExpression>()?),
22346            StructType::OrAlarmExpression => Some(from.as_any_ref().downcast_ref::<OrAlarmExpression>()?),
22347            StructType::StateAlarmExpression => Some(from.as_any_ref().downcast_ref::<StateAlarmExpression>()?),
22348            _ => None,
22349        }
22350    }
22351    
22352    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22353        let data_type = from.data_type();
22354        match data_type {
22355            StructType::AlarmExpression => Ok(from.as_any_box().downcast::<AlarmExpression>()?),
22356            StructType::AndAlarmExpression => Ok(from.as_any_box().downcast::<AndAlarmExpression>()?),
22357            StructType::EventAlarmExpression => Ok(from.as_any_box().downcast::<EventAlarmExpression>()?),
22358            StructType::MetricAlarmExpression => Ok(from.as_any_box().downcast::<MetricAlarmExpression>()?),
22359            StructType::OrAlarmExpression => Ok(from.as_any_box().downcast::<OrAlarmExpression>()?),
22360            StructType::StateAlarmExpression => Ok(from.as_any_box().downcast::<StateAlarmExpression>()?),
22361            _ => Err(from.as_any_box()),
22362        }
22363    }
22364}
22365/// Parameters for alarm creation.
22366pub trait AlarmSpecTrait : super::traits::DataObjectTrait {
22367    /// Name of the alarm.
22368    fn get_name(&self) -> &str;
22369    /// System name of the alarm.
22370    /// 
22371    /// This is set only for predefined Alarms - i.e. Alarms created by the
22372    /// server or extensions automatically. After creation this value cannot be
22373    /// modified. User-created Alarms do not have a systemName at all.
22374    /// 
22375    /// The purpose of this field is to identify system-created Alarms
22376    /// reliably, even if they are edited by users.
22377    /// 
22378    /// When creating Alarms with systemName, the systemName and the name of the
22379    /// alarm should be equal.
22380    /// 
22381    /// When reconfiguring an Alarm with systemName, the same systemName should
22382    /// be passed in the new AlarmSpec. Renaming Alarms with systemName is not
22383    /// allowed, i.e. when reconfiguring, the name passed in the new AlarmSpec
22384    /// should be equal to either the systemName or its localized version (the
22385    /// current name in the Alarm's info).
22386    fn get_system_name(&self) -> &Option<String>;
22387    /// Description of the alarm.
22388    fn get_description(&self) -> &str;
22389    /// Flag to indicate whether or not the alarm is enabled or disabled.
22390    fn get_enabled(&self) -> bool;
22391    /// Top-level alarm expression that defines trigger conditions.
22392    fn get_expression(&self) -> &Box<dyn super::traits::AlarmExpressionTrait>;
22393    /// Action to perform when the alarm is triggered.
22394    fn get_action(&self) -> &Option<Box<dyn super::traits::AlarmActionTrait>>;
22395    /// Frequency in seconds, which specifies how often appropriate actions
22396    /// should repeat when an alarm does not change state.
22397    fn get_action_frequency(&self) -> Option<i32>;
22398    /// Tolerance and maximum frequency settings.
22399    fn get_setting(&self) -> &Option<super::structs::AlarmSetting>;
22400}
22401impl<'s> serde::Serialize for dyn AlarmSpecTrait + 's {
22402            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22403            where
22404                S: serde::Serializer,
22405            {
22406                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22407            }
22408        }
22409impl<'de> serde::Deserialize<'de> for Box<dyn AlarmSpecTrait> {
22410            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22411                deserializer.deserialize_map(AlarmSpecVisitor)
22412            }
22413        }
22414
22415struct AlarmSpecVisitor;
22416
22417impl<'de> de::Visitor<'de> for AlarmSpecVisitor {
22418    type Value = Box<dyn AlarmSpecTrait>;
22419
22420    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22421        formatter.write_str("a valid AlarmSpecTrait JSON object with a _typeName field")
22422    }
22423
22424    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22425    where
22426        A: de::MapAccess<'de>,
22427    {
22428        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22429        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22430        match any {
22431            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22432                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22433            VimAny::Value(value) => Err(de::Error::custom(format!(
22434                "expected object not wrapped value: {:?}",
22435                value))),
22436        }
22437    }
22438}
22439
22440impl AlarmSpecTrait for AlarmSpec {
22441    fn get_name(&self) -> &str { &self.name }
22442    fn get_system_name(&self) -> &Option<String> { &self.system_name }
22443    fn get_description(&self) -> &str { &self.description }
22444    fn get_enabled(&self) -> bool { self.enabled }
22445    fn get_expression(&self) -> &Box<dyn super::traits::AlarmExpressionTrait> { &self.expression }
22446    fn get_action(&self) -> &Option<Box<dyn super::traits::AlarmActionTrait>> { &self.action }
22447    fn get_action_frequency(&self) -> Option<i32> { self.action_frequency }
22448    fn get_setting(&self) -> &Option<super::structs::AlarmSetting> { &self.setting }
22449}
22450impl AlarmSpecTrait for AlarmInfo {
22451    fn get_name(&self) -> &str { &self.name }
22452    fn get_system_name(&self) -> &Option<String> { &self.system_name }
22453    fn get_description(&self) -> &str { &self.description }
22454    fn get_enabled(&self) -> bool { self.enabled }
22455    fn get_expression(&self) -> &Box<dyn super::traits::AlarmExpressionTrait> { &self.expression }
22456    fn get_action(&self) -> &Option<Box<dyn super::traits::AlarmActionTrait>> { &self.action }
22457    fn get_action_frequency(&self) -> Option<i32> { self.action_frequency }
22458    fn get_setting(&self) -> &Option<super::structs::AlarmSetting> { &self.setting }
22459}
22460impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AlarmSpecTrait {
22461    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22462        let data_type = from.data_type();
22463        match data_type {
22464            StructType::AlarmSpec => Some(from.as_any_ref().downcast_ref::<AlarmSpec>()?),
22465            StructType::AlarmInfo => Some(from.as_any_ref().downcast_ref::<AlarmInfo>()?),
22466            _ => None,
22467        }
22468    }
22469    
22470    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22471        let data_type = from.data_type();
22472        match data_type {
22473            StructType::AlarmSpec => Ok(from.as_any_box().downcast::<AlarmSpec>()?),
22474            StructType::AlarmInfo => Ok(from.as_any_box().downcast::<AlarmInfo>()?),
22475            _ => Err(from.as_any_box()),
22476        }
22477    }
22478}
22479/// Base class for all action recommendations in VirtualCenter.
22480pub trait ClusterActionTrait : super::traits::DataObjectTrait {
22481    /// Type of the action.
22482    /// 
22483    /// This is encoded to differentiate between
22484    /// different types of actions aimed at achieving different goals.
22485    fn get_type(&self) -> &str;
22486    /// The target object on which this action will be applied.
22487    /// 
22488    /// For
22489    /// instance, a migration action will have a virtual machine as its
22490    /// target object, while a host power action will have a host as its
22491    /// target action.
22492    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference>;
22493}
22494impl<'s> serde::Serialize for dyn ClusterActionTrait + 's {
22495            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22496            where
22497                S: serde::Serializer,
22498            {
22499                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22500            }
22501        }
22502impl<'de> serde::Deserialize<'de> for Box<dyn ClusterActionTrait> {
22503            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22504                deserializer.deserialize_map(ClusterActionVisitor)
22505            }
22506        }
22507
22508struct ClusterActionVisitor;
22509
22510impl<'de> de::Visitor<'de> for ClusterActionVisitor {
22511    type Value = Box<dyn ClusterActionTrait>;
22512
22513    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22514        formatter.write_str("a valid ClusterActionTrait JSON object with a _typeName field")
22515    }
22516
22517    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22518    where
22519        A: de::MapAccess<'de>,
22520    {
22521        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22522        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22523        match any {
22524            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22525                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22526            VimAny::Value(value) => Err(de::Error::custom(format!(
22527                "expected object not wrapped value: {:?}",
22528                value))),
22529        }
22530    }
22531}
22532
22533impl ClusterActionTrait for ClusterAction {
22534    fn get_type(&self) -> &str { &self.r#type }
22535    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22536}
22537impl ClusterActionTrait for ClusterClusterInitialPlacementAction {
22538    fn get_type(&self) -> &str { &self.r#type }
22539    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22540}
22541impl ClusterActionTrait for ClusterHostInfraUpdateHaModeAction {
22542    fn get_type(&self) -> &str { &self.r#type }
22543    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22544}
22545impl ClusterActionTrait for ClusterHostPowerAction {
22546    fn get_type(&self) -> &str { &self.r#type }
22547    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22548}
22549impl ClusterActionTrait for ClusterInitialPlacementAction {
22550    fn get_type(&self) -> &str { &self.r#type }
22551    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22552}
22553impl ClusterActionTrait for ClusterMigrationAction {
22554    fn get_type(&self) -> &str { &self.r#type }
22555    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22556}
22557impl ClusterActionTrait for PlacementAction {
22558    fn get_type(&self) -> &str { &self.r#type }
22559    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22560}
22561impl ClusterActionTrait for HbrDiskMigrationAction {
22562    fn get_type(&self) -> &str { &self.r#type }
22563    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22564}
22565impl ClusterActionTrait for StorageMigrationAction {
22566    fn get_type(&self) -> &str { &self.r#type }
22567    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22568}
22569impl ClusterActionTrait for StoragePlacementAction {
22570    fn get_type(&self) -> &str { &self.r#type }
22571    fn get_target(&self) -> &Option<super::structs::ManagedObjectReference> { &self.target }
22572}
22573impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterActionTrait {
22574    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22575        let data_type = from.data_type();
22576        match data_type {
22577            StructType::ClusterAction => Some(from.as_any_ref().downcast_ref::<ClusterAction>()?),
22578            StructType::ClusterClusterInitialPlacementAction => Some(from.as_any_ref().downcast_ref::<ClusterClusterInitialPlacementAction>()?),
22579            StructType::ClusterHostInfraUpdateHaModeAction => Some(from.as_any_ref().downcast_ref::<ClusterHostInfraUpdateHaModeAction>()?),
22580            StructType::ClusterHostPowerAction => Some(from.as_any_ref().downcast_ref::<ClusterHostPowerAction>()?),
22581            StructType::ClusterInitialPlacementAction => Some(from.as_any_ref().downcast_ref::<ClusterInitialPlacementAction>()?),
22582            StructType::ClusterMigrationAction => Some(from.as_any_ref().downcast_ref::<ClusterMigrationAction>()?),
22583            StructType::PlacementAction => Some(from.as_any_ref().downcast_ref::<PlacementAction>()?),
22584            StructType::HbrDiskMigrationAction => Some(from.as_any_ref().downcast_ref::<HbrDiskMigrationAction>()?),
22585            StructType::StorageMigrationAction => Some(from.as_any_ref().downcast_ref::<StorageMigrationAction>()?),
22586            StructType::StoragePlacementAction => Some(from.as_any_ref().downcast_ref::<StoragePlacementAction>()?),
22587            _ => None,
22588        }
22589    }
22590    
22591    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22592        let data_type = from.data_type();
22593        match data_type {
22594            StructType::ClusterAction => Ok(from.as_any_box().downcast::<ClusterAction>()?),
22595            StructType::ClusterClusterInitialPlacementAction => Ok(from.as_any_box().downcast::<ClusterClusterInitialPlacementAction>()?),
22596            StructType::ClusterHostInfraUpdateHaModeAction => Ok(from.as_any_box().downcast::<ClusterHostInfraUpdateHaModeAction>()?),
22597            StructType::ClusterHostPowerAction => Ok(from.as_any_box().downcast::<ClusterHostPowerAction>()?),
22598            StructType::ClusterInitialPlacementAction => Ok(from.as_any_box().downcast::<ClusterInitialPlacementAction>()?),
22599            StructType::ClusterMigrationAction => Ok(from.as_any_box().downcast::<ClusterMigrationAction>()?),
22600            StructType::PlacementAction => Ok(from.as_any_box().downcast::<PlacementAction>()?),
22601            StructType::HbrDiskMigrationAction => Ok(from.as_any_box().downcast::<HbrDiskMigrationAction>()?),
22602            StructType::StorageMigrationAction => Ok(from.as_any_box().downcast::<StorageMigrationAction>()?),
22603            StructType::StoragePlacementAction => Ok(from.as_any_box().downcast::<StoragePlacementAction>()?),
22604            _ => Err(from.as_any_box()),
22605        }
22606    }
22607}
22608/// Base class for admission control related information of a vSphere HA cluster.
22609pub trait ClusterDasAdmissionControlInfoTrait : super::traits::DataObjectTrait {
22610}
22611impl<'s> serde::Serialize for dyn ClusterDasAdmissionControlInfoTrait + 's {
22612            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22613            where
22614                S: serde::Serializer,
22615            {
22616                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22617            }
22618        }
22619impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDasAdmissionControlInfoTrait> {
22620            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22621                deserializer.deserialize_map(ClusterDasAdmissionControlInfoVisitor)
22622            }
22623        }
22624
22625struct ClusterDasAdmissionControlInfoVisitor;
22626
22627impl<'de> de::Visitor<'de> for ClusterDasAdmissionControlInfoVisitor {
22628    type Value = Box<dyn ClusterDasAdmissionControlInfoTrait>;
22629
22630    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22631        formatter.write_str("a valid ClusterDasAdmissionControlInfoTrait JSON object with a _typeName field")
22632    }
22633
22634    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22635    where
22636        A: de::MapAccess<'de>,
22637    {
22638        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22639        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22640        match any {
22641            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22642                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22643            VimAny::Value(value) => Err(de::Error::custom(format!(
22644                "expected object not wrapped value: {:?}",
22645                value))),
22646        }
22647    }
22648}
22649
22650impl ClusterDasAdmissionControlInfoTrait for ClusterDasAdmissionControlInfo {
22651}
22652impl ClusterDasAdmissionControlInfoTrait for ClusterFailoverHostAdmissionControlInfo {
22653}
22654impl ClusterDasAdmissionControlInfoTrait for ClusterFailoverLevelAdmissionControlInfo {
22655}
22656impl ClusterDasAdmissionControlInfoTrait for ClusterFailoverResourcesAdmissionControlInfo {
22657}
22658impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDasAdmissionControlInfoTrait {
22659    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22660        let data_type = from.data_type();
22661        match data_type {
22662            StructType::ClusterDasAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAdmissionControlInfo>()?),
22663            StructType::ClusterFailoverHostAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverHostAdmissionControlInfo>()?),
22664            StructType::ClusterFailoverLevelAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverLevelAdmissionControlInfo>()?),
22665            StructType::ClusterFailoverResourcesAdmissionControlInfo => Some(from.as_any_ref().downcast_ref::<ClusterFailoverResourcesAdmissionControlInfo>()?),
22666            _ => None,
22667        }
22668    }
22669    
22670    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22671        let data_type = from.data_type();
22672        match data_type {
22673            StructType::ClusterDasAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterDasAdmissionControlInfo>()?),
22674            StructType::ClusterFailoverHostAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverHostAdmissionControlInfo>()?),
22675            StructType::ClusterFailoverLevelAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverLevelAdmissionControlInfo>()?),
22676            StructType::ClusterFailoverResourcesAdmissionControlInfo => Ok(from.as_any_box().downcast::<ClusterFailoverResourcesAdmissionControlInfo>()?),
22677            _ => Err(from.as_any_box()),
22678        }
22679    }
22680}
22681/// Base class for specifying how admission control should be done for vSphere HA.
22682pub trait ClusterDasAdmissionControlPolicyTrait : super::traits::DataObjectTrait {
22683    /// Percentage of resource reduction that a cluster of VMs can tolerate
22684    /// in case of a failover.
22685    fn get_resource_reduction_to_tolerate_percent(&self) -> Option<i32>;
22686    /// Deprecated as of vSphere 9.0 APIs with no replacement.
22687    /// 
22688    /// Flag that determines whether strict admission control for persistent
22689    /// memory is enabled.
22690    /// 
22691    /// By default, this value is false.
22692    /// This flag can only be set to true if
22693    /// *ClusterDasConfigInfo.admissionControlEnabled* is set to true.
22694    /// When you use persistent memory admission control, the following
22695    /// operations are prevented, if doing so would violate the
22696    /// *ClusterDasConfigInfo.admissionControlEnabled*.
22697    /// - Creating a virtual machine with persistent memory.
22698    /// - Adding a virtual persistent memory device to a virtual machine.
22699    /// - Increasing the capacity of a virtual persistent memory device.
22700    ///   
22701    /// ***Since:*** vSphere API Release 7.0.2.0
22702    fn get_p_mem_admission_control_enabled(&self) -> Option<bool>;
22703}
22704impl<'s> serde::Serialize for dyn ClusterDasAdmissionControlPolicyTrait + 's {
22705            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22706            where
22707                S: serde::Serializer,
22708            {
22709                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22710            }
22711        }
22712impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDasAdmissionControlPolicyTrait> {
22713            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22714                deserializer.deserialize_map(ClusterDasAdmissionControlPolicyVisitor)
22715            }
22716        }
22717
22718struct ClusterDasAdmissionControlPolicyVisitor;
22719
22720impl<'de> de::Visitor<'de> for ClusterDasAdmissionControlPolicyVisitor {
22721    type Value = Box<dyn ClusterDasAdmissionControlPolicyTrait>;
22722
22723    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22724        formatter.write_str("a valid ClusterDasAdmissionControlPolicyTrait JSON object with a _typeName field")
22725    }
22726
22727    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22728    where
22729        A: de::MapAccess<'de>,
22730    {
22731        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22732        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22733        match any {
22734            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22735                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22736            VimAny::Value(value) => Err(de::Error::custom(format!(
22737                "expected object not wrapped value: {:?}",
22738                value))),
22739        }
22740    }
22741}
22742
22743impl ClusterDasAdmissionControlPolicyTrait for ClusterDasAdmissionControlPolicy {
22744    fn get_resource_reduction_to_tolerate_percent(&self) -> Option<i32> { self.resource_reduction_to_tolerate_percent }
22745    fn get_p_mem_admission_control_enabled(&self) -> Option<bool> { self.p_mem_admission_control_enabled }
22746}
22747impl ClusterDasAdmissionControlPolicyTrait for ClusterFailoverHostAdmissionControlPolicy {
22748    fn get_resource_reduction_to_tolerate_percent(&self) -> Option<i32> { self.resource_reduction_to_tolerate_percent }
22749    fn get_p_mem_admission_control_enabled(&self) -> Option<bool> { self.p_mem_admission_control_enabled }
22750}
22751impl ClusterDasAdmissionControlPolicyTrait for ClusterFailoverLevelAdmissionControlPolicy {
22752    fn get_resource_reduction_to_tolerate_percent(&self) -> Option<i32> { self.resource_reduction_to_tolerate_percent }
22753    fn get_p_mem_admission_control_enabled(&self) -> Option<bool> { self.p_mem_admission_control_enabled }
22754}
22755impl ClusterDasAdmissionControlPolicyTrait for ClusterFailoverResourcesAdmissionControlPolicy {
22756    fn get_resource_reduction_to_tolerate_percent(&self) -> Option<i32> { self.resource_reduction_to_tolerate_percent }
22757    fn get_p_mem_admission_control_enabled(&self) -> Option<bool> { self.p_mem_admission_control_enabled }
22758}
22759impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDasAdmissionControlPolicyTrait {
22760    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22761        let data_type = from.data_type();
22762        match data_type {
22763            StructType::ClusterDasAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterDasAdmissionControlPolicy>()?),
22764            StructType::ClusterFailoverHostAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverHostAdmissionControlPolicy>()?),
22765            StructType::ClusterFailoverLevelAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverLevelAdmissionControlPolicy>()?),
22766            StructType::ClusterFailoverResourcesAdmissionControlPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFailoverResourcesAdmissionControlPolicy>()?),
22767            _ => None,
22768        }
22769    }
22770    
22771    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22772        let data_type = from.data_type();
22773        match data_type {
22774            StructType::ClusterDasAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterDasAdmissionControlPolicy>()?),
22775            StructType::ClusterFailoverHostAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverHostAdmissionControlPolicy>()?),
22776            StructType::ClusterFailoverLevelAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverLevelAdmissionControlPolicy>()?),
22777            StructType::ClusterFailoverResourcesAdmissionControlPolicy => Ok(from.as_any_box().downcast::<ClusterFailoverResourcesAdmissionControlPolicy>()?),
22778            _ => Err(from.as_any_box()),
22779        }
22780    }
22781}
22782/// Base class for advanced runtime information related to the high
22783/// availability service for a cluster.
22784pub trait ClusterDasAdvancedRuntimeInfoTrait : super::traits::DataObjectTrait {
22785    /// The information pertaining to the HA agents on the hosts
22786    fn get_das_host_info(&self) -> &Option<Box<dyn super::traits::ClusterDasHostInfoTrait>>;
22787    /// Whether HA VM Component Protection can be enabled for the cluster.
22788    fn get_vmcp_supported(&self) -> &Option<super::structs::ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo>;
22789    /// The map of a datastore to the set of hosts that are using
22790    /// the datastore for storage heartbeating.
22791    fn get_heartbeat_datastore_info(&self) -> &Option<Vec<super::structs::DasHeartbeatDatastoreInfo>>;
22792}
22793impl<'s> serde::Serialize for dyn ClusterDasAdvancedRuntimeInfoTrait + 's {
22794            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22795            where
22796                S: serde::Serializer,
22797            {
22798                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22799            }
22800        }
22801impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDasAdvancedRuntimeInfoTrait> {
22802            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22803                deserializer.deserialize_map(ClusterDasAdvancedRuntimeInfoVisitor)
22804            }
22805        }
22806
22807struct ClusterDasAdvancedRuntimeInfoVisitor;
22808
22809impl<'de> de::Visitor<'de> for ClusterDasAdvancedRuntimeInfoVisitor {
22810    type Value = Box<dyn ClusterDasAdvancedRuntimeInfoTrait>;
22811
22812    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22813        formatter.write_str("a valid ClusterDasAdvancedRuntimeInfoTrait JSON object with a _typeName field")
22814    }
22815
22816    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22817    where
22818        A: de::MapAccess<'de>,
22819    {
22820        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22821        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22822        match any {
22823            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22824                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22825            VimAny::Value(value) => Err(de::Error::custom(format!(
22826                "expected object not wrapped value: {:?}",
22827                value))),
22828        }
22829    }
22830}
22831
22832impl ClusterDasAdvancedRuntimeInfoTrait for ClusterDasAdvancedRuntimeInfo {
22833    fn get_das_host_info(&self) -> &Option<Box<dyn super::traits::ClusterDasHostInfoTrait>> { &self.das_host_info }
22834    fn get_vmcp_supported(&self) -> &Option<super::structs::ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo> { &self.vmcp_supported }
22835    fn get_heartbeat_datastore_info(&self) -> &Option<Vec<super::structs::DasHeartbeatDatastoreInfo>> { &self.heartbeat_datastore_info }
22836}
22837impl ClusterDasAdvancedRuntimeInfoTrait for ClusterDasFailoverLevelAdvancedRuntimeInfo {
22838    fn get_das_host_info(&self) -> &Option<Box<dyn super::traits::ClusterDasHostInfoTrait>> { &self.das_host_info }
22839    fn get_vmcp_supported(&self) -> &Option<super::structs::ClusterDasAdvancedRuntimeInfoVmcpCapabilityInfo> { &self.vmcp_supported }
22840    fn get_heartbeat_datastore_info(&self) -> &Option<Vec<super::structs::DasHeartbeatDatastoreInfo>> { &self.heartbeat_datastore_info }
22841}
22842impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDasAdvancedRuntimeInfoTrait {
22843    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22844        let data_type = from.data_type();
22845        match data_type {
22846            StructType::ClusterDasAdvancedRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAdvancedRuntimeInfo>()?),
22847            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasFailoverLevelAdvancedRuntimeInfo>()?),
22848            _ => None,
22849        }
22850    }
22851    
22852    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22853        let data_type = from.data_type();
22854        match data_type {
22855            StructType::ClusterDasAdvancedRuntimeInfo => Ok(from.as_any_box().downcast::<ClusterDasAdvancedRuntimeInfo>()?),
22856            StructType::ClusterDasFailoverLevelAdvancedRuntimeInfo => Ok(from.as_any_box().downcast::<ClusterDasFailoverLevelAdvancedRuntimeInfo>()?),
22857            _ => Err(from.as_any_box()),
22858        }
22859    }
22860}
22861/// Base class for DAS data for high availability service for a cluster.
22862pub trait ClusterDasDataTrait : super::traits::DataObjectTrait {
22863}
22864impl<'s> serde::Serialize for dyn ClusterDasDataTrait + 's {
22865            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22866            where
22867                S: serde::Serializer,
22868            {
22869                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22870            }
22871        }
22872impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDasDataTrait> {
22873            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22874                deserializer.deserialize_map(ClusterDasDataVisitor)
22875            }
22876        }
22877
22878struct ClusterDasDataVisitor;
22879
22880impl<'de> de::Visitor<'de> for ClusterDasDataVisitor {
22881    type Value = Box<dyn ClusterDasDataTrait>;
22882
22883    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22884        formatter.write_str("a valid ClusterDasDataTrait JSON object with a _typeName field")
22885    }
22886
22887    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22888    where
22889        A: de::MapAccess<'de>,
22890    {
22891        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22892        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22893        match any {
22894            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22895                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22896            VimAny::Value(value) => Err(de::Error::custom(format!(
22897                "expected object not wrapped value: {:?}",
22898                value))),
22899        }
22900    }
22901}
22902
22903impl ClusterDasDataTrait for ClusterDasData {
22904}
22905impl ClusterDasDataTrait for ClusterDasDataSummary {
22906}
22907impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDasDataTrait {
22908    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22909        let data_type = from.data_type();
22910        match data_type {
22911            StructType::ClusterDasData => Some(from.as_any_ref().downcast_ref::<ClusterDasData>()?),
22912            StructType::ClusterDasDataSummary => Some(from.as_any_ref().downcast_ref::<ClusterDasDataSummary>()?),
22913            _ => None,
22914        }
22915    }
22916    
22917    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22918        let data_type = from.data_type();
22919        match data_type {
22920            StructType::ClusterDasData => Ok(from.as_any_box().downcast::<ClusterDasData>()?),
22921            StructType::ClusterDasDataSummary => Ok(from.as_any_box().downcast::<ClusterDasDataSummary>()?),
22922            _ => Err(from.as_any_box()),
22923        }
22924    }
22925}
22926/// HA specific advanced information pertaining to the hosts in the cluster.
22927pub trait ClusterDasHostInfoTrait : super::traits::DataObjectTrait {
22928}
22929impl<'s> serde::Serialize for dyn ClusterDasHostInfoTrait + 's {
22930            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
22931            where
22932                S: serde::Serializer,
22933            {
22934                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
22935            }
22936        }
22937impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDasHostInfoTrait> {
22938            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
22939                deserializer.deserialize_map(ClusterDasHostInfoVisitor)
22940            }
22941        }
22942
22943struct ClusterDasHostInfoVisitor;
22944
22945impl<'de> de::Visitor<'de> for ClusterDasHostInfoVisitor {
22946    type Value = Box<dyn ClusterDasHostInfoTrait>;
22947
22948    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22949        formatter.write_str("a valid ClusterDasHostInfoTrait JSON object with a _typeName field")
22950    }
22951
22952    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
22953    where
22954        A: de::MapAccess<'de>,
22955    {
22956        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
22957        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
22958        match any {
22959            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
22960                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
22961            VimAny::Value(value) => Err(de::Error::custom(format!(
22962                "expected object not wrapped value: {:?}",
22963                value))),
22964        }
22965    }
22966}
22967
22968impl ClusterDasHostInfoTrait for ClusterDasHostInfo {
22969}
22970impl ClusterDasHostInfoTrait for ClusterDasAamHostInfo {
22971}
22972impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDasHostInfoTrait {
22973    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
22974        let data_type = from.data_type();
22975        match data_type {
22976            StructType::ClusterDasHostInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasHostInfo>()?),
22977            StructType::ClusterDasAamHostInfo => Some(from.as_any_ref().downcast_ref::<ClusterDasAamHostInfo>()?),
22978            _ => None,
22979        }
22980    }
22981    
22982    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
22983        let data_type = from.data_type();
22984        match data_type {
22985            StructType::ClusterDasHostInfo => Ok(from.as_any_box().downcast::<ClusterDasHostInfo>()?),
22986            StructType::ClusterDasAamHostInfo => Ok(from.as_any_box().downcast::<ClusterDasAamHostInfo>()?),
22987            _ => Err(from.as_any_box()),
22988        }
22989    }
22990}
22991/// FaultsByVm is the faults generated by DRS when it tries to
22992/// move a VM.
22993pub trait ClusterDrsFaultsFaultsByVmTrait : super::traits::DataObjectTrait {
22994    /// The VM that DRS was trying to migrate when it generated the faults.
22995    /// 
22996    /// If this property is NULL, the fault is not associated with a particular VM.
22997    /// 
22998    /// Refers instance of *VirtualMachine*.
22999    fn get_vm(&self) -> &Option<super::structs::ManagedObjectReference>;
23000    /// The faults generated by DRS when it was trying to move the given VM.
23001    fn get_fault(&self) -> &Vec<super::structs::MethodFault>;
23002}
23003impl<'s> serde::Serialize for dyn ClusterDrsFaultsFaultsByVmTrait + 's {
23004            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23005            where
23006                S: serde::Serializer,
23007            {
23008                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23009            }
23010        }
23011impl<'de> serde::Deserialize<'de> for Box<dyn ClusterDrsFaultsFaultsByVmTrait> {
23012            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23013                deserializer.deserialize_map(ClusterDrsFaultsFaultsByVmVisitor)
23014            }
23015        }
23016
23017struct ClusterDrsFaultsFaultsByVmVisitor;
23018
23019impl<'de> de::Visitor<'de> for ClusterDrsFaultsFaultsByVmVisitor {
23020    type Value = Box<dyn ClusterDrsFaultsFaultsByVmTrait>;
23021
23022    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23023        formatter.write_str("a valid ClusterDrsFaultsFaultsByVmTrait JSON object with a _typeName field")
23024    }
23025
23026    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23027    where
23028        A: de::MapAccess<'de>,
23029    {
23030        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23031        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23032        match any {
23033            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23034                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23035            VimAny::Value(value) => Err(de::Error::custom(format!(
23036                "expected object not wrapped value: {:?}",
23037                value))),
23038        }
23039    }
23040}
23041
23042impl ClusterDrsFaultsFaultsByVmTrait for ClusterDrsFaultsFaultsByVm {
23043    fn get_vm(&self) -> &Option<super::structs::ManagedObjectReference> { &self.vm }
23044    fn get_fault(&self) -> &Vec<super::structs::MethodFault> { &self.fault }
23045}
23046impl ClusterDrsFaultsFaultsByVmTrait for ClusterDrsFaultsFaultsByVirtualDisk {
23047    fn get_vm(&self) -> &Option<super::structs::ManagedObjectReference> { &self.vm }
23048    fn get_fault(&self) -> &Vec<super::structs::MethodFault> { &self.fault }
23049}
23050impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterDrsFaultsFaultsByVmTrait {
23051    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23052        let data_type = from.data_type();
23053        match data_type {
23054            StructType::ClusterDrsFaultsFaultsByVm => Some(from.as_any_ref().downcast_ref::<ClusterDrsFaultsFaultsByVm>()?),
23055            StructType::ClusterDrsFaultsFaultsByVirtualDisk => Some(from.as_any_ref().downcast_ref::<ClusterDrsFaultsFaultsByVirtualDisk>()?),
23056            _ => None,
23057        }
23058    }
23059    
23060    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23061        let data_type = from.data_type();
23062        match data_type {
23063            StructType::ClusterDrsFaultsFaultsByVm => Ok(from.as_any_box().downcast::<ClusterDrsFaultsFaultsByVm>()?),
23064            StructType::ClusterDrsFaultsFaultsByVirtualDisk => Ok(from.as_any_box().downcast::<ClusterDrsFaultsFaultsByVirtualDisk>()?),
23065            _ => Err(from.as_any_box()),
23066        }
23067    }
23068}
23069/// *ClusterGroupInfo* is the base type for all virtual machine
23070/// and host groups.
23071/// 
23072/// All virtual machines and hosts that are part of a group
23073/// must be part of the same cluster.
23074pub trait ClusterGroupInfoTrait : super::traits::DataObjectTrait {
23075    /// Unique name of the group.
23076    fn get_name(&self) -> &str;
23077    /// Flag to indicate whether the group is created by the user or the system.
23078    fn get_user_created(&self) -> Option<bool>;
23079    /// Unique ID for the group.
23080    /// 
23081    /// uniqueID is unique within a cluster.
23082    /// Groups residing in different clusters might share a uniqueID.
23083    fn get_unique_id(&self) -> &Option<String>;
23084}
23085impl<'s> serde::Serialize for dyn ClusterGroupInfoTrait + 's {
23086            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23087            where
23088                S: serde::Serializer,
23089            {
23090                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23091            }
23092        }
23093impl<'de> serde::Deserialize<'de> for Box<dyn ClusterGroupInfoTrait> {
23094            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23095                deserializer.deserialize_map(ClusterGroupInfoVisitor)
23096            }
23097        }
23098
23099struct ClusterGroupInfoVisitor;
23100
23101impl<'de> de::Visitor<'de> for ClusterGroupInfoVisitor {
23102    type Value = Box<dyn ClusterGroupInfoTrait>;
23103
23104    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23105        formatter.write_str("a valid ClusterGroupInfoTrait JSON object with a _typeName field")
23106    }
23107
23108    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23109    where
23110        A: de::MapAccess<'de>,
23111    {
23112        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23113        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23114        match any {
23115            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23116                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23117            VimAny::Value(value) => Err(de::Error::custom(format!(
23118                "expected object not wrapped value: {:?}",
23119                value))),
23120        }
23121    }
23122}
23123
23124impl ClusterGroupInfoTrait for ClusterGroupInfo {
23125    fn get_name(&self) -> &str { &self.name }
23126    fn get_user_created(&self) -> Option<bool> { self.user_created }
23127    fn get_unique_id(&self) -> &Option<String> { &self.unique_id }
23128}
23129impl ClusterGroupInfoTrait for ClusterHostGroup {
23130    fn get_name(&self) -> &str { &self.name }
23131    fn get_user_created(&self) -> Option<bool> { self.user_created }
23132    fn get_unique_id(&self) -> &Option<String> { &self.unique_id }
23133}
23134impl ClusterGroupInfoTrait for ClusterVmGroup {
23135    fn get_name(&self) -> &str { &self.name }
23136    fn get_user_created(&self) -> Option<bool> { self.user_created }
23137    fn get_unique_id(&self) -> &Option<String> { &self.unique_id }
23138}
23139impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterGroupInfoTrait {
23140    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23141        let data_type = from.data_type();
23142        match data_type {
23143            StructType::ClusterGroupInfo => Some(from.as_any_ref().downcast_ref::<ClusterGroupInfo>()?),
23144            StructType::ClusterHostGroup => Some(from.as_any_ref().downcast_ref::<ClusterHostGroup>()?),
23145            StructType::ClusterVmGroup => Some(from.as_any_ref().downcast_ref::<ClusterVmGroup>()?),
23146            _ => None,
23147        }
23148    }
23149    
23150    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23151        let data_type = from.data_type();
23152        match data_type {
23153            StructType::ClusterGroupInfo => Ok(from.as_any_box().downcast::<ClusterGroupInfo>()?),
23154            StructType::ClusterHostGroup => Ok(from.as_any_box().downcast::<ClusterHostGroup>()?),
23155            StructType::ClusterVmGroup => Ok(from.as_any_box().downcast::<ClusterVmGroup>()?),
23156            _ => Err(from.as_any_box()),
23157        }
23158    }
23159}
23160/// The *ClusterRuleInfo* data object is the base type for affinity
23161/// and anti-affinity rules.
23162/// 
23163/// The affinity and anti-affinity rules
23164/// are DRS (Distributed Resource Scheduling) rules that affect the placement
23165/// of virtual machines in a cluster. Hosts and virtual machines referenced
23166/// in a DRS rule must be in the same cluster.
23167/// 
23168/// Note: DRS rules are different than an individual host's CPU affinity rules
23169/// (*VirtualMachineAffinityInfo*).
23170/// 
23171/// The Server uses DRS rule objects to describe the current rule configuration
23172/// (*ClusterConfigInfoEx*.*ClusterConfigInfoEx.rule*).
23173/// Your client application uses rule objects to configure the affinity and
23174/// anti-affinity rules
23175/// (*ClusterConfigSpecEx*.*ClusterConfigSpecEx.rulesSpec*).
23176/// 
23177/// You can create the following types of rules:
23178/// - An affinity rule defines a set of virtual machines that should run
23179///   on the same host.
23180///   The *ClusterAffinityRuleSpec* object describes a rule that
23181///   identifies virtual machines, but does not identify any specific host.
23182/// - An anti-affinity rule defines a set of virtual machines that should run
23183///   on different hosts.
23184///   The *ClusterAntiAffinityRuleSpec* object describes a rule that
23185///   identifies virtual machines, but does not identify any specific host.
23186/// - A VM-Host rule defines affinity and anti-affinity relationships between
23187///   virtual machines and hosts.
23188///   The *ClusterVmHostRuleInfo* object describes a rule that identifies
23189///   a virtual machine group (*ClusterVmGroup*) and affinity and
23190///   anti-affinity host groups (*ClusterHostGroup*).
23191///   
23192/// Rule configuration is a dynamic process. When you create or modify a DRS rule,
23193/// the Server applies the rule to the cluster. If the existing cluster configuration
23194/// violates the rule, the Server attempts to correct the situation. If that is not
23195/// possible, the Server generates a fault and produces a log event.
23196/// DRS rules do not have precedence; all rules are applied equally.
23197/// DRS does not validate one rule against another. If you create conflicting
23198/// rules, the older rule takes precedence and DRS disables the newer rule.
23199/// 
23200/// Improperly used, DRS rules can fragment the cluster and inhibit the proper
23201/// functioning of DRS, HA, and DPM services. vSphere services never
23202/// take any actions that would result in the violation of mandatory DRS rules.
23203/// An operation that violates a mandatory rule would produce the following
23204/// consequences.
23205/// - DRS does not evacuate virtual machines to place a host in maintenance
23206///   mode.
23207/// - DRS does not place virtual machines for power-on or load balance virtual
23208///   machines.
23209/// - HA does not perform failovers.
23210/// - DPM does not optimize power management by placing hosts into standby
23211///   mode.
23212///   
23213/// To avoid these situations, exercise caution when creating more than one
23214/// mandatory rule, or consider using only optional rules. Make sure that
23215/// the number of hosts with which a virtual machine is related by affinity rule
23216/// is large enough that losing a host does not prevent the virtual machine
23217/// from running.
23218/// 
23219/// For manual and partially automated DRS clusters, the Server produces migration
23220/// recommendations to satisfy the DRS rules. You are not required to act on the
23221/// recommendations, but the Server maintains the recommendations until the rules
23222/// are satisfied.
23223pub trait ClusterRuleInfoTrait : super::traits::DataObjectTrait {
23224    /// Unique ID for rules.
23225    /// 
23226    /// When adding a new rule, do not specify this property.
23227    /// The Server will assign the key.
23228    fn get_key(&self) -> Option<i32>;
23229    /// Flag to indicate whether or not the rule is currently satisfied.
23230    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum>;
23231    /// Flag to indicate whether or not the rule is enabled.
23232    /// 
23233    /// Set this property
23234    /// when you configure the rule. The default value is false (disabled).
23235    /// If there is a rule conflict, the Server can override the setting to disable
23236    /// a rule.
23237    fn get_enabled(&self) -> Option<bool>;
23238    /// Name of the rule.
23239    fn get_name(&self) -> &Option<String>;
23240    /// Flag to indicate whether compliance with this rule is mandatory or optional.
23241    /// 
23242    /// The default value is false (optional).
23243    /// - A mandatory rule will prevent a virtual machine from being powered on
23244    ///   or migrated to a host that does not satisfy the rule.
23245    /// - An optional rule specifies a preference. DRS takes an optional rule
23246    ///   into consideration when it places a virtual machine in the cluster.
23247    ///   DRS will act on an optional rule as long as it does not impact
23248    ///   the ability of the host to satisfy current CPU or memory requirements
23249    ///   for virtual machines on the system. (As long as the operation does not
23250    ///   cause any host to be more than 100% utilized.)
23251    fn get_mandatory(&self) -> Option<bool>;
23252    /// Flag to indicate whether the rule is created by the user or the system.
23253    fn get_user_created(&self) -> Option<bool>;
23254    /// Flag to indicate whether or not the placement of Virtual Machines is currently
23255    /// in compliance with this rule.
23256    /// 
23257    /// The Server does not currently use this property.
23258    fn get_in_compliance(&self) -> Option<bool>;
23259    /// UUID for the rule.
23260    /// 
23261    /// When adding a new rule, do not specify this
23262    /// property. The Server will assign the key.
23263    fn get_rule_uuid(&self) -> &Option<String>;
23264}
23265impl<'s> serde::Serialize for dyn ClusterRuleInfoTrait + 's {
23266            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23267            where
23268                S: serde::Serializer,
23269            {
23270                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23271            }
23272        }
23273impl<'de> serde::Deserialize<'de> for Box<dyn ClusterRuleInfoTrait> {
23274            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23275                deserializer.deserialize_map(ClusterRuleInfoVisitor)
23276            }
23277        }
23278
23279struct ClusterRuleInfoVisitor;
23280
23281impl<'de> de::Visitor<'de> for ClusterRuleInfoVisitor {
23282    type Value = Box<dyn ClusterRuleInfoTrait>;
23283
23284    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23285        formatter.write_str("a valid ClusterRuleInfoTrait JSON object with a _typeName field")
23286    }
23287
23288    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23289    where
23290        A: de::MapAccess<'de>,
23291    {
23292        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23293        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23294        match any {
23295            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23296                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23297            VimAny::Value(value) => Err(de::Error::custom(format!(
23298                "expected object not wrapped value: {:?}",
23299                value))),
23300        }
23301    }
23302}
23303
23304impl ClusterRuleInfoTrait for ClusterRuleInfo {
23305    fn get_key(&self) -> Option<i32> { self.key }
23306    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23307    fn get_enabled(&self) -> Option<bool> { self.enabled }
23308    fn get_name(&self) -> &Option<String> { &self.name }
23309    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23310    fn get_user_created(&self) -> Option<bool> { self.user_created }
23311    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23312    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23313}
23314impl ClusterRuleInfoTrait for ClusterAffinityRuleSpec {
23315    fn get_key(&self) -> Option<i32> { self.key }
23316    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23317    fn get_enabled(&self) -> Option<bool> { self.enabled }
23318    fn get_name(&self) -> &Option<String> { &self.name }
23319    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23320    fn get_user_created(&self) -> Option<bool> { self.user_created }
23321    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23322    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23323}
23324impl ClusterRuleInfoTrait for ClusterAntiAffinityRuleSpec {
23325    fn get_key(&self) -> Option<i32> { self.key }
23326    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23327    fn get_enabled(&self) -> Option<bool> { self.enabled }
23328    fn get_name(&self) -> &Option<String> { &self.name }
23329    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23330    fn get_user_created(&self) -> Option<bool> { self.user_created }
23331    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23332    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23333}
23334impl ClusterRuleInfoTrait for ClusterDependencyRuleInfo {
23335    fn get_key(&self) -> Option<i32> { self.key }
23336    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23337    fn get_enabled(&self) -> Option<bool> { self.enabled }
23338    fn get_name(&self) -> &Option<String> { &self.name }
23339    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23340    fn get_user_created(&self) -> Option<bool> { self.user_created }
23341    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23342    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23343}
23344impl ClusterRuleInfoTrait for ClusterFtVmHostRuleInfo {
23345    fn get_key(&self) -> Option<i32> { self.key }
23346    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23347    fn get_enabled(&self) -> Option<bool> { self.enabled }
23348    fn get_name(&self) -> &Option<String> { &self.name }
23349    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23350    fn get_user_created(&self) -> Option<bool> { self.user_created }
23351    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23352    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23353}
23354impl ClusterRuleInfoTrait for ClusterVmHostRuleInfo {
23355    fn get_key(&self) -> Option<i32> { self.key }
23356    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23357    fn get_enabled(&self) -> Option<bool> { self.enabled }
23358    fn get_name(&self) -> &Option<String> { &self.name }
23359    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23360    fn get_user_created(&self) -> Option<bool> { self.user_created }
23361    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23362    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23363}
23364impl ClusterRuleInfoTrait for VirtualDiskAntiAffinityRuleSpec {
23365    fn get_key(&self) -> Option<i32> { self.key }
23366    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23367    fn get_enabled(&self) -> Option<bool> { self.enabled }
23368    fn get_name(&self) -> &Option<String> { &self.name }
23369    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23370    fn get_user_created(&self) -> Option<bool> { self.user_created }
23371    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23372    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23373}
23374impl ClusterRuleInfoTrait for VirtualDiskRuleSpec {
23375    fn get_key(&self) -> Option<i32> { self.key }
23376    fn get_status(&self) -> &Option<super::enums::ManagedEntityStatusEnum> { &self.status }
23377    fn get_enabled(&self) -> Option<bool> { self.enabled }
23378    fn get_name(&self) -> &Option<String> { &self.name }
23379    fn get_mandatory(&self) -> Option<bool> { self.mandatory }
23380    fn get_user_created(&self) -> Option<bool> { self.user_created }
23381    fn get_in_compliance(&self) -> Option<bool> { self.in_compliance }
23382    fn get_rule_uuid(&self) -> &Option<String> { &self.rule_uuid }
23383}
23384impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterRuleInfoTrait {
23385    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23386        let data_type = from.data_type();
23387        match data_type {
23388            StructType::ClusterRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterRuleInfo>()?),
23389            StructType::ClusterAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterAffinityRuleSpec>()?),
23390            StructType::ClusterAntiAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterAntiAffinityRuleSpec>()?),
23391            StructType::ClusterDependencyRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterDependencyRuleInfo>()?),
23392            StructType::ClusterFtVmHostRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterFtVmHostRuleInfo>()?),
23393            StructType::ClusterVmHostRuleInfo => Some(from.as_any_ref().downcast_ref::<ClusterVmHostRuleInfo>()?),
23394            StructType::VirtualDiskAntiAffinityRuleSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskAntiAffinityRuleSpec>()?),
23395            StructType::VirtualDiskRuleSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskRuleSpec>()?),
23396            _ => None,
23397        }
23398    }
23399    
23400    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23401        let data_type = from.data_type();
23402        match data_type {
23403            StructType::ClusterRuleInfo => Ok(from.as_any_box().downcast::<ClusterRuleInfo>()?),
23404            StructType::ClusterAffinityRuleSpec => Ok(from.as_any_box().downcast::<ClusterAffinityRuleSpec>()?),
23405            StructType::ClusterAntiAffinityRuleSpec => Ok(from.as_any_box().downcast::<ClusterAntiAffinityRuleSpec>()?),
23406            StructType::ClusterDependencyRuleInfo => Ok(from.as_any_box().downcast::<ClusterDependencyRuleInfo>()?),
23407            StructType::ClusterFtVmHostRuleInfo => Ok(from.as_any_box().downcast::<ClusterFtVmHostRuleInfo>()?),
23408            StructType::ClusterVmHostRuleInfo => Ok(from.as_any_box().downcast::<ClusterVmHostRuleInfo>()?),
23409            StructType::VirtualDiskAntiAffinityRuleSpec => Ok(from.as_any_box().downcast::<VirtualDiskAntiAffinityRuleSpec>()?),
23410            StructType::VirtualDiskRuleSpec => Ok(from.as_any_box().downcast::<VirtualDiskRuleSpec>()?),
23411            _ => Err(from.as_any_box()),
23412        }
23413    }
23414}
23415/// The base class *ClusterSlotPolicy* is used for specifying how
23416/// the slot size is to be computed for the failover level HA admission control
23417/// policy.
23418/// 
23419/// By default, vSphere HA defines the slot size using the largest memory
23420/// and cpu reservations of any powered on virtual machine in the cluster.
23421/// Subclasses of this class define various policies to modify how the slot size
23422/// is chosen to prevent outlier virtual machines (i.e. those with much larger
23423/// reservations than the average) from skewing the slot size. If such a policy is chosen,
23424/// outlier virtual machines will use multiple slots. Using such a policy introduces
23425/// a risk that vSphere HA will be unable to failover these virtual machines because
23426/// of resource fragmentation.
23427pub trait ClusterSlotPolicyTrait : super::traits::DataObjectTrait {
23428}
23429impl<'s> serde::Serialize for dyn ClusterSlotPolicyTrait + 's {
23430            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23431            where
23432                S: serde::Serializer,
23433            {
23434                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23435            }
23436        }
23437impl<'de> serde::Deserialize<'de> for Box<dyn ClusterSlotPolicyTrait> {
23438            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23439                deserializer.deserialize_map(ClusterSlotPolicyVisitor)
23440            }
23441        }
23442
23443struct ClusterSlotPolicyVisitor;
23444
23445impl<'de> de::Visitor<'de> for ClusterSlotPolicyVisitor {
23446    type Value = Box<dyn ClusterSlotPolicyTrait>;
23447
23448    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23449        formatter.write_str("a valid ClusterSlotPolicyTrait JSON object with a _typeName field")
23450    }
23451
23452    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23453    where
23454        A: de::MapAccess<'de>,
23455    {
23456        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23457        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23458        match any {
23459            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23460                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23461            VimAny::Value(value) => Err(de::Error::custom(format!(
23462                "expected object not wrapped value: {:?}",
23463                value))),
23464        }
23465    }
23466}
23467
23468impl ClusterSlotPolicyTrait for ClusterSlotPolicy {
23469}
23470impl ClusterSlotPolicyTrait for ClusterFixedSizeSlotPolicy {
23471}
23472impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterSlotPolicyTrait {
23473    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23474        let data_type = from.data_type();
23475        match data_type {
23476            StructType::ClusterSlotPolicy => Some(from.as_any_ref().downcast_ref::<ClusterSlotPolicy>()?),
23477            StructType::ClusterFixedSizeSlotPolicy => Some(from.as_any_ref().downcast_ref::<ClusterFixedSizeSlotPolicy>()?),
23478            _ => None,
23479        }
23480    }
23481    
23482    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23483        let data_type = from.data_type();
23484        match data_type {
23485            StructType::ClusterSlotPolicy => Ok(from.as_any_box().downcast::<ClusterSlotPolicy>()?),
23486            StructType::ClusterFixedSizeSlotPolicy => Ok(from.as_any_box().downcast::<ClusterFixedSizeSlotPolicy>()?),
23487            _ => Err(from.as_any_box()),
23488        }
23489    }
23490}
23491/// Defines a link in the context of a ResultTable cell, which
23492/// will be consumed by vSAN UI for UI navigation
23493/// 
23494/// This structure may be used only with operations rendered under `/vsan`.
23495pub trait VsanClusterHealthLinkBaseTrait : super::traits::DataObjectTrait {
23496    /// The label string showing on top of the link.
23497    fn get_label(&self) -> &Option<String>;
23498}
23499impl<'s> serde::Serialize for dyn VsanClusterHealthLinkBaseTrait + 's {
23500            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23501            where
23502                S: serde::Serializer,
23503            {
23504                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23505            }
23506        }
23507impl<'de> serde::Deserialize<'de> for Box<dyn VsanClusterHealthLinkBaseTrait> {
23508            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23509                deserializer.deserialize_map(VsanClusterHealthLinkBaseVisitor)
23510            }
23511        }
23512
23513struct VsanClusterHealthLinkBaseVisitor;
23514
23515impl<'de> de::Visitor<'de> for VsanClusterHealthLinkBaseVisitor {
23516    type Value = Box<dyn VsanClusterHealthLinkBaseTrait>;
23517
23518    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23519        formatter.write_str("a valid VsanClusterHealthLinkBaseTrait JSON object with a _typeName field")
23520    }
23521
23522    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23523    where
23524        A: de::MapAccess<'de>,
23525    {
23526        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23527        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23528        match any {
23529            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23530                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23531            VimAny::Value(value) => Err(de::Error::custom(format!(
23532                "expected object not wrapped value: {:?}",
23533                value))),
23534        }
23535    }
23536}
23537
23538impl VsanClusterHealthLinkBaseTrait for VsanClusterHealthLinkBase {
23539    fn get_label(&self) -> &Option<String> { &self.label }
23540}
23541impl VsanClusterHealthLinkBaseTrait for VsanClusterHealthLink {
23542    fn get_label(&self) -> &Option<String> { &self.label }
23543}
23544impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanClusterHealthLinkBaseTrait {
23545    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23546        let data_type = from.data_type();
23547        match data_type {
23548            StructType::VsanClusterHealthLinkBase => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthLinkBase>()?),
23549            StructType::VsanClusterHealthLink => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthLink>()?),
23550            _ => None,
23551        }
23552    }
23553    
23554    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23555        let data_type = from.data_type();
23556        match data_type {
23557            StructType::VsanClusterHealthLinkBase => Ok(from.as_any_box().downcast::<VsanClusterHealthLinkBase>()?),
23558            StructType::VsanClusterHealthLink => Ok(from.as_any_box().downcast::<VsanClusterHealthLink>()?),
23559            _ => Err(from.as_any_box()),
23560        }
23561    }
23562}
23563/// The base class for vSAN health summary test result
23564pub trait VsanClusterHealthResultBaseTrait : super::traits::DataObjectTrait {
23565    /// The label name for the vSAN health test
23566    fn get_label(&self) -> &Option<String>;
23567}
23568impl<'s> serde::Serialize for dyn VsanClusterHealthResultBaseTrait + 's {
23569            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23570            where
23571                S: serde::Serializer,
23572            {
23573                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23574            }
23575        }
23576impl<'de> serde::Deserialize<'de> for Box<dyn VsanClusterHealthResultBaseTrait> {
23577            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23578                deserializer.deserialize_map(VsanClusterHealthResultBaseVisitor)
23579            }
23580        }
23581
23582struct VsanClusterHealthResultBaseVisitor;
23583
23584impl<'de> de::Visitor<'de> for VsanClusterHealthResultBaseVisitor {
23585    type Value = Box<dyn VsanClusterHealthResultBaseTrait>;
23586
23587    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23588        formatter.write_str("a valid VsanClusterHealthResultBaseTrait JSON object with a _typeName field")
23589    }
23590
23591    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23592    where
23593        A: de::MapAccess<'de>,
23594    {
23595        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23596        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23597        match any {
23598            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23599                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23600            VimAny::Value(value) => Err(de::Error::custom(format!(
23601                "expected object not wrapped value: {:?}",
23602                value))),
23603        }
23604    }
23605}
23606
23607impl VsanClusterHealthResultBaseTrait for VsanClusterHealthResultBase {
23608    fn get_label(&self) -> &Option<String> { &self.label }
23609}
23610impl VsanClusterHealthResultBaseTrait for VsanClusterHealthResultTable {
23611    fn get_label(&self) -> &Option<String> { &self.label }
23612}
23613impl VsanClusterHealthResultBaseTrait for VsanClusterHealthResultWithRemediation {
23614    fn get_label(&self) -> &Option<String> { &self.label }
23615}
23616impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanClusterHealthResultBaseTrait {
23617    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23618        let data_type = from.data_type();
23619        match data_type {
23620            StructType::VsanClusterHealthResultBase => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultBase>()?),
23621            StructType::VsanClusterHealthResultTable => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultTable>()?),
23622            StructType::VsanClusterHealthResultWithRemediation => Some(from.as_any_ref().downcast_ref::<VsanClusterHealthResultWithRemediation>()?),
23623            _ => None,
23624        }
23625    }
23626    
23627    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23628        let data_type = from.data_type();
23629        match data_type {
23630            StructType::VsanClusterHealthResultBase => Ok(from.as_any_box().downcast::<VsanClusterHealthResultBase>()?),
23631            StructType::VsanClusterHealthResultTable => Ok(from.as_any_box().downcast::<VsanClusterHealthResultTable>()?),
23632            StructType::VsanClusterHealthResultWithRemediation => Ok(from.as_any_box().downcast::<VsanClusterHealthResultWithRemediation>()?),
23633            _ => Err(from.as_any_box()),
23634        }
23635    }
23636}
23637/// Describes a fault domain structure.
23638pub trait VimClusterVsanFaultDomainSpecTrait : super::traits::DataObjectTrait {
23639    /// List of hosts that will participate in the newly created fault domain.
23640    /// 
23641    /// Refers instances of *HostSystem*.
23642    fn get_hosts(&self) -> &Option<Vec<super::structs::ManagedObjectReference>>;
23643    /// The name of the fault domain.
23644    fn get_name(&self) -> &str;
23645}
23646impl<'s> serde::Serialize for dyn VimClusterVsanFaultDomainSpecTrait + 's {
23647            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23648            where
23649                S: serde::Serializer,
23650            {
23651                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23652            }
23653        }
23654impl<'de> serde::Deserialize<'de> for Box<dyn VimClusterVsanFaultDomainSpecTrait> {
23655            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23656                deserializer.deserialize_map(VimClusterVsanFaultDomainSpecVisitor)
23657            }
23658        }
23659
23660struct VimClusterVsanFaultDomainSpecVisitor;
23661
23662impl<'de> de::Visitor<'de> for VimClusterVsanFaultDomainSpecVisitor {
23663    type Value = Box<dyn VimClusterVsanFaultDomainSpecTrait>;
23664
23665    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23666        formatter.write_str("a valid VimClusterVsanFaultDomainSpecTrait JSON object with a _typeName field")
23667    }
23668
23669    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23670    where
23671        A: de::MapAccess<'de>,
23672    {
23673        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23674        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23675        match any {
23676            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23677                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23678            VimAny::Value(value) => Err(de::Error::custom(format!(
23679                "expected object not wrapped value: {:?}",
23680                value))),
23681        }
23682    }
23683}
23684
23685impl VimClusterVsanFaultDomainSpecTrait for VimClusterVsanFaultDomainSpec {
23686    fn get_hosts(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.hosts }
23687    fn get_name(&self) -> &str { &self.name }
23688}
23689impl VimClusterVsanFaultDomainSpecTrait for VsanFaultDomainDestroySpec {
23690    fn get_hosts(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.hosts }
23691    fn get_name(&self) -> &str { &self.name }
23692}
23693impl VimClusterVsanFaultDomainSpecTrait for VsanFaultDomainUpdateSpec {
23694    fn get_hosts(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.hosts }
23695    fn get_name(&self) -> &str { &self.name }
23696}
23697impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VimClusterVsanFaultDomainSpecTrait {
23698    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23699        let data_type = from.data_type();
23700        match data_type {
23701            StructType::VimClusterVsanFaultDomainSpec => Some(from.as_any_ref().downcast_ref::<VimClusterVsanFaultDomainSpec>()?),
23702            StructType::VsanFaultDomainDestroySpec => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainDestroySpec>()?),
23703            StructType::VsanFaultDomainUpdateSpec => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainUpdateSpec>()?),
23704            _ => None,
23705        }
23706    }
23707    
23708    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23709        let data_type = from.data_type();
23710        match data_type {
23711            StructType::VimClusterVsanFaultDomainSpec => Ok(from.as_any_box().downcast::<VimClusterVsanFaultDomainSpec>()?),
23712            StructType::VsanFaultDomainDestroySpec => Ok(from.as_any_box().downcast::<VsanFaultDomainDestroySpec>()?),
23713            StructType::VsanFaultDomainUpdateSpec => Ok(from.as_any_box().downcast::<VsanFaultDomainUpdateSpec>()?),
23714            _ => Err(from.as_any_box()),
23715        }
23716    }
23717}
23718/// This is the base class for vSAN health issue remediation or troubleshooting.
23719/// 
23720/// This structure may be used only with operations rendered under `/vsan`.
23721pub trait VsanHealthActionBaseTrait : super::traits::DataObjectTrait {
23722    /// The descriptive message for explaining what the action it is.
23723    /// 
23724    /// Notice it can support the following mark up tags.
23725    /// 1\. Hyperlink &lt;tag.link&gt;{link\_content}&lt;/tag.link&gt;
23726    /// 2\. Host entity &lt;tag.icon.host&gt;${host\_ip}&lt;/tag.icon.host&gt;
23727    fn get_description(&self) -> &str;
23728}
23729impl<'s> serde::Serialize for dyn VsanHealthActionBaseTrait + 's {
23730            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23731            where
23732                S: serde::Serializer,
23733            {
23734                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23735            }
23736        }
23737impl<'de> serde::Deserialize<'de> for Box<dyn VsanHealthActionBaseTrait> {
23738            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23739                deserializer.deserialize_map(VsanHealthActionBaseVisitor)
23740            }
23741        }
23742
23743struct VsanHealthActionBaseVisitor;
23744
23745impl<'de> de::Visitor<'de> for VsanHealthActionBaseVisitor {
23746    type Value = Box<dyn VsanHealthActionBaseTrait>;
23747
23748    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23749        formatter.write_str("a valid VsanHealthActionBaseTrait JSON object with a _typeName field")
23750    }
23751
23752    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23753    where
23754        A: de::MapAccess<'de>,
23755    {
23756        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23757        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23758        match any {
23759            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23760                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23761            VimAny::Value(value) => Err(de::Error::custom(format!(
23762                "expected object not wrapped value: {:?}",
23763                value))),
23764        }
23765    }
23766}
23767
23768impl VsanHealthActionBaseTrait for VsanHealthActionBase {
23769    fn get_description(&self) -> &str { &self.description }
23770}
23771impl VsanHealthActionBaseTrait for VsanHealthActionSteps {
23772    fn get_description(&self) -> &str { &self.description }
23773}
23774impl VsanHealthActionBaseTrait for VsanHealthApiBasedAction {
23775    fn get_description(&self) -> &str { &self.description }
23776}
23777impl VsanHealthActionBaseTrait for VsanHealthCmdBasedAction {
23778    fn get_description(&self) -> &str { &self.description }
23779}
23780impl VsanHealthActionBaseTrait for VsanHealthDataDrivenAction {
23781    fn get_description(&self) -> &str { &self.description }
23782}
23783impl VsanHealthActionBaseTrait for VsanHealthTxtBasedAction {
23784    fn get_description(&self) -> &str { &self.description }
23785}
23786impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHealthActionBaseTrait {
23787    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23788        let data_type = from.data_type();
23789        match data_type {
23790            StructType::VsanHealthActionBase => Some(from.as_any_ref().downcast_ref::<VsanHealthActionBase>()?),
23791            StructType::VsanHealthActionSteps => Some(from.as_any_ref().downcast_ref::<VsanHealthActionSteps>()?),
23792            StructType::VsanHealthApiBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthApiBasedAction>()?),
23793            StructType::VsanHealthCmdBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthCmdBasedAction>()?),
23794            StructType::VsanHealthDataDrivenAction => Some(from.as_any_ref().downcast_ref::<VsanHealthDataDrivenAction>()?),
23795            StructType::VsanHealthTxtBasedAction => Some(from.as_any_ref().downcast_ref::<VsanHealthTxtBasedAction>()?),
23796            _ => None,
23797        }
23798    }
23799    
23800    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23801        let data_type = from.data_type();
23802        match data_type {
23803            StructType::VsanHealthActionBase => Ok(from.as_any_box().downcast::<VsanHealthActionBase>()?),
23804            StructType::VsanHealthActionSteps => Ok(from.as_any_box().downcast::<VsanHealthActionSteps>()?),
23805            StructType::VsanHealthApiBasedAction => Ok(from.as_any_box().downcast::<VsanHealthApiBasedAction>()?),
23806            StructType::VsanHealthCmdBasedAction => Ok(from.as_any_box().downcast::<VsanHealthCmdBasedAction>()?),
23807            StructType::VsanHealthDataDrivenAction => Ok(from.as_any_box().downcast::<VsanHealthDataDrivenAction>()?),
23808            StructType::VsanHealthTxtBasedAction => Ok(from.as_any_box().downcast::<VsanHealthTxtBasedAction>()?),
23809            _ => Err(from.as_any_box()),
23810        }
23811    }
23812}
23813/// Specifies common properties for iSCSI LUN.
23814pub trait VsanIscsiLunCommonInfoTrait : super::traits::DataObjectTrait {
23815    /// The optional ID of the LUN \[0..255\].
23816    /// 
23817    /// If not provided, next free identifier will be used.
23818    /// If provided, ID must be unique within target.
23819    fn get_lun_id(&self) -> Option<i32>;
23820    /// An optional alias for LUN.
23821    /// 
23822    /// Can be used to indicate additional info about the LUN.
23823    fn get_alias(&self) -> &Option<String>;
23824    /// Size of the LUN object, unit is byte.
23825    fn get_lun_size(&self) -> i64;
23826    /// LUN status, the default value is 'Online'.
23827    /// 
23828    /// See also *VsanIscsiLUNStatus_enum*.
23829    fn get_status(&self) -> &Option<String>;
23830}
23831impl<'s> serde::Serialize for dyn VsanIscsiLunCommonInfoTrait + 's {
23832            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23833            where
23834                S: serde::Serializer,
23835            {
23836                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23837            }
23838        }
23839impl<'de> serde::Deserialize<'de> for Box<dyn VsanIscsiLunCommonInfoTrait> {
23840            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23841                deserializer.deserialize_map(VsanIscsiLunCommonInfoVisitor)
23842            }
23843        }
23844
23845struct VsanIscsiLunCommonInfoVisitor;
23846
23847impl<'de> de::Visitor<'de> for VsanIscsiLunCommonInfoVisitor {
23848    type Value = Box<dyn VsanIscsiLunCommonInfoTrait>;
23849
23850    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23851        formatter.write_str("a valid VsanIscsiLunCommonInfoTrait JSON object with a _typeName field")
23852    }
23853
23854    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23855    where
23856        A: de::MapAccess<'de>,
23857    {
23858        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23859        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23860        match any {
23861            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23862                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23863            VimAny::Value(value) => Err(de::Error::custom(format!(
23864                "expected object not wrapped value: {:?}",
23865                value))),
23866        }
23867    }
23868}
23869
23870impl VsanIscsiLunCommonInfoTrait for VsanIscsiLunCommonInfo {
23871    fn get_lun_id(&self) -> Option<i32> { self.lun_id }
23872    fn get_alias(&self) -> &Option<String> { &self.alias }
23873    fn get_lun_size(&self) -> i64 { self.lun_size }
23874    fn get_status(&self) -> &Option<String> { &self.status }
23875}
23876impl VsanIscsiLunCommonInfoTrait for VsanIscsiLun {
23877    fn get_lun_id(&self) -> Option<i32> { self.lun_id }
23878    fn get_alias(&self) -> &Option<String> { &self.alias }
23879    fn get_lun_size(&self) -> i64 { self.lun_size }
23880    fn get_status(&self) -> &Option<String> { &self.status }
23881}
23882impl VsanIscsiLunCommonInfoTrait for VsanIscsiLunSpec {
23883    fn get_lun_id(&self) -> Option<i32> { self.lun_id }
23884    fn get_alias(&self) -> &Option<String> { &self.alias }
23885    fn get_lun_size(&self) -> i64 { self.lun_size }
23886    fn get_status(&self) -> &Option<String> { &self.status }
23887}
23888impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanIscsiLunCommonInfoTrait {
23889    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23890        let data_type = from.data_type();
23891        match data_type {
23892            StructType::VsanIscsiLunCommonInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiLunCommonInfo>()?),
23893            StructType::VsanIscsiLun => Some(from.as_any_ref().downcast_ref::<VsanIscsiLun>()?),
23894            StructType::VsanIscsiLunSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiLunSpec>()?),
23895            _ => None,
23896        }
23897    }
23898    
23899    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23900        let data_type = from.data_type();
23901        match data_type {
23902            StructType::VsanIscsiLunCommonInfo => Ok(from.as_any_box().downcast::<VsanIscsiLunCommonInfo>()?),
23903            StructType::VsanIscsiLun => Ok(from.as_any_box().downcast::<VsanIscsiLun>()?),
23904            StructType::VsanIscsiLunSpec => Ok(from.as_any_box().downcast::<VsanIscsiLunSpec>()?),
23905            _ => Err(from.as_any_box()),
23906        }
23907    }
23908}
23909/// Specifies the basic properties for iSCSI target.
23910pub trait VsanIscsiTargetBasicInfoTrait : super::traits::DataObjectTrait {
23911    /// Alias, i.e., the human readable name.
23912    fn get_alias(&self) -> &str;
23913    /// The IQN of the target.
23914    /// 
23915    /// This parameter is optional and should be unique if provided.
23916    /// If not provided, appropriate IQN will be generated by the system.
23917    fn get_iqn(&self) -> &Option<String>;
23918}
23919impl<'s> serde::Serialize for dyn VsanIscsiTargetBasicInfoTrait + 's {
23920            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
23921            where
23922                S: serde::Serializer,
23923            {
23924                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
23925            }
23926        }
23927impl<'de> serde::Deserialize<'de> for Box<dyn VsanIscsiTargetBasicInfoTrait> {
23928            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
23929                deserializer.deserialize_map(VsanIscsiTargetBasicInfoVisitor)
23930            }
23931        }
23932
23933struct VsanIscsiTargetBasicInfoVisitor;
23934
23935impl<'de> de::Visitor<'de> for VsanIscsiTargetBasicInfoVisitor {
23936    type Value = Box<dyn VsanIscsiTargetBasicInfoTrait>;
23937
23938    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23939        formatter.write_str("a valid VsanIscsiTargetBasicInfoTrait JSON object with a _typeName field")
23940    }
23941
23942    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
23943    where
23944        A: de::MapAccess<'de>,
23945    {
23946        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
23947        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
23948        match any {
23949            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
23950                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
23951            VimAny::Value(value) => Err(de::Error::custom(format!(
23952                "expected object not wrapped value: {:?}",
23953                value))),
23954        }
23955    }
23956}
23957
23958impl VsanIscsiTargetBasicInfoTrait for VsanIscsiTargetBasicInfo {
23959    fn get_alias(&self) -> &str { &self.alias }
23960    fn get_iqn(&self) -> &Option<String> { &self.iqn }
23961}
23962impl VsanIscsiTargetBasicInfoTrait for VsanIscsiTargetCommonInfo {
23963    fn get_alias(&self) -> &str { &self.alias }
23964    fn get_iqn(&self) -> &Option<String> { &self.iqn }
23965}
23966impl VsanIscsiTargetBasicInfoTrait for VsanIscsiTarget {
23967    fn get_alias(&self) -> &str { &self.alias }
23968    fn get_iqn(&self) -> &Option<String> { &self.iqn }
23969}
23970impl VsanIscsiTargetBasicInfoTrait for VsanIscsiTargetSpec {
23971    fn get_alias(&self) -> &str { &self.alias }
23972    fn get_iqn(&self) -> &Option<String> { &self.iqn }
23973}
23974impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanIscsiTargetBasicInfoTrait {
23975    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
23976        let data_type = from.data_type();
23977        match data_type {
23978            StructType::VsanIscsiTargetBasicInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetBasicInfo>()?),
23979            StructType::VsanIscsiTargetCommonInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetCommonInfo>()?),
23980            StructType::VsanIscsiTarget => Some(from.as_any_ref().downcast_ref::<VsanIscsiTarget>()?),
23981            StructType::VsanIscsiTargetSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetSpec>()?),
23982            _ => None,
23983        }
23984    }
23985    
23986    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
23987        let data_type = from.data_type();
23988        match data_type {
23989            StructType::VsanIscsiTargetBasicInfo => Ok(from.as_any_box().downcast::<VsanIscsiTargetBasicInfo>()?),
23990            StructType::VsanIscsiTargetCommonInfo => Ok(from.as_any_box().downcast::<VsanIscsiTargetCommonInfo>()?),
23991            StructType::VsanIscsiTarget => Ok(from.as_any_box().downcast::<VsanIscsiTarget>()?),
23992            StructType::VsanIscsiTargetSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetSpec>()?),
23993            _ => Err(from.as_any_box()),
23994        }
23995    }
23996}
23997/// Specifies the common properties for vSAN iSCSI target.
23998pub trait VsanIscsiTargetCommonInfoTrait : super::traits::VsanIscsiTargetBasicInfoTrait {
23999    /// Authentication information.
24000    fn get_auth_spec(&self) -> &Option<super::structs::VsanIscsiTargetAuthSpec>;
24001    /// The network port on which target is accessible.
24002    /// 
24003    /// If not specified, at the same time,
24004    /// if networkInterface is also not specified, defaults to the defaultPort specified
24005    /// in iSCSI target service. If networkInterface is specified, defaults to port 3260.
24006    /// The firewall should be opened automatically for port specified by the user.
24007    fn get_port(&self) -> Option<i32>;
24008    /// Name of the VMkernel Network interface which will handle the iSCSI traffic.
24009    /// 
24010    /// If
24011    /// not specified, the default one defined in iSCSI target service will be used.
24012    fn get_network_interface(&self) -> &Option<String>;
24013    /// The site affinity location option is only available when the cluster is
24014    /// configured into the streched cluster mode.
24015    /// 
24016    /// No site affinity will be
24017    /// configured when this field is not present.
24018    /// 
24019    /// See also *VsanSiteLocationType_enum*.
24020    fn get_affinity_location(&self) -> &Option<String>;
24021}
24022impl<'s> serde::Serialize for dyn VsanIscsiTargetCommonInfoTrait + 's {
24023            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24024            where
24025                S: serde::Serializer,
24026            {
24027                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24028            }
24029        }
24030impl<'de> serde::Deserialize<'de> for Box<dyn VsanIscsiTargetCommonInfoTrait> {
24031            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24032                deserializer.deserialize_map(VsanIscsiTargetCommonInfoVisitor)
24033            }
24034        }
24035
24036struct VsanIscsiTargetCommonInfoVisitor;
24037
24038impl<'de> de::Visitor<'de> for VsanIscsiTargetCommonInfoVisitor {
24039    type Value = Box<dyn VsanIscsiTargetCommonInfoTrait>;
24040
24041    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24042        formatter.write_str("a valid VsanIscsiTargetCommonInfoTrait JSON object with a _typeName field")
24043    }
24044
24045    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24046    where
24047        A: de::MapAccess<'de>,
24048    {
24049        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24050        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24051        match any {
24052            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24053                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24054            VimAny::Value(value) => Err(de::Error::custom(format!(
24055                "expected object not wrapped value: {:?}",
24056                value))),
24057        }
24058    }
24059}
24060
24061impl VsanIscsiTargetCommonInfoTrait for VsanIscsiTargetCommonInfo {
24062    fn get_auth_spec(&self) -> &Option<super::structs::VsanIscsiTargetAuthSpec> { &self.auth_spec }
24063    fn get_port(&self) -> Option<i32> { self.port }
24064    fn get_network_interface(&self) -> &Option<String> { &self.network_interface }
24065    fn get_affinity_location(&self) -> &Option<String> { &self.affinity_location }
24066}
24067impl VsanIscsiTargetCommonInfoTrait for VsanIscsiTarget {
24068    fn get_auth_spec(&self) -> &Option<super::structs::VsanIscsiTargetAuthSpec> { &self.auth_spec }
24069    fn get_port(&self) -> Option<i32> { self.port }
24070    fn get_network_interface(&self) -> &Option<String> { &self.network_interface }
24071    fn get_affinity_location(&self) -> &Option<String> { &self.affinity_location }
24072}
24073impl VsanIscsiTargetCommonInfoTrait for VsanIscsiTargetSpec {
24074    fn get_auth_spec(&self) -> &Option<super::structs::VsanIscsiTargetAuthSpec> { &self.auth_spec }
24075    fn get_port(&self) -> Option<i32> { self.port }
24076    fn get_network_interface(&self) -> &Option<String> { &self.network_interface }
24077    fn get_affinity_location(&self) -> &Option<String> { &self.affinity_location }
24078}
24079impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanIscsiTargetCommonInfoTrait {
24080    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24081        let data_type = from.data_type();
24082        match data_type {
24083            StructType::VsanIscsiTargetCommonInfo => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetCommonInfo>()?),
24084            StructType::VsanIscsiTarget => Some(from.as_any_ref().downcast_ref::<VsanIscsiTarget>()?),
24085            StructType::VsanIscsiTargetSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetSpec>()?),
24086            _ => None,
24087        }
24088    }
24089    
24090    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24091        let data_type = from.data_type();
24092        match data_type {
24093            StructType::VsanIscsiTargetCommonInfo => Ok(from.as_any_box().downcast::<VsanIscsiTargetCommonInfo>()?),
24094            StructType::VsanIscsiTarget => Ok(from.as_any_box().downcast::<VsanIscsiTarget>()?),
24095            StructType::VsanIscsiTargetSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetSpec>()?),
24096            _ => Err(from.as_any_box()),
24097        }
24098    }
24099}
24100/// Specified common properties for vSAN iSCSI target service.
24101pub trait VsanIscsiTargetServiceConfigTrait : super::traits::DataObjectTrait {
24102    /// vSAN iSCSI target service default configuration.
24103    fn get_default_config(&self) -> &Option<super::structs::VsanIscsiTargetServiceDefaultConfigSpec>;
24104    /// Whether vSAN iSCSI target service is enabled.
24105    fn get_enabled(&self) -> Option<bool>;
24106    /// Virtual IP (VIP) configurations.
24107    /// 
24108    /// Currently,
24109    /// only 1 Virutal IP configuration is allowed.
24110    fn get_vip_configs(&self) -> &Option<Vec<Box<dyn super::traits::VsanIscsiVipConfigSpecTrait>>>;
24111}
24112impl<'s> serde::Serialize for dyn VsanIscsiTargetServiceConfigTrait + 's {
24113            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24114            where
24115                S: serde::Serializer,
24116            {
24117                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24118            }
24119        }
24120impl<'de> serde::Deserialize<'de> for Box<dyn VsanIscsiTargetServiceConfigTrait> {
24121            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24122                deserializer.deserialize_map(VsanIscsiTargetServiceConfigVisitor)
24123            }
24124        }
24125
24126struct VsanIscsiTargetServiceConfigVisitor;
24127
24128impl<'de> de::Visitor<'de> for VsanIscsiTargetServiceConfigVisitor {
24129    type Value = Box<dyn VsanIscsiTargetServiceConfigTrait>;
24130
24131    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24132        formatter.write_str("a valid VsanIscsiTargetServiceConfigTrait JSON object with a _typeName field")
24133    }
24134
24135    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24136    where
24137        A: de::MapAccess<'de>,
24138    {
24139        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24140        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24141        match any {
24142            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24143                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24144            VimAny::Value(value) => Err(de::Error::custom(format!(
24145                "expected object not wrapped value: {:?}",
24146                value))),
24147        }
24148    }
24149}
24150
24151impl VsanIscsiTargetServiceConfigTrait for VsanIscsiTargetServiceConfig {
24152    fn get_default_config(&self) -> &Option<super::structs::VsanIscsiTargetServiceDefaultConfigSpec> { &self.default_config }
24153    fn get_enabled(&self) -> Option<bool> { self.enabled }
24154    fn get_vip_configs(&self) -> &Option<Vec<Box<dyn super::traits::VsanIscsiVipConfigSpecTrait>>> { &self.vip_configs }
24155}
24156impl VsanIscsiTargetServiceConfigTrait for VsanIscsiTargetServiceSpec {
24157    fn get_default_config(&self) -> &Option<super::structs::VsanIscsiTargetServiceDefaultConfigSpec> { &self.default_config }
24158    fn get_enabled(&self) -> Option<bool> { self.enabled }
24159    fn get_vip_configs(&self) -> &Option<Vec<Box<dyn super::traits::VsanIscsiVipConfigSpecTrait>>> { &self.vip_configs }
24160}
24161impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanIscsiTargetServiceConfigTrait {
24162    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24163        let data_type = from.data_type();
24164        match data_type {
24165            StructType::VsanIscsiTargetServiceConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetServiceConfig>()?),
24166            StructType::VsanIscsiTargetServiceSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiTargetServiceSpec>()?),
24167            _ => None,
24168        }
24169    }
24170    
24171    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24172        let data_type = from.data_type();
24173        match data_type {
24174            StructType::VsanIscsiTargetServiceConfig => Ok(from.as_any_box().downcast::<VsanIscsiTargetServiceConfig>()?),
24175            StructType::VsanIscsiTargetServiceSpec => Ok(from.as_any_box().downcast::<VsanIscsiTargetServiceSpec>()?),
24176            _ => Err(from.as_any_box()),
24177        }
24178    }
24179}
24180/// This class defines general access control list spec.
24181/// 
24182/// This structure may be used only with operations rendered under `/vsan`.
24183pub trait CnsAccessControlSpecTrait : super::traits::DataObjectTrait {
24184}
24185impl<'s> serde::Serialize for dyn CnsAccessControlSpecTrait + 's {
24186            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24187            where
24188                S: serde::Serializer,
24189            {
24190                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24191            }
24192        }
24193impl<'de> serde::Deserialize<'de> for Box<dyn CnsAccessControlSpecTrait> {
24194            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24195                deserializer.deserialize_map(CnsAccessControlSpecVisitor)
24196            }
24197        }
24198
24199struct CnsAccessControlSpecVisitor;
24200
24201impl<'de> de::Visitor<'de> for CnsAccessControlSpecVisitor {
24202    type Value = Box<dyn CnsAccessControlSpecTrait>;
24203
24204    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24205        formatter.write_str("a valid CnsAccessControlSpecTrait JSON object with a _typeName field")
24206    }
24207
24208    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24209    where
24210        A: de::MapAccess<'de>,
24211    {
24212        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24213        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24214        match any {
24215            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24216                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24217            VimAny::Value(value) => Err(de::Error::custom(format!(
24218                "expected object not wrapped value: {:?}",
24219                value))),
24220        }
24221    }
24222}
24223
24224impl CnsAccessControlSpecTrait for CnsAccessControlSpec {
24225}
24226impl CnsAccessControlSpecTrait for CnsNfsAccessControlSpec {
24227}
24228impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsAccessControlSpecTrait {
24229    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24230        let data_type = from.data_type();
24231        match data_type {
24232            StructType::CnsAccessControlSpec => Some(from.as_any_ref().downcast_ref::<CnsAccessControlSpec>()?),
24233            StructType::CnsNfsAccessControlSpec => Some(from.as_any_ref().downcast_ref::<CnsNfsAccessControlSpec>()?),
24234            _ => None,
24235        }
24236    }
24237    
24238    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24239        let data_type = from.data_type();
24240        match data_type {
24241            StructType::CnsAccessControlSpec => Ok(from.as_any_box().downcast::<CnsAccessControlSpec>()?),
24242            StructType::CnsNfsAccessControlSpec => Ok(from.as_any_box().downcast::<CnsNfsAccessControlSpec>()?),
24243            _ => Err(from.as_any_box()),
24244        }
24245    }
24246}
24247/// Base class for providing additional option for creating backing for a
24248/// container volume.
24249/// 
24250///   
24251/// The child-classes of this class will be used at the time
24252/// of volume creation to specify options that should be used to create volume,
24253/// and will also be returned as part of query result to give more information
24254/// about the volume, *CnsVolume*. Type of child-class will also serve
24255/// as the volume type specification during creation.
24256///   
24257/// Backing type specific fields would be there in the respective child classes.
24258///   
24259/// E.g. BlockBackingDetails class will have details related to block type of
24260/// backing object. One example of such property is ID of the block disk that
24261/// backs the volume.
24262/// 
24263/// This structure may be used only with operations rendered under `/vsan`.
24264pub trait CnsBackingObjectDetailsTrait : super::traits::DataObjectTrait {
24265    /// During creation this field specifies desired container volume capacity in MB.
24266    /// 
24267    ///   
24268    /// In case of block and file volumes, when an existing volume is specified
24269    /// then this field will be ignored.
24270    ///   
24271    /// At the time of query, when available, this field will tell the actual
24272    /// capacity of volume that backs the container volume. Else it will be set
24273    /// to -1, to indicate that the capacity of the volume is unknown at the moment.
24274    /// This can happen due to some internal system errors or due to the underlying
24275    /// platform that's eventually consistent.
24276    fn get_capacity_in_mb(&self) -> Option<i64>;
24277}
24278impl<'s> serde::Serialize for dyn CnsBackingObjectDetailsTrait + 's {
24279            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24280            where
24281                S: serde::Serializer,
24282            {
24283                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24284            }
24285        }
24286impl<'de> serde::Deserialize<'de> for Box<dyn CnsBackingObjectDetailsTrait> {
24287            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24288                deserializer.deserialize_map(CnsBackingObjectDetailsVisitor)
24289            }
24290        }
24291
24292struct CnsBackingObjectDetailsVisitor;
24293
24294impl<'de> de::Visitor<'de> for CnsBackingObjectDetailsVisitor {
24295    type Value = Box<dyn CnsBackingObjectDetailsTrait>;
24296
24297    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24298        formatter.write_str("a valid CnsBackingObjectDetailsTrait JSON object with a _typeName field")
24299    }
24300
24301    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24302    where
24303        A: de::MapAccess<'de>,
24304    {
24305        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24306        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24307        match any {
24308            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24309                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24310            VimAny::Value(value) => Err(de::Error::custom(format!(
24311                "expected object not wrapped value: {:?}",
24312                value))),
24313        }
24314    }
24315}
24316
24317impl CnsBackingObjectDetailsTrait for CnsBackingObjectDetails {
24318    fn get_capacity_in_mb(&self) -> Option<i64> { self.capacity_in_mb }
24319}
24320impl CnsBackingObjectDetailsTrait for CnsBlockBackingDetails {
24321    fn get_capacity_in_mb(&self) -> Option<i64> { self.capacity_in_mb }
24322}
24323impl CnsBackingObjectDetailsTrait for CnsFileBackingDetails {
24324    fn get_capacity_in_mb(&self) -> Option<i64> { self.capacity_in_mb }
24325}
24326impl CnsBackingObjectDetailsTrait for CnsVsanFileShareBackingDetails {
24327    fn get_capacity_in_mb(&self) -> Option<i64> { self.capacity_in_mb }
24328}
24329impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsBackingObjectDetailsTrait {
24330    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24331        let data_type = from.data_type();
24332        match data_type {
24333            StructType::CnsBackingObjectDetails => Some(from.as_any_ref().downcast_ref::<CnsBackingObjectDetails>()?),
24334            StructType::CnsBlockBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsBlockBackingDetails>()?),
24335            StructType::CnsFileBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsFileBackingDetails>()?),
24336            StructType::CnsVsanFileShareBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsVsanFileShareBackingDetails>()?),
24337            _ => None,
24338        }
24339    }
24340    
24341    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24342        let data_type = from.data_type();
24343        match data_type {
24344            StructType::CnsBackingObjectDetails => Ok(from.as_any_box().downcast::<CnsBackingObjectDetails>()?),
24345            StructType::CnsBlockBackingDetails => Ok(from.as_any_box().downcast::<CnsBlockBackingDetails>()?),
24346            StructType::CnsFileBackingDetails => Ok(from.as_any_box().downcast::<CnsFileBackingDetails>()?),
24347            StructType::CnsVsanFileShareBackingDetails => Ok(from.as_any_box().downcast::<CnsVsanFileShareBackingDetails>()?),
24348            _ => Err(from.as_any_box()),
24349        }
24350    }
24351}
24352/// Details for a file type backing for container volume.
24353/// 
24354///   
24355/// This class will be used as input at the time of volume creation and will also
24356/// be returned as part of query result to give more information about a
24357/// container volume.
24358/// 
24359/// This structure may be used only with operations rendered under `/vsan`.
24360pub trait CnsFileBackingDetailsTrait : super::traits::CnsBackingObjectDetailsTrait {
24361    /// At the time of creation this field would identify the existing file share
24362    /// that should be used to back the container volume.
24363    /// 
24364    ///   
24365    /// This field is optional and when not specified, a new file share will be
24366    /// created to back the volume.
24367    ///   
24368    /// When this field is present, capacityInMb and storage policy fields
24369    /// will be ignored.
24370    fn get_backing_file_id(&self) -> &Option<String>;
24371}
24372impl<'s> serde::Serialize for dyn CnsFileBackingDetailsTrait + 's {
24373            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24374            where
24375                S: serde::Serializer,
24376            {
24377                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24378            }
24379        }
24380impl<'de> serde::Deserialize<'de> for Box<dyn CnsFileBackingDetailsTrait> {
24381            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24382                deserializer.deserialize_map(CnsFileBackingDetailsVisitor)
24383            }
24384        }
24385
24386struct CnsFileBackingDetailsVisitor;
24387
24388impl<'de> de::Visitor<'de> for CnsFileBackingDetailsVisitor {
24389    type Value = Box<dyn CnsFileBackingDetailsTrait>;
24390
24391    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24392        formatter.write_str("a valid CnsFileBackingDetailsTrait JSON object with a _typeName field")
24393    }
24394
24395    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24396    where
24397        A: de::MapAccess<'de>,
24398    {
24399        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24400        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24401        match any {
24402            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24403                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24404            VimAny::Value(value) => Err(de::Error::custom(format!(
24405                "expected object not wrapped value: {:?}",
24406                value))),
24407        }
24408    }
24409}
24410
24411impl CnsFileBackingDetailsTrait for CnsFileBackingDetails {
24412    fn get_backing_file_id(&self) -> &Option<String> { &self.backing_file_id }
24413}
24414impl CnsFileBackingDetailsTrait for CnsVsanFileShareBackingDetails {
24415    fn get_backing_file_id(&self) -> &Option<String> { &self.backing_file_id }
24416}
24417impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsFileBackingDetailsTrait {
24418    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24419        let data_type = from.data_type();
24420        match data_type {
24421            StructType::CnsFileBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsFileBackingDetails>()?),
24422            StructType::CnsVsanFileShareBackingDetails => Some(from.as_any_ref().downcast_ref::<CnsVsanFileShareBackingDetails>()?),
24423            _ => None,
24424        }
24425    }
24426    
24427    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24428        let data_type = from.data_type();
24429        match data_type {
24430            StructType::CnsFileBackingDetails => Ok(from.as_any_box().downcast::<CnsFileBackingDetails>()?),
24431            StructType::CnsVsanFileShareBackingDetails => Ok(from.as_any_box().downcast::<CnsVsanFileShareBackingDetails>()?),
24432            _ => Err(from.as_any_box()),
24433        }
24434    }
24435}
24436/// Base specification for volume creation.
24437/// 
24438/// This structure may be used only with operations rendered under `/vsan`.
24439pub trait CnsBaseCreateSpecTrait : super::traits::DataObjectTrait {
24440}
24441impl<'s> serde::Serialize for dyn CnsBaseCreateSpecTrait + 's {
24442            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24443            where
24444                S: serde::Serializer,
24445            {
24446                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24447            }
24448        }
24449impl<'de> serde::Deserialize<'de> for Box<dyn CnsBaseCreateSpecTrait> {
24450            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24451                deserializer.deserialize_map(CnsBaseCreateSpecVisitor)
24452            }
24453        }
24454
24455struct CnsBaseCreateSpecVisitor;
24456
24457impl<'de> de::Visitor<'de> for CnsBaseCreateSpecVisitor {
24458    type Value = Box<dyn CnsBaseCreateSpecTrait>;
24459
24460    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24461        formatter.write_str("a valid CnsBaseCreateSpecTrait JSON object with a _typeName field")
24462    }
24463
24464    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24465    where
24466        A: de::MapAccess<'de>,
24467    {
24468        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24469        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24470        match any {
24471            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24472                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24473            VimAny::Value(value) => Err(de::Error::custom(format!(
24474                "expected object not wrapped value: {:?}",
24475                value))),
24476        }
24477    }
24478}
24479
24480impl CnsBaseCreateSpecTrait for CnsBaseCreateSpec {
24481}
24482impl CnsBaseCreateSpecTrait for CnsFileCreateSpec {
24483}
24484impl CnsBaseCreateSpecTrait for CnsVsanFileCreateSpec {
24485}
24486impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsBaseCreateSpecTrait {
24487    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24488        let data_type = from.data_type();
24489        match data_type {
24490            StructType::CnsBaseCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsBaseCreateSpec>()?),
24491            StructType::CnsFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsFileCreateSpec>()?),
24492            StructType::CnsVsanFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsVsanFileCreateSpec>()?),
24493            _ => None,
24494        }
24495    }
24496    
24497    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24498        let data_type = from.data_type();
24499        match data_type {
24500            StructType::CnsBaseCreateSpec => Ok(from.as_any_box().downcast::<CnsBaseCreateSpec>()?),
24501            StructType::CnsFileCreateSpec => Ok(from.as_any_box().downcast::<CnsFileCreateSpec>()?),
24502            StructType::CnsVsanFileCreateSpec => Ok(from.as_any_box().downcast::<CnsVsanFileCreateSpec>()?),
24503            _ => Err(from.as_any_box()),
24504        }
24505    }
24506}
24507/// Specification for file volume creation.
24508/// 
24509/// The file volume could be
24510/// NFS or SMB file share. Currently, only NFS file shares provisioned by
24511/// vSAN file service will be supported. CNS may support non NFS,
24512/// non vSAN file service based file shares in future.
24513/// 
24514/// This structure may be used only with operations rendered under `/vsan`.
24515pub trait CnsFileCreateSpecTrait : super::traits::CnsBaseCreateSpecTrait {
24516}
24517impl<'s> serde::Serialize for dyn CnsFileCreateSpecTrait + 's {
24518            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24519            where
24520                S: serde::Serializer,
24521            {
24522                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24523            }
24524        }
24525impl<'de> serde::Deserialize<'de> for Box<dyn CnsFileCreateSpecTrait> {
24526            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24527                deserializer.deserialize_map(CnsFileCreateSpecVisitor)
24528            }
24529        }
24530
24531struct CnsFileCreateSpecVisitor;
24532
24533impl<'de> de::Visitor<'de> for CnsFileCreateSpecVisitor {
24534    type Value = Box<dyn CnsFileCreateSpecTrait>;
24535
24536    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24537        formatter.write_str("a valid CnsFileCreateSpecTrait JSON object with a _typeName field")
24538    }
24539
24540    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24541    where
24542        A: de::MapAccess<'de>,
24543    {
24544        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24545        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24546        match any {
24547            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24548                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24549            VimAny::Value(value) => Err(de::Error::custom(format!(
24550                "expected object not wrapped value: {:?}",
24551                value))),
24552        }
24553    }
24554}
24555
24556impl CnsFileCreateSpecTrait for CnsFileCreateSpec {
24557}
24558impl CnsFileCreateSpecTrait for CnsVsanFileCreateSpec {
24559}
24560impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsFileCreateSpecTrait {
24561    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24562        let data_type = from.data_type();
24563        match data_type {
24564            StructType::CnsFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsFileCreateSpec>()?),
24565            StructType::CnsVsanFileCreateSpec => Some(from.as_any_ref().downcast_ref::<CnsVsanFileCreateSpec>()?),
24566            _ => None,
24567        }
24568    }
24569    
24570    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24571        let data_type = from.data_type();
24572        match data_type {
24573            StructType::CnsFileCreateSpec => Ok(from.as_any_box().downcast::<CnsFileCreateSpec>()?),
24574            StructType::CnsVsanFileCreateSpec => Ok(from.as_any_box().downcast::<CnsVsanFileCreateSpec>()?),
24575            _ => Err(from.as_any_box()),
24576        }
24577    }
24578}
24579/// Base data object that represents the metadata associated with an entity
24580/// in container orchestrators like Kubernetes, Docker swarm etc.
24581/// 
24582/// This structure may be used only with operations rendered under `/vsan`.
24583pub trait CnsEntityMetadataTrait : super::traits::DataObjectTrait {
24584    /// Represents the name of entity.
24585    fn get_entity_name(&self) -> &str;
24586    /// Labels for this entity.
24587    /// 
24588    ///   
24589    /// Labels are opaque to CNS and it will neither try to parse the key nor the value.
24590    /// A maximum of 32 labels will be supported for each entity. Label key should be
24591    /// less than 320 bytes and value should be less than 64 bytes.
24592    ///   
24593    /// If the constraints are not honored, then *InvalidArgument* will be thrown.
24594    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>>;
24595    /// If not set, False is assumed.
24596    /// - True indicates that the EntityMetadata should be deleted in
24597    ///   VolumeManager.Update API.
24598    /// - False indicates that the EntityMetadata should be added or replaced
24599    ///   in VolumeManager.Create, VolumeManager.Update APIs.
24600    fn get_delete(&self) -> Option<bool>;
24601    /// Represents the container orchestrator cluster the entity belongs to.
24602    /// 
24603    /// This is a mandatory field as the VolumeMetadata.containerCluster
24604    /// is deprecated.
24605    ///   
24606    /// This field points to a cluster in
24607    /// *CnsVolumeMetadata.containerClusterArray*
24608    fn get_cluster_id(&self) -> &Option<String>;
24609}
24610impl<'s> serde::Serialize for dyn CnsEntityMetadataTrait + 's {
24611            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24612            where
24613                S: serde::Serializer,
24614            {
24615                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24616            }
24617        }
24618impl<'de> serde::Deserialize<'de> for Box<dyn CnsEntityMetadataTrait> {
24619            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24620                deserializer.deserialize_map(CnsEntityMetadataVisitor)
24621            }
24622        }
24623
24624struct CnsEntityMetadataVisitor;
24625
24626impl<'de> de::Visitor<'de> for CnsEntityMetadataVisitor {
24627    type Value = Box<dyn CnsEntityMetadataTrait>;
24628
24629    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24630        formatter.write_str("a valid CnsEntityMetadataTrait JSON object with a _typeName field")
24631    }
24632
24633    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24634    where
24635        A: de::MapAccess<'de>,
24636    {
24637        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24638        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24639        match any {
24640            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24641                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24642            VimAny::Value(value) => Err(de::Error::custom(format!(
24643                "expected object not wrapped value: {:?}",
24644                value))),
24645        }
24646    }
24647}
24648
24649impl CnsEntityMetadataTrait for CnsEntityMetadata {
24650    fn get_entity_name(&self) -> &str { &self.entity_name }
24651    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.labels }
24652    fn get_delete(&self) -> Option<bool> { self.delete }
24653    fn get_cluster_id(&self) -> &Option<String> { &self.cluster_id }
24654}
24655impl CnsEntityMetadataTrait for CnsKubernetesEntityMetadata {
24656    fn get_entity_name(&self) -> &str { &self.entity_name }
24657    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.labels }
24658    fn get_delete(&self) -> Option<bool> { self.delete }
24659    fn get_cluster_id(&self) -> &Option<String> { &self.cluster_id }
24660}
24661impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsEntityMetadataTrait {
24662    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24663        let data_type = from.data_type();
24664        match data_type {
24665            StructType::CnsEntityMetadata => Some(from.as_any_ref().downcast_ref::<CnsEntityMetadata>()?),
24666            StructType::CnsKubernetesEntityMetadata => Some(from.as_any_ref().downcast_ref::<CnsKubernetesEntityMetadata>()?),
24667            _ => None,
24668        }
24669    }
24670    
24671    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24672        let data_type = from.data_type();
24673        match data_type {
24674            StructType::CnsEntityMetadata => Ok(from.as_any_box().downcast::<CnsEntityMetadata>()?),
24675            StructType::CnsKubernetesEntityMetadata => Ok(from.as_any_box().downcast::<CnsKubernetesEntityMetadata>()?),
24676            _ => Err(from.as_any_box()),
24677        }
24678    }
24679}
24680/// Filter object to query matching volumes.
24681/// 
24682///   
24683/// Every property criteria that is specified through array, like labels, datastores
24684/// and so on will add complexity in retrieving the query result, and it should be
24685/// minimal (preferrably less than or equal to 10). The query may be slow or fail
24686/// if this guideline is not honored. All string matchings will be absolute, unless
24687/// specified.
24688/// 
24689/// This structure may be used only with operations rendered under `/vsan`.
24690pub trait CnsQueryFilterTrait : super::traits::DataObjectTrait {
24691    /// Volume identifiers to be queried.
24692    /// 
24693    ///   
24694    /// A maximum of 1000 volume ids can be provided.
24695    fn get_volume_ids(&self) -> &Option<Vec<super::structs::CnsVolumeId>>;
24696    /// Volume names to be queried.
24697    /// 
24698    ///   
24699    /// Currently only full string match will be supported. No regex or substring matching will be done.
24700    fn get_names(&self) -> &Option<Vec<String>>;
24701    /// Container orchestrator cluster identifiers.
24702    fn get_container_cluster_ids(&self) -> &Option<Vec<String>>;
24703    /// Storage policy id associated with volume.
24704    /// 
24705    ///   
24706    /// This will be matched to the actual storage policy attached with the volume.
24707    fn get_storage_policy_id(&self) -> &Option<String>;
24708    /// Volumes located on this Datastore will be returned.
24709    /// 
24710    /// Refers instances of *Datastore*.
24711    fn get_datastores(&self) -> &Option<Vec<super::structs::ManagedObjectReference>>;
24712    /// Labels to be matched for this volume.
24713    /// 
24714    ///   
24715    /// Label key and value should be an exact match. All volumes that match
24716    /// any of the labels will be returned in the result.
24717    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>>;
24718    /// Storage policy compliance status of the volume.
24719    /// 
24720    ///   
24721    /// This must be one of the compliance status exposed by SPBM. See *VsanComplianceStatus_enum*.
24722    fn get_compliance_status(&self) -> &Option<String>;
24723    /// Deprecated since vSphere 7.0 in favor of healthStatus.
24724    /// 
24725    /// Datastore accessibility status of the volume.
24726    /// 
24727    ///   
24728    /// This must be one of the datastore accessibility status exposed by SPBM.
24729    /// See *PbmEntityHealthDatastoreAccessibilityStatus_enum*.
24730    fn get_datastore_accessibility_status(&self) -> &Option<String>;
24731    /// Cursor object, pointing to desired range of results.
24732    fn get_cursor(&self) -> &Option<super::structs::CnsCursor>;
24733    /// Health status of the volume.
24734    /// 
24735    ///   
24736    /// This will be one of the health status exposed by SPBM.
24737    /// See *PbmEntityHealthStatus.healthStatus*.
24738    fn get_health_status(&self) -> &Option<String>;
24739}
24740impl<'s> serde::Serialize for dyn CnsQueryFilterTrait + 's {
24741            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24742            where
24743                S: serde::Serializer,
24744            {
24745                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24746            }
24747        }
24748impl<'de> serde::Deserialize<'de> for Box<dyn CnsQueryFilterTrait> {
24749            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24750                deserializer.deserialize_map(CnsQueryFilterVisitor)
24751            }
24752        }
24753
24754struct CnsQueryFilterVisitor;
24755
24756impl<'de> de::Visitor<'de> for CnsQueryFilterVisitor {
24757    type Value = Box<dyn CnsQueryFilterTrait>;
24758
24759    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24760        formatter.write_str("a valid CnsQueryFilterTrait JSON object with a _typeName field")
24761    }
24762
24763    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24764    where
24765        A: de::MapAccess<'de>,
24766    {
24767        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24768        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24769        match any {
24770            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24771                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24772            VimAny::Value(value) => Err(de::Error::custom(format!(
24773                "expected object not wrapped value: {:?}",
24774                value))),
24775        }
24776    }
24777}
24778
24779impl CnsQueryFilterTrait for CnsQueryFilter {
24780    fn get_volume_ids(&self) -> &Option<Vec<super::structs::CnsVolumeId>> { &self.volume_ids }
24781    fn get_names(&self) -> &Option<Vec<String>> { &self.names }
24782    fn get_container_cluster_ids(&self) -> &Option<Vec<String>> { &self.container_cluster_ids }
24783    fn get_storage_policy_id(&self) -> &Option<String> { &self.storage_policy_id }
24784    fn get_datastores(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.datastores }
24785    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.labels }
24786    fn get_compliance_status(&self) -> &Option<String> { &self.compliance_status }
24787    fn get_datastore_accessibility_status(&self) -> &Option<String> { &self.datastore_accessibility_status }
24788    fn get_cursor(&self) -> &Option<super::structs::CnsCursor> { &self.cursor }
24789    fn get_health_status(&self) -> &Option<String> { &self.health_status }
24790}
24791impl CnsQueryFilterTrait for CnsKubernetesQueryFilter {
24792    fn get_volume_ids(&self) -> &Option<Vec<super::structs::CnsVolumeId>> { &self.volume_ids }
24793    fn get_names(&self) -> &Option<Vec<String>> { &self.names }
24794    fn get_container_cluster_ids(&self) -> &Option<Vec<String>> { &self.container_cluster_ids }
24795    fn get_storage_policy_id(&self) -> &Option<String> { &self.storage_policy_id }
24796    fn get_datastores(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.datastores }
24797    fn get_labels(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.labels }
24798    fn get_compliance_status(&self) -> &Option<String> { &self.compliance_status }
24799    fn get_datastore_accessibility_status(&self) -> &Option<String> { &self.datastore_accessibility_status }
24800    fn get_cursor(&self) -> &Option<super::structs::CnsCursor> { &self.cursor }
24801    fn get_health_status(&self) -> &Option<String> { &self.health_status }
24802}
24803impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsQueryFilterTrait {
24804    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24805        let data_type = from.data_type();
24806        match data_type {
24807            StructType::CnsQueryFilter => Some(from.as_any_ref().downcast_ref::<CnsQueryFilter>()?),
24808            StructType::CnsKubernetesQueryFilter => Some(from.as_any_ref().downcast_ref::<CnsKubernetesQueryFilter>()?),
24809            _ => None,
24810        }
24811    }
24812    
24813    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24814        let data_type = from.data_type();
24815        match data_type {
24816            StructType::CnsQueryFilter => Ok(from.as_any_box().downcast::<CnsQueryFilter>()?),
24817            StructType::CnsKubernetesQueryFilter => Ok(from.as_any_box().downcast::<CnsKubernetesQueryFilter>()?),
24818            _ => Err(from.as_any_box()),
24819        }
24820    }
24821}
24822/// Base class for returning result of operation invoked on a specific volume.
24823/// 
24824///   
24825/// Operations that require some additional fields in their result can extend this
24826/// class. E.g. result classes for create and attach operations extend this class to
24827/// add additional fields.
24828///   
24829/// If an operation allows batch input, then the output should contain same number
24830/// of result objects. One object corresponding to each input entry.
24831///   
24832/// Since every result object will have its own fault, that fault will be limited to the
24833/// corresponding input object and should not be used for overall operation failure.
24834/// 
24835/// This structure may be used only with operations rendered under `/vsan`.
24836pub trait CnsVolumeOperationResultTrait : super::traits::DataObjectTrait {
24837    /// Unique identifier and datastore information for the volume.
24838    /// 
24839    ///   
24840    /// Result object for all operations, other than create, will get volumeId as
24841    /// part of its input parameter and should always have this field set. For the
24842    /// result of create operation, this field will not be set. Please see
24843    /// *CnsVolumeCreateResult* for details.
24844    fn get_volume_id(&self) -> &Option<super::structs::CnsVolumeId>;
24845    /// Fault, if any, corresponding to the specified volume ID that caused operation
24846    /// to fail.
24847    /// 
24848    /// Absence of fault will indicate successful result.
24849    ///   
24850    /// For create operation, volumeId field will not be set. Instead, volume name
24851    /// will be set, to associated fault with appropriate request. Please see
24852    /// *CnsVolumeCreateResult* for details.
24853    fn get_fault(&self) -> &Option<super::structs::MethodFault>;
24854}
24855impl<'s> serde::Serialize for dyn CnsVolumeOperationResultTrait + 's {
24856            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24857            where
24858                S: serde::Serializer,
24859            {
24860                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24861            }
24862        }
24863impl<'de> serde::Deserialize<'de> for Box<dyn CnsVolumeOperationResultTrait> {
24864            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24865                deserializer.deserialize_map(CnsVolumeOperationResultVisitor)
24866            }
24867        }
24868
24869struct CnsVolumeOperationResultVisitor;
24870
24871impl<'de> de::Visitor<'de> for CnsVolumeOperationResultVisitor {
24872    type Value = Box<dyn CnsVolumeOperationResultTrait>;
24873
24874    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24875        formatter.write_str("a valid CnsVolumeOperationResultTrait JSON object with a _typeName field")
24876    }
24877
24878    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24879    where
24880        A: de::MapAccess<'de>,
24881    {
24882        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24883        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24884        match any {
24885            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24886                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24887            VimAny::Value(value) => Err(de::Error::custom(format!(
24888                "expected object not wrapped value: {:?}",
24889                value))),
24890        }
24891    }
24892}
24893
24894impl CnsVolumeOperationResultTrait for CnsVolumeOperationResult {
24895    fn get_volume_id(&self) -> &Option<super::structs::CnsVolumeId> { &self.volume_id }
24896    fn get_fault(&self) -> &Option<super::structs::MethodFault> { &self.fault }
24897}
24898impl CnsVolumeOperationResultTrait for CnsAsyncQueryResult {
24899    fn get_volume_id(&self) -> &Option<super::structs::CnsVolumeId> { &self.volume_id }
24900    fn get_fault(&self) -> &Option<super::structs::MethodFault> { &self.fault }
24901}
24902impl CnsVolumeOperationResultTrait for CnsVolumeAttachResult {
24903    fn get_volume_id(&self) -> &Option<super::structs::CnsVolumeId> { &self.volume_id }
24904    fn get_fault(&self) -> &Option<super::structs::MethodFault> { &self.fault }
24905}
24906impl CnsVolumeOperationResultTrait for CnsVolumeCreateResult {
24907    fn get_volume_id(&self) -> &Option<super::structs::CnsVolumeId> { &self.volume_id }
24908    fn get_fault(&self) -> &Option<super::structs::MethodFault> { &self.fault }
24909}
24910impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsVolumeOperationResultTrait {
24911    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
24912        let data_type = from.data_type();
24913        match data_type {
24914            StructType::CnsVolumeOperationResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeOperationResult>()?),
24915            StructType::CnsAsyncQueryResult => Some(from.as_any_ref().downcast_ref::<CnsAsyncQueryResult>()?),
24916            StructType::CnsVolumeAttachResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeAttachResult>()?),
24917            StructType::CnsVolumeCreateResult => Some(from.as_any_ref().downcast_ref::<CnsVolumeCreateResult>()?),
24918            _ => None,
24919        }
24920    }
24921    
24922    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
24923        let data_type = from.data_type();
24924        match data_type {
24925            StructType::CnsVolumeOperationResult => Ok(from.as_any_box().downcast::<CnsVolumeOperationResult>()?),
24926            StructType::CnsAsyncQueryResult => Ok(from.as_any_box().downcast::<CnsAsyncQueryResult>()?),
24927            StructType::CnsVolumeAttachResult => Ok(from.as_any_box().downcast::<CnsVolumeAttachResult>()?),
24928            StructType::CnsVolumeCreateResult => Ok(from.as_any_box().downcast::<CnsVolumeCreateResult>()?),
24929            _ => Err(from.as_any_box()),
24930        }
24931    }
24932}
24933/// Base class for the volume relocation spec.
24934/// 
24935/// This structure may be used only with operations rendered under `/vsan`.
24936pub trait CnsVolumeRelocateSpecTrait : super::traits::DataObjectTrait {
24937    /// Unique identifier for the volume.
24938    fn get_volume_id(&self) -> &super::structs::CnsVolumeId;
24939    /// The destination datastore that the volume is relocated to.
24940    /// 
24941    /// Refers instance of *Datastore*.
24942    fn get_datastore(&self) -> &super::structs::ManagedObjectReference;
24943    /// Volume relocation profile requirement.
24944    /// 
24945    ///   
24946    /// While relocating the volume, the default policy of the destination
24947    /// datastore is applied if this is unset.
24948    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>>;
24949}
24950impl<'s> serde::Serialize for dyn CnsVolumeRelocateSpecTrait + 's {
24951            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
24952            where
24953                S: serde::Serializer,
24954            {
24955                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
24956            }
24957        }
24958impl<'de> serde::Deserialize<'de> for Box<dyn CnsVolumeRelocateSpecTrait> {
24959            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
24960                deserializer.deserialize_map(CnsVolumeRelocateSpecVisitor)
24961            }
24962        }
24963
24964struct CnsVolumeRelocateSpecVisitor;
24965
24966impl<'de> de::Visitor<'de> for CnsVolumeRelocateSpecVisitor {
24967    type Value = Box<dyn CnsVolumeRelocateSpecTrait>;
24968
24969    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24970        formatter.write_str("a valid CnsVolumeRelocateSpecTrait JSON object with a _typeName field")
24971    }
24972
24973    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
24974    where
24975        A: de::MapAccess<'de>,
24976    {
24977        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
24978        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
24979        match any {
24980            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
24981                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
24982            VimAny::Value(value) => Err(de::Error::custom(format!(
24983                "expected object not wrapped value: {:?}",
24984                value))),
24985        }
24986    }
24987}
24988
24989impl CnsVolumeRelocateSpecTrait for CnsVolumeRelocateSpec {
24990    fn get_volume_id(&self) -> &super::structs::CnsVolumeId { &self.volume_id }
24991    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
24992    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
24993}
24994impl CnsVolumeRelocateSpecTrait for CnsBlockVolumeRelocateSpec {
24995    fn get_volume_id(&self) -> &super::structs::CnsVolumeId { &self.volume_id }
24996    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
24997    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
24998}
24999impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsVolumeRelocateSpecTrait {
25000    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25001        let data_type = from.data_type();
25002        match data_type {
25003            StructType::CnsVolumeRelocateSpec => Some(from.as_any_ref().downcast_ref::<CnsVolumeRelocateSpec>()?),
25004            StructType::CnsBlockVolumeRelocateSpec => Some(from.as_any_ref().downcast_ref::<CnsBlockVolumeRelocateSpec>()?),
25005            _ => None,
25006        }
25007    }
25008    
25009    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25010        let data_type = from.data_type();
25011        match data_type {
25012            StructType::CnsVolumeRelocateSpec => Ok(from.as_any_box().downcast::<CnsVolumeRelocateSpec>()?),
25013            StructType::CnsBlockVolumeRelocateSpec => Ok(from.as_any_box().downcast::<CnsBlockVolumeRelocateSpec>()?),
25014            _ => Err(from.as_any_box()),
25015        }
25016    }
25017}
25018/// Base class for the source of volumes creation.
25019/// 
25020/// The source can be a volume snapshot or a volume.
25021/// 
25022/// This structure may be used only with operations rendered under `/vsan`.
25023pub trait CnsVolumeSourceTrait : super::traits::DataObjectTrait {
25024}
25025impl<'s> serde::Serialize for dyn CnsVolumeSourceTrait + 's {
25026            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25027            where
25028                S: serde::Serializer,
25029            {
25030                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25031            }
25032        }
25033impl<'de> serde::Deserialize<'de> for Box<dyn CnsVolumeSourceTrait> {
25034            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25035                deserializer.deserialize_map(CnsVolumeSourceVisitor)
25036            }
25037        }
25038
25039struct CnsVolumeSourceVisitor;
25040
25041impl<'de> de::Visitor<'de> for CnsVolumeSourceVisitor {
25042    type Value = Box<dyn CnsVolumeSourceTrait>;
25043
25044    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25045        formatter.write_str("a valid CnsVolumeSourceTrait JSON object with a _typeName field")
25046    }
25047
25048    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25049    where
25050        A: de::MapAccess<'de>,
25051    {
25052        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25053        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25054        match any {
25055            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25056                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25057            VimAny::Value(value) => Err(de::Error::custom(format!(
25058                "expected object not wrapped value: {:?}",
25059                value))),
25060        }
25061    }
25062}
25063
25064impl CnsVolumeSourceTrait for CnsVolumeSource {
25065}
25066impl CnsVolumeSourceTrait for CnsSnapshotVolumeSource {
25067}
25068impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CnsVolumeSourceTrait {
25069    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25070        let data_type = from.data_type();
25071        match data_type {
25072            StructType::CnsVolumeSource => Some(from.as_any_ref().downcast_ref::<CnsVolumeSource>()?),
25073            StructType::CnsSnapshotVolumeSource => Some(from.as_any_ref().downcast_ref::<CnsSnapshotVolumeSource>()?),
25074            _ => None,
25075        }
25076    }
25077    
25078    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25079        let data_type = from.data_type();
25080        match data_type {
25081            StructType::CnsVolumeSource => Ok(from.as_any_box().downcast::<CnsVolumeSource>()?),
25082            StructType::CnsSnapshotVolumeSource => Ok(from.as_any_box().downcast::<CnsSnapshotVolumeSource>()?),
25083            _ => Err(from.as_any_box()),
25084        }
25085    }
25086}
25087/// The *DVPortSetting* data object
25088/// describes the network configuration of a *DistributedVirtualPort*.
25089pub trait DvPortSettingTrait : super::traits::DataObjectTrait {
25090    /// Indicates whether this port is blocked.
25091    /// 
25092    /// If a port is blocked,
25093    /// packet forwarding is stopped.
25094    fn get_blocked(&self) -> &Option<super::structs::BoolPolicy>;
25095    /// Deprecated as of vSphere API 8.0. VMDirectPath Gen 2 is no longer supported and
25096    /// there is no replacement.
25097    /// 
25098    /// Indicates whether this port is allowed to do VMDirectPath Gen2 network passthrough.
25099    /// 
25100    /// Direct path capability is defined at host, switch, and device levels.
25101    /// See the <code>vmDirectPathGen2Supported</code> properties on the
25102    /// *DVSFeatureCapability*,
25103    /// *HostCapability*, *PhysicalNic*,
25104    /// and *VirtualEthernetCardOption* objects.
25105    fn get_vm_direct_path_gen_2_allowed(&self) -> &Option<super::structs::BoolPolicy>;
25106    /// Network shaping policy for controlling throughput of inbound traffic.
25107    fn get_in_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy>;
25108    /// Network shaping policy for controlling throughput of outbound traffic.
25109    fn get_out_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy>;
25110    /// Opaque binary blob that stores vendor specific configuration.
25111    fn get_vendor_specific_config(&self) -> &Option<super::structs::DvsVendorSpecificConfig>;
25112    /// Deprecated as of vSphere API 6.0
25113    /// Use *DVPortgroupConfigInfo.vmVnicNetworkResourcePoolKey* instead
25114    /// to reference the virtual NIC network resource pool.
25115    /// 
25116    /// The key of user defined network resource pool to be associated with a port.
25117    /// 
25118    /// The default value for this property is "-1", indicating that
25119    /// this port is not associated with any network resource pool.
25120    fn get_network_resource_pool_key(&self) -> &Option<super::structs::StringPolicy>;
25121    /// Configuration for Network Filter Policy.
25122    fn get_filter_policy(&self) -> &Option<super::structs::DvsFilterPolicy>;
25123}
25124impl<'s> serde::Serialize for dyn DvPortSettingTrait + 's {
25125            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25126            where
25127                S: serde::Serializer,
25128            {
25129                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25130            }
25131        }
25132impl<'de> serde::Deserialize<'de> for Box<dyn DvPortSettingTrait> {
25133            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25134                deserializer.deserialize_map(DvPortSettingVisitor)
25135            }
25136        }
25137
25138struct DvPortSettingVisitor;
25139
25140impl<'de> de::Visitor<'de> for DvPortSettingVisitor {
25141    type Value = Box<dyn DvPortSettingTrait>;
25142
25143    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25144        formatter.write_str("a valid DvPortSettingTrait JSON object with a _typeName field")
25145    }
25146
25147    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25148    where
25149        A: de::MapAccess<'de>,
25150    {
25151        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25152        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25153        match any {
25154            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25155                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25156            VimAny::Value(value) => Err(de::Error::custom(format!(
25157                "expected object not wrapped value: {:?}",
25158                value))),
25159        }
25160    }
25161}
25162
25163impl DvPortSettingTrait for DvPortSetting {
25164    fn get_blocked(&self) -> &Option<super::structs::BoolPolicy> { &self.blocked }
25165    fn get_vm_direct_path_gen_2_allowed(&self) -> &Option<super::structs::BoolPolicy> { &self.vm_direct_path_gen_2_allowed }
25166    fn get_in_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy> { &self.in_shaping_policy }
25167    fn get_out_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy> { &self.out_shaping_policy }
25168    fn get_vendor_specific_config(&self) -> &Option<super::structs::DvsVendorSpecificConfig> { &self.vendor_specific_config }
25169    fn get_network_resource_pool_key(&self) -> &Option<super::structs::StringPolicy> { &self.network_resource_pool_key }
25170    fn get_filter_policy(&self) -> &Option<super::structs::DvsFilterPolicy> { &self.filter_policy }
25171}
25172impl DvPortSettingTrait for VMwareDvsPortSetting {
25173    fn get_blocked(&self) -> &Option<super::structs::BoolPolicy> { &self.blocked }
25174    fn get_vm_direct_path_gen_2_allowed(&self) -> &Option<super::structs::BoolPolicy> { &self.vm_direct_path_gen_2_allowed }
25175    fn get_in_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy> { &self.in_shaping_policy }
25176    fn get_out_shaping_policy(&self) -> &Option<super::structs::DvsTrafficShapingPolicy> { &self.out_shaping_policy }
25177    fn get_vendor_specific_config(&self) -> &Option<super::structs::DvsVendorSpecificConfig> { &self.vendor_specific_config }
25178    fn get_network_resource_pool_key(&self) -> &Option<super::structs::StringPolicy> { &self.network_resource_pool_key }
25179    fn get_filter_policy(&self) -> &Option<super::structs::DvsFilterPolicy> { &self.filter_policy }
25180}
25181impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvPortSettingTrait {
25182    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25183        let data_type = from.data_type();
25184        match data_type {
25185            StructType::DvPortSetting => Some(from.as_any_ref().downcast_ref::<DvPortSetting>()?),
25186            StructType::VMwareDvsPortSetting => Some(from.as_any_ref().downcast_ref::<VMwareDvsPortSetting>()?),
25187            _ => None,
25188        }
25189    }
25190    
25191    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25192        let data_type = from.data_type();
25193        match data_type {
25194            StructType::DvPortSetting => Ok(from.as_any_box().downcast::<DvPortSetting>()?),
25195            StructType::VMwareDvsPortSetting => Ok(from.as_any_box().downcast::<VMwareDvsPortSetting>()?),
25196            _ => Err(from.as_any_box()),
25197        }
25198    }
25199}
25200/// The DistributedVirtualPortgroup policies.
25201/// 
25202/// This field is not applicable
25203/// when queried directly against an ESX host.
25204pub trait DvPortgroupPolicyTrait : super::traits::DataObjectTrait {
25205    /// Allow the *DVPortSetting.blocked* setting
25206    /// of an individual port to override the setting in
25207    /// *DVPortgroupConfigInfo.defaultPortConfig* of
25208    /// a portgroup.
25209    fn get_block_override_allowed(&self) -> bool;
25210    /// Allow the *DVPortSetting.inShapingPolicy* or
25211    /// *DVPortSetting.outShapingPolicy* settings
25212    /// of an individual port to override the setting in
25213    /// *DVPortgroupConfigInfo.defaultPortConfig* of
25214    /// a portgroup.
25215    fn get_shaping_override_allowed(&self) -> bool;
25216    /// Allow the *DVPortSetting.vendorSpecificConfig*
25217    /// setting of an individual port to override the setting in
25218    /// *DVPortgroupConfigInfo.defaultPortConfig* of
25219    /// a portgroup.
25220    fn get_vendor_config_override_allowed(&self) -> bool;
25221    /// Allow a live port to be moved in and out of the portgroup.
25222    fn get_live_port_moving_allowed(&self) -> bool;
25223    /// If true, reset the port network setting back to the portgroup setting
25224    /// (thus removing the per-port setting) when the port is disconnected from
25225    /// the connectee.
25226    fn get_port_config_reset_at_disconnect(&self) -> bool;
25227    /// Allow the setting of
25228    /// *DVPortSetting.networkResourcePoolKey* of an
25229    /// individual port to override the setting in
25230    /// *DVPortgroupConfigInfo.defaultPortConfig*
25231    /// of a portgroup.
25232    fn get_network_resource_pool_override_allowed(&self) -> Option<bool>;
25233    /// Allow the setting of
25234    /// *DVPortSetting.filterPolicy*,
25235    /// for an individual port to override the setting in
25236    /// *DVPortgroupConfigInfo.defaultPortConfig* of
25237    /// a portgroup.
25238    fn get_traffic_filter_override_allowed(&self) -> Option<bool>;
25239}
25240impl<'s> serde::Serialize for dyn DvPortgroupPolicyTrait + 's {
25241            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25242            where
25243                S: serde::Serializer,
25244            {
25245                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25246            }
25247        }
25248impl<'de> serde::Deserialize<'de> for Box<dyn DvPortgroupPolicyTrait> {
25249            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25250                deserializer.deserialize_map(DvPortgroupPolicyVisitor)
25251            }
25252        }
25253
25254struct DvPortgroupPolicyVisitor;
25255
25256impl<'de> de::Visitor<'de> for DvPortgroupPolicyVisitor {
25257    type Value = Box<dyn DvPortgroupPolicyTrait>;
25258
25259    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25260        formatter.write_str("a valid DvPortgroupPolicyTrait JSON object with a _typeName field")
25261    }
25262
25263    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25264    where
25265        A: de::MapAccess<'de>,
25266    {
25267        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25268        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25269        match any {
25270            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25271                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25272            VimAny::Value(value) => Err(de::Error::custom(format!(
25273                "expected object not wrapped value: {:?}",
25274                value))),
25275        }
25276    }
25277}
25278
25279impl DvPortgroupPolicyTrait for DvPortgroupPolicy {
25280    fn get_block_override_allowed(&self) -> bool { self.block_override_allowed }
25281    fn get_shaping_override_allowed(&self) -> bool { self.shaping_override_allowed }
25282    fn get_vendor_config_override_allowed(&self) -> bool { self.vendor_config_override_allowed }
25283    fn get_live_port_moving_allowed(&self) -> bool { self.live_port_moving_allowed }
25284    fn get_port_config_reset_at_disconnect(&self) -> bool { self.port_config_reset_at_disconnect }
25285    fn get_network_resource_pool_override_allowed(&self) -> Option<bool> { self.network_resource_pool_override_allowed }
25286    fn get_traffic_filter_override_allowed(&self) -> Option<bool> { self.traffic_filter_override_allowed }
25287}
25288impl DvPortgroupPolicyTrait for VMwareDvsPortgroupPolicy {
25289    fn get_block_override_allowed(&self) -> bool { self.block_override_allowed }
25290    fn get_shaping_override_allowed(&self) -> bool { self.shaping_override_allowed }
25291    fn get_vendor_config_override_allowed(&self) -> bool { self.vendor_config_override_allowed }
25292    fn get_live_port_moving_allowed(&self) -> bool { self.live_port_moving_allowed }
25293    fn get_port_config_reset_at_disconnect(&self) -> bool { self.port_config_reset_at_disconnect }
25294    fn get_network_resource_pool_override_allowed(&self) -> Option<bool> { self.network_resource_pool_override_allowed }
25295    fn get_traffic_filter_override_allowed(&self) -> Option<bool> { self.traffic_filter_override_allowed }
25296}
25297impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvPortgroupPolicyTrait {
25298    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25299        let data_type = from.data_type();
25300        match data_type {
25301            StructType::DvPortgroupPolicy => Some(from.as_any_ref().downcast_ref::<DvPortgroupPolicy>()?),
25302            StructType::VMwareDvsPortgroupPolicy => Some(from.as_any_ref().downcast_ref::<VMwareDvsPortgroupPolicy>()?),
25303            _ => None,
25304        }
25305    }
25306    
25307    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25308        let data_type = from.data_type();
25309        match data_type {
25310            StructType::DvPortgroupPolicy => Ok(from.as_any_box().downcast::<DvPortgroupPolicy>()?),
25311            StructType::VMwareDvsPortgroupPolicy => Ok(from.as_any_box().downcast::<VMwareDvsPortgroupPolicy>()?),
25312            _ => Err(from.as_any_box()),
25313        }
25314    }
25315}
25316/// Base class for filters to check host compatibility.
25317pub trait DistributedVirtualSwitchManagerHostDvsFilterSpecTrait : super::traits::DataObjectTrait {
25318    /// If this flag is true, then the filter returns the hosts in the
25319    /// *DistributedVirtualSwitchManagerHostContainer*
25320    /// that satisfy the criteria specified by this filter, otherwise
25321    /// it returns hosts that don't meet the criteria.
25322    fn get_inclusive(&self) -> bool;
25323}
25324impl<'s> serde::Serialize for dyn DistributedVirtualSwitchManagerHostDvsFilterSpecTrait + 's {
25325            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25326            where
25327                S: serde::Serializer,
25328            {
25329                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25330            }
25331        }
25332impl<'de> serde::Deserialize<'de> for Box<dyn DistributedVirtualSwitchManagerHostDvsFilterSpecTrait> {
25333            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25334                deserializer.deserialize_map(DistributedVirtualSwitchManagerHostDvsFilterSpecVisitor)
25335            }
25336        }
25337
25338struct DistributedVirtualSwitchManagerHostDvsFilterSpecVisitor;
25339
25340impl<'de> de::Visitor<'de> for DistributedVirtualSwitchManagerHostDvsFilterSpecVisitor {
25341    type Value = Box<dyn DistributedVirtualSwitchManagerHostDvsFilterSpecTrait>;
25342
25343    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25344        formatter.write_str("a valid DistributedVirtualSwitchManagerHostDvsFilterSpecTrait JSON object with a _typeName field")
25345    }
25346
25347    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25348    where
25349        A: de::MapAccess<'de>,
25350    {
25351        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25352        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25353        match any {
25354            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25355                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25356            VimAny::Value(value) => Err(de::Error::custom(format!(
25357                "expected object not wrapped value: {:?}",
25358                value))),
25359        }
25360    }
25361}
25362
25363impl DistributedVirtualSwitchManagerHostDvsFilterSpecTrait for DistributedVirtualSwitchManagerHostDvsFilterSpec {
25364    fn get_inclusive(&self) -> bool { self.inclusive }
25365}
25366impl DistributedVirtualSwitchManagerHostDvsFilterSpecTrait for DistributedVirtualSwitchManagerHostArrayFilter {
25367    fn get_inclusive(&self) -> bool { self.inclusive }
25368}
25369impl DistributedVirtualSwitchManagerHostDvsFilterSpecTrait for DistributedVirtualSwitchManagerHostContainerFilter {
25370    fn get_inclusive(&self) -> bool { self.inclusive }
25371}
25372impl DistributedVirtualSwitchManagerHostDvsFilterSpecTrait for DistributedVirtualSwitchManagerHostDvsMembershipFilter {
25373    fn get_inclusive(&self) -> bool { self.inclusive }
25374}
25375impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DistributedVirtualSwitchManagerHostDvsFilterSpecTrait {
25376    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25377        let data_type = from.data_type();
25378        match data_type {
25379            StructType::DistributedVirtualSwitchManagerHostDvsFilterSpec => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostDvsFilterSpec>()?),
25380            StructType::DistributedVirtualSwitchManagerHostArrayFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostArrayFilter>()?),
25381            StructType::DistributedVirtualSwitchManagerHostContainerFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostContainerFilter>()?),
25382            StructType::DistributedVirtualSwitchManagerHostDvsMembershipFilter => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchManagerHostDvsMembershipFilter>()?),
25383            _ => None,
25384        }
25385    }
25386    
25387    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25388        let data_type = from.data_type();
25389        match data_type {
25390            StructType::DistributedVirtualSwitchManagerHostDvsFilterSpec => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostDvsFilterSpec>()?),
25391            StructType::DistributedVirtualSwitchManagerHostArrayFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostArrayFilter>()?),
25392            StructType::DistributedVirtualSwitchManagerHostContainerFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostContainerFilter>()?),
25393            StructType::DistributedVirtualSwitchManagerHostDvsMembershipFilter => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchManagerHostDvsMembershipFilter>()?),
25394            _ => Err(from.as_any_box()),
25395        }
25396    }
25397}
25398/// Base class for connectee filters.
25399/// 
25400/// This class serves as a base for different types of connectee filters.
25401/// It has three sub-classes.
25402/// 
25403/// ***Since:*** vSphere API Release 8.0.3.0
25404pub trait DvsFilterSpecConnecteeSpecTrait : super::traits::DataObjectTrait {
25405}
25406impl<'s> serde::Serialize for dyn DvsFilterSpecConnecteeSpecTrait + 's {
25407            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25408            where
25409                S: serde::Serializer,
25410            {
25411                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25412            }
25413        }
25414impl<'de> serde::Deserialize<'de> for Box<dyn DvsFilterSpecConnecteeSpecTrait> {
25415            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25416                deserializer.deserialize_map(DvsFilterSpecConnecteeSpecVisitor)
25417            }
25418        }
25419
25420struct DvsFilterSpecConnecteeSpecVisitor;
25421
25422impl<'de> de::Visitor<'de> for DvsFilterSpecConnecteeSpecVisitor {
25423    type Value = Box<dyn DvsFilterSpecConnecteeSpecTrait>;
25424
25425    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25426        formatter.write_str("a valid DvsFilterSpecConnecteeSpecTrait JSON object with a _typeName field")
25427    }
25428
25429    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25430    where
25431        A: de::MapAccess<'de>,
25432    {
25433        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25434        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25435        match any {
25436            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25437                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25438            VimAny::Value(value) => Err(de::Error::custom(format!(
25439                "expected object not wrapped value: {:?}",
25440                value))),
25441        }
25442    }
25443}
25444
25445impl DvsFilterSpecConnecteeSpecTrait for DvsFilterSpecConnecteeSpec {
25446}
25447impl DvsFilterSpecConnecteeSpecTrait for DvsFilterSpecPnicConnecteeSpec {
25448}
25449impl DvsFilterSpecConnecteeSpecTrait for DvsFilterSpecVmConnecteeSpec {
25450}
25451impl DvsFilterSpecConnecteeSpecTrait for DvsFilterSpecVmknicConnecteeSpec {
25452}
25453impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsFilterSpecConnecteeSpecTrait {
25454    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25455        let data_type = from.data_type();
25456        match data_type {
25457            StructType::DvsFilterSpecConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecConnecteeSpec>()?),
25458            StructType::DvsFilterSpecPnicConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecPnicConnecteeSpec>()?),
25459            StructType::DvsFilterSpecVmConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVmConnecteeSpec>()?),
25460            StructType::DvsFilterSpecVmknicConnecteeSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVmknicConnecteeSpec>()?),
25461            _ => None,
25462        }
25463    }
25464    
25465    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25466        let data_type = from.data_type();
25467        match data_type {
25468            StructType::DvsFilterSpecConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecConnecteeSpec>()?),
25469            StructType::DvsFilterSpecPnicConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecPnicConnecteeSpec>()?),
25470            StructType::DvsFilterSpecVmConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVmConnecteeSpec>()?),
25471            StructType::DvsFilterSpecVmknicConnecteeSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVmknicConnecteeSpec>()?),
25472            _ => Err(from.as_any_box()),
25473        }
25474    }
25475}
25476/// Base class for VlanSpec filters.
25477/// 
25478/// This class serves as a base for different types of VlanSpec filters.
25479/// It has three sub-classes.
25480/// 
25481/// ***Since:*** vSphere API Release 8.0.3.0
25482pub trait DvsFilterSpecVlanSpecTrait : super::traits::DataObjectTrait {
25483}
25484impl<'s> serde::Serialize for dyn DvsFilterSpecVlanSpecTrait + 's {
25485            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25486            where
25487                S: serde::Serializer,
25488            {
25489                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25490            }
25491        }
25492impl<'de> serde::Deserialize<'de> for Box<dyn DvsFilterSpecVlanSpecTrait> {
25493            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25494                deserializer.deserialize_map(DvsFilterSpecVlanSpecVisitor)
25495            }
25496        }
25497
25498struct DvsFilterSpecVlanSpecVisitor;
25499
25500impl<'de> de::Visitor<'de> for DvsFilterSpecVlanSpecVisitor {
25501    type Value = Box<dyn DvsFilterSpecVlanSpecTrait>;
25502
25503    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25504        formatter.write_str("a valid DvsFilterSpecVlanSpecTrait JSON object with a _typeName field")
25505    }
25506
25507    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25508    where
25509        A: de::MapAccess<'de>,
25510    {
25511        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25512        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25513        match any {
25514            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25515                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25516            VimAny::Value(value) => Err(de::Error::custom(format!(
25517                "expected object not wrapped value: {:?}",
25518                value))),
25519        }
25520    }
25521}
25522
25523impl DvsFilterSpecVlanSpecTrait for DvsFilterSpecVlanSpec {
25524}
25525impl DvsFilterSpecVlanSpecTrait for DvsFilterSpecPvlanSpec {
25526}
25527impl DvsFilterSpecVlanSpecTrait for DvsFilterSpecTrunkVlanSpec {
25528}
25529impl DvsFilterSpecVlanSpecTrait for DvsFilterSpecVlanIdSpec {
25530}
25531impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsFilterSpecVlanSpecTrait {
25532    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25533        let data_type = from.data_type();
25534        match data_type {
25535            StructType::DvsFilterSpecVlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVlanSpec>()?),
25536            StructType::DvsFilterSpecPvlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecPvlanSpec>()?),
25537            StructType::DvsFilterSpecTrunkVlanSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecTrunkVlanSpec>()?),
25538            StructType::DvsFilterSpecVlanIdSpec => Some(from.as_any_ref().downcast_ref::<DvsFilterSpecVlanIdSpec>()?),
25539            _ => None,
25540        }
25541    }
25542    
25543    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25544        let data_type = from.data_type();
25545        match data_type {
25546            StructType::DvsFilterSpecVlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVlanSpec>()?),
25547            StructType::DvsFilterSpecPvlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecPvlanSpec>()?),
25548            StructType::DvsFilterSpecTrunkVlanSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecTrunkVlanSpec>()?),
25549            StructType::DvsFilterSpecVlanIdSpec => Ok(from.as_any_box().downcast::<DvsFilterSpecVlanIdSpec>()?),
25550            _ => Err(from.as_any_box()),
25551        }
25552    }
25553}
25554/// Base class.
25555pub trait DistributedVirtualSwitchHostMemberBackingTrait : super::traits::DataObjectTrait {
25556}
25557impl<'s> serde::Serialize for dyn DistributedVirtualSwitchHostMemberBackingTrait + 's {
25558            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25559            where
25560                S: serde::Serializer,
25561            {
25562                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25563            }
25564        }
25565impl<'de> serde::Deserialize<'de> for Box<dyn DistributedVirtualSwitchHostMemberBackingTrait> {
25566            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25567                deserializer.deserialize_map(DistributedVirtualSwitchHostMemberBackingVisitor)
25568            }
25569        }
25570
25571struct DistributedVirtualSwitchHostMemberBackingVisitor;
25572
25573impl<'de> de::Visitor<'de> for DistributedVirtualSwitchHostMemberBackingVisitor {
25574    type Value = Box<dyn DistributedVirtualSwitchHostMemberBackingTrait>;
25575
25576    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25577        formatter.write_str("a valid DistributedVirtualSwitchHostMemberBackingTrait JSON object with a _typeName field")
25578    }
25579
25580    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25581    where
25582        A: de::MapAccess<'de>,
25583    {
25584        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25585        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25586        match any {
25587            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25588                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25589            VimAny::Value(value) => Err(de::Error::custom(format!(
25590                "expected object not wrapped value: {:?}",
25591                value))),
25592        }
25593    }
25594}
25595
25596impl DistributedVirtualSwitchHostMemberBackingTrait for DistributedVirtualSwitchHostMemberBacking {
25597}
25598impl DistributedVirtualSwitchHostMemberBackingTrait for DistributedVirtualSwitchHostMemberPnicBacking {
25599}
25600impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DistributedVirtualSwitchHostMemberBackingTrait {
25601    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25602        let data_type = from.data_type();
25603        match data_type {
25604            StructType::DistributedVirtualSwitchHostMemberBacking => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberBacking>()?),
25605            StructType::DistributedVirtualSwitchHostMemberPnicBacking => Some(from.as_any_ref().downcast_ref::<DistributedVirtualSwitchHostMemberPnicBacking>()?),
25606            _ => None,
25607        }
25608    }
25609    
25610    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25611        let data_type = from.data_type();
25612        match data_type {
25613            StructType::DistributedVirtualSwitchHostMemberBacking => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberBacking>()?),
25614            StructType::DistributedVirtualSwitchHostMemberPnicBacking => Ok(from.as_any_box().downcast::<DistributedVirtualSwitchHostMemberPnicBacking>()?),
25615            _ => Err(from.as_any_box()),
25616        }
25617    }
25618}
25619/// This class defines healthcheck result of the vSphere Distributed Switch.
25620pub trait HostMemberHealthCheckResultTrait : super::traits::DataObjectTrait {
25621    /// The summary of health check result.
25622    fn get_summary(&self) -> &Option<String>;
25623}
25624impl<'s> serde::Serialize for dyn HostMemberHealthCheckResultTrait + 's {
25625            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25626            where
25627                S: serde::Serializer,
25628            {
25629                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25630            }
25631        }
25632impl<'de> serde::Deserialize<'de> for Box<dyn HostMemberHealthCheckResultTrait> {
25633            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25634                deserializer.deserialize_map(HostMemberHealthCheckResultVisitor)
25635            }
25636        }
25637
25638struct HostMemberHealthCheckResultVisitor;
25639
25640impl<'de> de::Visitor<'de> for HostMemberHealthCheckResultVisitor {
25641    type Value = Box<dyn HostMemberHealthCheckResultTrait>;
25642
25643    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25644        formatter.write_str("a valid HostMemberHealthCheckResultTrait JSON object with a _typeName field")
25645    }
25646
25647    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25648    where
25649        A: de::MapAccess<'de>,
25650    {
25651        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25652        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25653        match any {
25654            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25655                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25656            VimAny::Value(value) => Err(de::Error::custom(format!(
25657                "expected object not wrapped value: {:?}",
25658                value))),
25659        }
25660    }
25661}
25662
25663impl HostMemberHealthCheckResultTrait for HostMemberHealthCheckResult {
25664    fn get_summary(&self) -> &Option<String> { &self.summary }
25665}
25666impl HostMemberHealthCheckResultTrait for HostMemberUplinkHealthCheckResult {
25667    fn get_summary(&self) -> &Option<String> { &self.summary }
25668}
25669impl HostMemberHealthCheckResultTrait for VMwareDvsMtuHealthCheckResult {
25670    fn get_summary(&self) -> &Option<String> { &self.summary }
25671}
25672impl HostMemberHealthCheckResultTrait for VMwareDvsVlanHealthCheckResult {
25673    fn get_summary(&self) -> &Option<String> { &self.summary }
25674}
25675impl HostMemberHealthCheckResultTrait for VMwareDvsTeamingHealthCheckResult {
25676    fn get_summary(&self) -> &Option<String> { &self.summary }
25677}
25678impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostMemberHealthCheckResultTrait {
25679    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25680        let data_type = from.data_type();
25681        match data_type {
25682            StructType::HostMemberHealthCheckResult => Some(from.as_any_ref().downcast_ref::<HostMemberHealthCheckResult>()?),
25683            StructType::HostMemberUplinkHealthCheckResult => Some(from.as_any_ref().downcast_ref::<HostMemberUplinkHealthCheckResult>()?),
25684            StructType::VMwareDvsMtuHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsMtuHealthCheckResult>()?),
25685            StructType::VMwareDvsVlanHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanHealthCheckResult>()?),
25686            StructType::VMwareDvsTeamingHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsTeamingHealthCheckResult>()?),
25687            _ => None,
25688        }
25689    }
25690    
25691    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25692        let data_type = from.data_type();
25693        match data_type {
25694            StructType::HostMemberHealthCheckResult => Ok(from.as_any_box().downcast::<HostMemberHealthCheckResult>()?),
25695            StructType::HostMemberUplinkHealthCheckResult => Ok(from.as_any_box().downcast::<HostMemberUplinkHealthCheckResult>()?),
25696            StructType::VMwareDvsMtuHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsMtuHealthCheckResult>()?),
25697            StructType::VMwareDvsVlanHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsVlanHealthCheckResult>()?),
25698            StructType::VMwareDvsTeamingHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsTeamingHealthCheckResult>()?),
25699            _ => Err(from.as_any_box()),
25700        }
25701    }
25702}
25703/// This class defines healthcheck result of a specified Uplink port
25704/// in vSphere Distributed Switch.
25705pub trait HostMemberUplinkHealthCheckResultTrait : super::traits::HostMemberHealthCheckResultTrait {
25706    /// The uplink port key.
25707    fn get_uplink_port_key(&self) -> &str;
25708}
25709impl<'s> serde::Serialize for dyn HostMemberUplinkHealthCheckResultTrait + 's {
25710            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25711            where
25712                S: serde::Serializer,
25713            {
25714                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25715            }
25716        }
25717impl<'de> serde::Deserialize<'de> for Box<dyn HostMemberUplinkHealthCheckResultTrait> {
25718            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25719                deserializer.deserialize_map(HostMemberUplinkHealthCheckResultVisitor)
25720            }
25721        }
25722
25723struct HostMemberUplinkHealthCheckResultVisitor;
25724
25725impl<'de> de::Visitor<'de> for HostMemberUplinkHealthCheckResultVisitor {
25726    type Value = Box<dyn HostMemberUplinkHealthCheckResultTrait>;
25727
25728    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25729        formatter.write_str("a valid HostMemberUplinkHealthCheckResultTrait JSON object with a _typeName field")
25730    }
25731
25732    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25733    where
25734        A: de::MapAccess<'de>,
25735    {
25736        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25737        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25738        match any {
25739            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25740                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25741            VimAny::Value(value) => Err(de::Error::custom(format!(
25742                "expected object not wrapped value: {:?}",
25743                value))),
25744        }
25745    }
25746}
25747
25748impl HostMemberUplinkHealthCheckResultTrait for HostMemberUplinkHealthCheckResult {
25749    fn get_uplink_port_key(&self) -> &str { &self.uplink_port_key }
25750}
25751impl HostMemberUplinkHealthCheckResultTrait for VMwareDvsMtuHealthCheckResult {
25752    fn get_uplink_port_key(&self) -> &str { &self.uplink_port_key }
25753}
25754impl HostMemberUplinkHealthCheckResultTrait for VMwareDvsVlanHealthCheckResult {
25755    fn get_uplink_port_key(&self) -> &str { &self.uplink_port_key }
25756}
25757impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostMemberUplinkHealthCheckResultTrait {
25758    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25759        let data_type = from.data_type();
25760        match data_type {
25761            StructType::HostMemberUplinkHealthCheckResult => Some(from.as_any_ref().downcast_ref::<HostMemberUplinkHealthCheckResult>()?),
25762            StructType::VMwareDvsMtuHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsMtuHealthCheckResult>()?),
25763            StructType::VMwareDvsVlanHealthCheckResult => Some(from.as_any_ref().downcast_ref::<VMwareDvsVlanHealthCheckResult>()?),
25764            _ => None,
25765        }
25766    }
25767    
25768    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25769        let data_type = from.data_type();
25770        match data_type {
25771            StructType::HostMemberUplinkHealthCheckResult => Ok(from.as_any_box().downcast::<HostMemberUplinkHealthCheckResult>()?),
25772            StructType::VMwareDvsMtuHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsMtuHealthCheckResult>()?),
25773            StructType::VMwareDvsVlanHealthCheckResult => Ok(from.as_any_box().downcast::<VMwareDvsVlanHealthCheckResult>()?),
25774            _ => Err(from.as_any_box()),
25775        }
25776    }
25777}
25778/// This class is the base class for network rule action.
25779pub trait DvsNetworkRuleActionTrait : super::traits::DataObjectTrait {
25780}
25781impl<'s> serde::Serialize for dyn DvsNetworkRuleActionTrait + 's {
25782            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25783            where
25784                S: serde::Serializer,
25785            {
25786                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25787            }
25788        }
25789impl<'de> serde::Deserialize<'de> for Box<dyn DvsNetworkRuleActionTrait> {
25790            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25791                deserializer.deserialize_map(DvsNetworkRuleActionVisitor)
25792            }
25793        }
25794
25795struct DvsNetworkRuleActionVisitor;
25796
25797impl<'de> de::Visitor<'de> for DvsNetworkRuleActionVisitor {
25798    type Value = Box<dyn DvsNetworkRuleActionTrait>;
25799
25800    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25801        formatter.write_str("a valid DvsNetworkRuleActionTrait JSON object with a _typeName field")
25802    }
25803
25804    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25805    where
25806        A: de::MapAccess<'de>,
25807    {
25808        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25809        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25810        match any {
25811            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25812                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25813            VimAny::Value(value) => Err(de::Error::custom(format!(
25814                "expected object not wrapped value: {:?}",
25815                value))),
25816        }
25817    }
25818}
25819
25820impl DvsNetworkRuleActionTrait for DvsNetworkRuleAction {
25821}
25822impl DvsNetworkRuleActionTrait for DvsAcceptNetworkRuleAction {
25823}
25824impl DvsNetworkRuleActionTrait for DvsCopyNetworkRuleAction {
25825}
25826impl DvsNetworkRuleActionTrait for DvsDropNetworkRuleAction {
25827}
25828impl DvsNetworkRuleActionTrait for DvsGreEncapNetworkRuleAction {
25829}
25830impl DvsNetworkRuleActionTrait for DvsLogNetworkRuleAction {
25831}
25832impl DvsNetworkRuleActionTrait for DvsMacRewriteNetworkRuleAction {
25833}
25834impl DvsNetworkRuleActionTrait for DvsPuntNetworkRuleAction {
25835}
25836impl DvsNetworkRuleActionTrait for DvsRateLimitNetworkRuleAction {
25837}
25838impl DvsNetworkRuleActionTrait for DvsUpdateTagNetworkRuleAction {
25839}
25840impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsNetworkRuleActionTrait {
25841    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25842        let data_type = from.data_type();
25843        match data_type {
25844            StructType::DvsNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsNetworkRuleAction>()?),
25845            StructType::DvsAcceptNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsAcceptNetworkRuleAction>()?),
25846            StructType::DvsCopyNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsCopyNetworkRuleAction>()?),
25847            StructType::DvsDropNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsDropNetworkRuleAction>()?),
25848            StructType::DvsGreEncapNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsGreEncapNetworkRuleAction>()?),
25849            StructType::DvsLogNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsLogNetworkRuleAction>()?),
25850            StructType::DvsMacRewriteNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsMacRewriteNetworkRuleAction>()?),
25851            StructType::DvsPuntNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsPuntNetworkRuleAction>()?),
25852            StructType::DvsRateLimitNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsRateLimitNetworkRuleAction>()?),
25853            StructType::DvsUpdateTagNetworkRuleAction => Some(from.as_any_ref().downcast_ref::<DvsUpdateTagNetworkRuleAction>()?),
25854            _ => None,
25855        }
25856    }
25857    
25858    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25859        let data_type = from.data_type();
25860        match data_type {
25861            StructType::DvsNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsNetworkRuleAction>()?),
25862            StructType::DvsAcceptNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsAcceptNetworkRuleAction>()?),
25863            StructType::DvsCopyNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsCopyNetworkRuleAction>()?),
25864            StructType::DvsDropNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsDropNetworkRuleAction>()?),
25865            StructType::DvsGreEncapNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsGreEncapNetworkRuleAction>()?),
25866            StructType::DvsLogNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsLogNetworkRuleAction>()?),
25867            StructType::DvsMacRewriteNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsMacRewriteNetworkRuleAction>()?),
25868            StructType::DvsPuntNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsPuntNetworkRuleAction>()?),
25869            StructType::DvsRateLimitNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsRateLimitNetworkRuleAction>()?),
25870            StructType::DvsUpdateTagNetworkRuleAction => Ok(from.as_any_box().downcast::<DvsUpdateTagNetworkRuleAction>()?),
25871            _ => Err(from.as_any_box()),
25872        }
25873    }
25874}
25875/// This class is the base class for identifying network traffic.
25876pub trait DvsNetworkRuleQualifierTrait : super::traits::DataObjectTrait {
25877    /// The key of the Qualifier
25878    fn get_key(&self) -> &Option<String>;
25879}
25880impl<'s> serde::Serialize for dyn DvsNetworkRuleQualifierTrait + 's {
25881            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25882            where
25883                S: serde::Serializer,
25884            {
25885                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25886            }
25887        }
25888impl<'de> serde::Deserialize<'de> for Box<dyn DvsNetworkRuleQualifierTrait> {
25889            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25890                deserializer.deserialize_map(DvsNetworkRuleQualifierVisitor)
25891            }
25892        }
25893
25894struct DvsNetworkRuleQualifierVisitor;
25895
25896impl<'de> de::Visitor<'de> for DvsNetworkRuleQualifierVisitor {
25897    type Value = Box<dyn DvsNetworkRuleQualifierTrait>;
25898
25899    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25900        formatter.write_str("a valid DvsNetworkRuleQualifierTrait JSON object with a _typeName field")
25901    }
25902
25903    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25904    where
25905        A: de::MapAccess<'de>,
25906    {
25907        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25908        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25909        match any {
25910            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25911                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25912            VimAny::Value(value) => Err(de::Error::custom(format!(
25913                "expected object not wrapped value: {:?}",
25914                value))),
25915        }
25916    }
25917}
25918
25919impl DvsNetworkRuleQualifierTrait for DvsNetworkRuleQualifier {
25920    fn get_key(&self) -> &Option<String> { &self.key }
25921}
25922impl DvsNetworkRuleQualifierTrait for DvsIpNetworkRuleQualifier {
25923    fn get_key(&self) -> &Option<String> { &self.key }
25924}
25925impl DvsNetworkRuleQualifierTrait for DvsMacNetworkRuleQualifier {
25926    fn get_key(&self) -> &Option<String> { &self.key }
25927}
25928impl DvsNetworkRuleQualifierTrait for DvsSystemTrafficNetworkRuleQualifier {
25929    fn get_key(&self) -> &Option<String> { &self.key }
25930}
25931impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsNetworkRuleQualifierTrait {
25932    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
25933        let data_type = from.data_type();
25934        match data_type {
25935            StructType::DvsNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsNetworkRuleQualifier>()?),
25936            StructType::DvsIpNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsIpNetworkRuleQualifier>()?),
25937            StructType::DvsMacNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsMacNetworkRuleQualifier>()?),
25938            StructType::DvsSystemTrafficNetworkRuleQualifier => Some(from.as_any_ref().downcast_ref::<DvsSystemTrafficNetworkRuleQualifier>()?),
25939            _ => None,
25940        }
25941    }
25942    
25943    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
25944        let data_type = from.data_type();
25945        match data_type {
25946            StructType::DvsNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsNetworkRuleQualifier>()?),
25947            StructType::DvsIpNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsIpNetworkRuleQualifier>()?),
25948            StructType::DvsMacNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsMacNetworkRuleQualifier>()?),
25949            StructType::DvsSystemTrafficNetworkRuleQualifier => Ok(from.as_any_box().downcast::<DvsSystemTrafficNetworkRuleQualifier>()?),
25950            _ => Err(from.as_any_box()),
25951        }
25952    }
25953}
25954/// Base class of key information.
25955/// 
25956/// ***Since:*** vSphere API Release 9.0.0.0
25957pub trait CryptoManagerKmipCryptoKeyStatusKeyInfoTrait : super::traits::DataObjectTrait {
25958    /// Wrapping Key ID
25959    fn get_key_id(&self) -> &str;
25960}
25961impl<'s> serde::Serialize for dyn CryptoManagerKmipCryptoKeyStatusKeyInfoTrait + 's {
25962            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
25963            where
25964                S: serde::Serializer,
25965            {
25966                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
25967            }
25968        }
25969impl<'de> serde::Deserialize<'de> for Box<dyn CryptoManagerKmipCryptoKeyStatusKeyInfoTrait> {
25970            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
25971                deserializer.deserialize_map(CryptoManagerKmipCryptoKeyStatusKeyInfoVisitor)
25972            }
25973        }
25974
25975struct CryptoManagerKmipCryptoKeyStatusKeyInfoVisitor;
25976
25977impl<'de> de::Visitor<'de> for CryptoManagerKmipCryptoKeyStatusKeyInfoVisitor {
25978    type Value = Box<dyn CryptoManagerKmipCryptoKeyStatusKeyInfoTrait>;
25979
25980    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25981        formatter.write_str("a valid CryptoManagerKmipCryptoKeyStatusKeyInfoTrait JSON object with a _typeName field")
25982    }
25983
25984    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
25985    where
25986        A: de::MapAccess<'de>,
25987    {
25988        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
25989        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
25990        match any {
25991            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
25992                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
25993            VimAny::Value(value) => Err(de::Error::custom(format!(
25994                "expected object not wrapped value: {:?}",
25995                value))),
25996        }
25997    }
25998}
25999
26000impl CryptoManagerKmipCryptoKeyStatusKeyInfoTrait for CryptoManagerKmipCryptoKeyStatusKeyInfo {
26001    fn get_key_id(&self) -> &str { &self.key_id }
26002}
26003impl CryptoManagerKmipCryptoKeyStatusKeyInfoTrait for CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo {
26004    fn get_key_id(&self) -> &str { &self.key_id }
26005}
26006impl CryptoManagerKmipCryptoKeyStatusKeyInfoTrait for CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo {
26007    fn get_key_id(&self) -> &str { &self.key_id }
26008}
26009impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CryptoManagerKmipCryptoKeyStatusKeyInfoTrait {
26010    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26011        let data_type = from.data_type();
26012        match data_type {
26013            StructType::CryptoManagerKmipCryptoKeyStatusKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusKeyInfo>()?),
26014            StructType::CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo>()?),
26015            StructType::CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo => Some(from.as_any_ref().downcast_ref::<CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo>()?),
26016            _ => None,
26017        }
26018    }
26019    
26020    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26021        let data_type = from.data_type();
26022        match data_type {
26023            StructType::CryptoManagerKmipCryptoKeyStatusKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusKeyInfo>()?),
26024            StructType::CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusWrappingKeyIdKeyInfo>()?),
26025            StructType::CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo => Ok(from.as_any_box().downcast::<CryptoManagerKmipCryptoKeyStatusWrappingRotationIntervalKeyInfo>()?),
26026            _ => Err(from.as_any_box()),
26027        }
26028    }
26029}
26030/// This data object type encapsulates virtual machine or disk encryption
26031/// settings.
26032pub trait CryptoSpecTrait : super::traits::DataObjectTrait {
26033}
26034impl<'s> serde::Serialize for dyn CryptoSpecTrait + 's {
26035            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26036            where
26037                S: serde::Serializer,
26038            {
26039                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26040            }
26041        }
26042impl<'de> serde::Deserialize<'de> for Box<dyn CryptoSpecTrait> {
26043            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26044                deserializer.deserialize_map(CryptoSpecVisitor)
26045            }
26046        }
26047
26048struct CryptoSpecVisitor;
26049
26050impl<'de> de::Visitor<'de> for CryptoSpecVisitor {
26051    type Value = Box<dyn CryptoSpecTrait>;
26052
26053    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26054        formatter.write_str("a valid CryptoSpecTrait JSON object with a _typeName field")
26055    }
26056
26057    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26058    where
26059        A: de::MapAccess<'de>,
26060    {
26061        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26062        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26063        match any {
26064            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26065                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26066            VimAny::Value(value) => Err(de::Error::custom(format!(
26067                "expected object not wrapped value: {:?}",
26068                value))),
26069        }
26070    }
26071}
26072
26073impl CryptoSpecTrait for CryptoSpec {
26074}
26075impl CryptoSpecTrait for CryptoSpecDecrypt {
26076}
26077impl CryptoSpecTrait for CryptoSpecDeepRecrypt {
26078}
26079impl CryptoSpecTrait for CryptoSpecEncrypt {
26080}
26081impl CryptoSpecTrait for CryptoSpecNoOp {
26082}
26083impl CryptoSpecTrait for CryptoSpecRegister {
26084}
26085impl CryptoSpecTrait for CryptoSpecShallowRecrypt {
26086}
26087impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CryptoSpecTrait {
26088    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26089        let data_type = from.data_type();
26090        match data_type {
26091            StructType::CryptoSpec => Some(from.as_any_ref().downcast_ref::<CryptoSpec>()?),
26092            StructType::CryptoSpecDecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecDecrypt>()?),
26093            StructType::CryptoSpecDeepRecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecDeepRecrypt>()?),
26094            StructType::CryptoSpecEncrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecEncrypt>()?),
26095            StructType::CryptoSpecNoOp => Some(from.as_any_ref().downcast_ref::<CryptoSpecNoOp>()?),
26096            StructType::CryptoSpecRegister => Some(from.as_any_ref().downcast_ref::<CryptoSpecRegister>()?),
26097            StructType::CryptoSpecShallowRecrypt => Some(from.as_any_ref().downcast_ref::<CryptoSpecShallowRecrypt>()?),
26098            _ => None,
26099        }
26100    }
26101    
26102    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26103        let data_type = from.data_type();
26104        match data_type {
26105            StructType::CryptoSpec => Ok(from.as_any_box().downcast::<CryptoSpec>()?),
26106            StructType::CryptoSpecDecrypt => Ok(from.as_any_box().downcast::<CryptoSpecDecrypt>()?),
26107            StructType::CryptoSpecDeepRecrypt => Ok(from.as_any_box().downcast::<CryptoSpecDeepRecrypt>()?),
26108            StructType::CryptoSpecEncrypt => Ok(from.as_any_box().downcast::<CryptoSpecEncrypt>()?),
26109            StructType::CryptoSpecNoOp => Ok(from.as_any_box().downcast::<CryptoSpecNoOp>()?),
26110            StructType::CryptoSpecRegister => Ok(from.as_any_box().downcast::<CryptoSpecRegister>()?),
26111            StructType::CryptoSpecShallowRecrypt => Ok(from.as_any_box().downcast::<CryptoSpecShallowRecrypt>()?),
26112            _ => Err(from.as_any_box()),
26113        }
26114    }
26115}
26116/// This data object type indicates that the encryption settings of the
26117/// virtual machine or disk should not be modified by the operation.
26118pub trait CryptoSpecNoOpTrait : super::traits::CryptoSpecTrait {
26119}
26120impl<'s> serde::Serialize for dyn CryptoSpecNoOpTrait + 's {
26121            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26122            where
26123                S: serde::Serializer,
26124            {
26125                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26126            }
26127        }
26128impl<'de> serde::Deserialize<'de> for Box<dyn CryptoSpecNoOpTrait> {
26129            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26130                deserializer.deserialize_map(CryptoSpecNoOpVisitor)
26131            }
26132        }
26133
26134struct CryptoSpecNoOpVisitor;
26135
26136impl<'de> de::Visitor<'de> for CryptoSpecNoOpVisitor {
26137    type Value = Box<dyn CryptoSpecNoOpTrait>;
26138
26139    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26140        formatter.write_str("a valid CryptoSpecNoOpTrait JSON object with a _typeName field")
26141    }
26142
26143    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26144    where
26145        A: de::MapAccess<'de>,
26146    {
26147        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26148        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26149        match any {
26150            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26151                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26152            VimAny::Value(value) => Err(de::Error::custom(format!(
26153                "expected object not wrapped value: {:?}",
26154                value))),
26155        }
26156    }
26157}
26158
26159impl CryptoSpecNoOpTrait for CryptoSpecNoOp {
26160}
26161impl CryptoSpecNoOpTrait for CryptoSpecRegister {
26162}
26163impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CryptoSpecNoOpTrait {
26164    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26165        let data_type = from.data_type();
26166        match data_type {
26167            StructType::CryptoSpecNoOp => Some(from.as_any_ref().downcast_ref::<CryptoSpecNoOp>()?),
26168            StructType::CryptoSpecRegister => Some(from.as_any_ref().downcast_ref::<CryptoSpecRegister>()?),
26169            _ => None,
26170        }
26171    }
26172    
26173    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26174        let data_type = from.data_type();
26175        match data_type {
26176            StructType::CryptoSpecNoOp => Ok(from.as_any_box().downcast::<CryptoSpecNoOp>()?),
26177            StructType::CryptoSpecRegister => Ok(from.as_any_box().downcast::<CryptoSpecRegister>()?),
26178            _ => Err(from.as_any_box()),
26179        }
26180    }
26181}
26182/// Base class of key information.
26183/// 
26184/// ***Since:*** vSphere API Release 9.0.0.0
26185pub trait KmipClusterInfoKeyInfoTrait : super::traits::DataObjectTrait {
26186}
26187impl<'s> serde::Serialize for dyn KmipClusterInfoKeyInfoTrait + 's {
26188            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26189            where
26190                S: serde::Serializer,
26191            {
26192                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26193            }
26194        }
26195impl<'de> serde::Deserialize<'de> for Box<dyn KmipClusterInfoKeyInfoTrait> {
26196            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26197                deserializer.deserialize_map(KmipClusterInfoKeyInfoVisitor)
26198            }
26199        }
26200
26201struct KmipClusterInfoKeyInfoVisitor;
26202
26203impl<'de> de::Visitor<'de> for KmipClusterInfoKeyInfoVisitor {
26204    type Value = Box<dyn KmipClusterInfoKeyInfoTrait>;
26205
26206    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26207        formatter.write_str("a valid KmipClusterInfoKeyInfoTrait JSON object with a _typeName field")
26208    }
26209
26210    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26211    where
26212        A: de::MapAccess<'de>,
26213    {
26214        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26215        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26216        match any {
26217            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26218                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26219            VimAny::Value(value) => Err(de::Error::custom(format!(
26220                "expected object not wrapped value: {:?}",
26221                value))),
26222        }
26223    }
26224}
26225
26226impl KmipClusterInfoKeyInfoTrait for KmipClusterInfoKeyInfo {
26227}
26228impl KmipClusterInfoKeyInfoTrait for KmipClusterInfoWrappingKeyIdKeyInfo {
26229}
26230impl KmipClusterInfoKeyInfoTrait for KmipClusterInfoWrappingRotationIntervalKeyInfo {
26231}
26232impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn KmipClusterInfoKeyInfoTrait {
26233    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26234        let data_type = from.data_type();
26235        match data_type {
26236            StructType::KmipClusterInfoKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoKeyInfo>()?),
26237            StructType::KmipClusterInfoWrappingKeyIdKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoWrappingKeyIdKeyInfo>()?),
26238            StructType::KmipClusterInfoWrappingRotationIntervalKeyInfo => Some(from.as_any_ref().downcast_ref::<KmipClusterInfoWrappingRotationIntervalKeyInfo>()?),
26239            _ => None,
26240        }
26241    }
26242    
26243    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26244        let data_type = from.data_type();
26245        match data_type {
26246            StructType::KmipClusterInfoKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoKeyInfo>()?),
26247            StructType::KmipClusterInfoWrappingKeyIdKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoWrappingKeyIdKeyInfo>()?),
26248            StructType::KmipClusterInfoWrappingRotationIntervalKeyInfo => Ok(from.as_any_box().downcast::<KmipClusterInfoWrappingRotationIntervalKeyInfo>()?),
26249            _ => Err(from.as_any_box()),
26250        }
26251    }
26252}
26253/// Base class of key specification.
26254/// 
26255/// ***Since:*** vSphere API Release 9.0.0.0
26256pub trait KmipServerSpecKeySpecTrait : super::traits::DataObjectTrait {
26257}
26258impl<'s> serde::Serialize for dyn KmipServerSpecKeySpecTrait + 's {
26259            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26260            where
26261                S: serde::Serializer,
26262            {
26263                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26264            }
26265        }
26266impl<'de> serde::Deserialize<'de> for Box<dyn KmipServerSpecKeySpecTrait> {
26267            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26268                deserializer.deserialize_map(KmipServerSpecKeySpecVisitor)
26269            }
26270        }
26271
26272struct KmipServerSpecKeySpecVisitor;
26273
26274impl<'de> de::Visitor<'de> for KmipServerSpecKeySpecVisitor {
26275    type Value = Box<dyn KmipServerSpecKeySpecTrait>;
26276
26277    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26278        formatter.write_str("a valid KmipServerSpecKeySpecTrait JSON object with a _typeName field")
26279    }
26280
26281    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26282    where
26283        A: de::MapAccess<'de>,
26284    {
26285        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26286        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26287        match any {
26288            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26289                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26290            VimAny::Value(value) => Err(de::Error::custom(format!(
26291                "expected object not wrapped value: {:?}",
26292                value))),
26293        }
26294    }
26295}
26296
26297impl KmipServerSpecKeySpecTrait for KmipServerSpecKeySpec {
26298}
26299impl KmipServerSpecKeySpecTrait for KmipServerSpecWrappingKeyIdKeySpec {
26300}
26301impl KmipServerSpecKeySpecTrait for KmipServerSpecWrappingRotationIntervalKeySpec {
26302}
26303impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn KmipServerSpecKeySpecTrait {
26304    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26305        let data_type = from.data_type();
26306        match data_type {
26307            StructType::KmipServerSpecKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecKeySpec>()?),
26308            StructType::KmipServerSpecWrappingKeyIdKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecWrappingKeyIdKeySpec>()?),
26309            StructType::KmipServerSpecWrappingRotationIntervalKeySpec => Some(from.as_any_ref().downcast_ref::<KmipServerSpecWrappingRotationIntervalKeySpec>()?),
26310            _ => None,
26311        }
26312    }
26313    
26314    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26315        let data_type = from.data_type();
26316        match data_type {
26317            StructType::KmipServerSpecKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecKeySpec>()?),
26318            StructType::KmipServerSpecWrappingKeyIdKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecWrappingKeyIdKeySpec>()?),
26319            StructType::KmipServerSpecWrappingRotationIntervalKeySpec => Ok(from.as_any_box().downcast::<KmipServerSpecWrappingRotationIntervalKeySpec>()?),
26320            _ => Err(from.as_any_box()),
26321        }
26322    }
26323}
26324/// This is the base type for event argument types.
26325/// 
26326/// Event argument objects, which inherit from a common subtype,
26327/// are used to manage supplementary properties of different kinds
26328/// of event objects.
26329pub trait EventArgumentTrait : super::traits::DataObjectTrait {
26330}
26331impl<'s> serde::Serialize for dyn EventArgumentTrait + 's {
26332            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26333            where
26334                S: serde::Serializer,
26335            {
26336                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26337            }
26338        }
26339impl<'de> serde::Deserialize<'de> for Box<dyn EventArgumentTrait> {
26340            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26341                deserializer.deserialize_map(EventArgumentVisitor)
26342            }
26343        }
26344
26345struct EventArgumentVisitor;
26346
26347impl<'de> de::Visitor<'de> for EventArgumentVisitor {
26348    type Value = Box<dyn EventArgumentTrait>;
26349
26350    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26351        formatter.write_str("a valid EventArgumentTrait JSON object with a _typeName field")
26352    }
26353
26354    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26355    where
26356        A: de::MapAccess<'de>,
26357    {
26358        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26359        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26360        match any {
26361            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26362                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26363            VimAny::Value(value) => Err(de::Error::custom(format!(
26364                "expected object not wrapped value: {:?}",
26365                value))),
26366        }
26367    }
26368}
26369
26370impl EventArgumentTrait for EventArgument {
26371}
26372impl EventArgumentTrait for EntityEventArgument {
26373}
26374impl EventArgumentTrait for AlarmEventArgument {
26375}
26376impl EventArgumentTrait for ComputeResourceEventArgument {
26377}
26378impl EventArgumentTrait for DatacenterEventArgument {
26379}
26380impl EventArgumentTrait for DatastoreEventArgument {
26381}
26382impl EventArgumentTrait for DvsEventArgument {
26383}
26384impl EventArgumentTrait for FolderEventArgument {
26385}
26386impl EventArgumentTrait for HostEventArgument {
26387}
26388impl EventArgumentTrait for ManagedEntityEventArgument {
26389}
26390impl EventArgumentTrait for NetworkEventArgument {
26391}
26392impl EventArgumentTrait for ResourcePoolEventArgument {
26393}
26394impl EventArgumentTrait for ScheduledTaskEventArgument {
26395}
26396impl EventArgumentTrait for VmEventArgument {
26397}
26398impl EventArgumentTrait for ProfileEventArgument {
26399}
26400impl EventArgumentTrait for RoleEventArgument {
26401}
26402impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn EventArgumentTrait {
26403    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26404        let data_type = from.data_type();
26405        match data_type {
26406            StructType::EventArgument => Some(from.as_any_ref().downcast_ref::<EventArgument>()?),
26407            StructType::EntityEventArgument => Some(from.as_any_ref().downcast_ref::<EntityEventArgument>()?),
26408            StructType::AlarmEventArgument => Some(from.as_any_ref().downcast_ref::<AlarmEventArgument>()?),
26409            StructType::ComputeResourceEventArgument => Some(from.as_any_ref().downcast_ref::<ComputeResourceEventArgument>()?),
26410            StructType::DatacenterEventArgument => Some(from.as_any_ref().downcast_ref::<DatacenterEventArgument>()?),
26411            StructType::DatastoreEventArgument => Some(from.as_any_ref().downcast_ref::<DatastoreEventArgument>()?),
26412            StructType::DvsEventArgument => Some(from.as_any_ref().downcast_ref::<DvsEventArgument>()?),
26413            StructType::FolderEventArgument => Some(from.as_any_ref().downcast_ref::<FolderEventArgument>()?),
26414            StructType::HostEventArgument => Some(from.as_any_ref().downcast_ref::<HostEventArgument>()?),
26415            StructType::ManagedEntityEventArgument => Some(from.as_any_ref().downcast_ref::<ManagedEntityEventArgument>()?),
26416            StructType::NetworkEventArgument => Some(from.as_any_ref().downcast_ref::<NetworkEventArgument>()?),
26417            StructType::ResourcePoolEventArgument => Some(from.as_any_ref().downcast_ref::<ResourcePoolEventArgument>()?),
26418            StructType::ScheduledTaskEventArgument => Some(from.as_any_ref().downcast_ref::<ScheduledTaskEventArgument>()?),
26419            StructType::VmEventArgument => Some(from.as_any_ref().downcast_ref::<VmEventArgument>()?),
26420            StructType::ProfileEventArgument => Some(from.as_any_ref().downcast_ref::<ProfileEventArgument>()?),
26421            StructType::RoleEventArgument => Some(from.as_any_ref().downcast_ref::<RoleEventArgument>()?),
26422            _ => None,
26423        }
26424    }
26425    
26426    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26427        let data_type = from.data_type();
26428        match data_type {
26429            StructType::EventArgument => Ok(from.as_any_box().downcast::<EventArgument>()?),
26430            StructType::EntityEventArgument => Ok(from.as_any_box().downcast::<EntityEventArgument>()?),
26431            StructType::AlarmEventArgument => Ok(from.as_any_box().downcast::<AlarmEventArgument>()?),
26432            StructType::ComputeResourceEventArgument => Ok(from.as_any_box().downcast::<ComputeResourceEventArgument>()?),
26433            StructType::DatacenterEventArgument => Ok(from.as_any_box().downcast::<DatacenterEventArgument>()?),
26434            StructType::DatastoreEventArgument => Ok(from.as_any_box().downcast::<DatastoreEventArgument>()?),
26435            StructType::DvsEventArgument => Ok(from.as_any_box().downcast::<DvsEventArgument>()?),
26436            StructType::FolderEventArgument => Ok(from.as_any_box().downcast::<FolderEventArgument>()?),
26437            StructType::HostEventArgument => Ok(from.as_any_box().downcast::<HostEventArgument>()?),
26438            StructType::ManagedEntityEventArgument => Ok(from.as_any_box().downcast::<ManagedEntityEventArgument>()?),
26439            StructType::NetworkEventArgument => Ok(from.as_any_box().downcast::<NetworkEventArgument>()?),
26440            StructType::ResourcePoolEventArgument => Ok(from.as_any_box().downcast::<ResourcePoolEventArgument>()?),
26441            StructType::ScheduledTaskEventArgument => Ok(from.as_any_box().downcast::<ScheduledTaskEventArgument>()?),
26442            StructType::VmEventArgument => Ok(from.as_any_box().downcast::<VmEventArgument>()?),
26443            StructType::ProfileEventArgument => Ok(from.as_any_box().downcast::<ProfileEventArgument>()?),
26444            StructType::RoleEventArgument => Ok(from.as_any_box().downcast::<RoleEventArgument>()?),
26445            _ => Err(from.as_any_box()),
26446        }
26447    }
26448}
26449/// The event argument is a managed entity object.
26450/// 
26451/// Subclasses of this type distinguish the different managed entities
26452/// referenced in event objects.
26453pub trait EntityEventArgumentTrait : super::traits::EventArgumentTrait {
26454    /// Name of the entity, including its full path from the root of the inventory.
26455    fn get_name(&self) -> &str;
26456}
26457impl<'s> serde::Serialize for dyn EntityEventArgumentTrait + 's {
26458            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26459            where
26460                S: serde::Serializer,
26461            {
26462                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26463            }
26464        }
26465impl<'de> serde::Deserialize<'de> for Box<dyn EntityEventArgumentTrait> {
26466            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26467                deserializer.deserialize_map(EntityEventArgumentVisitor)
26468            }
26469        }
26470
26471struct EntityEventArgumentVisitor;
26472
26473impl<'de> de::Visitor<'de> for EntityEventArgumentVisitor {
26474    type Value = Box<dyn EntityEventArgumentTrait>;
26475
26476    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26477        formatter.write_str("a valid EntityEventArgumentTrait JSON object with a _typeName field")
26478    }
26479
26480    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26481    where
26482        A: de::MapAccess<'de>,
26483    {
26484        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26485        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26486        match any {
26487            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26488                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26489            VimAny::Value(value) => Err(de::Error::custom(format!(
26490                "expected object not wrapped value: {:?}",
26491                value))),
26492        }
26493    }
26494}
26495
26496impl EntityEventArgumentTrait for EntityEventArgument {
26497    fn get_name(&self) -> &str { &self.name }
26498}
26499impl EntityEventArgumentTrait for AlarmEventArgument {
26500    fn get_name(&self) -> &str { &self.name }
26501}
26502impl EntityEventArgumentTrait for ComputeResourceEventArgument {
26503    fn get_name(&self) -> &str { &self.name }
26504}
26505impl EntityEventArgumentTrait for DatacenterEventArgument {
26506    fn get_name(&self) -> &str { &self.name }
26507}
26508impl EntityEventArgumentTrait for DatastoreEventArgument {
26509    fn get_name(&self) -> &str { &self.name }
26510}
26511impl EntityEventArgumentTrait for DvsEventArgument {
26512    fn get_name(&self) -> &str { &self.name }
26513}
26514impl EntityEventArgumentTrait for FolderEventArgument {
26515    fn get_name(&self) -> &str { &self.name }
26516}
26517impl EntityEventArgumentTrait for HostEventArgument {
26518    fn get_name(&self) -> &str { &self.name }
26519}
26520impl EntityEventArgumentTrait for ManagedEntityEventArgument {
26521    fn get_name(&self) -> &str { &self.name }
26522}
26523impl EntityEventArgumentTrait for NetworkEventArgument {
26524    fn get_name(&self) -> &str { &self.name }
26525}
26526impl EntityEventArgumentTrait for ResourcePoolEventArgument {
26527    fn get_name(&self) -> &str { &self.name }
26528}
26529impl EntityEventArgumentTrait for ScheduledTaskEventArgument {
26530    fn get_name(&self) -> &str { &self.name }
26531}
26532impl EntityEventArgumentTrait for VmEventArgument {
26533    fn get_name(&self) -> &str { &self.name }
26534}
26535impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn EntityEventArgumentTrait {
26536    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26537        let data_type = from.data_type();
26538        match data_type {
26539            StructType::EntityEventArgument => Some(from.as_any_ref().downcast_ref::<EntityEventArgument>()?),
26540            StructType::AlarmEventArgument => Some(from.as_any_ref().downcast_ref::<AlarmEventArgument>()?),
26541            StructType::ComputeResourceEventArgument => Some(from.as_any_ref().downcast_ref::<ComputeResourceEventArgument>()?),
26542            StructType::DatacenterEventArgument => Some(from.as_any_ref().downcast_ref::<DatacenterEventArgument>()?),
26543            StructType::DatastoreEventArgument => Some(from.as_any_ref().downcast_ref::<DatastoreEventArgument>()?),
26544            StructType::DvsEventArgument => Some(from.as_any_ref().downcast_ref::<DvsEventArgument>()?),
26545            StructType::FolderEventArgument => Some(from.as_any_ref().downcast_ref::<FolderEventArgument>()?),
26546            StructType::HostEventArgument => Some(from.as_any_ref().downcast_ref::<HostEventArgument>()?),
26547            StructType::ManagedEntityEventArgument => Some(from.as_any_ref().downcast_ref::<ManagedEntityEventArgument>()?),
26548            StructType::NetworkEventArgument => Some(from.as_any_ref().downcast_ref::<NetworkEventArgument>()?),
26549            StructType::ResourcePoolEventArgument => Some(from.as_any_ref().downcast_ref::<ResourcePoolEventArgument>()?),
26550            StructType::ScheduledTaskEventArgument => Some(from.as_any_ref().downcast_ref::<ScheduledTaskEventArgument>()?),
26551            StructType::VmEventArgument => Some(from.as_any_ref().downcast_ref::<VmEventArgument>()?),
26552            _ => None,
26553        }
26554    }
26555    
26556    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26557        let data_type = from.data_type();
26558        match data_type {
26559            StructType::EntityEventArgument => Ok(from.as_any_box().downcast::<EntityEventArgument>()?),
26560            StructType::AlarmEventArgument => Ok(from.as_any_box().downcast::<AlarmEventArgument>()?),
26561            StructType::ComputeResourceEventArgument => Ok(from.as_any_box().downcast::<ComputeResourceEventArgument>()?),
26562            StructType::DatacenterEventArgument => Ok(from.as_any_box().downcast::<DatacenterEventArgument>()?),
26563            StructType::DatastoreEventArgument => Ok(from.as_any_box().downcast::<DatastoreEventArgument>()?),
26564            StructType::DvsEventArgument => Ok(from.as_any_box().downcast::<DvsEventArgument>()?),
26565            StructType::FolderEventArgument => Ok(from.as_any_box().downcast::<FolderEventArgument>()?),
26566            StructType::HostEventArgument => Ok(from.as_any_box().downcast::<HostEventArgument>()?),
26567            StructType::ManagedEntityEventArgument => Ok(from.as_any_box().downcast::<ManagedEntityEventArgument>()?),
26568            StructType::NetworkEventArgument => Ok(from.as_any_box().downcast::<NetworkEventArgument>()?),
26569            StructType::ResourcePoolEventArgument => Ok(from.as_any_box().downcast::<ResourcePoolEventArgument>()?),
26570            StructType::ScheduledTaskEventArgument => Ok(from.as_any_box().downcast::<ScheduledTaskEventArgument>()?),
26571            StructType::VmEventArgument => Ok(from.as_any_box().downcast::<VmEventArgument>()?),
26572            _ => Err(from.as_any_box()),
26573        }
26574    }
26575}
26576/// BaseClass allowing different views on filtered set.
26577/// 
26578/// ***Since:*** vSphere API Release 9.0.0.0
26579pub trait EventManagerEventViewSpecTrait : super::traits::DataObjectTrait {
26580}
26581impl<'s> serde::Serialize for dyn EventManagerEventViewSpecTrait + 's {
26582            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26583            where
26584                S: serde::Serializer,
26585            {
26586                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26587            }
26588        }
26589impl<'de> serde::Deserialize<'de> for Box<dyn EventManagerEventViewSpecTrait> {
26590            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26591                deserializer.deserialize_map(EventManagerEventViewSpecVisitor)
26592            }
26593        }
26594
26595struct EventManagerEventViewSpecVisitor;
26596
26597impl<'de> de::Visitor<'de> for EventManagerEventViewSpecVisitor {
26598    type Value = Box<dyn EventManagerEventViewSpecTrait>;
26599
26600    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26601        formatter.write_str("a valid EventManagerEventViewSpecTrait JSON object with a _typeName field")
26602    }
26603
26604    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26605    where
26606        A: de::MapAccess<'de>,
26607    {
26608        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26609        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26610        match any {
26611            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26612                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26613            VimAny::Value(value) => Err(de::Error::custom(format!(
26614                "expected object not wrapped value: {:?}",
26615                value))),
26616        }
26617    }
26618}
26619
26620impl EventManagerEventViewSpecTrait for EventManagerEventViewSpec {
26621}
26622impl EventManagerEventViewSpecTrait for EventManagerViewByStartId {
26623}
26624impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn EventManagerEventViewSpecTrait {
26625    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26626        let data_type = from.data_type();
26627        match data_type {
26628            StructType::EventManagerEventViewSpec => Some(from.as_any_ref().downcast_ref::<EventManagerEventViewSpec>()?),
26629            StructType::EventManagerViewByStartId => Some(from.as_any_ref().downcast_ref::<EventManagerViewByStartId>()?),
26630            _ => None,
26631        }
26632    }
26633    
26634    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26635        let data_type = from.data_type();
26636        match data_type {
26637            StructType::EventManagerEventViewSpec => Ok(from.as_any_box().downcast::<EventManagerEventViewSpec>()?),
26638            StructType::EventManagerViewByStartId => Ok(from.as_any_box().downcast::<EventManagerViewByStartId>()?),
26639            _ => Err(from.as_any_box()),
26640        }
26641    }
26642}
26643/// The *HostAuthenticationStoreInfo* base class defines status information
26644/// for local and host Active Directory authentication.
26645pub trait HostAuthenticationStoreInfoTrait : super::traits::DataObjectTrait {
26646    /// Indicates whether the authentication store is configured.
26647    /// - Host Active Directory authentication - <code>enabled</code>
26648    ///   is <code>True</code> if the host is a member of a domain.
26649    /// - Local authentication - <code>enabled</code> is always <code>True</code>.
26650    fn get_enabled(&self) -> bool;
26651}
26652impl<'s> serde::Serialize for dyn HostAuthenticationStoreInfoTrait + 's {
26653            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26654            where
26655                S: serde::Serializer,
26656            {
26657                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26658            }
26659        }
26660impl<'de> serde::Deserialize<'de> for Box<dyn HostAuthenticationStoreInfoTrait> {
26661            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26662                deserializer.deserialize_map(HostAuthenticationStoreInfoVisitor)
26663            }
26664        }
26665
26666struct HostAuthenticationStoreInfoVisitor;
26667
26668impl<'de> de::Visitor<'de> for HostAuthenticationStoreInfoVisitor {
26669    type Value = Box<dyn HostAuthenticationStoreInfoTrait>;
26670
26671    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26672        formatter.write_str("a valid HostAuthenticationStoreInfoTrait JSON object with a _typeName field")
26673    }
26674
26675    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26676    where
26677        A: de::MapAccess<'de>,
26678    {
26679        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26680        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26681        match any {
26682            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26683                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26684            VimAny::Value(value) => Err(de::Error::custom(format!(
26685                "expected object not wrapped value: {:?}",
26686                value))),
26687        }
26688    }
26689}
26690
26691impl HostAuthenticationStoreInfoTrait for HostAuthenticationStoreInfo {
26692    fn get_enabled(&self) -> bool { self.enabled }
26693}
26694impl HostAuthenticationStoreInfoTrait for HostDirectoryStoreInfo {
26695    fn get_enabled(&self) -> bool { self.enabled }
26696}
26697impl HostAuthenticationStoreInfoTrait for HostActiveDirectoryInfo {
26698    fn get_enabled(&self) -> bool { self.enabled }
26699}
26700impl HostAuthenticationStoreInfoTrait for HostLocalAuthenticationInfo {
26701    fn get_enabled(&self) -> bool { self.enabled }
26702}
26703impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostAuthenticationStoreInfoTrait {
26704    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26705        let data_type = from.data_type();
26706        match data_type {
26707            StructType::HostAuthenticationStoreInfo => Some(from.as_any_ref().downcast_ref::<HostAuthenticationStoreInfo>()?),
26708            StructType::HostDirectoryStoreInfo => Some(from.as_any_ref().downcast_ref::<HostDirectoryStoreInfo>()?),
26709            StructType::HostActiveDirectoryInfo => Some(from.as_any_ref().downcast_ref::<HostActiveDirectoryInfo>()?),
26710            StructType::HostLocalAuthenticationInfo => Some(from.as_any_ref().downcast_ref::<HostLocalAuthenticationInfo>()?),
26711            _ => None,
26712        }
26713    }
26714    
26715    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26716        let data_type = from.data_type();
26717        match data_type {
26718            StructType::HostAuthenticationStoreInfo => Ok(from.as_any_box().downcast::<HostAuthenticationStoreInfo>()?),
26719            StructType::HostDirectoryStoreInfo => Ok(from.as_any_box().downcast::<HostDirectoryStoreInfo>()?),
26720            StructType::HostActiveDirectoryInfo => Ok(from.as_any_box().downcast::<HostActiveDirectoryInfo>()?),
26721            StructType::HostLocalAuthenticationInfo => Ok(from.as_any_box().downcast::<HostLocalAuthenticationInfo>()?),
26722            _ => Err(from.as_any_box()),
26723        }
26724    }
26725}
26726/// *HostDirectoryStoreInfo* is a base class for objects that
26727/// provide information about directory-based authentication stores.
26728pub trait HostDirectoryStoreInfoTrait : super::traits::HostAuthenticationStoreInfoTrait {
26729}
26730impl<'s> serde::Serialize for dyn HostDirectoryStoreInfoTrait + 's {
26731            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26732            where
26733                S: serde::Serializer,
26734            {
26735                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26736            }
26737        }
26738impl<'de> serde::Deserialize<'de> for Box<dyn HostDirectoryStoreInfoTrait> {
26739            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26740                deserializer.deserialize_map(HostDirectoryStoreInfoVisitor)
26741            }
26742        }
26743
26744struct HostDirectoryStoreInfoVisitor;
26745
26746impl<'de> de::Visitor<'de> for HostDirectoryStoreInfoVisitor {
26747    type Value = Box<dyn HostDirectoryStoreInfoTrait>;
26748
26749    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26750        formatter.write_str("a valid HostDirectoryStoreInfoTrait JSON object with a _typeName field")
26751    }
26752
26753    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26754    where
26755        A: de::MapAccess<'de>,
26756    {
26757        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26758        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26759        match any {
26760            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26761                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26762            VimAny::Value(value) => Err(de::Error::custom(format!(
26763                "expected object not wrapped value: {:?}",
26764                value))),
26765        }
26766    }
26767}
26768
26769impl HostDirectoryStoreInfoTrait for HostDirectoryStoreInfo {
26770}
26771impl HostDirectoryStoreInfoTrait for HostActiveDirectoryInfo {
26772}
26773impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDirectoryStoreInfoTrait {
26774    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26775        let data_type = from.data_type();
26776        match data_type {
26777            StructType::HostDirectoryStoreInfo => Some(from.as_any_ref().downcast_ref::<HostDirectoryStoreInfo>()?),
26778            StructType::HostActiveDirectoryInfo => Some(from.as_any_ref().downcast_ref::<HostActiveDirectoryInfo>()?),
26779            _ => None,
26780        }
26781    }
26782    
26783    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26784        let data_type = from.data_type();
26785        match data_type {
26786            StructType::HostDirectoryStoreInfo => Ok(from.as_any_box().downcast::<HostDirectoryStoreInfo>()?),
26787            StructType::HostActiveDirectoryInfo => Ok(from.as_any_box().downcast::<HostActiveDirectoryInfo>()?),
26788            _ => Err(from.as_any_box()),
26789        }
26790    }
26791}
26792/// The base data object type for information about datastores on the host.
26793pub trait HostDatastoreConnectInfoTrait : super::traits::DataObjectTrait {
26794    /// Basic datastore information.
26795    /// 
26796    /// The managed object reference is not set.
26797    fn get_summary(&self) -> &super::structs::DatastoreSummary;
26798}
26799impl<'s> serde::Serialize for dyn HostDatastoreConnectInfoTrait + 's {
26800            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26801            where
26802                S: serde::Serializer,
26803            {
26804                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26805            }
26806        }
26807impl<'de> serde::Deserialize<'de> for Box<dyn HostDatastoreConnectInfoTrait> {
26808            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26809                deserializer.deserialize_map(HostDatastoreConnectInfoVisitor)
26810            }
26811        }
26812
26813struct HostDatastoreConnectInfoVisitor;
26814
26815impl<'de> de::Visitor<'de> for HostDatastoreConnectInfoVisitor {
26816    type Value = Box<dyn HostDatastoreConnectInfoTrait>;
26817
26818    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26819        formatter.write_str("a valid HostDatastoreConnectInfoTrait JSON object with a _typeName field")
26820    }
26821
26822    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26823    where
26824        A: de::MapAccess<'de>,
26825    {
26826        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26827        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26828        match any {
26829            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26830                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26831            VimAny::Value(value) => Err(de::Error::custom(format!(
26832                "expected object not wrapped value: {:?}",
26833                value))),
26834        }
26835    }
26836}
26837
26838impl HostDatastoreConnectInfoTrait for HostDatastoreConnectInfo {
26839    fn get_summary(&self) -> &super::structs::DatastoreSummary { &self.summary }
26840}
26841impl HostDatastoreConnectInfoTrait for HostDatastoreExistsConnectInfo {
26842    fn get_summary(&self) -> &super::structs::DatastoreSummary { &self.summary }
26843}
26844impl HostDatastoreConnectInfoTrait for HostDatastoreNameConflictConnectInfo {
26845    fn get_summary(&self) -> &super::structs::DatastoreSummary { &self.summary }
26846}
26847impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDatastoreConnectInfoTrait {
26848    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26849        let data_type = from.data_type();
26850        match data_type {
26851            StructType::HostDatastoreConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreConnectInfo>()?),
26852            StructType::HostDatastoreExistsConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreExistsConnectInfo>()?),
26853            StructType::HostDatastoreNameConflictConnectInfo => Some(from.as_any_ref().downcast_ref::<HostDatastoreNameConflictConnectInfo>()?),
26854            _ => None,
26855        }
26856    }
26857    
26858    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26859        let data_type = from.data_type();
26860        match data_type {
26861            StructType::HostDatastoreConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreConnectInfo>()?),
26862            StructType::HostDatastoreExistsConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreExistsConnectInfo>()?),
26863            StructType::HostDatastoreNameConflictConnectInfo => Ok(from.as_any_box().downcast::<HostDatastoreNameConflictConnectInfo>()?),
26864            _ => Err(from.as_any_box()),
26865        }
26866    }
26867}
26868/// The base data object type for information about networks on the host.
26869pub trait HostConnectInfoNetworkInfoTrait : super::traits::DataObjectTrait {
26870    /// Basic network information, such as network name.
26871    /// 
26872    /// The managed object reference
26873    /// is not set.
26874    fn get_summary(&self) -> &Box<dyn super::traits::NetworkSummaryTrait>;
26875}
26876impl<'s> serde::Serialize for dyn HostConnectInfoNetworkInfoTrait + 's {
26877            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26878            where
26879                S: serde::Serializer,
26880            {
26881                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26882            }
26883        }
26884impl<'de> serde::Deserialize<'de> for Box<dyn HostConnectInfoNetworkInfoTrait> {
26885            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26886                deserializer.deserialize_map(HostConnectInfoNetworkInfoVisitor)
26887            }
26888        }
26889
26890struct HostConnectInfoNetworkInfoVisitor;
26891
26892impl<'de> de::Visitor<'de> for HostConnectInfoNetworkInfoVisitor {
26893    type Value = Box<dyn HostConnectInfoNetworkInfoTrait>;
26894
26895    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26896        formatter.write_str("a valid HostConnectInfoNetworkInfoTrait JSON object with a _typeName field")
26897    }
26898
26899    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26900    where
26901        A: de::MapAccess<'de>,
26902    {
26903        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26904        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26905        match any {
26906            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26907                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26908            VimAny::Value(value) => Err(de::Error::custom(format!(
26909                "expected object not wrapped value: {:?}",
26910                value))),
26911        }
26912    }
26913}
26914
26915impl HostConnectInfoNetworkInfoTrait for HostConnectInfoNetworkInfo {
26916    fn get_summary(&self) -> &Box<dyn super::traits::NetworkSummaryTrait> { &self.summary }
26917}
26918impl HostConnectInfoNetworkInfoTrait for HostNewNetworkConnectInfo {
26919    fn get_summary(&self) -> &Box<dyn super::traits::NetworkSummaryTrait> { &self.summary }
26920}
26921impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostConnectInfoNetworkInfoTrait {
26922    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26923        let data_type = from.data_type();
26924        match data_type {
26925            StructType::HostConnectInfoNetworkInfo => Some(from.as_any_ref().downcast_ref::<HostConnectInfoNetworkInfo>()?),
26926            StructType::HostNewNetworkConnectInfo => Some(from.as_any_ref().downcast_ref::<HostNewNetworkConnectInfo>()?),
26927            _ => None,
26928        }
26929    }
26930    
26931    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
26932        let data_type = from.data_type();
26933        match data_type {
26934            StructType::HostConnectInfoNetworkInfo => Ok(from.as_any_box().downcast::<HostConnectInfoNetworkInfo>()?),
26935            StructType::HostNewNetworkConnectInfo => Ok(from.as_any_box().downcast::<HostNewNetworkConnectInfo>()?),
26936            _ => Err(from.as_any_box()),
26937        }
26938    }
26939}
26940/// DataTransportConnectionInfo contains common information about data transport
26941/// connections on a host.
26942/// 
26943/// ***Since:*** vSphere API Release 7.0.3.0
26944pub trait HostDataTransportConnectionInfoTrait : super::traits::DataObjectTrait {
26945    /// Static memory consumption by a connection in bytes like buffer sizes, heap sizes, etc.
26946    fn get_static_memory_consumed(&self) -> i64;
26947}
26948impl<'s> serde::Serialize for dyn HostDataTransportConnectionInfoTrait + 's {
26949            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
26950            where
26951                S: serde::Serializer,
26952            {
26953                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
26954            }
26955        }
26956impl<'de> serde::Deserialize<'de> for Box<dyn HostDataTransportConnectionInfoTrait> {
26957            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
26958                deserializer.deserialize_map(HostDataTransportConnectionInfoVisitor)
26959            }
26960        }
26961
26962struct HostDataTransportConnectionInfoVisitor;
26963
26964impl<'de> de::Visitor<'de> for HostDataTransportConnectionInfoVisitor {
26965    type Value = Box<dyn HostDataTransportConnectionInfoTrait>;
26966
26967    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26968        formatter.write_str("a valid HostDataTransportConnectionInfoTrait JSON object with a _typeName field")
26969    }
26970
26971    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
26972    where
26973        A: de::MapAccess<'de>,
26974    {
26975        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
26976        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
26977        match any {
26978            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
26979                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
26980            VimAny::Value(value) => Err(de::Error::custom(format!(
26981                "expected object not wrapped value: {:?}",
26982                value))),
26983        }
26984    }
26985}
26986
26987impl HostDataTransportConnectionInfoTrait for HostDataTransportConnectionInfo {
26988    fn get_static_memory_consumed(&self) -> i64 { self.static_memory_consumed }
26989}
26990impl HostDataTransportConnectionInfoTrait for HostNfcConnectionInfo {
26991    fn get_static_memory_consumed(&self) -> i64 { self.static_memory_consumed }
26992}
26993impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDataTransportConnectionInfoTrait {
26994    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
26995        let data_type = from.data_type();
26996        match data_type {
26997            StructType::HostDataTransportConnectionInfo => Some(from.as_any_ref().downcast_ref::<HostDataTransportConnectionInfo>()?),
26998            StructType::HostNfcConnectionInfo => Some(from.as_any_ref().downcast_ref::<HostNfcConnectionInfo>()?),
26999            _ => None,
27000        }
27001    }
27002    
27003    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27004        let data_type = from.data_type();
27005        match data_type {
27006            StructType::HostDataTransportConnectionInfo => Ok(from.as_any_box().downcast::<HostDataTransportConnectionInfo>()?),
27007            StructType::HostNfcConnectionInfo => Ok(from.as_any_box().downcast::<HostNfcConnectionInfo>()?),
27008            _ => Err(from.as_any_box()),
27009        }
27010    }
27011}
27012/// This data object type contains rudimentary information about a file in a
27013/// datastore.
27014/// 
27015/// The information here is not meant to cover all information in
27016/// traditional file systems, but rather to provide sufficient information for files
27017/// that are associated with virtual machines. Derived types describe the known file
27018/// types for a datastore.
27019pub trait FileInfoTrait : super::traits::DataObjectTrait {
27020    /// The path relative to the folder path in the search results.
27021    fn get_path(&self) -> &str;
27022    /// User friendly name.
27023    fn get_friendly_name(&self) -> &Option<String>;
27024    /// The size of the file in bytes.
27025    fn get_file_size(&self) -> Option<i64>;
27026    /// The last date and time the file was modified.
27027    fn get_modification(&self) -> &Option<String>;
27028    /// The user name of the owner of the file.
27029    fn get_owner(&self) -> &Option<String>;
27030}
27031impl<'s> serde::Serialize for dyn FileInfoTrait + 's {
27032            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27033            where
27034                S: serde::Serializer,
27035            {
27036                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27037            }
27038        }
27039impl<'de> serde::Deserialize<'de> for Box<dyn FileInfoTrait> {
27040            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27041                deserializer.deserialize_map(FileInfoVisitor)
27042            }
27043        }
27044
27045struct FileInfoVisitor;
27046
27047impl<'de> de::Visitor<'de> for FileInfoVisitor {
27048    type Value = Box<dyn FileInfoTrait>;
27049
27050    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27051        formatter.write_str("a valid FileInfoTrait JSON object with a _typeName field")
27052    }
27053
27054    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27055    where
27056        A: de::MapAccess<'de>,
27057    {
27058        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27059        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27060        match any {
27061            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27062                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27063            VimAny::Value(value) => Err(de::Error::custom(format!(
27064                "expected object not wrapped value: {:?}",
27065                value))),
27066        }
27067    }
27068}
27069
27070impl FileInfoTrait for FileInfo {
27071    fn get_path(&self) -> &str { &self.path }
27072    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27073    fn get_file_size(&self) -> Option<i64> { self.file_size }
27074    fn get_modification(&self) -> &Option<String> { &self.modification }
27075    fn get_owner(&self) -> &Option<String> { &self.owner }
27076}
27077impl FileInfoTrait for FloppyImageFileInfo {
27078    fn get_path(&self) -> &str { &self.path }
27079    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27080    fn get_file_size(&self) -> Option<i64> { self.file_size }
27081    fn get_modification(&self) -> &Option<String> { &self.modification }
27082    fn get_owner(&self) -> &Option<String> { &self.owner }
27083}
27084impl FileInfoTrait for FolderFileInfo {
27085    fn get_path(&self) -> &str { &self.path }
27086    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27087    fn get_file_size(&self) -> Option<i64> { self.file_size }
27088    fn get_modification(&self) -> &Option<String> { &self.modification }
27089    fn get_owner(&self) -> &Option<String> { &self.owner }
27090}
27091impl FileInfoTrait for IsoImageFileInfo {
27092    fn get_path(&self) -> &str { &self.path }
27093    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27094    fn get_file_size(&self) -> Option<i64> { self.file_size }
27095    fn get_modification(&self) -> &Option<String> { &self.modification }
27096    fn get_owner(&self) -> &Option<String> { &self.owner }
27097}
27098impl FileInfoTrait for VmConfigFileInfo {
27099    fn get_path(&self) -> &str { &self.path }
27100    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27101    fn get_file_size(&self) -> Option<i64> { self.file_size }
27102    fn get_modification(&self) -> &Option<String> { &self.modification }
27103    fn get_owner(&self) -> &Option<String> { &self.owner }
27104}
27105impl FileInfoTrait for TemplateConfigFileInfo {
27106    fn get_path(&self) -> &str { &self.path }
27107    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27108    fn get_file_size(&self) -> Option<i64> { self.file_size }
27109    fn get_modification(&self) -> &Option<String> { &self.modification }
27110    fn get_owner(&self) -> &Option<String> { &self.owner }
27111}
27112impl FileInfoTrait for VmDiskFileInfo {
27113    fn get_path(&self) -> &str { &self.path }
27114    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27115    fn get_file_size(&self) -> Option<i64> { self.file_size }
27116    fn get_modification(&self) -> &Option<String> { &self.modification }
27117    fn get_owner(&self) -> &Option<String> { &self.owner }
27118}
27119impl FileInfoTrait for VmLogFileInfo {
27120    fn get_path(&self) -> &str { &self.path }
27121    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27122    fn get_file_size(&self) -> Option<i64> { self.file_size }
27123    fn get_modification(&self) -> &Option<String> { &self.modification }
27124    fn get_owner(&self) -> &Option<String> { &self.owner }
27125}
27126impl FileInfoTrait for VmNvramFileInfo {
27127    fn get_path(&self) -> &str { &self.path }
27128    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27129    fn get_file_size(&self) -> Option<i64> { self.file_size }
27130    fn get_modification(&self) -> &Option<String> { &self.modification }
27131    fn get_owner(&self) -> &Option<String> { &self.owner }
27132}
27133impl FileInfoTrait for VmSnapshotFileInfo {
27134    fn get_path(&self) -> &str { &self.path }
27135    fn get_friendly_name(&self) -> &Option<String> { &self.friendly_name }
27136    fn get_file_size(&self) -> Option<i64> { self.file_size }
27137    fn get_modification(&self) -> &Option<String> { &self.modification }
27138    fn get_owner(&self) -> &Option<String> { &self.owner }
27139}
27140impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FileInfoTrait {
27141    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27142        let data_type = from.data_type();
27143        match data_type {
27144            StructType::FileInfo => Some(from.as_any_ref().downcast_ref::<FileInfo>()?),
27145            StructType::FloppyImageFileInfo => Some(from.as_any_ref().downcast_ref::<FloppyImageFileInfo>()?),
27146            StructType::FolderFileInfo => Some(from.as_any_ref().downcast_ref::<FolderFileInfo>()?),
27147            StructType::IsoImageFileInfo => Some(from.as_any_ref().downcast_ref::<IsoImageFileInfo>()?),
27148            StructType::VmConfigFileInfo => Some(from.as_any_ref().downcast_ref::<VmConfigFileInfo>()?),
27149            StructType::TemplateConfigFileInfo => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileInfo>()?),
27150            StructType::VmDiskFileInfo => Some(from.as_any_ref().downcast_ref::<VmDiskFileInfo>()?),
27151            StructType::VmLogFileInfo => Some(from.as_any_ref().downcast_ref::<VmLogFileInfo>()?),
27152            StructType::VmNvramFileInfo => Some(from.as_any_ref().downcast_ref::<VmNvramFileInfo>()?),
27153            StructType::VmSnapshotFileInfo => Some(from.as_any_ref().downcast_ref::<VmSnapshotFileInfo>()?),
27154            _ => None,
27155        }
27156    }
27157    
27158    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27159        let data_type = from.data_type();
27160        match data_type {
27161            StructType::FileInfo => Ok(from.as_any_box().downcast::<FileInfo>()?),
27162            StructType::FloppyImageFileInfo => Ok(from.as_any_box().downcast::<FloppyImageFileInfo>()?),
27163            StructType::FolderFileInfo => Ok(from.as_any_box().downcast::<FolderFileInfo>()?),
27164            StructType::IsoImageFileInfo => Ok(from.as_any_box().downcast::<IsoImageFileInfo>()?),
27165            StructType::VmConfigFileInfo => Ok(from.as_any_box().downcast::<VmConfigFileInfo>()?),
27166            StructType::TemplateConfigFileInfo => Ok(from.as_any_box().downcast::<TemplateConfigFileInfo>()?),
27167            StructType::VmDiskFileInfo => Ok(from.as_any_box().downcast::<VmDiskFileInfo>()?),
27168            StructType::VmLogFileInfo => Ok(from.as_any_box().downcast::<VmLogFileInfo>()?),
27169            StructType::VmNvramFileInfo => Ok(from.as_any_box().downcast::<VmNvramFileInfo>()?),
27170            StructType::VmSnapshotFileInfo => Ok(from.as_any_box().downcast::<VmSnapshotFileInfo>()?),
27171            _ => Err(from.as_any_box()),
27172        }
27173    }
27174}
27175/// This data object type describes a virtual machine configuration file.
27176pub trait VmConfigFileInfoTrait : super::traits::FileInfoTrait {
27177    fn get_config_version(&self) -> Option<i32>;
27178    /// The encryption information of the virtual machine
27179    /// configuration file.
27180    /// 
27181    /// If encryption was selected in VmConfigFileQueryFlags then this
27182    /// field is always set. Inspect the VmConfigEncryptionInfo to
27183    /// determine if the virtual machine configuration file is encrypted.
27184    fn get_encryption(&self) -> &Option<super::structs::VmConfigFileEncryptionInfo>;
27185}
27186impl<'s> serde::Serialize for dyn VmConfigFileInfoTrait + 's {
27187            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27188            where
27189                S: serde::Serializer,
27190            {
27191                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27192            }
27193        }
27194impl<'de> serde::Deserialize<'de> for Box<dyn VmConfigFileInfoTrait> {
27195            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27196                deserializer.deserialize_map(VmConfigFileInfoVisitor)
27197            }
27198        }
27199
27200struct VmConfigFileInfoVisitor;
27201
27202impl<'de> de::Visitor<'de> for VmConfigFileInfoVisitor {
27203    type Value = Box<dyn VmConfigFileInfoTrait>;
27204
27205    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27206        formatter.write_str("a valid VmConfigFileInfoTrait JSON object with a _typeName field")
27207    }
27208
27209    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27210    where
27211        A: de::MapAccess<'de>,
27212    {
27213        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27214        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27215        match any {
27216            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27217                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27218            VimAny::Value(value) => Err(de::Error::custom(format!(
27219                "expected object not wrapped value: {:?}",
27220                value))),
27221        }
27222    }
27223}
27224
27225impl VmConfigFileInfoTrait for VmConfigFileInfo {
27226    fn get_config_version(&self) -> Option<i32> { self.config_version }
27227    fn get_encryption(&self) -> &Option<super::structs::VmConfigFileEncryptionInfo> { &self.encryption }
27228}
27229impl VmConfigFileInfoTrait for TemplateConfigFileInfo {
27230    fn get_config_version(&self) -> Option<i32> { self.config_version }
27231    fn get_encryption(&self) -> &Option<super::structs::VmConfigFileEncryptionInfo> { &self.encryption }
27232}
27233impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmConfigFileInfoTrait {
27234    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27235        let data_type = from.data_type();
27236        match data_type {
27237            StructType::VmConfigFileInfo => Some(from.as_any_ref().downcast_ref::<VmConfigFileInfo>()?),
27238            StructType::TemplateConfigFileInfo => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileInfo>()?),
27239            _ => None,
27240        }
27241    }
27242    
27243    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27244        let data_type = from.data_type();
27245        match data_type {
27246            StructType::VmConfigFileInfo => Ok(from.as_any_box().downcast::<VmConfigFileInfo>()?),
27247            StructType::TemplateConfigFileInfo => Ok(from.as_any_box().downcast::<TemplateConfigFileInfo>()?),
27248            _ => Err(from.as_any_box()),
27249        }
27250    }
27251}
27252/// The data object type that describes the base query specification.
27253/// 
27254/// Contains query
27255/// filters and details that apply to every file. Querying only file details generally
27256/// does not require opening files and so is an efficient query. Derived types add
27257/// query parameters specific to the type of file.
27258pub trait FileQueryTrait : super::traits::DataObjectTrait {
27259}
27260impl<'s> serde::Serialize for dyn FileQueryTrait + 's {
27261            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27262            where
27263                S: serde::Serializer,
27264            {
27265                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27266            }
27267        }
27268impl<'de> serde::Deserialize<'de> for Box<dyn FileQueryTrait> {
27269            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27270                deserializer.deserialize_map(FileQueryVisitor)
27271            }
27272        }
27273
27274struct FileQueryVisitor;
27275
27276impl<'de> de::Visitor<'de> for FileQueryVisitor {
27277    type Value = Box<dyn FileQueryTrait>;
27278
27279    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27280        formatter.write_str("a valid FileQueryTrait JSON object with a _typeName field")
27281    }
27282
27283    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27284    where
27285        A: de::MapAccess<'de>,
27286    {
27287        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27288        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27289        match any {
27290            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27291                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27292            VimAny::Value(value) => Err(de::Error::custom(format!(
27293                "expected object not wrapped value: {:?}",
27294                value))),
27295        }
27296    }
27297}
27298
27299impl FileQueryTrait for FileQuery {
27300}
27301impl FileQueryTrait for FloppyImageFileQuery {
27302}
27303impl FileQueryTrait for FolderFileQuery {
27304}
27305impl FileQueryTrait for IsoImageFileQuery {
27306}
27307impl FileQueryTrait for VmConfigFileQuery {
27308}
27309impl FileQueryTrait for TemplateConfigFileQuery {
27310}
27311impl FileQueryTrait for VmDiskFileQuery {
27312}
27313impl FileQueryTrait for VmLogFileQuery {
27314}
27315impl FileQueryTrait for VmNvramFileQuery {
27316}
27317impl FileQueryTrait for VmSnapshotFileQuery {
27318}
27319impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FileQueryTrait {
27320    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27321        let data_type = from.data_type();
27322        match data_type {
27323            StructType::FileQuery => Some(from.as_any_ref().downcast_ref::<FileQuery>()?),
27324            StructType::FloppyImageFileQuery => Some(from.as_any_ref().downcast_ref::<FloppyImageFileQuery>()?),
27325            StructType::FolderFileQuery => Some(from.as_any_ref().downcast_ref::<FolderFileQuery>()?),
27326            StructType::IsoImageFileQuery => Some(from.as_any_ref().downcast_ref::<IsoImageFileQuery>()?),
27327            StructType::VmConfigFileQuery => Some(from.as_any_ref().downcast_ref::<VmConfigFileQuery>()?),
27328            StructType::TemplateConfigFileQuery => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileQuery>()?),
27329            StructType::VmDiskFileQuery => Some(from.as_any_ref().downcast_ref::<VmDiskFileQuery>()?),
27330            StructType::VmLogFileQuery => Some(from.as_any_ref().downcast_ref::<VmLogFileQuery>()?),
27331            StructType::VmNvramFileQuery => Some(from.as_any_ref().downcast_ref::<VmNvramFileQuery>()?),
27332            StructType::VmSnapshotFileQuery => Some(from.as_any_ref().downcast_ref::<VmSnapshotFileQuery>()?),
27333            _ => None,
27334        }
27335    }
27336    
27337    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27338        let data_type = from.data_type();
27339        match data_type {
27340            StructType::FileQuery => Ok(from.as_any_box().downcast::<FileQuery>()?),
27341            StructType::FloppyImageFileQuery => Ok(from.as_any_box().downcast::<FloppyImageFileQuery>()?),
27342            StructType::FolderFileQuery => Ok(from.as_any_box().downcast::<FolderFileQuery>()?),
27343            StructType::IsoImageFileQuery => Ok(from.as_any_box().downcast::<IsoImageFileQuery>()?),
27344            StructType::VmConfigFileQuery => Ok(from.as_any_box().downcast::<VmConfigFileQuery>()?),
27345            StructType::TemplateConfigFileQuery => Ok(from.as_any_box().downcast::<TemplateConfigFileQuery>()?),
27346            StructType::VmDiskFileQuery => Ok(from.as_any_box().downcast::<VmDiskFileQuery>()?),
27347            StructType::VmLogFileQuery => Ok(from.as_any_box().downcast::<VmLogFileQuery>()?),
27348            StructType::VmNvramFileQuery => Ok(from.as_any_box().downcast::<VmNvramFileQuery>()?),
27349            StructType::VmSnapshotFileQuery => Ok(from.as_any_box().downcast::<VmSnapshotFileQuery>()?),
27350            _ => Err(from.as_any_box()),
27351        }
27352    }
27353}
27354/// This data object type describes query specification for the virtual machine
27355/// configuration file.
27356pub trait VmConfigFileQueryTrait : super::traits::FileQueryTrait {
27357    /// The filter specification for the virtual machine configuration file query.
27358    fn get_filter(&self) -> &Option<super::structs::VmConfigFileQueryFilter>;
27359    /// The details specification for the virtual machine configuration file query.
27360    fn get_details(&self) -> &Option<super::structs::VmConfigFileQueryFlags>;
27361}
27362impl<'s> serde::Serialize for dyn VmConfigFileQueryTrait + 's {
27363            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27364            where
27365                S: serde::Serializer,
27366            {
27367                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27368            }
27369        }
27370impl<'de> serde::Deserialize<'de> for Box<dyn VmConfigFileQueryTrait> {
27371            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27372                deserializer.deserialize_map(VmConfigFileQueryVisitor)
27373            }
27374        }
27375
27376struct VmConfigFileQueryVisitor;
27377
27378impl<'de> de::Visitor<'de> for VmConfigFileQueryVisitor {
27379    type Value = Box<dyn VmConfigFileQueryTrait>;
27380
27381    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27382        formatter.write_str("a valid VmConfigFileQueryTrait JSON object with a _typeName field")
27383    }
27384
27385    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27386    where
27387        A: de::MapAccess<'de>,
27388    {
27389        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27390        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27391        match any {
27392            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27393                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27394            VimAny::Value(value) => Err(de::Error::custom(format!(
27395                "expected object not wrapped value: {:?}",
27396                value))),
27397        }
27398    }
27399}
27400
27401impl VmConfigFileQueryTrait for VmConfigFileQuery {
27402    fn get_filter(&self) -> &Option<super::structs::VmConfigFileQueryFilter> { &self.filter }
27403    fn get_details(&self) -> &Option<super::structs::VmConfigFileQueryFlags> { &self.details }
27404}
27405impl VmConfigFileQueryTrait for TemplateConfigFileQuery {
27406    fn get_filter(&self) -> &Option<super::structs::VmConfigFileQueryFilter> { &self.filter }
27407    fn get_details(&self) -> &Option<super::structs::VmConfigFileQueryFlags> { &self.details }
27408}
27409impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmConfigFileQueryTrait {
27410    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27411        let data_type = from.data_type();
27412        match data_type {
27413            StructType::VmConfigFileQuery => Some(from.as_any_ref().downcast_ref::<VmConfigFileQuery>()?),
27414            StructType::TemplateConfigFileQuery => Some(from.as_any_ref().downcast_ref::<TemplateConfigFileQuery>()?),
27415            _ => None,
27416        }
27417    }
27418    
27419    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27420        let data_type = from.data_type();
27421        match data_type {
27422            StructType::VmConfigFileQuery => Ok(from.as_any_box().downcast::<VmConfigFileQuery>()?),
27423            StructType::TemplateConfigFileQuery => Ok(from.as_any_box().downcast::<TemplateConfigFileQuery>()?),
27424            _ => Err(from.as_any_box()),
27425        }
27426    }
27427}
27428/// This data object type defines a device on the host.
27429pub trait HostDeviceTrait : super::traits::DataObjectTrait {
27430    /// The name of the device on the host.
27431    /// 
27432    /// For example,
27433    /// /dev/cdrom or \\\\serverX\\device\_name.
27434    fn get_device_name(&self) -> &str;
27435    /// Device type when available:
27436    /// floppy, mouse, cdrom, disk, scsi device, or adapter.
27437    fn get_device_type(&self) -> &str;
27438}
27439impl<'s> serde::Serialize for dyn HostDeviceTrait + 's {
27440            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27441            where
27442                S: serde::Serializer,
27443            {
27444                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27445            }
27446        }
27447impl<'de> serde::Deserialize<'de> for Box<dyn HostDeviceTrait> {
27448            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27449                deserializer.deserialize_map(HostDeviceVisitor)
27450            }
27451        }
27452
27453struct HostDeviceVisitor;
27454
27455impl<'de> de::Visitor<'de> for HostDeviceVisitor {
27456    type Value = Box<dyn HostDeviceTrait>;
27457
27458    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27459        formatter.write_str("a valid HostDeviceTrait JSON object with a _typeName field")
27460    }
27461
27462    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27463    where
27464        A: de::MapAccess<'de>,
27465    {
27466        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27467        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27468        match any {
27469            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27470                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27471            VimAny::Value(value) => Err(de::Error::custom(format!(
27472                "expected object not wrapped value: {:?}",
27473                value))),
27474        }
27475    }
27476}
27477
27478impl HostDeviceTrait for HostDevice {
27479    fn get_device_name(&self) -> &str { &self.device_name }
27480    fn get_device_type(&self) -> &str { &self.device_type }
27481}
27482impl HostDeviceTrait for ScsiLun {
27483    fn get_device_name(&self) -> &str { &self.device_name }
27484    fn get_device_type(&self) -> &str { &self.device_type }
27485}
27486impl HostDeviceTrait for HostScsiDisk {
27487    fn get_device_name(&self) -> &str { &self.device_name }
27488    fn get_device_type(&self) -> &str { &self.device_type }
27489}
27490impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDeviceTrait {
27491    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27492        let data_type = from.data_type();
27493        match data_type {
27494            StructType::HostDevice => Some(from.as_any_ref().downcast_ref::<HostDevice>()?),
27495            StructType::ScsiLun => Some(from.as_any_ref().downcast_ref::<ScsiLun>()?),
27496            StructType::HostScsiDisk => Some(from.as_any_ref().downcast_ref::<HostScsiDisk>()?),
27497            _ => None,
27498        }
27499    }
27500    
27501    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27502        let data_type = from.data_type();
27503        match data_type {
27504            StructType::HostDevice => Ok(from.as_any_box().downcast::<HostDevice>()?),
27505            StructType::ScsiLun => Ok(from.as_any_box().downcast::<ScsiLun>()?),
27506            StructType::HostScsiDisk => Ok(from.as_any_box().downcast::<HostScsiDisk>()?),
27507            _ => Err(from.as_any_box()),
27508        }
27509    }
27510}
27511/// The *ScsiLun* data object describes a SCSI logical unit.
27512/// 
27513/// A SCSI logical unit is a host device that an ESX Server or virtual machine
27514/// can use for I/O operations.
27515/// 
27516/// An ESX Server creates SCSI logical unit objects to represent
27517/// devices in the host configuration. (See the definition of
27518/// *ScsiLunType_enum* for a list of the supported device types.)
27519/// The vSphere API uses one of two object types to represent a SCSI
27520/// logical unit, depending on the device type.
27521/// - Disks containing file system volumes or parts of volumes for hosts
27522///   or raw disks for virtual machines. To represent disks, the ESX Server
27523///   creates a *HostScsiDisk* object, which inherits properties from
27524///   the *ScsiLun* base class.
27525/// - Other SCSI devices, for example SCSI passthrough devices
27526///   for virtual machines. To represent one of these devices,
27527///   the ESX Server creates a *ScsiLun* object.
27528///   
27529/// When the Server creates a *HostScsiDisk* or *ScsiLun* object,
27530/// it specifies a valid device name and type:
27531/// - *HostDevice.deviceName* - A string representing the name of the device
27532///   that is meaningful to the host. The following are some examples of
27533///   device names.  
27534///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>/dev/cdrom</code>  
27535///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>/vmkdev/vmhba0:0:1:0</code>  
27536///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>PhysicalDrive0</code>
27537/// - *HostDevice.deviceType* - A string describing the type of device.
27538///   The following are some examples of device types.  
27539///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>scsi-cdrom</code>  
27540///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>scsi-tape</code>  
27541///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>scsi-disk</code>  
27542///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>scsi-processor</code>  
27543///   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>scsi-unknown</code>
27544pub trait ScsiLunTrait : super::traits::HostDeviceTrait {
27545    /// Linkable identifier
27546    fn get_key(&self) -> &Option<String>;
27547    /// Universally unique identifier for the LUN used to identify ScsiLun across
27548    /// multiple servers.
27549    /// 
27550    /// This identifier can be used to identify analogous objects in other views
27551    /// such as *HostMultipathInfoLogicalUnit* and *HostScsiTopologyLun*.
27552    /// 
27553    /// See also *HostMultipathInfoLogicalUnit*, *HostScsiTopologyLun*.
27554    fn get_uuid(&self) -> &str;
27555    /// List of descriptors that can be used to identify the LUN object.
27556    /// 
27557    /// The
27558    /// uuid will also appear as a descriptor.
27559    /// 
27560    /// The id field in the descriptor is a string that can be used to correlate
27561    /// the ScsiLun across multiple servers. A ScsiLun may have multiple
27562    /// descriptors. The choice and order of these descriptors may be different
27563    /// on different servers.
27564    /// 
27565    /// Not all descriptors are suitable for correlation. Some descriptors are
27566    /// only sufficient to identify the ScsiLun within a single host. Each
27567    /// descriptor contains a quality property that indicates whether or not
27568    /// the descriptor is suitable for correlation.
27569    fn get_descriptor(&self) -> &Option<Vec<super::structs::ScsiLunDescriptor>>;
27570    /// Canonical name of the SCSI logical unit.
27571    /// 
27572    /// Disk partition or extent identifiers refer to this name when
27573    /// referring to a disk. Use this property to correlate a partition
27574    /// or extent to a specific SCSI disk.
27575    /// 
27576    /// See also *HostScsiDiskPartition.diskName*.
27577    fn get_canonical_name(&self) -> &Option<String>;
27578    /// User configurable display name of the SCSI logical unit.
27579    /// 
27580    /// A default
27581    /// display name will be used if available. If the display name is not
27582    /// supported, it will be unset. The display name does not have to be
27583    /// unique but it is recommended that it be unique.
27584    fn get_display_name(&self) -> &Option<String>;
27585    /// The type of SCSI device.
27586    /// 
27587    /// Must be one of the values of
27588    /// *ScsiLunType_enum*.
27589    fn get_lun_type(&self) -> &str;
27590    /// The vendor of the SCSI device.
27591    fn get_vendor(&self) -> &Option<String>;
27592    /// The model number of the SCSI device.
27593    fn get_model(&self) -> &Option<String>;
27594    /// The revision of the SCSI device.
27595    fn get_revision(&self) -> &Option<String>;
27596    /// The SCSI level of the SCSI device.
27597    fn get_scsi_level(&self) -> Option<i32>;
27598    /// The serial number of the SCSI device.
27599    /// 
27600    /// For a device that is SCSI-3 compliant, this property is derived
27601    /// from page 80h of the Vital Product Data (VPD), as defined by the
27602    /// SCSI-3 Primary Commands (SPC-3) spec. Not all SCSI-3 compliant
27603    /// devices provide this information. For devices that are not
27604    /// SCSI-3 compliant, this property is not defined.
27605    fn get_serial_number(&self) -> &Option<String>;
27606    /// The durable name of the SCSI device.
27607    /// 
27608    /// For a SCSI-3 compliant device this property is derived from the
27609    /// payloads of pages 80h and 83h of the Vital Product Data (VPD) as
27610    /// defined by the T10 and SMI standards. For devices that do not provide
27611    /// this information, this property is not defined.
27612    fn get_durable_name(&self) -> &Option<super::structs::ScsiLunDurableName>;
27613    /// Alternate durable names.
27614    /// 
27615    /// Records all available durable names derived from page 80h of the Vital
27616    /// Product Data (VPD) and the Identification Vital Product Data (VPD) page
27617    /// 83h as defined by the SCSI-3 Primary Commands. For devices that are not
27618    /// SCSI-3 compliant this property is not defined.
27619    fn get_alternate_name(&self) -> &Option<Vec<super::structs::ScsiLunDurableName>>;
27620    /// Standard Inquiry payload.
27621    /// 
27622    /// For a SCSI-3 compliant device this property is derived from the
27623    /// standard inquiry data. For devices that are not SCSI-3 compliant this
27624    /// property is not defined.
27625    fn get_standard_inquiry(&self) -> &Option<Vec<i8>>;
27626    /// The queue depth of SCSI device.
27627    fn get_queue_depth(&self) -> Option<i32>;
27628    /// The operational states of the LUN.
27629    /// 
27630    /// When more than one item is present in the array, the first state
27631    /// should be considered the primary state. For example, a LUN may
27632    /// be "ok" and "degraded" indicating I/O is still possible to the LUN, but
27633    /// it is operating in a degraded mode.
27634    /// 
27635    /// See also *ScsiLunState_enum*.
27636    fn get_operational_state(&self) -> &Vec<String>;
27637    /// Capabilities of SCSI device.
27638    fn get_capabilities(&self) -> &Option<super::structs::ScsiLunCapabilities>;
27639    /// vStorage hardware acceleration support status.
27640    /// 
27641    /// This property
27642    /// represents storage acceleration provided by the SCSI logical unit.
27643    /// See *ScsiLunVStorageSupportStatus_enum* for valid values.
27644    /// 
27645    /// If a storage device supports hardware acceleration,
27646    /// the ESX host can offload specific virtual machine management
27647    /// operations to the storage device. With hardware assistance,
27648    /// the host performs storage operations faster and consumes
27649    /// less CPU, memory, and storage fabric bandwidth.
27650    /// 
27651    /// For vSphere 4.0 or earlier hosts, this value will be unset.
27652    fn get_v_storage_support(&self) -> &Option<String>;
27653    /// Indicates that this SCSI LUN is protocol endpoint.
27654    /// 
27655    /// This
27656    /// property will be populated if and only if host supports
27657    /// VirtualVolume based Datastore. Check the host capability
27658    /// *HostCapability.virtualVolumeDatastoreSupported*.
27659    /// See *HostProtocolEndpoint*.
27660    fn get_protocol_endpoint(&self) -> Option<bool>;
27661    /// Indicates the state of a perennially reserved flag for a LUN.
27662    /// 
27663    /// If
27664    /// set for Raw Device Mapped (RDM) LUNs, the host startup or LUN rescan
27665    /// take comparatively shorter duration than when it is unset.
27666    fn get_perennially_reserved(&self) -> Option<bool>;
27667    /// Indicates if LUN has the prequisite properties to enable Clustered Vmdk
27668    /// feature once formatted into VMFS Datastore.
27669    fn get_clustered_vmdk_supported(&self) -> Option<bool>;
27670    /// Indicates the current device protocol.
27671    /// 
27672    /// Application protocol for a device which is set based on input
27673    /// from vmkctl storage control plane. Must be one of the values of
27674    /// *DeviceProtocol_enum*.
27675    /// 
27676    /// ***Since:*** vSphere API Release 8.0.1.0
27677    fn get_application_protocol(&self) -> &Option<String>;
27678    /// Indicates whether namespace is dispersed.
27679    /// 
27680    /// Set to true when the namespace of LUN is dispersed.
27681    /// 
27682    /// ***Since:*** vSphere API Release 8.0.1.0
27683    fn get_dispersed_ns(&self) -> Option<bool>;
27684    /// Indicates whether a device is under SCSI/NVMe reservation.
27685    /// 
27686    /// Device reservation for a SCSI/NVMe device set based on
27687    /// values received from vmkernel. The list of supported values is defined in
27688    /// *ScsiLunLunReservationStatus_enum*.
27689    /// If unset, the reservation status is unknown.
27690    /// 
27691    /// ***Since:*** vSphere API Release 8.0.3.0
27692    fn get_device_reservation(&self) -> &Option<String>;
27693}
27694impl<'s> serde::Serialize for dyn ScsiLunTrait + 's {
27695            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27696            where
27697                S: serde::Serializer,
27698            {
27699                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27700            }
27701        }
27702impl<'de> serde::Deserialize<'de> for Box<dyn ScsiLunTrait> {
27703            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27704                deserializer.deserialize_map(ScsiLunVisitor)
27705            }
27706        }
27707
27708struct ScsiLunVisitor;
27709
27710impl<'de> de::Visitor<'de> for ScsiLunVisitor {
27711    type Value = Box<dyn ScsiLunTrait>;
27712
27713    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27714        formatter.write_str("a valid ScsiLunTrait JSON object with a _typeName field")
27715    }
27716
27717    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27718    where
27719        A: de::MapAccess<'de>,
27720    {
27721        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27722        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27723        match any {
27724            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27725                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27726            VimAny::Value(value) => Err(de::Error::custom(format!(
27727                "expected object not wrapped value: {:?}",
27728                value))),
27729        }
27730    }
27731}
27732
27733impl ScsiLunTrait for ScsiLun {
27734    fn get_key(&self) -> &Option<String> { &self.key }
27735    fn get_uuid(&self) -> &str { &self.uuid }
27736    fn get_descriptor(&self) -> &Option<Vec<super::structs::ScsiLunDescriptor>> { &self.descriptor }
27737    fn get_canonical_name(&self) -> &Option<String> { &self.canonical_name }
27738    fn get_display_name(&self) -> &Option<String> { &self.display_name }
27739    fn get_lun_type(&self) -> &str { &self.lun_type }
27740    fn get_vendor(&self) -> &Option<String> { &self.vendor }
27741    fn get_model(&self) -> &Option<String> { &self.model }
27742    fn get_revision(&self) -> &Option<String> { &self.revision }
27743    fn get_scsi_level(&self) -> Option<i32> { self.scsi_level }
27744    fn get_serial_number(&self) -> &Option<String> { &self.serial_number }
27745    fn get_durable_name(&self) -> &Option<super::structs::ScsiLunDurableName> { &self.durable_name }
27746    fn get_alternate_name(&self) -> &Option<Vec<super::structs::ScsiLunDurableName>> { &self.alternate_name }
27747    fn get_standard_inquiry(&self) -> &Option<Vec<i8>> { &self.standard_inquiry }
27748    fn get_queue_depth(&self) -> Option<i32> { self.queue_depth }
27749    fn get_operational_state(&self) -> &Vec<String> { &self.operational_state }
27750    fn get_capabilities(&self) -> &Option<super::structs::ScsiLunCapabilities> { &self.capabilities }
27751    fn get_v_storage_support(&self) -> &Option<String> { &self.v_storage_support }
27752    fn get_protocol_endpoint(&self) -> Option<bool> { self.protocol_endpoint }
27753    fn get_perennially_reserved(&self) -> Option<bool> { self.perennially_reserved }
27754    fn get_clustered_vmdk_supported(&self) -> Option<bool> { self.clustered_vmdk_supported }
27755    fn get_application_protocol(&self) -> &Option<String> { &self.application_protocol }
27756    fn get_dispersed_ns(&self) -> Option<bool> { self.dispersed_ns }
27757    fn get_device_reservation(&self) -> &Option<String> { &self.device_reservation }
27758}
27759impl ScsiLunTrait for HostScsiDisk {
27760    fn get_key(&self) -> &Option<String> { &self.key }
27761    fn get_uuid(&self) -> &str { &self.uuid }
27762    fn get_descriptor(&self) -> &Option<Vec<super::structs::ScsiLunDescriptor>> { &self.descriptor }
27763    fn get_canonical_name(&self) -> &Option<String> { &self.canonical_name }
27764    fn get_display_name(&self) -> &Option<String> { &self.display_name }
27765    fn get_lun_type(&self) -> &str { &self.lun_type }
27766    fn get_vendor(&self) -> &Option<String> { &self.vendor }
27767    fn get_model(&self) -> &Option<String> { &self.model }
27768    fn get_revision(&self) -> &Option<String> { &self.revision }
27769    fn get_scsi_level(&self) -> Option<i32> { self.scsi_level }
27770    fn get_serial_number(&self) -> &Option<String> { &self.serial_number }
27771    fn get_durable_name(&self) -> &Option<super::structs::ScsiLunDurableName> { &self.durable_name }
27772    fn get_alternate_name(&self) -> &Option<Vec<super::structs::ScsiLunDurableName>> { &self.alternate_name }
27773    fn get_standard_inquiry(&self) -> &Option<Vec<i8>> { &self.standard_inquiry }
27774    fn get_queue_depth(&self) -> Option<i32> { self.queue_depth }
27775    fn get_operational_state(&self) -> &Vec<String> { &self.operational_state }
27776    fn get_capabilities(&self) -> &Option<super::structs::ScsiLunCapabilities> { &self.capabilities }
27777    fn get_v_storage_support(&self) -> &Option<String> { &self.v_storage_support }
27778    fn get_protocol_endpoint(&self) -> Option<bool> { self.protocol_endpoint }
27779    fn get_perennially_reserved(&self) -> Option<bool> { self.perennially_reserved }
27780    fn get_clustered_vmdk_supported(&self) -> Option<bool> { self.clustered_vmdk_supported }
27781    fn get_application_protocol(&self) -> &Option<String> { &self.application_protocol }
27782    fn get_dispersed_ns(&self) -> Option<bool> { self.dispersed_ns }
27783    fn get_device_reservation(&self) -> &Option<String> { &self.device_reservation }
27784}
27785impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ScsiLunTrait {
27786    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27787        let data_type = from.data_type();
27788        match data_type {
27789            StructType::ScsiLun => Some(from.as_any_ref().downcast_ref::<ScsiLun>()?),
27790            StructType::HostScsiDisk => Some(from.as_any_ref().downcast_ref::<HostScsiDisk>()?),
27791            _ => None,
27792        }
27793    }
27794    
27795    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27796        let data_type = from.data_type();
27797        match data_type {
27798            StructType::ScsiLun => Ok(from.as_any_box().downcast::<ScsiLun>()?),
27799            StructType::HostScsiDisk => Ok(from.as_any_box().downcast::<HostScsiDisk>()?),
27800            _ => Err(from.as_any_box()),
27801        }
27802    }
27803}
27804/// This data object type describes the digest information
27805pub trait HostDigestInfoTrait : super::traits::DataObjectTrait {
27806    /// Method in which the digest value is calculated.
27807    /// 
27808    /// The set of possible
27809    /// values is described in *HostDigestInfoDigestMethodType_enum*.
27810    fn get_digest_method(&self) -> &str;
27811    /// The variable length byte array containing the digest value calculated by
27812    /// the specified digestMethod.
27813    fn get_digest_value(&self) -> &Vec<i8>;
27814    /// The name of the object from which this digest value is calcaulated.
27815    fn get_object_name(&self) -> &Option<String>;
27816}
27817impl<'s> serde::Serialize for dyn HostDigestInfoTrait + 's {
27818            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27819            where
27820                S: serde::Serializer,
27821            {
27822                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27823            }
27824        }
27825impl<'de> serde::Deserialize<'de> for Box<dyn HostDigestInfoTrait> {
27826            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27827                deserializer.deserialize_map(HostDigestInfoVisitor)
27828            }
27829        }
27830
27831struct HostDigestInfoVisitor;
27832
27833impl<'de> de::Visitor<'de> for HostDigestInfoVisitor {
27834    type Value = Box<dyn HostDigestInfoTrait>;
27835
27836    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27837        formatter.write_str("a valid HostDigestInfoTrait JSON object with a _typeName field")
27838    }
27839
27840    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27841    where
27842        A: de::MapAccess<'de>,
27843    {
27844        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27845        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27846        match any {
27847            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27848                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27849            VimAny::Value(value) => Err(de::Error::custom(format!(
27850                "expected object not wrapped value: {:?}",
27851                value))),
27852        }
27853    }
27854}
27855
27856impl HostDigestInfoTrait for HostDigestInfo {
27857    fn get_digest_method(&self) -> &str { &self.digest_method }
27858    fn get_digest_value(&self) -> &Vec<i8> { &self.digest_value }
27859    fn get_object_name(&self) -> &Option<String> { &self.object_name }
27860}
27861impl HostDigestInfoTrait for HostTpmDigestInfo {
27862    fn get_digest_method(&self) -> &str { &self.digest_method }
27863    fn get_digest_value(&self) -> &Vec<i8> { &self.digest_value }
27864    fn get_object_name(&self) -> &Option<String> { &self.object_name }
27865}
27866impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDigestInfoTrait {
27867    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
27868        let data_type = from.data_type();
27869        match data_type {
27870            StructType::HostDigestInfo => Some(from.as_any_ref().downcast_ref::<HostDigestInfo>()?),
27871            StructType::HostTpmDigestInfo => Some(from.as_any_ref().downcast_ref::<HostTpmDigestInfo>()?),
27872            _ => None,
27873        }
27874    }
27875    
27876    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
27877        let data_type = from.data_type();
27878        match data_type {
27879            StructType::HostDigestInfo => Ok(from.as_any_box().downcast::<HostDigestInfo>()?),
27880            StructType::HostTpmDigestInfo => Ok(from.as_any_box().downcast::<HostTpmDigestInfo>()?),
27881            _ => Err(from.as_any_box()),
27882        }
27883    }
27884}
27885/// This data object type describes the DNS configuration.
27886/// 
27887/// All IPv4 addresses, subnet addresses, and netmasks are specified using
27888/// dotted decimal notation. For example, "192.0.2.1".
27889/// IPv6 addresses are 128-bit addresses represented as
27890/// eight fields of up to four hexadecimal digits.
27891/// A colon separates each field (:). For example,
27892/// 2001:DB8:101::230:6eff:fe04:d9ff. The address can also consist of the
27893/// symbol '::' to represent multiple 16-bit groups of
27894/// contiguous 0's only once in an address as described in RFC 2373.
27895pub trait HostDnsConfigTrait : super::traits::DataObjectTrait {
27896    /// The flag to indicate whether or not DHCP (dynamic host control
27897    /// protocol) is used to determine DNS configuration automatically.
27898    fn get_dhcp(&self) -> bool;
27899    /// If DHCP is enabled, the DHCP DNS of the vmkernel nic will override
27900    /// the system's DNS.
27901    /// 
27902    /// This field applies to both IPv4 and IPv6 DNS settings
27903    /// if *ipv6VirtualNicDevice*
27904    /// is unset, otherwise it is applicable only for IPv4 setting.
27905    /// This field is ignored if DHCP is disabled by the
27906    /// *dhcp* property.
27907    fn get_virtual_nic_device(&self) -> &Option<String>;
27908    /// If DHCP is enabled, the IPv6 DHCP DNS of the vmkernel nic will override
27909    /// the system's IPv6 DNS.
27910    /// 
27911    /// This field is ignored if DHCP is disabled by the
27912    /// *dhcp* property.
27913    fn get_ipv_6_virtual_nic_device(&self) -> &Option<String>;
27914    /// The host name portion of DNS name.
27915    /// 
27916    /// For example, "esx01".
27917    /// 
27918    /// **Note**: When DHCP is not enabled, the property can be set
27919    /// explicitly. When DHCP is enabled, the property reflects the current
27920    /// DNS configuration, but cannot be set.
27921    /// The hostName can't have character '.' in it when set explicitly.
27922    fn get_host_name(&self) -> &str;
27923    /// The domain name portion of the DNS name.
27924    /// 
27925    /// For example, "vmware.com".
27926    /// 
27927    /// **Note**: When DHCP is not enabled, the property can be set
27928    /// explicitly. When DHCP is enabled, the property reflects the current
27929    /// DNS configuration, but cannot be set.
27930    fn get_domain_name(&self) -> &str;
27931    /// The IP addresses of the DNS servers, placed in order of preference.
27932    /// 
27933    /// **Note**: When DHCP is not enabled, the property can be set
27934    /// explicitly. When DHCP is enabled, the property reflects the current
27935    /// DNS configuration, but cannot be set.
27936    fn get_address(&self) -> &Option<Vec<String>>;
27937    /// The domain in which to search for hosts, placed in order of preference.
27938    /// 
27939    /// **Note**: When DHCP is not enabled, the property can be set
27940    /// explicitly. When DHCP is enabled, the property reflects the current
27941    /// DNS configuration, but cannot be set.
27942    fn get_search_domain(&self) -> &Option<Vec<String>>;
27943}
27944impl<'s> serde::Serialize for dyn HostDnsConfigTrait + 's {
27945            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27946            where
27947                S: serde::Serializer,
27948            {
27949                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
27950            }
27951        }
27952impl<'de> serde::Deserialize<'de> for Box<dyn HostDnsConfigTrait> {
27953            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
27954                deserializer.deserialize_map(HostDnsConfigVisitor)
27955            }
27956        }
27957
27958struct HostDnsConfigVisitor;
27959
27960impl<'de> de::Visitor<'de> for HostDnsConfigVisitor {
27961    type Value = Box<dyn HostDnsConfigTrait>;
27962
27963    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27964        formatter.write_str("a valid HostDnsConfigTrait JSON object with a _typeName field")
27965    }
27966
27967    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
27968    where
27969        A: de::MapAccess<'de>,
27970    {
27971        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
27972        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
27973        match any {
27974            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
27975                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
27976            VimAny::Value(value) => Err(de::Error::custom(format!(
27977                "expected object not wrapped value: {:?}",
27978                value))),
27979        }
27980    }
27981}
27982
27983impl HostDnsConfigTrait for HostDnsConfig {
27984    fn get_dhcp(&self) -> bool { self.dhcp }
27985    fn get_virtual_nic_device(&self) -> &Option<String> { &self.virtual_nic_device }
27986    fn get_ipv_6_virtual_nic_device(&self) -> &Option<String> { &self.ipv_6_virtual_nic_device }
27987    fn get_host_name(&self) -> &str { &self.host_name }
27988    fn get_domain_name(&self) -> &str { &self.domain_name }
27989    fn get_address(&self) -> &Option<Vec<String>> { &self.address }
27990    fn get_search_domain(&self) -> &Option<Vec<String>> { &self.search_domain }
27991}
27992impl HostDnsConfigTrait for HostDnsConfigSpec {
27993    fn get_dhcp(&self) -> bool { self.dhcp }
27994    fn get_virtual_nic_device(&self) -> &Option<String> { &self.virtual_nic_device }
27995    fn get_ipv_6_virtual_nic_device(&self) -> &Option<String> { &self.ipv_6_virtual_nic_device }
27996    fn get_host_name(&self) -> &str { &self.host_name }
27997    fn get_domain_name(&self) -> &str { &self.domain_name }
27998    fn get_address(&self) -> &Option<Vec<String>> { &self.address }
27999    fn get_search_domain(&self) -> &Option<Vec<String>> { &self.search_domain }
28000}
28001impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostDnsConfigTrait {
28002    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28003        let data_type = from.data_type();
28004        match data_type {
28005            StructType::HostDnsConfig => Some(from.as_any_ref().downcast_ref::<HostDnsConfig>()?),
28006            StructType::HostDnsConfigSpec => Some(from.as_any_ref().downcast_ref::<HostDnsConfigSpec>()?),
28007            _ => None,
28008        }
28009    }
28010    
28011    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28012        let data_type = from.data_type();
28013        match data_type {
28014            StructType::HostDnsConfig => Ok(from.as_any_box().downcast::<HostDnsConfig>()?),
28015            StructType::HostDnsConfigSpec => Ok(from.as_any_box().downcast::<HostDnsConfigSpec>()?),
28016            _ => Err(from.as_any_box()),
28017        }
28018    }
28019}
28020/// Detailed information about a file system.
28021/// 
28022/// This is a base type for derived types
28023/// that have more specific details about specific filesystem types.
28024/// 
28025/// Typically a FileSystem is exposed as a datatore
28026/// 
28027/// See also *DatastoreInfo*, *HostVmfsVolume*, *HostNasVolume*, *HostVffsVolume*, *HostLocalFileSystemVolume*
28028/// 
28029/// However, a FileSystemVolume need not be exposed a datastore., *HostVfatVolume*.
28030pub trait HostFileSystemVolumeTrait : super::traits::DataObjectTrait {
28031    /// FileSystemType of this particular file system
28032    /// See *HostFileSystemVolumeFileSystemType_enum*
28033    fn get_type(&self) -> &str;
28034    /// Name of the file system volume.
28035    fn get_name(&self) -> &str;
28036    /// The capacity of the file system volume, in bytes.
28037    fn get_capacity(&self) -> i64;
28038}
28039impl<'s> serde::Serialize for dyn HostFileSystemVolumeTrait + 's {
28040            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28041            where
28042                S: serde::Serializer,
28043            {
28044                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28045            }
28046        }
28047impl<'de> serde::Deserialize<'de> for Box<dyn HostFileSystemVolumeTrait> {
28048            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28049                deserializer.deserialize_map(HostFileSystemVolumeVisitor)
28050            }
28051        }
28052
28053struct HostFileSystemVolumeVisitor;
28054
28055impl<'de> de::Visitor<'de> for HostFileSystemVolumeVisitor {
28056    type Value = Box<dyn HostFileSystemVolumeTrait>;
28057
28058    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28059        formatter.write_str("a valid HostFileSystemVolumeTrait JSON object with a _typeName field")
28060    }
28061
28062    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28063    where
28064        A: de::MapAccess<'de>,
28065    {
28066        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28067        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28068        match any {
28069            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28070                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28071            VimAny::Value(value) => Err(de::Error::custom(format!(
28072                "expected object not wrapped value: {:?}",
28073                value))),
28074        }
28075    }
28076}
28077
28078impl HostFileSystemVolumeTrait for HostFileSystemVolume {
28079    fn get_type(&self) -> &str { &self.r#type }
28080    fn get_name(&self) -> &str { &self.name }
28081    fn get_capacity(&self) -> i64 { self.capacity }
28082}
28083impl HostFileSystemVolumeTrait for HostLocalFileSystemVolume {
28084    fn get_type(&self) -> &str { &self.r#type }
28085    fn get_name(&self) -> &str { &self.name }
28086    fn get_capacity(&self) -> i64 { self.capacity }
28087}
28088impl HostFileSystemVolumeTrait for HostNasVolume {
28089    fn get_type(&self) -> &str { &self.r#type }
28090    fn get_name(&self) -> &str { &self.name }
28091    fn get_capacity(&self) -> i64 { self.capacity }
28092}
28093impl HostFileSystemVolumeTrait for HostPMemVolume {
28094    fn get_type(&self) -> &str { &self.r#type }
28095    fn get_name(&self) -> &str { &self.name }
28096    fn get_capacity(&self) -> i64 { self.capacity }
28097}
28098impl HostFileSystemVolumeTrait for HostVfatVolume {
28099    fn get_type(&self) -> &str { &self.r#type }
28100    fn get_name(&self) -> &str { &self.name }
28101    fn get_capacity(&self) -> i64 { self.capacity }
28102}
28103impl HostFileSystemVolumeTrait for HostVffsVolume {
28104    fn get_type(&self) -> &str { &self.r#type }
28105    fn get_name(&self) -> &str { &self.name }
28106    fn get_capacity(&self) -> i64 { self.capacity }
28107}
28108impl HostFileSystemVolumeTrait for HostVmfsVolume {
28109    fn get_type(&self) -> &str { &self.r#type }
28110    fn get_name(&self) -> &str { &self.name }
28111    fn get_capacity(&self) -> i64 { self.capacity }
28112}
28113impl HostFileSystemVolumeTrait for HostVvolVolume {
28114    fn get_type(&self) -> &str { &self.r#type }
28115    fn get_name(&self) -> &str { &self.name }
28116    fn get_capacity(&self) -> i64 { self.capacity }
28117}
28118impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostFileSystemVolumeTrait {
28119    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28120        let data_type = from.data_type();
28121        match data_type {
28122            StructType::HostFileSystemVolume => Some(from.as_any_ref().downcast_ref::<HostFileSystemVolume>()?),
28123            StructType::HostLocalFileSystemVolume => Some(from.as_any_ref().downcast_ref::<HostLocalFileSystemVolume>()?),
28124            StructType::HostNasVolume => Some(from.as_any_ref().downcast_ref::<HostNasVolume>()?),
28125            StructType::HostPMemVolume => Some(from.as_any_ref().downcast_ref::<HostPMemVolume>()?),
28126            StructType::HostVfatVolume => Some(from.as_any_ref().downcast_ref::<HostVfatVolume>()?),
28127            StructType::HostVffsVolume => Some(from.as_any_ref().downcast_ref::<HostVffsVolume>()?),
28128            StructType::HostVmfsVolume => Some(from.as_any_ref().downcast_ref::<HostVmfsVolume>()?),
28129            StructType::HostVvolVolume => Some(from.as_any_ref().downcast_ref::<HostVvolVolume>()?),
28130            _ => None,
28131        }
28132    }
28133    
28134    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28135        let data_type = from.data_type();
28136        match data_type {
28137            StructType::HostFileSystemVolume => Ok(from.as_any_box().downcast::<HostFileSystemVolume>()?),
28138            StructType::HostLocalFileSystemVolume => Ok(from.as_any_box().downcast::<HostLocalFileSystemVolume>()?),
28139            StructType::HostNasVolume => Ok(from.as_any_box().downcast::<HostNasVolume>()?),
28140            StructType::HostPMemVolume => Ok(from.as_any_box().downcast::<HostPMemVolume>()?),
28141            StructType::HostVfatVolume => Ok(from.as_any_box().downcast::<HostVfatVolume>()?),
28142            StructType::HostVffsVolume => Ok(from.as_any_box().downcast::<HostVffsVolume>()?),
28143            StructType::HostVmfsVolume => Ok(from.as_any_box().downcast::<HostVmfsVolume>()?),
28144            StructType::HostVvolVolume => Ok(from.as_any_box().downcast::<HostVvolVolume>()?),
28145            _ => Err(from.as_any_box()),
28146        }
28147    }
28148}
28149/// Data object describing the operational status of a physical
28150/// element.
28151pub trait HostHardwareElementInfoTrait : super::traits::DataObjectTrait {
28152    /// The name of the physical element
28153    fn get_name(&self) -> &str;
28154    /// The operational status of the physical element.
28155    /// 
28156    /// The status is one of
28157    /// the values specified in HostHardwareElementStatus.
28158    /// 
28159    /// See also *HostHardwareElementStatus_enum*.
28160    fn get_status(&self) -> &Box<dyn super::traits::ElementDescriptionTrait>;
28161}
28162impl<'s> serde::Serialize for dyn HostHardwareElementInfoTrait + 's {
28163            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28164            where
28165                S: serde::Serializer,
28166            {
28167                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28168            }
28169        }
28170impl<'de> serde::Deserialize<'de> for Box<dyn HostHardwareElementInfoTrait> {
28171            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28172                deserializer.deserialize_map(HostHardwareElementInfoVisitor)
28173            }
28174        }
28175
28176struct HostHardwareElementInfoVisitor;
28177
28178impl<'de> de::Visitor<'de> for HostHardwareElementInfoVisitor {
28179    type Value = Box<dyn HostHardwareElementInfoTrait>;
28180
28181    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28182        formatter.write_str("a valid HostHardwareElementInfoTrait JSON object with a _typeName field")
28183    }
28184
28185    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28186    where
28187        A: de::MapAccess<'de>,
28188    {
28189        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28190        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28191        match any {
28192            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28193                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28194            VimAny::Value(value) => Err(de::Error::custom(format!(
28195                "expected object not wrapped value: {:?}",
28196                value))),
28197        }
28198    }
28199}
28200
28201impl HostHardwareElementInfoTrait for HostHardwareElementInfo {
28202    fn get_name(&self) -> &str { &self.name }
28203    fn get_status(&self) -> &Box<dyn super::traits::ElementDescriptionTrait> { &self.status }
28204}
28205impl HostHardwareElementInfoTrait for DpuStatusInfo {
28206    fn get_name(&self) -> &str { &self.name }
28207    fn get_status(&self) -> &Box<dyn super::traits::ElementDescriptionTrait> { &self.status }
28208}
28209impl HostHardwareElementInfoTrait for HostStorageElementInfo {
28210    fn get_name(&self) -> &str { &self.name }
28211    fn get_status(&self) -> &Box<dyn super::traits::ElementDescriptionTrait> { &self.status }
28212}
28213impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostHardwareElementInfoTrait {
28214    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28215        let data_type = from.data_type();
28216        match data_type {
28217            StructType::HostHardwareElementInfo => Some(from.as_any_ref().downcast_ref::<HostHardwareElementInfo>()?),
28218            StructType::DpuStatusInfo => Some(from.as_any_ref().downcast_ref::<DpuStatusInfo>()?),
28219            StructType::HostStorageElementInfo => Some(from.as_any_ref().downcast_ref::<HostStorageElementInfo>()?),
28220            _ => None,
28221        }
28222    }
28223    
28224    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28225        let data_type = from.data_type();
28226        match data_type {
28227            StructType::HostHardwareElementInfo => Ok(from.as_any_box().downcast::<HostHardwareElementInfo>()?),
28228            StructType::DpuStatusInfo => Ok(from.as_any_box().downcast::<DpuStatusInfo>()?),
28229            StructType::HostStorageElementInfo => Ok(from.as_any_box().downcast::<HostStorageElementInfo>()?),
28230            _ => Err(from.as_any_box()),
28231        }
28232    }
28233}
28234/// A data object which specifies the parameters needed
28235/// to create a software host bus adapter of a specific kind.
28236/// 
28237/// ***Since:*** vSphere API Release 7.0.3.0
28238pub trait HostHbaCreateSpecTrait : super::traits::DataObjectTrait {
28239}
28240impl<'s> serde::Serialize for dyn HostHbaCreateSpecTrait + 's {
28241            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28242            where
28243                S: serde::Serializer,
28244            {
28245                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28246            }
28247        }
28248impl<'de> serde::Deserialize<'de> for Box<dyn HostHbaCreateSpecTrait> {
28249            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28250                deserializer.deserialize_map(HostHbaCreateSpecVisitor)
28251            }
28252        }
28253
28254struct HostHbaCreateSpecVisitor;
28255
28256impl<'de> de::Visitor<'de> for HostHbaCreateSpecVisitor {
28257    type Value = Box<dyn HostHbaCreateSpecTrait>;
28258
28259    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28260        formatter.write_str("a valid HostHbaCreateSpecTrait JSON object with a _typeName field")
28261    }
28262
28263    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28264    where
28265        A: de::MapAccess<'de>,
28266    {
28267        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28268        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28269        match any {
28270            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28271                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28272            VimAny::Value(value) => Err(de::Error::custom(format!(
28273                "expected object not wrapped value: {:?}",
28274                value))),
28275        }
28276    }
28277}
28278
28279impl HostHbaCreateSpecTrait for HostHbaCreateSpec {
28280}
28281impl HostHbaCreateSpecTrait for HostTcpHbaCreateSpec {
28282}
28283impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostHbaCreateSpecTrait {
28284    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28285        let data_type = from.data_type();
28286        match data_type {
28287            StructType::HostHbaCreateSpec => Some(from.as_any_ref().downcast_ref::<HostHbaCreateSpec>()?),
28288            StructType::HostTcpHbaCreateSpec => Some(from.as_any_ref().downcast_ref::<HostTcpHbaCreateSpec>()?),
28289            _ => None,
28290        }
28291    }
28292    
28293    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28294        let data_type = from.data_type();
28295        match data_type {
28296            StructType::HostHbaCreateSpec => Ok(from.as_any_box().downcast::<HostHbaCreateSpec>()?),
28297            StructType::HostTcpHbaCreateSpec => Ok(from.as_any_box().downcast::<HostTcpHbaCreateSpec>()?),
28298            _ => Err(from.as_any_box()),
28299        }
28300    }
28301}
28302/// This data object type describes the bus adapter for
28303/// the host.
28304/// 
28305/// A host bus adapter (HBA) is a hardware
28306/// or software adapter that connects the host to storage devices.
28307pub trait HostHostBusAdapterTrait : super::traits::DataObjectTrait {
28308    /// The linkable identifier.
28309    fn get_key(&self) -> &Option<String>;
28310    /// The device name of host bus adapter.
28311    fn get_device(&self) -> &str;
28312    /// The host bus number.
28313    fn get_bus(&self) -> i32;
28314    /// The operational status of the adapter.
28315    /// 
28316    /// Valid values include "online",
28317    /// "offline", "unbound", and "unknown".
28318    fn get_status(&self) -> &str;
28319    /// The model name of the host bus adapter.
28320    fn get_model(&self) -> &str;
28321    /// The name of the driver.
28322    fn get_driver(&self) -> &Option<String>;
28323    /// The Peripheral Connect Interface (PCI) ID of the device
28324    /// representing the host bus adapter.
28325    fn get_pci(&self) -> &Option<String>;
28326    /// The type of protocol supported by the host bus adapter.
28327    /// 
28328    /// The list of supported values is described in
28329    /// *HostStorageProtocol_enum*.
28330    /// When unset, a default value of "scsi" is assumed.
28331    fn get_storage_protocol(&self) -> &Option<String>;
28332}
28333impl<'s> serde::Serialize for dyn HostHostBusAdapterTrait + 's {
28334            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28335            where
28336                S: serde::Serializer,
28337            {
28338                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28339            }
28340        }
28341impl<'de> serde::Deserialize<'de> for Box<dyn HostHostBusAdapterTrait> {
28342            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28343                deserializer.deserialize_map(HostHostBusAdapterVisitor)
28344            }
28345        }
28346
28347struct HostHostBusAdapterVisitor;
28348
28349impl<'de> de::Visitor<'de> for HostHostBusAdapterVisitor {
28350    type Value = Box<dyn HostHostBusAdapterTrait>;
28351
28352    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28353        formatter.write_str("a valid HostHostBusAdapterTrait JSON object with a _typeName field")
28354    }
28355
28356    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28357    where
28358        A: de::MapAccess<'de>,
28359    {
28360        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28361        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28362        match any {
28363            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28364                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28365            VimAny::Value(value) => Err(de::Error::custom(format!(
28366                "expected object not wrapped value: {:?}",
28367                value))),
28368        }
28369    }
28370}
28371
28372impl HostHostBusAdapterTrait for HostHostBusAdapter {
28373    fn get_key(&self) -> &Option<String> { &self.key }
28374    fn get_device(&self) -> &str { &self.device }
28375    fn get_bus(&self) -> i32 { self.bus }
28376    fn get_status(&self) -> &str { &self.status }
28377    fn get_model(&self) -> &str { &self.model }
28378    fn get_driver(&self) -> &Option<String> { &self.driver }
28379    fn get_pci(&self) -> &Option<String> { &self.pci }
28380    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28381}
28382impl HostHostBusAdapterTrait for HostBlockHba {
28383    fn get_key(&self) -> &Option<String> { &self.key }
28384    fn get_device(&self) -> &str { &self.device }
28385    fn get_bus(&self) -> i32 { self.bus }
28386    fn get_status(&self) -> &str { &self.status }
28387    fn get_model(&self) -> &str { &self.model }
28388    fn get_driver(&self) -> &Option<String> { &self.driver }
28389    fn get_pci(&self) -> &Option<String> { &self.pci }
28390    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28391}
28392impl HostHostBusAdapterTrait for HostFibreChannelHba {
28393    fn get_key(&self) -> &Option<String> { &self.key }
28394    fn get_device(&self) -> &str { &self.device }
28395    fn get_bus(&self) -> i32 { self.bus }
28396    fn get_status(&self) -> &str { &self.status }
28397    fn get_model(&self) -> &str { &self.model }
28398    fn get_driver(&self) -> &Option<String> { &self.driver }
28399    fn get_pci(&self) -> &Option<String> { &self.pci }
28400    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28401}
28402impl HostHostBusAdapterTrait for HostFibreChannelOverEthernetHba {
28403    fn get_key(&self) -> &Option<String> { &self.key }
28404    fn get_device(&self) -> &str { &self.device }
28405    fn get_bus(&self) -> i32 { self.bus }
28406    fn get_status(&self) -> &str { &self.status }
28407    fn get_model(&self) -> &str { &self.model }
28408    fn get_driver(&self) -> &Option<String> { &self.driver }
28409    fn get_pci(&self) -> &Option<String> { &self.pci }
28410    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28411}
28412impl HostHostBusAdapterTrait for HostInternetScsiHba {
28413    fn get_key(&self) -> &Option<String> { &self.key }
28414    fn get_device(&self) -> &str { &self.device }
28415    fn get_bus(&self) -> i32 { self.bus }
28416    fn get_status(&self) -> &str { &self.status }
28417    fn get_model(&self) -> &str { &self.model }
28418    fn get_driver(&self) -> &Option<String> { &self.driver }
28419    fn get_pci(&self) -> &Option<String> { &self.pci }
28420    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28421}
28422impl HostHostBusAdapterTrait for HostParallelScsiHba {
28423    fn get_key(&self) -> &Option<String> { &self.key }
28424    fn get_device(&self) -> &str { &self.device }
28425    fn get_bus(&self) -> i32 { self.bus }
28426    fn get_status(&self) -> &str { &self.status }
28427    fn get_model(&self) -> &str { &self.model }
28428    fn get_driver(&self) -> &Option<String> { &self.driver }
28429    fn get_pci(&self) -> &Option<String> { &self.pci }
28430    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28431}
28432impl HostHostBusAdapterTrait for HostPcieHba {
28433    fn get_key(&self) -> &Option<String> { &self.key }
28434    fn get_device(&self) -> &str { &self.device }
28435    fn get_bus(&self) -> i32 { self.bus }
28436    fn get_status(&self) -> &str { &self.status }
28437    fn get_model(&self) -> &str { &self.model }
28438    fn get_driver(&self) -> &Option<String> { &self.driver }
28439    fn get_pci(&self) -> &Option<String> { &self.pci }
28440    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28441}
28442impl HostHostBusAdapterTrait for HostRdmaHba {
28443    fn get_key(&self) -> &Option<String> { &self.key }
28444    fn get_device(&self) -> &str { &self.device }
28445    fn get_bus(&self) -> i32 { self.bus }
28446    fn get_status(&self) -> &str { &self.status }
28447    fn get_model(&self) -> &str { &self.model }
28448    fn get_driver(&self) -> &Option<String> { &self.driver }
28449    fn get_pci(&self) -> &Option<String> { &self.pci }
28450    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28451}
28452impl HostHostBusAdapterTrait for HostSerialAttachedHba {
28453    fn get_key(&self) -> &Option<String> { &self.key }
28454    fn get_device(&self) -> &str { &self.device }
28455    fn get_bus(&self) -> i32 { self.bus }
28456    fn get_status(&self) -> &str { &self.status }
28457    fn get_model(&self) -> &str { &self.model }
28458    fn get_driver(&self) -> &Option<String> { &self.driver }
28459    fn get_pci(&self) -> &Option<String> { &self.pci }
28460    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28461}
28462impl HostHostBusAdapterTrait for HostTcpHba {
28463    fn get_key(&self) -> &Option<String> { &self.key }
28464    fn get_device(&self) -> &str { &self.device }
28465    fn get_bus(&self) -> i32 { self.bus }
28466    fn get_status(&self) -> &str { &self.status }
28467    fn get_model(&self) -> &str { &self.model }
28468    fn get_driver(&self) -> &Option<String> { &self.driver }
28469    fn get_pci(&self) -> &Option<String> { &self.pci }
28470    fn get_storage_protocol(&self) -> &Option<String> { &self.storage_protocol }
28471}
28472impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostHostBusAdapterTrait {
28473    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28474        let data_type = from.data_type();
28475        match data_type {
28476            StructType::HostHostBusAdapter => Some(from.as_any_ref().downcast_ref::<HostHostBusAdapter>()?),
28477            StructType::HostBlockHba => Some(from.as_any_ref().downcast_ref::<HostBlockHba>()?),
28478            StructType::HostFibreChannelHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelHba>()?),
28479            StructType::HostFibreChannelOverEthernetHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetHba>()?),
28480            StructType::HostInternetScsiHba => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHba>()?),
28481            StructType::HostParallelScsiHba => Some(from.as_any_ref().downcast_ref::<HostParallelScsiHba>()?),
28482            StructType::HostPcieHba => Some(from.as_any_ref().downcast_ref::<HostPcieHba>()?),
28483            StructType::HostRdmaHba => Some(from.as_any_ref().downcast_ref::<HostRdmaHba>()?),
28484            StructType::HostSerialAttachedHba => Some(from.as_any_ref().downcast_ref::<HostSerialAttachedHba>()?),
28485            StructType::HostTcpHba => Some(from.as_any_ref().downcast_ref::<HostTcpHba>()?),
28486            _ => None,
28487        }
28488    }
28489    
28490    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28491        let data_type = from.data_type();
28492        match data_type {
28493            StructType::HostHostBusAdapter => Ok(from.as_any_box().downcast::<HostHostBusAdapter>()?),
28494            StructType::HostBlockHba => Ok(from.as_any_box().downcast::<HostBlockHba>()?),
28495            StructType::HostFibreChannelHba => Ok(from.as_any_box().downcast::<HostFibreChannelHba>()?),
28496            StructType::HostFibreChannelOverEthernetHba => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetHba>()?),
28497            StructType::HostInternetScsiHba => Ok(from.as_any_box().downcast::<HostInternetScsiHba>()?),
28498            StructType::HostParallelScsiHba => Ok(from.as_any_box().downcast::<HostParallelScsiHba>()?),
28499            StructType::HostPcieHba => Ok(from.as_any_box().downcast::<HostPcieHba>()?),
28500            StructType::HostRdmaHba => Ok(from.as_any_box().downcast::<HostRdmaHba>()?),
28501            StructType::HostSerialAttachedHba => Ok(from.as_any_box().downcast::<HostSerialAttachedHba>()?),
28502            StructType::HostTcpHba => Ok(from.as_any_box().downcast::<HostTcpHba>()?),
28503            _ => Err(from.as_any_box()),
28504        }
28505    }
28506}
28507/// This data object type describes the Fibre Channel host bus adapter.
28508pub trait HostFibreChannelHbaTrait : super::traits::HostHostBusAdapterTrait {
28509    /// The world wide port name for the adapter.
28510    fn get_port_world_wide_name(&self) -> i64;
28511    /// The world wide node name for the adapter.
28512    fn get_node_world_wide_name(&self) -> i64;
28513    /// The type of the fiber channel port.
28514    fn get_port_type(&self) -> &super::enums::FibreChannelPortTypeEnum;
28515    /// The current operating speed of the adapter in
28516    /// bits per second.
28517    fn get_speed(&self) -> i64;
28518}
28519impl<'s> serde::Serialize for dyn HostFibreChannelHbaTrait + 's {
28520            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28521            where
28522                S: serde::Serializer,
28523            {
28524                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28525            }
28526        }
28527impl<'de> serde::Deserialize<'de> for Box<dyn HostFibreChannelHbaTrait> {
28528            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28529                deserializer.deserialize_map(HostFibreChannelHbaVisitor)
28530            }
28531        }
28532
28533struct HostFibreChannelHbaVisitor;
28534
28535impl<'de> de::Visitor<'de> for HostFibreChannelHbaVisitor {
28536    type Value = Box<dyn HostFibreChannelHbaTrait>;
28537
28538    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28539        formatter.write_str("a valid HostFibreChannelHbaTrait JSON object with a _typeName field")
28540    }
28541
28542    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28543    where
28544        A: de::MapAccess<'de>,
28545    {
28546        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28547        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28548        match any {
28549            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28550                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28551            VimAny::Value(value) => Err(de::Error::custom(format!(
28552                "expected object not wrapped value: {:?}",
28553                value))),
28554        }
28555    }
28556}
28557
28558impl HostFibreChannelHbaTrait for HostFibreChannelHba {
28559    fn get_port_world_wide_name(&self) -> i64 { self.port_world_wide_name }
28560    fn get_node_world_wide_name(&self) -> i64 { self.node_world_wide_name }
28561    fn get_port_type(&self) -> &super::enums::FibreChannelPortTypeEnum { &self.port_type }
28562    fn get_speed(&self) -> i64 { self.speed }
28563}
28564impl HostFibreChannelHbaTrait for HostFibreChannelOverEthernetHba {
28565    fn get_port_world_wide_name(&self) -> i64 { self.port_world_wide_name }
28566    fn get_node_world_wide_name(&self) -> i64 { self.node_world_wide_name }
28567    fn get_port_type(&self) -> &super::enums::FibreChannelPortTypeEnum { &self.port_type }
28568    fn get_speed(&self) -> i64 { self.speed }
28569}
28570impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostFibreChannelHbaTrait {
28571    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28572        let data_type = from.data_type();
28573        match data_type {
28574            StructType::HostFibreChannelHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelHba>()?),
28575            StructType::HostFibreChannelOverEthernetHba => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetHba>()?),
28576            _ => None,
28577        }
28578    }
28579    
28580    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28581        let data_type = from.data_type();
28582        match data_type {
28583            StructType::HostFibreChannelHba => Ok(from.as_any_box().downcast::<HostFibreChannelHba>()?),
28584            StructType::HostFibreChannelOverEthernetHba => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetHba>()?),
28585            _ => Err(from.as_any_box()),
28586        }
28587    }
28588}
28589/// The IP configuration.
28590pub trait HostIpConfigTrait : super::traits::DataObjectTrait {
28591    /// The flag to indicate whether or not DHCP (dynamic host
28592    /// control protocol) is enabled.
28593    /// 
28594    /// If this property is set to true,
28595    /// the ipAddress and the subnetMask strings cannot be set explicitly.
28596    fn get_dhcp(&self) -> bool;
28597    /// The IP address currently used by the network adapter.
28598    /// 
28599    /// All IP addresses are specified using IPv4 dot notation.
28600    /// For example, "192.168.0.1". Subnet addresses and netmasks are
28601    /// specified using the same notation.
28602    /// 
28603    /// **Note**: When DHCP is enabled, this property reflects the
28604    /// current IP configuration and cannot be set. When DHCP is not
28605    /// enabled, this property can be set explicitly.
28606    fn get_ip_address(&self) -> &Option<String>;
28607    /// The subnet mask.
28608    /// 
28609    /// **Note**: When DHCP is not enabled, this property can be
28610    /// set explicitly. When DHCP is enabled, this property reflects the
28611    /// current IP configuration and cannot be set.
28612    fn get_subnet_mask(&self) -> &Option<String>;
28613    /// The ipv6 configuration
28614    fn get_ip_v_6_config(&self) -> &Option<super::structs::HostIpConfigIpV6AddressConfiguration>;
28615}
28616impl<'s> serde::Serialize for dyn HostIpConfigTrait + 's {
28617            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28618            where
28619                S: serde::Serializer,
28620            {
28621                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28622            }
28623        }
28624impl<'de> serde::Deserialize<'de> for Box<dyn HostIpConfigTrait> {
28625            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28626                deserializer.deserialize_map(HostIpConfigVisitor)
28627            }
28628        }
28629
28630struct HostIpConfigVisitor;
28631
28632impl<'de> de::Visitor<'de> for HostIpConfigVisitor {
28633    type Value = Box<dyn HostIpConfigTrait>;
28634
28635    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28636        formatter.write_str("a valid HostIpConfigTrait JSON object with a _typeName field")
28637    }
28638
28639    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28640    where
28641        A: de::MapAccess<'de>,
28642    {
28643        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28644        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28645        match any {
28646            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28647                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28648            VimAny::Value(value) => Err(de::Error::custom(format!(
28649                "expected object not wrapped value: {:?}",
28650                value))),
28651        }
28652    }
28653}
28654
28655impl HostIpConfigTrait for HostIpConfig {
28656    fn get_dhcp(&self) -> bool { self.dhcp }
28657    fn get_ip_address(&self) -> &Option<String> { &self.ip_address }
28658    fn get_subnet_mask(&self) -> &Option<String> { &self.subnet_mask }
28659    fn get_ip_v_6_config(&self) -> &Option<super::structs::HostIpConfigIpV6AddressConfiguration> { &self.ip_v_6_config }
28660}
28661impl HostIpConfigTrait for VsanFileServiceIpConfig {
28662    fn get_dhcp(&self) -> bool { self.dhcp }
28663    fn get_ip_address(&self) -> &Option<String> { &self.ip_address }
28664    fn get_subnet_mask(&self) -> &Option<String> { &self.subnet_mask }
28665    fn get_ip_v_6_config(&self) -> &Option<super::structs::HostIpConfigIpV6AddressConfiguration> { &self.ip_v_6_config }
28666}
28667impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostIpConfigTrait {
28668    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28669        let data_type = from.data_type();
28670        match data_type {
28671            StructType::HostIpConfig => Some(from.as_any_ref().downcast_ref::<HostIpConfig>()?),
28672            StructType::VsanFileServiceIpConfig => Some(from.as_any_ref().downcast_ref::<VsanFileServiceIpConfig>()?),
28673            _ => None,
28674        }
28675    }
28676    
28677    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28678        let data_type = from.data_type();
28679        match data_type {
28680            StructType::HostIpConfig => Ok(from.as_any_box().downcast::<HostIpConfig>()?),
28681            StructType::VsanFileServiceIpConfig => Ok(from.as_any_box().downcast::<VsanFileServiceIpConfig>()?),
28682            _ => Err(from.as_any_box()),
28683        }
28684    }
28685}
28686/// IP Route Configuration.
28687/// 
28688/// All IPv4 addresses, subnet addresses, and
28689/// netmasks are specified as strings using dotted decimal notation.
28690/// For example, "192.0.2.1".
28691/// IPv6 addresses are 128-bit addresses represented
28692/// as eight fields of up to four hexadecimal digits. A colon separates each
28693/// field (:). For example, 2001:DB8:101::230:6eff:fe04:d9ff. The address can
28694/// also consist of symbol '::' to represent multiple 16-bit groups of
28695/// contiguous 0's only once in an address as described in RFC 2373.
28696pub trait HostIpRouteConfigTrait : super::traits::DataObjectTrait {
28697    /// The default gateway address.
28698    fn get_default_gateway(&self) -> &Option<String>;
28699    /// The gateway device.
28700    /// 
28701    /// This applies to service console gateway only, it
28702    /// is ignored otherwise.
28703    fn get_gateway_device(&self) -> &Option<String>;
28704    /// The default ipv6 gateway address
28705    fn get_ip_v_6_default_gateway(&self) -> &Option<String>;
28706    /// The ipv6 gateway device.
28707    /// 
28708    /// This applies to service console gateway only, it
28709    fn get_ip_v_6_gateway_device(&self) -> &Option<String>;
28710}
28711impl<'s> serde::Serialize for dyn HostIpRouteConfigTrait + 's {
28712            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28713            where
28714                S: serde::Serializer,
28715            {
28716                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28717            }
28718        }
28719impl<'de> serde::Deserialize<'de> for Box<dyn HostIpRouteConfigTrait> {
28720            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28721                deserializer.deserialize_map(HostIpRouteConfigVisitor)
28722            }
28723        }
28724
28725struct HostIpRouteConfigVisitor;
28726
28727impl<'de> de::Visitor<'de> for HostIpRouteConfigVisitor {
28728    type Value = Box<dyn HostIpRouteConfigTrait>;
28729
28730    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28731        formatter.write_str("a valid HostIpRouteConfigTrait JSON object with a _typeName field")
28732    }
28733
28734    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28735    where
28736        A: de::MapAccess<'de>,
28737    {
28738        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28739        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28740        match any {
28741            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28742                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28743            VimAny::Value(value) => Err(de::Error::custom(format!(
28744                "expected object not wrapped value: {:?}",
28745                value))),
28746        }
28747    }
28748}
28749
28750impl HostIpRouteConfigTrait for HostIpRouteConfig {
28751    fn get_default_gateway(&self) -> &Option<String> { &self.default_gateway }
28752    fn get_gateway_device(&self) -> &Option<String> { &self.gateway_device }
28753    fn get_ip_v_6_default_gateway(&self) -> &Option<String> { &self.ip_v_6_default_gateway }
28754    fn get_ip_v_6_gateway_device(&self) -> &Option<String> { &self.ip_v_6_gateway_device }
28755}
28756impl HostIpRouteConfigTrait for HostIpRouteConfigSpec {
28757    fn get_default_gateway(&self) -> &Option<String> { &self.default_gateway }
28758    fn get_gateway_device(&self) -> &Option<String> { &self.gateway_device }
28759    fn get_ip_v_6_default_gateway(&self) -> &Option<String> { &self.ip_v_6_default_gateway }
28760    fn get_ip_v_6_gateway_device(&self) -> &Option<String> { &self.ip_v_6_gateway_device }
28761}
28762impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostIpRouteConfigTrait {
28763    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28764        let data_type = from.data_type();
28765        match data_type {
28766            StructType::HostIpRouteConfig => Some(from.as_any_ref().downcast_ref::<HostIpRouteConfig>()?),
28767            StructType::HostIpRouteConfigSpec => Some(from.as_any_ref().downcast_ref::<HostIpRouteConfigSpec>()?),
28768            _ => None,
28769        }
28770    }
28771    
28772    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28773        let data_type = from.data_type();
28774        match data_type {
28775            StructType::HostIpRouteConfig => Ok(from.as_any_box().downcast::<HostIpRouteConfig>()?),
28776            StructType::HostIpRouteConfigSpec => Ok(from.as_any_box().downcast::<HostIpRouteConfigSpec>()?),
28777            _ => Err(from.as_any_box()),
28778        }
28779    }
28780}
28781/// This data object type contains common parameters
28782/// for local account creation.
28783/// 
28784/// The password and description properties
28785/// are not supported for group accounts on POSIX hosts.
28786pub trait HostAccountSpecTrait : super::traits::DataObjectTrait {
28787    /// The ID of the specified account.
28788    fn get_id(&self) -> &str;
28789    /// The password for a user or group.
28790    fn get_password(&self) -> &Option<String>;
28791    /// The description of the specified account.
28792    fn get_description(&self) -> &Option<String>;
28793}
28794impl<'s> serde::Serialize for dyn HostAccountSpecTrait + 's {
28795            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28796            where
28797                S: serde::Serializer,
28798            {
28799                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28800            }
28801        }
28802impl<'de> serde::Deserialize<'de> for Box<dyn HostAccountSpecTrait> {
28803            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28804                deserializer.deserialize_map(HostAccountSpecVisitor)
28805            }
28806        }
28807
28808struct HostAccountSpecVisitor;
28809
28810impl<'de> de::Visitor<'de> for HostAccountSpecVisitor {
28811    type Value = Box<dyn HostAccountSpecTrait>;
28812
28813    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28814        formatter.write_str("a valid HostAccountSpecTrait JSON object with a _typeName field")
28815    }
28816
28817    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28818    where
28819        A: de::MapAccess<'de>,
28820    {
28821        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28822        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28823        match any {
28824            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28825                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28826            VimAny::Value(value) => Err(de::Error::custom(format!(
28827                "expected object not wrapped value: {:?}",
28828                value))),
28829        }
28830    }
28831}
28832
28833impl HostAccountSpecTrait for HostAccountSpec {
28834    fn get_id(&self) -> &str { &self.id }
28835    fn get_password(&self) -> &Option<String> { &self.password }
28836    fn get_description(&self) -> &Option<String> { &self.description }
28837}
28838impl HostAccountSpecTrait for HostPosixAccountSpec {
28839    fn get_id(&self) -> &str { &self.id }
28840    fn get_password(&self) -> &Option<String> { &self.password }
28841    fn get_description(&self) -> &Option<String> { &self.description }
28842}
28843impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostAccountSpecTrait {
28844    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28845        let data_type = from.data_type();
28846        match data_type {
28847            StructType::HostAccountSpec => Some(from.as_any_ref().downcast_ref::<HostAccountSpec>()?),
28848            StructType::HostPosixAccountSpec => Some(from.as_any_ref().downcast_ref::<HostPosixAccountSpec>()?),
28849            _ => None,
28850        }
28851    }
28852    
28853    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28854        let data_type = from.data_type();
28855        match data_type {
28856            StructType::HostAccountSpec => Ok(from.as_any_box().downcast::<HostAccountSpec>()?),
28857            StructType::HostPosixAccountSpec => Ok(from.as_any_box().downcast::<HostPosixAccountSpec>()?),
28858            _ => Err(from.as_any_box()),
28859        }
28860    }
28861}
28862/// The *HostMultipathInfoLogicalUnitPolicy* data object
28863/// describes a path selection policy for a device.
28864/// 
28865/// This policy determines
28866/// how paths should be utilized when accessing a device.
28867pub trait HostMultipathInfoLogicalUnitPolicyTrait : super::traits::DataObjectTrait {
28868    /// String representing the path selection policy for a device.
28869    /// 
28870    /// Use one of the following
28871    /// strings:
28872    /// For NMP plugin
28873    /// - <code>VMW\_PSP\_FIXED</code> - Use a preferred path whenever possible.
28874    /// - <code>VMW\_PSP\_RR</code> - Load balance.
28875    /// - <code>VMW\_PSP\_MRU</code> - Use the most recently used path.
28876    ///   
28877    /// For HPP plugin
28878    /// - <code>FIXED</code> - Use a preferred path whenever possible.
28879    /// - <code>LB-RR</code> - Load Balance - round robin.
28880    /// - <code>LB-IOPS</code> - Load Balance - iops.
28881    /// - <code>LB-BYTES</code> - Load Balance - bytes.
28882    /// - <code>LB--Latency</code> - Load balance - least latency.
28883    ///   
28884    /// You can also use the
28885    /// *HostStorageSystem.QueryPathSelectionPolicyOptions* method
28886    /// to retrieve the set of valid strings.
28887    /// Use the key from the resulting structure
28888    /// *HostPathSelectionPolicyOption*.
28889    fn get_policy(&self) -> &str;
28890}
28891impl<'s> serde::Serialize for dyn HostMultipathInfoLogicalUnitPolicyTrait + 's {
28892            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28893            where
28894                S: serde::Serializer,
28895            {
28896                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28897            }
28898        }
28899impl<'de> serde::Deserialize<'de> for Box<dyn HostMultipathInfoLogicalUnitPolicyTrait> {
28900            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28901                deserializer.deserialize_map(HostMultipathInfoLogicalUnitPolicyVisitor)
28902            }
28903        }
28904
28905struct HostMultipathInfoLogicalUnitPolicyVisitor;
28906
28907impl<'de> de::Visitor<'de> for HostMultipathInfoLogicalUnitPolicyVisitor {
28908    type Value = Box<dyn HostMultipathInfoLogicalUnitPolicyTrait>;
28909
28910    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28911        formatter.write_str("a valid HostMultipathInfoLogicalUnitPolicyTrait JSON object with a _typeName field")
28912    }
28913
28914    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28915    where
28916        A: de::MapAccess<'de>,
28917    {
28918        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28919        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28920        match any {
28921            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28922                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
28923            VimAny::Value(value) => Err(de::Error::custom(format!(
28924                "expected object not wrapped value: {:?}",
28925                value))),
28926        }
28927    }
28928}
28929
28930impl HostMultipathInfoLogicalUnitPolicyTrait for HostMultipathInfoLogicalUnitPolicy {
28931    fn get_policy(&self) -> &str { &self.policy }
28932}
28933impl HostMultipathInfoLogicalUnitPolicyTrait for HostMultipathInfoFixedLogicalUnitPolicy {
28934    fn get_policy(&self) -> &str { &self.policy }
28935}
28936impl HostMultipathInfoLogicalUnitPolicyTrait for HostMultipathInfoHppLogicalUnitPolicy {
28937    fn get_policy(&self) -> &str { &self.policy }
28938}
28939impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostMultipathInfoLogicalUnitPolicyTrait {
28940    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
28941        let data_type = from.data_type();
28942        match data_type {
28943            StructType::HostMultipathInfoLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoLogicalUnitPolicy>()?),
28944            StructType::HostMultipathInfoFixedLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoFixedLogicalUnitPolicy>()?),
28945            StructType::HostMultipathInfoHppLogicalUnitPolicy => Some(from.as_any_ref().downcast_ref::<HostMultipathInfoHppLogicalUnitPolicy>()?),
28946            _ => None,
28947        }
28948    }
28949    
28950    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
28951        let data_type = from.data_type();
28952        match data_type {
28953            StructType::HostMultipathInfoLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoLogicalUnitPolicy>()?),
28954            StructType::HostMultipathInfoFixedLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoFixedLogicalUnitPolicy>()?),
28955            StructType::HostMultipathInfoHppLogicalUnitPolicy => Ok(from.as_any_box().downcast::<HostMultipathInfoHppLogicalUnitPolicy>()?),
28956            _ => Err(from.as_any_box()),
28957        }
28958    }
28959}
28960/// Specifies the main parameters needed when connecting to
28961/// an NVMe over Fabrics controller or Discovery Service.
28962pub trait HostNvmeSpecTrait : super::traits::DataObjectTrait {
28963    /// The device name of the NVME over Fabrics host bus adapter.
28964    fn get_hba_name(&self) -> &str;
28965    /// Transport specific information necessary to connect to the controller.
28966    fn get_transport_parameters(&self) -> &Box<dyn super::traits::HostNvmeTransportParametersTrait>;
28967}
28968impl<'s> serde::Serialize for dyn HostNvmeSpecTrait + 's {
28969            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
28970            where
28971                S: serde::Serializer,
28972            {
28973                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
28974            }
28975        }
28976impl<'de> serde::Deserialize<'de> for Box<dyn HostNvmeSpecTrait> {
28977            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
28978                deserializer.deserialize_map(HostNvmeSpecVisitor)
28979            }
28980        }
28981
28982struct HostNvmeSpecVisitor;
28983
28984impl<'de> de::Visitor<'de> for HostNvmeSpecVisitor {
28985    type Value = Box<dyn HostNvmeSpecTrait>;
28986
28987    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28988        formatter.write_str("a valid HostNvmeSpecTrait JSON object with a _typeName field")
28989    }
28990
28991    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
28992    where
28993        A: de::MapAccess<'de>,
28994    {
28995        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
28996        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
28997        match any {
28998            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
28999                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29000            VimAny::Value(value) => Err(de::Error::custom(format!(
29001                "expected object not wrapped value: {:?}",
29002                value))),
29003        }
29004    }
29005}
29006
29007impl HostNvmeSpecTrait for HostNvmeSpec {
29008    fn get_hba_name(&self) -> &str { &self.hba_name }
29009    fn get_transport_parameters(&self) -> &Box<dyn super::traits::HostNvmeTransportParametersTrait> { &self.transport_parameters }
29010}
29011impl HostNvmeSpecTrait for HostNvmeConnectSpec {
29012    fn get_hba_name(&self) -> &str { &self.hba_name }
29013    fn get_transport_parameters(&self) -> &Box<dyn super::traits::HostNvmeTransportParametersTrait> { &self.transport_parameters }
29014}
29015impl HostNvmeSpecTrait for HostNvmeDiscoverSpec {
29016    fn get_hba_name(&self) -> &str { &self.hba_name }
29017    fn get_transport_parameters(&self) -> &Box<dyn super::traits::HostNvmeTransportParametersTrait> { &self.transport_parameters }
29018}
29019impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostNvmeSpecTrait {
29020    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29021        let data_type = from.data_type();
29022        match data_type {
29023            StructType::HostNvmeSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeSpec>()?),
29024            StructType::HostNvmeConnectSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeConnectSpec>()?),
29025            StructType::HostNvmeDiscoverSpec => Some(from.as_any_ref().downcast_ref::<HostNvmeDiscoverSpec>()?),
29026            _ => None,
29027        }
29028    }
29029    
29030    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29031        let data_type = from.data_type();
29032        match data_type {
29033            StructType::HostNvmeSpec => Ok(from.as_any_box().downcast::<HostNvmeSpec>()?),
29034            StructType::HostNvmeConnectSpec => Ok(from.as_any_box().downcast::<HostNvmeConnectSpec>()?),
29035            StructType::HostNvmeDiscoverSpec => Ok(from.as_any_box().downcast::<HostNvmeDiscoverSpec>()?),
29036            _ => Err(from.as_any_box()),
29037        }
29038    }
29039}
29040/// This data object represents the transport specific parameters
29041/// necessary to establish an NVM Express over Fabrics connection.
29042/// 
29043/// For some further information, see:
29044/// - "NVM Express over Fabrics 1.0", Section 1.5.7, "Connection"
29045pub trait HostNvmeTransportParametersTrait : super::traits::DataObjectTrait {
29046}
29047impl<'s> serde::Serialize for dyn HostNvmeTransportParametersTrait + 's {
29048            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29049            where
29050                S: serde::Serializer,
29051            {
29052                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29053            }
29054        }
29055impl<'de> serde::Deserialize<'de> for Box<dyn HostNvmeTransportParametersTrait> {
29056            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29057                deserializer.deserialize_map(HostNvmeTransportParametersVisitor)
29058            }
29059        }
29060
29061struct HostNvmeTransportParametersVisitor;
29062
29063impl<'de> de::Visitor<'de> for HostNvmeTransportParametersVisitor {
29064    type Value = Box<dyn HostNvmeTransportParametersTrait>;
29065
29066    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29067        formatter.write_str("a valid HostNvmeTransportParametersTrait JSON object with a _typeName field")
29068    }
29069
29070    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29071    where
29072        A: de::MapAccess<'de>,
29073    {
29074        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29075        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29076        match any {
29077            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29078                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29079            VimAny::Value(value) => Err(de::Error::custom(format!(
29080                "expected object not wrapped value: {:?}",
29081                value))),
29082        }
29083    }
29084}
29085
29086impl HostNvmeTransportParametersTrait for HostNvmeTransportParameters {
29087}
29088impl HostNvmeTransportParametersTrait for HostNvmeOpaqueTransportParameters {
29089}
29090impl HostNvmeTransportParametersTrait for HostNvmeOverFibreChannelParameters {
29091}
29092impl HostNvmeTransportParametersTrait for HostNvmeOverRdmaParameters {
29093}
29094impl HostNvmeTransportParametersTrait for HostNvmeOverTcpParameters {
29095}
29096impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostNvmeTransportParametersTrait {
29097    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29098        let data_type = from.data_type();
29099        match data_type {
29100            StructType::HostNvmeTransportParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeTransportParameters>()?),
29101            StructType::HostNvmeOpaqueTransportParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOpaqueTransportParameters>()?),
29102            StructType::HostNvmeOverFibreChannelParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverFibreChannelParameters>()?),
29103            StructType::HostNvmeOverRdmaParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverRdmaParameters>()?),
29104            StructType::HostNvmeOverTcpParameters => Some(from.as_any_ref().downcast_ref::<HostNvmeOverTcpParameters>()?),
29105            _ => None,
29106        }
29107    }
29108    
29109    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29110        let data_type = from.data_type();
29111        match data_type {
29112            StructType::HostNvmeTransportParameters => Ok(from.as_any_box().downcast::<HostNvmeTransportParameters>()?),
29113            StructType::HostNvmeOpaqueTransportParameters => Ok(from.as_any_box().downcast::<HostNvmeOpaqueTransportParameters>()?),
29114            StructType::HostNvmeOverFibreChannelParameters => Ok(from.as_any_box().downcast::<HostNvmeOverFibreChannelParameters>()?),
29115            StructType::HostNvmeOverRdmaParameters => Ok(from.as_any_box().downcast::<HostNvmeOverRdmaParameters>()?),
29116            StructType::HostNvmeOverTcpParameters => Ok(from.as_any_box().downcast::<HostNvmeOverTcpParameters>()?),
29117            _ => Err(from.as_any_box()),
29118        }
29119    }
29120}
29121/// This data object provides information about the state of PciPassthru
29122/// for all pci devices.
29123pub trait HostPciPassthruConfigTrait : super::traits::DataObjectTrait {
29124    /// The name ID of this PCI, composed of "bus:slot.function".
29125    fn get_id(&self) -> &str;
29126    /// Whether passThru has been configured for this device
29127    fn get_passthru_enabled(&self) -> bool;
29128    /// Whether the passThru config should take effect without rebooting ESX.
29129    /// 
29130    /// When unset, the behavior will be determined automatically
29131    /// based on *HostCapability.deviceRebindWithoutRebootSupported*.
29132    /// If the configuration can be applied immediately, it
29133    /// will be, otherwise the changes will take effect after reboot.
29134    fn get_apply_now(&self) -> Option<bool>;
29135    /// The hardware label of the this PCI device.
29136    /// 
29137    /// ***Since:*** vSphere API Release 7.0.2.0
29138    fn get_hardware_label(&self) -> &Option<String>;
29139}
29140impl<'s> serde::Serialize for dyn HostPciPassthruConfigTrait + 's {
29141            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29142            where
29143                S: serde::Serializer,
29144            {
29145                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29146            }
29147        }
29148impl<'de> serde::Deserialize<'de> for Box<dyn HostPciPassthruConfigTrait> {
29149            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29150                deserializer.deserialize_map(HostPciPassthruConfigVisitor)
29151            }
29152        }
29153
29154struct HostPciPassthruConfigVisitor;
29155
29156impl<'de> de::Visitor<'de> for HostPciPassthruConfigVisitor {
29157    type Value = Box<dyn HostPciPassthruConfigTrait>;
29158
29159    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29160        formatter.write_str("a valid HostPciPassthruConfigTrait JSON object with a _typeName field")
29161    }
29162
29163    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29164    where
29165        A: de::MapAccess<'de>,
29166    {
29167        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29168        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29169        match any {
29170            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29171                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29172            VimAny::Value(value) => Err(de::Error::custom(format!(
29173                "expected object not wrapped value: {:?}",
29174                value))),
29175        }
29176    }
29177}
29178
29179impl HostPciPassthruConfigTrait for HostPciPassthruConfig {
29180    fn get_id(&self) -> &str { &self.id }
29181    fn get_passthru_enabled(&self) -> bool { self.passthru_enabled }
29182    fn get_apply_now(&self) -> Option<bool> { self.apply_now }
29183    fn get_hardware_label(&self) -> &Option<String> { &self.hardware_label }
29184}
29185impl HostPciPassthruConfigTrait for HostSriovConfig {
29186    fn get_id(&self) -> &str { &self.id }
29187    fn get_passthru_enabled(&self) -> bool { self.passthru_enabled }
29188    fn get_apply_now(&self) -> Option<bool> { self.apply_now }
29189    fn get_hardware_label(&self) -> &Option<String> { &self.hardware_label }
29190}
29191impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostPciPassthruConfigTrait {
29192    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29193        let data_type = from.data_type();
29194        match data_type {
29195            StructType::HostPciPassthruConfig => Some(from.as_any_ref().downcast_ref::<HostPciPassthruConfig>()?),
29196            StructType::HostSriovConfig => Some(from.as_any_ref().downcast_ref::<HostSriovConfig>()?),
29197            _ => None,
29198        }
29199    }
29200    
29201    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29202        let data_type = from.data_type();
29203        match data_type {
29204            StructType::HostPciPassthruConfig => Ok(from.as_any_box().downcast::<HostPciPassthruConfig>()?),
29205            StructType::HostSriovConfig => Ok(from.as_any_box().downcast::<HostSriovConfig>()?),
29206            _ => Err(from.as_any_box()),
29207        }
29208    }
29209}
29210/// This data object provides information about the state of PciPassthru
29211/// for all pci devices.
29212pub trait HostPciPassthruInfoTrait : super::traits::DataObjectTrait {
29213    /// The name ID of this PCI, composed of "bus:slot.function".
29214    fn get_id(&self) -> &str;
29215    /// Device which needs to be unclaimed by vmkernel (may be bridge)
29216    fn get_dependent_device(&self) -> &str;
29217    /// Whether passThru has been configured by the user
29218    fn get_passthru_enabled(&self) -> bool;
29219    /// Whether passThru is even possible for this device (decided by vmkctl)
29220    fn get_passthru_capable(&self) -> bool;
29221    /// Whether passThru is active for this device (meaning enabled + rebooted)
29222    fn get_passthru_active(&self) -> bool;
29223    /// The hardware label of this PCI device.
29224    /// 
29225    /// ***Since:*** vSphere API Release 7.0.2.0
29226    fn get_hardware_label(&self) -> &Option<String>;
29227}
29228impl<'s> serde::Serialize for dyn HostPciPassthruInfoTrait + 's {
29229            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29230            where
29231                S: serde::Serializer,
29232            {
29233                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29234            }
29235        }
29236impl<'de> serde::Deserialize<'de> for Box<dyn HostPciPassthruInfoTrait> {
29237            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29238                deserializer.deserialize_map(HostPciPassthruInfoVisitor)
29239            }
29240        }
29241
29242struct HostPciPassthruInfoVisitor;
29243
29244impl<'de> de::Visitor<'de> for HostPciPassthruInfoVisitor {
29245    type Value = Box<dyn HostPciPassthruInfoTrait>;
29246
29247    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29248        formatter.write_str("a valid HostPciPassthruInfoTrait JSON object with a _typeName field")
29249    }
29250
29251    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29252    where
29253        A: de::MapAccess<'de>,
29254    {
29255        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29256        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29257        match any {
29258            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29259                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29260            VimAny::Value(value) => Err(de::Error::custom(format!(
29261                "expected object not wrapped value: {:?}",
29262                value))),
29263        }
29264    }
29265}
29266
29267impl HostPciPassthruInfoTrait for HostPciPassthruInfo {
29268    fn get_id(&self) -> &str { &self.id }
29269    fn get_dependent_device(&self) -> &str { &self.dependent_device }
29270    fn get_passthru_enabled(&self) -> bool { self.passthru_enabled }
29271    fn get_passthru_capable(&self) -> bool { self.passthru_capable }
29272    fn get_passthru_active(&self) -> bool { self.passthru_active }
29273    fn get_hardware_label(&self) -> &Option<String> { &self.hardware_label }
29274}
29275impl HostPciPassthruInfoTrait for HostSriovInfo {
29276    fn get_id(&self) -> &str { &self.id }
29277    fn get_dependent_device(&self) -> &str { &self.dependent_device }
29278    fn get_passthru_enabled(&self) -> bool { self.passthru_enabled }
29279    fn get_passthru_capable(&self) -> bool { self.passthru_capable }
29280    fn get_passthru_active(&self) -> bool { self.passthru_active }
29281    fn get_hardware_label(&self) -> &Option<String> { &self.hardware_label }
29282}
29283impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostPciPassthruInfoTrait {
29284    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29285        let data_type = from.data_type();
29286        match data_type {
29287            StructType::HostPciPassthruInfo => Some(from.as_any_ref().downcast_ref::<HostPciPassthruInfo>()?),
29288            StructType::HostSriovInfo => Some(from.as_any_ref().downcast_ref::<HostSriovInfo>()?),
29289            _ => None,
29290        }
29291    }
29292    
29293    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29294        let data_type = from.data_type();
29295        match data_type {
29296            StructType::HostPciPassthruInfo => Ok(from.as_any_box().downcast::<HostPciPassthruInfo>()?),
29297            StructType::HostSriovInfo => Ok(from.as_any_box().downcast::<HostSriovInfo>()?),
29298            _ => Err(from.as_any_box()),
29299        }
29300    }
29301}
29302/// This data object type describes each network of a physical
29303/// network adapter's network hint.
29304pub trait PhysicalNicHintTrait : super::traits::DataObjectTrait {
29305    /// The optional VLAN Id of the network.
29306    fn get_vlan_id(&self) -> Option<i32>;
29307}
29308impl<'s> serde::Serialize for dyn PhysicalNicHintTrait + 's {
29309            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29310            where
29311                S: serde::Serializer,
29312            {
29313                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29314            }
29315        }
29316impl<'de> serde::Deserialize<'de> for Box<dyn PhysicalNicHintTrait> {
29317            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29318                deserializer.deserialize_map(PhysicalNicHintVisitor)
29319            }
29320        }
29321
29322struct PhysicalNicHintVisitor;
29323
29324impl<'de> de::Visitor<'de> for PhysicalNicHintVisitor {
29325    type Value = Box<dyn PhysicalNicHintTrait>;
29326
29327    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29328        formatter.write_str("a valid PhysicalNicHintTrait JSON object with a _typeName field")
29329    }
29330
29331    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29332    where
29333        A: de::MapAccess<'de>,
29334    {
29335        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29336        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29337        match any {
29338            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29339                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29340            VimAny::Value(value) => Err(de::Error::custom(format!(
29341                "expected object not wrapped value: {:?}",
29342                value))),
29343        }
29344    }
29345}
29346
29347impl PhysicalNicHintTrait for PhysicalNicHint {
29348    fn get_vlan_id(&self) -> Option<i32> { self.vlan_id }
29349}
29350impl PhysicalNicHintTrait for PhysicalNicIpHint {
29351    fn get_vlan_id(&self) -> Option<i32> { self.vlan_id }
29352}
29353impl PhysicalNicHintTrait for PhysicalNicNameHint {
29354    fn get_vlan_id(&self) -> Option<i32> { self.vlan_id }
29355}
29356impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PhysicalNicHintTrait {
29357    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29358        let data_type = from.data_type();
29359        match data_type {
29360            StructType::PhysicalNicHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicHint>()?),
29361            StructType::PhysicalNicIpHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicIpHint>()?),
29362            StructType::PhysicalNicNameHint => Some(from.as_any_ref().downcast_ref::<PhysicalNicNameHint>()?),
29363            _ => None,
29364        }
29365    }
29366    
29367    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29368        let data_type = from.data_type();
29369        match data_type {
29370            StructType::PhysicalNicHint => Ok(from.as_any_box().downcast::<PhysicalNicHint>()?),
29371            StructType::PhysicalNicIpHint => Ok(from.as_any_box().downcast::<PhysicalNicIpHint>()?),
29372            StructType::PhysicalNicNameHint => Ok(from.as_any_box().downcast::<PhysicalNicNameHint>()?),
29373            _ => Err(from.as_any_box()),
29374        }
29375    }
29376}
29377/// This data object represents the physical
29378/// backing of an RDMA device.
29379pub trait HostRdmaDeviceBackingTrait : super::traits::DataObjectTrait {
29380}
29381impl<'s> serde::Serialize for dyn HostRdmaDeviceBackingTrait + 's {
29382            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29383            where
29384                S: serde::Serializer,
29385            {
29386                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29387            }
29388        }
29389impl<'de> serde::Deserialize<'de> for Box<dyn HostRdmaDeviceBackingTrait> {
29390            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29391                deserializer.deserialize_map(HostRdmaDeviceBackingVisitor)
29392            }
29393        }
29394
29395struct HostRdmaDeviceBackingVisitor;
29396
29397impl<'de> de::Visitor<'de> for HostRdmaDeviceBackingVisitor {
29398    type Value = Box<dyn HostRdmaDeviceBackingTrait>;
29399
29400    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29401        formatter.write_str("a valid HostRdmaDeviceBackingTrait JSON object with a _typeName field")
29402    }
29403
29404    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29405    where
29406        A: de::MapAccess<'de>,
29407    {
29408        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29409        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29410        match any {
29411            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29412                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29413            VimAny::Value(value) => Err(de::Error::custom(format!(
29414                "expected object not wrapped value: {:?}",
29415                value))),
29416        }
29417    }
29418}
29419
29420impl HostRdmaDeviceBackingTrait for HostRdmaDeviceBacking {
29421}
29422impl HostRdmaDeviceBackingTrait for HostRdmaDevicePnicBacking {
29423}
29424impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostRdmaDeviceBackingTrait {
29425    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29426        let data_type = from.data_type();
29427        match data_type {
29428            StructType::HostRdmaDeviceBacking => Some(from.as_any_ref().downcast_ref::<HostRdmaDeviceBacking>()?),
29429            StructType::HostRdmaDevicePnicBacking => Some(from.as_any_ref().downcast_ref::<HostRdmaDevicePnicBacking>()?),
29430            _ => None,
29431        }
29432    }
29433    
29434    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29435        let data_type = from.data_type();
29436        match data_type {
29437            StructType::HostRdmaDeviceBacking => Ok(from.as_any_box().downcast::<HostRdmaDeviceBacking>()?),
29438            StructType::HostRdmaDevicePnicBacking => Ok(from.as_any_box().downcast::<HostRdmaDevicePnicBacking>()?),
29439            _ => Err(from.as_any_box()),
29440        }
29441    }
29442}
29443pub trait HostSriovDevicePoolInfoTrait : super::traits::DataObjectTrait {
29444    fn get_key(&self) -> &str;
29445}
29446impl<'s> serde::Serialize for dyn HostSriovDevicePoolInfoTrait + 's {
29447            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29448            where
29449                S: serde::Serializer,
29450            {
29451                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29452            }
29453        }
29454impl<'de> serde::Deserialize<'de> for Box<dyn HostSriovDevicePoolInfoTrait> {
29455            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29456                deserializer.deserialize_map(HostSriovDevicePoolInfoVisitor)
29457            }
29458        }
29459
29460struct HostSriovDevicePoolInfoVisitor;
29461
29462impl<'de> de::Visitor<'de> for HostSriovDevicePoolInfoVisitor {
29463    type Value = Box<dyn HostSriovDevicePoolInfoTrait>;
29464
29465    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29466        formatter.write_str("a valid HostSriovDevicePoolInfoTrait JSON object with a _typeName field")
29467    }
29468
29469    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29470    where
29471        A: de::MapAccess<'de>,
29472    {
29473        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29474        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29475        match any {
29476            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29477                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29478            VimAny::Value(value) => Err(de::Error::custom(format!(
29479                "expected object not wrapped value: {:?}",
29480                value))),
29481        }
29482    }
29483}
29484
29485impl HostSriovDevicePoolInfoTrait for HostSriovDevicePoolInfo {
29486    fn get_key(&self) -> &str { &self.key }
29487}
29488impl HostSriovDevicePoolInfoTrait for HostSriovNetworkDevicePoolInfo {
29489    fn get_key(&self) -> &str { &self.key }
29490}
29491impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostSriovDevicePoolInfoTrait {
29492    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29493        let data_type = from.data_type();
29494        match data_type {
29495            StructType::HostSriovDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<HostSriovDevicePoolInfo>()?),
29496            StructType::HostSriovNetworkDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<HostSriovNetworkDevicePoolInfo>()?),
29497            _ => None,
29498        }
29499    }
29500    
29501    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29502        let data_type = from.data_type();
29503        match data_type {
29504            StructType::HostSriovDevicePoolInfo => Ok(from.as_any_box().downcast::<HostSriovDevicePoolInfo>()?),
29505            StructType::HostSriovNetworkDevicePoolInfo => Ok(from.as_any_box().downcast::<HostSriovNetworkDevicePoolInfo>()?),
29506            _ => Err(from.as_any_box()),
29507        }
29508    }
29509}
29510/// Base class for all system swap options.
29511/// 
29512/// This class is not supposed to be used directly.  
29513/// These values are to be used in a *SystemSwapConfiguration.option*
29514/// array.
29515pub trait HostSystemSwapConfigurationSystemSwapOptionTrait : super::traits::DataObjectTrait {
29516    /// Specifies the order the options are preferred among each other.
29517    /// 
29518    /// The lower the value the more important.
29519    fn get_key(&self) -> i32;
29520}
29521impl<'s> serde::Serialize for dyn HostSystemSwapConfigurationSystemSwapOptionTrait + 's {
29522            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29523            where
29524                S: serde::Serializer,
29525            {
29526                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29527            }
29528        }
29529impl<'de> serde::Deserialize<'de> for Box<dyn HostSystemSwapConfigurationSystemSwapOptionTrait> {
29530            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29531                deserializer.deserialize_map(HostSystemSwapConfigurationSystemSwapOptionVisitor)
29532            }
29533        }
29534
29535struct HostSystemSwapConfigurationSystemSwapOptionVisitor;
29536
29537impl<'de> de::Visitor<'de> for HostSystemSwapConfigurationSystemSwapOptionVisitor {
29538    type Value = Box<dyn HostSystemSwapConfigurationSystemSwapOptionTrait>;
29539
29540    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29541        formatter.write_str("a valid HostSystemSwapConfigurationSystemSwapOptionTrait JSON object with a _typeName field")
29542    }
29543
29544    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29545    where
29546        A: de::MapAccess<'de>,
29547    {
29548        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29549        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29550        match any {
29551            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29552                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29553            VimAny::Value(value) => Err(de::Error::custom(format!(
29554                "expected object not wrapped value: {:?}",
29555                value))),
29556        }
29557    }
29558}
29559
29560impl HostSystemSwapConfigurationSystemSwapOptionTrait for HostSystemSwapConfigurationSystemSwapOption {
29561    fn get_key(&self) -> i32 { self.key }
29562}
29563impl HostSystemSwapConfigurationSystemSwapOptionTrait for HostSystemSwapConfigurationDatastoreOption {
29564    fn get_key(&self) -> i32 { self.key }
29565}
29566impl HostSystemSwapConfigurationSystemSwapOptionTrait for HostSystemSwapConfigurationDisabledOption {
29567    fn get_key(&self) -> i32 { self.key }
29568}
29569impl HostSystemSwapConfigurationSystemSwapOptionTrait for HostSystemSwapConfigurationHostCacheOption {
29570    fn get_key(&self) -> i32 { self.key }
29571}
29572impl HostSystemSwapConfigurationSystemSwapOptionTrait for HostSystemSwapConfigurationHostLocalSwapOption {
29573    fn get_key(&self) -> i32 { self.key }
29574}
29575impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostSystemSwapConfigurationSystemSwapOptionTrait {
29576    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29577        let data_type = from.data_type();
29578        match data_type {
29579            StructType::HostSystemSwapConfigurationSystemSwapOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationSystemSwapOption>()?),
29580            StructType::HostSystemSwapConfigurationDatastoreOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationDatastoreOption>()?),
29581            StructType::HostSystemSwapConfigurationDisabledOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationDisabledOption>()?),
29582            StructType::HostSystemSwapConfigurationHostCacheOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationHostCacheOption>()?),
29583            StructType::HostSystemSwapConfigurationHostLocalSwapOption => Some(from.as_any_ref().downcast_ref::<HostSystemSwapConfigurationHostLocalSwapOption>()?),
29584            _ => None,
29585        }
29586    }
29587    
29588    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29589        let data_type = from.data_type();
29590        match data_type {
29591            StructType::HostSystemSwapConfigurationSystemSwapOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationSystemSwapOption>()?),
29592            StructType::HostSystemSwapConfigurationDatastoreOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationDatastoreOption>()?),
29593            StructType::HostSystemSwapConfigurationDisabledOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationDisabledOption>()?),
29594            StructType::HostSystemSwapConfigurationHostCacheOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationHostCacheOption>()?),
29595            StructType::HostSystemSwapConfigurationHostLocalSwapOption => Ok(from.as_any_box().downcast::<HostSystemSwapConfigurationHostLocalSwapOption>()?),
29596            _ => Err(from.as_any_box()),
29597        }
29598    }
29599}
29600/// Transport information about a SCSI target.
29601pub trait HostTargetTransportTrait : super::traits::DataObjectTrait {
29602}
29603impl<'s> serde::Serialize for dyn HostTargetTransportTrait + 's {
29604            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29605            where
29606                S: serde::Serializer,
29607            {
29608                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29609            }
29610        }
29611impl<'de> serde::Deserialize<'de> for Box<dyn HostTargetTransportTrait> {
29612            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29613                deserializer.deserialize_map(HostTargetTransportVisitor)
29614            }
29615        }
29616
29617struct HostTargetTransportVisitor;
29618
29619impl<'de> de::Visitor<'de> for HostTargetTransportVisitor {
29620    type Value = Box<dyn HostTargetTransportTrait>;
29621
29622    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29623        formatter.write_str("a valid HostTargetTransportTrait JSON object with a _typeName field")
29624    }
29625
29626    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29627    where
29628        A: de::MapAccess<'de>,
29629    {
29630        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29631        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29632        match any {
29633            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29634                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29635            VimAny::Value(value) => Err(de::Error::custom(format!(
29636                "expected object not wrapped value: {:?}",
29637                value))),
29638        }
29639    }
29640}
29641
29642impl HostTargetTransportTrait for HostTargetTransport {
29643}
29644impl HostTargetTransportTrait for HostBlockAdapterTargetTransport {
29645}
29646impl HostTargetTransportTrait for HostFibreChannelTargetTransport {
29647}
29648impl HostTargetTransportTrait for HostFibreChannelOverEthernetTargetTransport {
29649}
29650impl HostTargetTransportTrait for HostInternetScsiTargetTransport {
29651}
29652impl HostTargetTransportTrait for HostParallelScsiTargetTransport {
29653}
29654impl HostTargetTransportTrait for HostPcieTargetTransport {
29655}
29656impl HostTargetTransportTrait for HostRdmaTargetTransport {
29657}
29658impl HostTargetTransportTrait for HostSerialAttachedTargetTransport {
29659}
29660impl HostTargetTransportTrait for HostTcpTargetTransport {
29661}
29662impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostTargetTransportTrait {
29663    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29664        let data_type = from.data_type();
29665        match data_type {
29666            StructType::HostTargetTransport => Some(from.as_any_ref().downcast_ref::<HostTargetTransport>()?),
29667            StructType::HostBlockAdapterTargetTransport => Some(from.as_any_ref().downcast_ref::<HostBlockAdapterTargetTransport>()?),
29668            StructType::HostFibreChannelTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelTargetTransport>()?),
29669            StructType::HostFibreChannelOverEthernetTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetTargetTransport>()?),
29670            StructType::HostInternetScsiTargetTransport => Some(from.as_any_ref().downcast_ref::<HostInternetScsiTargetTransport>()?),
29671            StructType::HostParallelScsiTargetTransport => Some(from.as_any_ref().downcast_ref::<HostParallelScsiTargetTransport>()?),
29672            StructType::HostPcieTargetTransport => Some(from.as_any_ref().downcast_ref::<HostPcieTargetTransport>()?),
29673            StructType::HostRdmaTargetTransport => Some(from.as_any_ref().downcast_ref::<HostRdmaTargetTransport>()?),
29674            StructType::HostSerialAttachedTargetTransport => Some(from.as_any_ref().downcast_ref::<HostSerialAttachedTargetTransport>()?),
29675            StructType::HostTcpTargetTransport => Some(from.as_any_ref().downcast_ref::<HostTcpTargetTransport>()?),
29676            _ => None,
29677        }
29678    }
29679    
29680    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29681        let data_type = from.data_type();
29682        match data_type {
29683            StructType::HostTargetTransport => Ok(from.as_any_box().downcast::<HostTargetTransport>()?),
29684            StructType::HostBlockAdapterTargetTransport => Ok(from.as_any_box().downcast::<HostBlockAdapterTargetTransport>()?),
29685            StructType::HostFibreChannelTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelTargetTransport>()?),
29686            StructType::HostFibreChannelOverEthernetTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetTargetTransport>()?),
29687            StructType::HostInternetScsiTargetTransport => Ok(from.as_any_box().downcast::<HostInternetScsiTargetTransport>()?),
29688            StructType::HostParallelScsiTargetTransport => Ok(from.as_any_box().downcast::<HostParallelScsiTargetTransport>()?),
29689            StructType::HostPcieTargetTransport => Ok(from.as_any_box().downcast::<HostPcieTargetTransport>()?),
29690            StructType::HostRdmaTargetTransport => Ok(from.as_any_box().downcast::<HostRdmaTargetTransport>()?),
29691            StructType::HostSerialAttachedTargetTransport => Ok(from.as_any_box().downcast::<HostSerialAttachedTargetTransport>()?),
29692            StructType::HostTcpTargetTransport => Ok(from.as_any_box().downcast::<HostTcpTargetTransport>()?),
29693            _ => Err(from.as_any_box()),
29694        }
29695    }
29696}
29697/// Fibre Channel transport information about a SCSI target.
29698pub trait HostFibreChannelTargetTransportTrait : super::traits::HostTargetTransportTrait {
29699    /// The world wide port name of the target.
29700    fn get_port_world_wide_name(&self) -> i64;
29701    /// The world wide node name of the target.
29702    fn get_node_world_wide_name(&self) -> i64;
29703}
29704impl<'s> serde::Serialize for dyn HostFibreChannelTargetTransportTrait + 's {
29705            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29706            where
29707                S: serde::Serializer,
29708            {
29709                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29710            }
29711        }
29712impl<'de> serde::Deserialize<'de> for Box<dyn HostFibreChannelTargetTransportTrait> {
29713            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29714                deserializer.deserialize_map(HostFibreChannelTargetTransportVisitor)
29715            }
29716        }
29717
29718struct HostFibreChannelTargetTransportVisitor;
29719
29720impl<'de> de::Visitor<'de> for HostFibreChannelTargetTransportVisitor {
29721    type Value = Box<dyn HostFibreChannelTargetTransportTrait>;
29722
29723    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29724        formatter.write_str("a valid HostFibreChannelTargetTransportTrait JSON object with a _typeName field")
29725    }
29726
29727    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29728    where
29729        A: de::MapAccess<'de>,
29730    {
29731        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29732        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29733        match any {
29734            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29735                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29736            VimAny::Value(value) => Err(de::Error::custom(format!(
29737                "expected object not wrapped value: {:?}",
29738                value))),
29739        }
29740    }
29741}
29742
29743impl HostFibreChannelTargetTransportTrait for HostFibreChannelTargetTransport {
29744    fn get_port_world_wide_name(&self) -> i64 { self.port_world_wide_name }
29745    fn get_node_world_wide_name(&self) -> i64 { self.node_world_wide_name }
29746}
29747impl HostFibreChannelTargetTransportTrait for HostFibreChannelOverEthernetTargetTransport {
29748    fn get_port_world_wide_name(&self) -> i64 { self.port_world_wide_name }
29749    fn get_node_world_wide_name(&self) -> i64 { self.node_world_wide_name }
29750}
29751impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostFibreChannelTargetTransportTrait {
29752    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29753        let data_type = from.data_type();
29754        match data_type {
29755            StructType::HostFibreChannelTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelTargetTransport>()?),
29756            StructType::HostFibreChannelOverEthernetTargetTransport => Some(from.as_any_ref().downcast_ref::<HostFibreChannelOverEthernetTargetTransport>()?),
29757            _ => None,
29758        }
29759    }
29760    
29761    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29762        let data_type = from.data_type();
29763        match data_type {
29764            StructType::HostFibreChannelTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelTargetTransport>()?),
29765            StructType::HostFibreChannelOverEthernetTargetTransport => Ok(from.as_any_box().downcast::<HostFibreChannelOverEthernetTargetTransport>()?),
29766            _ => Err(from.as_any_box()),
29767        }
29768    }
29769}
29770/// This is a base data object for describing an event generated by
29771/// Trusted Platform Module (TPM).
29772/// 
29773/// It contains parameters common to
29774/// all TPM event types.
29775pub trait HostTpmEventDetailsTrait : super::traits::DataObjectTrait {
29776    /// Value of the Platform Configuration Register (PCR) for this event.
29777    fn get_data_hash(&self) -> &Vec<i8>;
29778    /// Method in which the digest hash is calculated.
29779    /// 
29780    /// The set of possible
29781    /// values is described in *HostDigestInfoDigestMethodType_enum*.
29782    fn get_data_hash_method(&self) -> &Option<String>;
29783}
29784impl<'s> serde::Serialize for dyn HostTpmEventDetailsTrait + 's {
29785            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29786            where
29787                S: serde::Serializer,
29788            {
29789                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29790            }
29791        }
29792impl<'de> serde::Deserialize<'de> for Box<dyn HostTpmEventDetailsTrait> {
29793            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29794                deserializer.deserialize_map(HostTpmEventDetailsVisitor)
29795            }
29796        }
29797
29798struct HostTpmEventDetailsVisitor;
29799
29800impl<'de> de::Visitor<'de> for HostTpmEventDetailsVisitor {
29801    type Value = Box<dyn HostTpmEventDetailsTrait>;
29802
29803    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29804        formatter.write_str("a valid HostTpmEventDetailsTrait JSON object with a _typeName field")
29805    }
29806
29807    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29808    where
29809        A: de::MapAccess<'de>,
29810    {
29811        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29812        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29813        match any {
29814            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29815                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29816            VimAny::Value(value) => Err(de::Error::custom(format!(
29817                "expected object not wrapped value: {:?}",
29818                value))),
29819        }
29820    }
29821}
29822
29823impl HostTpmEventDetailsTrait for HostTpmEventDetails {
29824    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29825    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29826}
29827impl HostTpmEventDetailsTrait for HostTpmBootCompleteEventDetails {
29828    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29829    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29830}
29831impl HostTpmEventDetailsTrait for HostTpmBootSecurityOptionEventDetails {
29832    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29833    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29834}
29835impl HostTpmEventDetailsTrait for HostTpmNvTagEventDetails {
29836    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29837    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29838}
29839impl HostTpmEventDetailsTrait for HostTpmSignerEventDetails {
29840    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29841    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29842}
29843impl HostTpmEventDetailsTrait for HostTpmCommandEventDetails {
29844    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29845    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29846}
29847impl HostTpmEventDetailsTrait for HostTpmOptionEventDetails {
29848    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29849    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29850}
29851impl HostTpmEventDetailsTrait for HostTpmSoftwareComponentEventDetails {
29852    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29853    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29854}
29855impl HostTpmEventDetailsTrait for HostTpmVersionEventDetails {
29856    fn get_data_hash(&self) -> &Vec<i8> { &self.data_hash }
29857    fn get_data_hash_method(&self) -> &Option<String> { &self.data_hash_method }
29858}
29859impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostTpmEventDetailsTrait {
29860    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29861        let data_type = from.data_type();
29862        match data_type {
29863            StructType::HostTpmEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmEventDetails>()?),
29864            StructType::HostTpmBootCompleteEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmBootCompleteEventDetails>()?),
29865            StructType::HostTpmBootSecurityOptionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmBootSecurityOptionEventDetails>()?),
29866            StructType::HostTpmNvTagEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmNvTagEventDetails>()?),
29867            StructType::HostTpmSignerEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmSignerEventDetails>()?),
29868            StructType::HostTpmCommandEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmCommandEventDetails>()?),
29869            StructType::HostTpmOptionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmOptionEventDetails>()?),
29870            StructType::HostTpmSoftwareComponentEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmSoftwareComponentEventDetails>()?),
29871            StructType::HostTpmVersionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmVersionEventDetails>()?),
29872            _ => None,
29873        }
29874    }
29875    
29876    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29877        let data_type = from.data_type();
29878        match data_type {
29879            StructType::HostTpmEventDetails => Ok(from.as_any_box().downcast::<HostTpmEventDetails>()?),
29880            StructType::HostTpmBootCompleteEventDetails => Ok(from.as_any_box().downcast::<HostTpmBootCompleteEventDetails>()?),
29881            StructType::HostTpmBootSecurityOptionEventDetails => Ok(from.as_any_box().downcast::<HostTpmBootSecurityOptionEventDetails>()?),
29882            StructType::HostTpmNvTagEventDetails => Ok(from.as_any_box().downcast::<HostTpmNvTagEventDetails>()?),
29883            StructType::HostTpmSignerEventDetails => Ok(from.as_any_box().downcast::<HostTpmSignerEventDetails>()?),
29884            StructType::HostTpmCommandEventDetails => Ok(from.as_any_box().downcast::<HostTpmCommandEventDetails>()?),
29885            StructType::HostTpmOptionEventDetails => Ok(from.as_any_box().downcast::<HostTpmOptionEventDetails>()?),
29886            StructType::HostTpmSoftwareComponentEventDetails => Ok(from.as_any_box().downcast::<HostTpmSoftwareComponentEventDetails>()?),
29887            StructType::HostTpmVersionEventDetails => Ok(from.as_any_box().downcast::<HostTpmVersionEventDetails>()?),
29888            _ => Err(from.as_any_box()),
29889        }
29890    }
29891}
29892/// Details of a Trusted Platform Module (TPM) event recording kernel security
29893/// option passed at boot time and currently in effect.
29894/// 
29895/// This event type exists to simplify parsing of the security-related information
29896/// by internal and third-party solutions. Each boot option may be passed to kernel
29897/// multiple times and/or in different forms. Replicating the parsing logic of the
29898/// kernel would be neither convinient, nor secure for the client applications.
29899/// 
29900/// Each instance of this event reports details of a single security-related
29901/// boot option, as set in the kernel.
29902pub trait HostTpmBootSecurityOptionEventDetailsTrait : super::traits::HostTpmEventDetailsTrait {
29903    /// Security-related options string, reflecting the state of an option set
29904    /// in the kernel.
29905    /// 
29906    /// This string is in the form of a KEY=VALUE pair.
29907    fn get_boot_security_option(&self) -> &str;
29908}
29909impl<'s> serde::Serialize for dyn HostTpmBootSecurityOptionEventDetailsTrait + 's {
29910            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29911            where
29912                S: serde::Serializer,
29913            {
29914                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29915            }
29916        }
29917impl<'de> serde::Deserialize<'de> for Box<dyn HostTpmBootSecurityOptionEventDetailsTrait> {
29918            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29919                deserializer.deserialize_map(HostTpmBootSecurityOptionEventDetailsVisitor)
29920            }
29921        }
29922
29923struct HostTpmBootSecurityOptionEventDetailsVisitor;
29924
29925impl<'de> de::Visitor<'de> for HostTpmBootSecurityOptionEventDetailsVisitor {
29926    type Value = Box<dyn HostTpmBootSecurityOptionEventDetailsTrait>;
29927
29928    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29929        formatter.write_str("a valid HostTpmBootSecurityOptionEventDetailsTrait JSON object with a _typeName field")
29930    }
29931
29932    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
29933    where
29934        A: de::MapAccess<'de>,
29935    {
29936        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
29937        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
29938        match any {
29939            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
29940                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
29941            VimAny::Value(value) => Err(de::Error::custom(format!(
29942                "expected object not wrapped value: {:?}",
29943                value))),
29944        }
29945    }
29946}
29947
29948impl HostTpmBootSecurityOptionEventDetailsTrait for HostTpmBootSecurityOptionEventDetails {
29949    fn get_boot_security_option(&self) -> &str { &self.boot_security_option }
29950}
29951impl HostTpmBootSecurityOptionEventDetailsTrait for HostTpmNvTagEventDetails {
29952    fn get_boot_security_option(&self) -> &str { &self.boot_security_option }
29953}
29954impl HostTpmBootSecurityOptionEventDetailsTrait for HostTpmSignerEventDetails {
29955    fn get_boot_security_option(&self) -> &str { &self.boot_security_option }
29956}
29957impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostTpmBootSecurityOptionEventDetailsTrait {
29958    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
29959        let data_type = from.data_type();
29960        match data_type {
29961            StructType::HostTpmBootSecurityOptionEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmBootSecurityOptionEventDetails>()?),
29962            StructType::HostTpmNvTagEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmNvTagEventDetails>()?),
29963            StructType::HostTpmSignerEventDetails => Some(from.as_any_ref().downcast_ref::<HostTpmSignerEventDetails>()?),
29964            _ => None,
29965        }
29966    }
29967    
29968    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
29969        let data_type = from.data_type();
29970        match data_type {
29971            StructType::HostTpmBootSecurityOptionEventDetails => Ok(from.as_any_box().downcast::<HostTpmBootSecurityOptionEventDetails>()?),
29972            StructType::HostTpmNvTagEventDetails => Ok(from.as_any_box().downcast::<HostTpmNvTagEventDetails>()?),
29973            StructType::HostTpmSignerEventDetails => Ok(from.as_any_box().downcast::<HostTpmSignerEventDetails>()?),
29974            _ => Err(from.as_any_box()),
29975        }
29976    }
29977}
29978/// A bridge connects a virtual switch to a physical network adapter.
29979/// 
29980/// There are multiple types of bridges.
29981pub trait HostVirtualSwitchBridgeTrait : super::traits::DataObjectTrait {
29982}
29983impl<'s> serde::Serialize for dyn HostVirtualSwitchBridgeTrait + 's {
29984            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
29985            where
29986                S: serde::Serializer,
29987            {
29988                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
29989            }
29990        }
29991impl<'de> serde::Deserialize<'de> for Box<dyn HostVirtualSwitchBridgeTrait> {
29992            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
29993                deserializer.deserialize_map(HostVirtualSwitchBridgeVisitor)
29994            }
29995        }
29996
29997struct HostVirtualSwitchBridgeVisitor;
29998
29999impl<'de> de::Visitor<'de> for HostVirtualSwitchBridgeVisitor {
30000    type Value = Box<dyn HostVirtualSwitchBridgeTrait>;
30001
30002    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30003        formatter.write_str("a valid HostVirtualSwitchBridgeTrait JSON object with a _typeName field")
30004    }
30005
30006    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30007    where
30008        A: de::MapAccess<'de>,
30009    {
30010        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30011        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30012        match any {
30013            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30014                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30015            VimAny::Value(value) => Err(de::Error::custom(format!(
30016                "expected object not wrapped value: {:?}",
30017                value))),
30018        }
30019    }
30020}
30021
30022impl HostVirtualSwitchBridgeTrait for HostVirtualSwitchBridge {
30023}
30024impl HostVirtualSwitchBridgeTrait for HostVirtualSwitchAutoBridge {
30025}
30026impl HostVirtualSwitchBridgeTrait for HostVirtualSwitchBondBridge {
30027}
30028impl HostVirtualSwitchBridgeTrait for HostVirtualSwitchSimpleBridge {
30029}
30030impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostVirtualSwitchBridgeTrait {
30031    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30032        let data_type = from.data_type();
30033        match data_type {
30034            StructType::HostVirtualSwitchBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchBridge>()?),
30035            StructType::HostVirtualSwitchAutoBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchAutoBridge>()?),
30036            StructType::HostVirtualSwitchBondBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchBondBridge>()?),
30037            StructType::HostVirtualSwitchSimpleBridge => Some(from.as_any_ref().downcast_ref::<HostVirtualSwitchSimpleBridge>()?),
30038            _ => None,
30039        }
30040    }
30041    
30042    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30043        let data_type = from.data_type();
30044        match data_type {
30045            StructType::HostVirtualSwitchBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchBridge>()?),
30046            StructType::HostVirtualSwitchAutoBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchAutoBridge>()?),
30047            StructType::HostVirtualSwitchBondBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchBondBridge>()?),
30048            StructType::HostVirtualSwitchSimpleBridge => Ok(from.as_any_box().downcast::<HostVirtualSwitchSimpleBridge>()?),
30049            _ => Err(from.as_any_box()),
30050        }
30051    }
30052}
30053/// Base class that describes a VMFS datastore provisioning option.
30054pub trait VmfsDatastoreBaseOptionTrait : super::traits::DataObjectTrait {
30055    /// The partition table layout that the disk will have if this
30056    /// provisioning option is selected.
30057    /// 
30058    /// In releases after vSphere API 5.0, vSphere Servers might not
30059    /// generate property collector update notifications for this property.
30060    /// To obtain the latest value of the property, you can use
30061    /// PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx.
30062    /// If you use the PropertyCollector.WaitForUpdatesEx method, specify
30063    /// an empty string for the version parameter.
30064    /// Since this property is on a DataObject, an update returned by WaitForUpdatesEx may
30065    /// contain values for this property when some other property on the DataObject changes.
30066    /// If this update is a result of a call to WaitForUpdatesEx with a non-empty
30067    /// version parameter, the value for this property may not be current.
30068    fn get_layout(&self) -> &super::structs::HostDiskPartitionLayout;
30069    /// Indicates whether selecting this option will change the partition
30070    /// format type on the disk.
30071    /// 
30072    /// See also *HostDiskPartitionInfoPartitionFormat_enum*.
30073    fn get_partition_format_change(&self) -> Option<bool>;
30074}
30075impl<'s> serde::Serialize for dyn VmfsDatastoreBaseOptionTrait + 's {
30076            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30077            where
30078                S: serde::Serializer,
30079            {
30080                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30081            }
30082        }
30083impl<'de> serde::Deserialize<'de> for Box<dyn VmfsDatastoreBaseOptionTrait> {
30084            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30085                deserializer.deserialize_map(VmfsDatastoreBaseOptionVisitor)
30086            }
30087        }
30088
30089struct VmfsDatastoreBaseOptionVisitor;
30090
30091impl<'de> de::Visitor<'de> for VmfsDatastoreBaseOptionVisitor {
30092    type Value = Box<dyn VmfsDatastoreBaseOptionTrait>;
30093
30094    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30095        formatter.write_str("a valid VmfsDatastoreBaseOptionTrait JSON object with a _typeName field")
30096    }
30097
30098    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30099    where
30100        A: de::MapAccess<'de>,
30101    {
30102        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30103        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30104        match any {
30105            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30106                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30107            VimAny::Value(value) => Err(de::Error::custom(format!(
30108                "expected object not wrapped value: {:?}",
30109                value))),
30110        }
30111    }
30112}
30113
30114impl VmfsDatastoreBaseOptionTrait for VmfsDatastoreBaseOption {
30115    fn get_layout(&self) -> &super::structs::HostDiskPartitionLayout { &self.layout }
30116    fn get_partition_format_change(&self) -> Option<bool> { self.partition_format_change }
30117}
30118impl VmfsDatastoreBaseOptionTrait for VmfsDatastoreMultipleExtentOption {
30119    fn get_layout(&self) -> &super::structs::HostDiskPartitionLayout { &self.layout }
30120    fn get_partition_format_change(&self) -> Option<bool> { self.partition_format_change }
30121}
30122impl VmfsDatastoreBaseOptionTrait for VmfsDatastoreSingleExtentOption {
30123    fn get_layout(&self) -> &super::structs::HostDiskPartitionLayout { &self.layout }
30124    fn get_partition_format_change(&self) -> Option<bool> { self.partition_format_change }
30125}
30126impl VmfsDatastoreBaseOptionTrait for VmfsDatastoreAllExtentOption {
30127    fn get_layout(&self) -> &super::structs::HostDiskPartitionLayout { &self.layout }
30128    fn get_partition_format_change(&self) -> Option<bool> { self.partition_format_change }
30129}
30130impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmfsDatastoreBaseOptionTrait {
30131    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30132        let data_type = from.data_type();
30133        match data_type {
30134            StructType::VmfsDatastoreBaseOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreBaseOption>()?),
30135            StructType::VmfsDatastoreMultipleExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreMultipleExtentOption>()?),
30136            StructType::VmfsDatastoreSingleExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreSingleExtentOption>()?),
30137            StructType::VmfsDatastoreAllExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreAllExtentOption>()?),
30138            _ => None,
30139        }
30140    }
30141    
30142    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30143        let data_type = from.data_type();
30144        match data_type {
30145            StructType::VmfsDatastoreBaseOption => Ok(from.as_any_box().downcast::<VmfsDatastoreBaseOption>()?),
30146            StructType::VmfsDatastoreMultipleExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreMultipleExtentOption>()?),
30147            StructType::VmfsDatastoreSingleExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreSingleExtentOption>()?),
30148            StructType::VmfsDatastoreAllExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreAllExtentOption>()?),
30149            _ => Err(from.as_any_box()),
30150        }
30151    }
30152}
30153/// Datastore addition policy to use a single extent on the disk for a VMFS
30154/// datastore.
30155/// 
30156/// A single extent implies that one disk partition will be
30157/// created on the disk for creating or increasing the capacity of a VMFS datastore.
30158pub trait VmfsDatastoreSingleExtentOptionTrait : super::traits::VmfsDatastoreBaseOptionTrait {
30159    /// The block range to be used as an extent in a VMFS datastore.
30160    fn get_vmfs_extent(&self) -> &super::structs::HostDiskPartitionBlockRange;
30161}
30162impl<'s> serde::Serialize for dyn VmfsDatastoreSingleExtentOptionTrait + 's {
30163            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30164            where
30165                S: serde::Serializer,
30166            {
30167                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30168            }
30169        }
30170impl<'de> serde::Deserialize<'de> for Box<dyn VmfsDatastoreSingleExtentOptionTrait> {
30171            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30172                deserializer.deserialize_map(VmfsDatastoreSingleExtentOptionVisitor)
30173            }
30174        }
30175
30176struct VmfsDatastoreSingleExtentOptionVisitor;
30177
30178impl<'de> de::Visitor<'de> for VmfsDatastoreSingleExtentOptionVisitor {
30179    type Value = Box<dyn VmfsDatastoreSingleExtentOptionTrait>;
30180
30181    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30182        formatter.write_str("a valid VmfsDatastoreSingleExtentOptionTrait JSON object with a _typeName field")
30183    }
30184
30185    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30186    where
30187        A: de::MapAccess<'de>,
30188    {
30189        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30190        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30191        match any {
30192            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30193                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30194            VimAny::Value(value) => Err(de::Error::custom(format!(
30195                "expected object not wrapped value: {:?}",
30196                value))),
30197        }
30198    }
30199}
30200
30201impl VmfsDatastoreSingleExtentOptionTrait for VmfsDatastoreSingleExtentOption {
30202    fn get_vmfs_extent(&self) -> &super::structs::HostDiskPartitionBlockRange { &self.vmfs_extent }
30203}
30204impl VmfsDatastoreSingleExtentOptionTrait for VmfsDatastoreAllExtentOption {
30205    fn get_vmfs_extent(&self) -> &super::structs::HostDiskPartitionBlockRange { &self.vmfs_extent }
30206}
30207impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmfsDatastoreSingleExtentOptionTrait {
30208    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30209        let data_type = from.data_type();
30210        match data_type {
30211            StructType::VmfsDatastoreSingleExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreSingleExtentOption>()?),
30212            StructType::VmfsDatastoreAllExtentOption => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreAllExtentOption>()?),
30213            _ => None,
30214        }
30215    }
30216    
30217    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30218        let data_type = from.data_type();
30219        match data_type {
30220            StructType::VmfsDatastoreSingleExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreSingleExtentOption>()?),
30221            StructType::VmfsDatastoreAllExtentOption => Ok(from.as_any_box().downcast::<VmfsDatastoreAllExtentOption>()?),
30222            _ => Err(from.as_any_box()),
30223        }
30224    }
30225}
30226/// Base class for VMFS datastore addition specification.
30227/// 
30228/// Used as a generic
30229/// way to point to one of the creation specifications that can be used to
30230/// apply a specification to effect the creation or extension of a VMFS
30231/// datastore.
30232pub trait VmfsDatastoreSpecTrait : super::traits::DataObjectTrait {
30233    /// The UUID of the SCSI disk on which the VMFS datastore is located.
30234    /// 
30235    /// See also *HostScsiDisk*, *ScsiLun.uuid*.
30236    fn get_disk_uuid(&self) -> &str;
30237}
30238impl<'s> serde::Serialize for dyn VmfsDatastoreSpecTrait + 's {
30239            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30240            where
30241                S: serde::Serializer,
30242            {
30243                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30244            }
30245        }
30246impl<'de> serde::Deserialize<'de> for Box<dyn VmfsDatastoreSpecTrait> {
30247            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30248                deserializer.deserialize_map(VmfsDatastoreSpecVisitor)
30249            }
30250        }
30251
30252struct VmfsDatastoreSpecVisitor;
30253
30254impl<'de> de::Visitor<'de> for VmfsDatastoreSpecVisitor {
30255    type Value = Box<dyn VmfsDatastoreSpecTrait>;
30256
30257    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30258        formatter.write_str("a valid VmfsDatastoreSpecTrait JSON object with a _typeName field")
30259    }
30260
30261    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30262    where
30263        A: de::MapAccess<'de>,
30264    {
30265        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30266        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30267        match any {
30268            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30269                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30270            VimAny::Value(value) => Err(de::Error::custom(format!(
30271                "expected object not wrapped value: {:?}",
30272                value))),
30273        }
30274    }
30275}
30276
30277impl VmfsDatastoreSpecTrait for VmfsDatastoreSpec {
30278    fn get_disk_uuid(&self) -> &str { &self.disk_uuid }
30279}
30280impl VmfsDatastoreSpecTrait for VmfsDatastoreCreateSpec {
30281    fn get_disk_uuid(&self) -> &str { &self.disk_uuid }
30282}
30283impl VmfsDatastoreSpecTrait for VmfsDatastoreExpandSpec {
30284    fn get_disk_uuid(&self) -> &str { &self.disk_uuid }
30285}
30286impl VmfsDatastoreSpecTrait for VmfsDatastoreExtendSpec {
30287    fn get_disk_uuid(&self) -> &str { &self.disk_uuid }
30288}
30289impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmfsDatastoreSpecTrait {
30290    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30291        let data_type = from.data_type();
30292        match data_type {
30293            StructType::VmfsDatastoreSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreSpec>()?),
30294            StructType::VmfsDatastoreCreateSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreCreateSpec>()?),
30295            StructType::VmfsDatastoreExpandSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreExpandSpec>()?),
30296            StructType::VmfsDatastoreExtendSpec => Some(from.as_any_ref().downcast_ref::<VmfsDatastoreExtendSpec>()?),
30297            _ => None,
30298        }
30299    }
30300    
30301    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30302        let data_type = from.data_type();
30303        match data_type {
30304            StructType::VmfsDatastoreSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreSpec>()?),
30305            StructType::VmfsDatastoreCreateSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreCreateSpec>()?),
30306            StructType::VmfsDatastoreExpandSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreExpandSpec>()?),
30307            StructType::VmfsDatastoreExtendSpec => Ok(from.as_any_box().downcast::<VmfsDatastoreExtendSpec>()?),
30308            _ => Err(from.as_any_box()),
30309        }
30310    }
30311}
30312/// Captures all common HCL related information about particular device, e.g physical NIC
30313/// 
30314/// This structure may be used only with operations rendered under `/vsan`.
30315pub trait VsanHclCommonDeviceInfoTrait : super::traits::DataObjectTrait {
30316    /// The device name used by ESX to refer to the device right now, e.g.
30317    /// 
30318    /// vmhba1, vmnic0
30319    fn get_device_name(&self) -> &str;
30320    /// The human friendly product model description by which the controller
30321    /// announces itself, e.g., "Intel Corporation PIIX4 ...".
30322    fn get_display_name(&self) -> &Option<String>;
30323    /// The name of the driver, e.g.
30324    /// 
30325    /// mpt2sas.
30326    fn get_driver_name(&self) -> &Option<String>;
30327    /// The version of the driver as reported by the driver kernel module,
30328    /// e.g.
30329    /// 
30330    /// '4.23.01.00-9vmw'.
30331    fn get_driver_version(&self) -> &Option<String>;
30332    /// The vendorId of the PCI device, e.g.
30333    /// 
30334    /// 4096.
30335    fn get_vendor_id(&self) -> Option<i64>;
30336    /// The deviceId of the PCI device, e.g.
30337    /// 
30338    /// 48.
30339    fn get_device_id(&self) -> Option<i64>;
30340    /// The subVendorId of the PCI device, e.g.
30341    /// 
30342    /// 6518.
30343    fn get_sub_vendor_id(&self) -> Option<i64>;
30344    /// The subDeviceId of the PCI device, e.g.
30345    /// 
30346    /// 5549.
30347    fn get_sub_device_id(&self) -> Option<i64>;
30348    /// Any additional information not explicitly modeled in API.
30349    /// 
30350    /// Can be used for vendor specific information about features
30351    /// of a controller.
30352    fn get_extra_info(&self) -> &Option<Vec<super::structs::KeyValue>>;
30353    /// If the device shows up on the HCL at all.
30354    fn get_device_on_hcl(&self) -> Option<bool>;
30355    /// If the device is on the HCL and the release of ESXi in use is supported.
30356    fn get_release_supported(&self) -> Option<bool>;
30357    /// If the device is on the HCL, this holds the names of the supported releases.
30358    fn get_releases_on_hcl(&self) -> &Option<Vec<String>>;
30359    /// If the device shows up on the HCL, and is supported for the release of ESXi,
30360    /// this field will list the supported driver versions.
30361    fn get_driver_versions_on_hcl(&self) -> &Option<Vec<String>>;
30362    /// If the device shows up on the HCL, and is supported for the release of ESXi,
30363    /// and the driver version is detected to be supported
30364    fn get_driver_version_supported(&self) -> Option<bool>;
30365    /// Ignore this value.
30366    fn get_fw_version_supported(&self) -> Option<bool>;
30367    /// Ignore this value.
30368    fn get_fw_version_on_hcl(&self) -> &Option<Vec<String>>;
30369    /// Ignore this value.
30370    fn get_fw_version(&self) -> &Option<String>;
30371    /// If the device shows up on the HCL, and is supported for the release of ESXi,
30372    /// this field will list the supported driver versions, as well as additional
30373    /// information for each driver, like associated firmware.
30374    fn get_drivers_on_hcl(&self) -> &Option<Vec<super::structs::VsanHclDriverInfo>>;
30375}
30376impl<'s> serde::Serialize for dyn VsanHclCommonDeviceInfoTrait + 's {
30377            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30378            where
30379                S: serde::Serializer,
30380            {
30381                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30382            }
30383        }
30384impl<'de> serde::Deserialize<'de> for Box<dyn VsanHclCommonDeviceInfoTrait> {
30385            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30386                deserializer.deserialize_map(VsanHclCommonDeviceInfoVisitor)
30387            }
30388        }
30389
30390struct VsanHclCommonDeviceInfoVisitor;
30391
30392impl<'de> de::Visitor<'de> for VsanHclCommonDeviceInfoVisitor {
30393    type Value = Box<dyn VsanHclCommonDeviceInfoTrait>;
30394
30395    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30396        formatter.write_str("a valid VsanHclCommonDeviceInfoTrait JSON object with a _typeName field")
30397    }
30398
30399    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30400    where
30401        A: de::MapAccess<'de>,
30402    {
30403        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30404        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30405        match any {
30406            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30407                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30408            VimAny::Value(value) => Err(de::Error::custom(format!(
30409                "expected object not wrapped value: {:?}",
30410                value))),
30411        }
30412    }
30413}
30414
30415impl VsanHclCommonDeviceInfoTrait for VsanHclCommonDeviceInfo {
30416    fn get_device_name(&self) -> &str { &self.device_name }
30417    fn get_display_name(&self) -> &Option<String> { &self.display_name }
30418    fn get_driver_name(&self) -> &Option<String> { &self.driver_name }
30419    fn get_driver_version(&self) -> &Option<String> { &self.driver_version }
30420    fn get_vendor_id(&self) -> Option<i64> { self.vendor_id }
30421    fn get_device_id(&self) -> Option<i64> { self.device_id }
30422    fn get_sub_vendor_id(&self) -> Option<i64> { self.sub_vendor_id }
30423    fn get_sub_device_id(&self) -> Option<i64> { self.sub_device_id }
30424    fn get_extra_info(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.extra_info }
30425    fn get_device_on_hcl(&self) -> Option<bool> { self.device_on_hcl }
30426    fn get_release_supported(&self) -> Option<bool> { self.release_supported }
30427    fn get_releases_on_hcl(&self) -> &Option<Vec<String>> { &self.releases_on_hcl }
30428    fn get_driver_versions_on_hcl(&self) -> &Option<Vec<String>> { &self.driver_versions_on_hcl }
30429    fn get_driver_version_supported(&self) -> Option<bool> { self.driver_version_supported }
30430    fn get_fw_version_supported(&self) -> Option<bool> { self.fw_version_supported }
30431    fn get_fw_version_on_hcl(&self) -> &Option<Vec<String>> { &self.fw_version_on_hcl }
30432    fn get_fw_version(&self) -> &Option<String> { &self.fw_version }
30433    fn get_drivers_on_hcl(&self) -> &Option<Vec<super::structs::VsanHclDriverInfo>> { &self.drivers_on_hcl }
30434}
30435impl VsanHclCommonDeviceInfoTrait for VsanHclNicInfo {
30436    fn get_device_name(&self) -> &str { &self.device_name }
30437    fn get_display_name(&self) -> &Option<String> { &self.display_name }
30438    fn get_driver_name(&self) -> &Option<String> { &self.driver_name }
30439    fn get_driver_version(&self) -> &Option<String> { &self.driver_version }
30440    fn get_vendor_id(&self) -> Option<i64> { self.vendor_id }
30441    fn get_device_id(&self) -> Option<i64> { self.device_id }
30442    fn get_sub_vendor_id(&self) -> Option<i64> { self.sub_vendor_id }
30443    fn get_sub_device_id(&self) -> Option<i64> { self.sub_device_id }
30444    fn get_extra_info(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.extra_info }
30445    fn get_device_on_hcl(&self) -> Option<bool> { self.device_on_hcl }
30446    fn get_release_supported(&self) -> Option<bool> { self.release_supported }
30447    fn get_releases_on_hcl(&self) -> &Option<Vec<String>> { &self.releases_on_hcl }
30448    fn get_driver_versions_on_hcl(&self) -> &Option<Vec<String>> { &self.driver_versions_on_hcl }
30449    fn get_driver_version_supported(&self) -> Option<bool> { self.driver_version_supported }
30450    fn get_fw_version_supported(&self) -> Option<bool> { self.fw_version_supported }
30451    fn get_fw_version_on_hcl(&self) -> &Option<Vec<String>> { &self.fw_version_on_hcl }
30452    fn get_fw_version(&self) -> &Option<String> { &self.fw_version }
30453    fn get_drivers_on_hcl(&self) -> &Option<Vec<super::structs::VsanHclDriverInfo>> { &self.drivers_on_hcl }
30454}
30455impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHclCommonDeviceInfoTrait {
30456    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30457        let data_type = from.data_type();
30458        match data_type {
30459            StructType::VsanHclCommonDeviceInfo => Some(from.as_any_ref().downcast_ref::<VsanHclCommonDeviceInfo>()?),
30460            StructType::VsanHclNicInfo => Some(from.as_any_ref().downcast_ref::<VsanHclNicInfo>()?),
30461            _ => None,
30462        }
30463    }
30464    
30465    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30466        let data_type = from.data_type();
30467        match data_type {
30468            StructType::VsanHclCommonDeviceInfo => Ok(from.as_any_box().downcast::<VsanHclCommonDeviceInfo>()?),
30469            StructType::VsanHclNicInfo => Ok(from.as_any_box().downcast::<VsanHclNicInfo>()?),
30470            _ => Err(from.as_any_box()),
30471        }
30472    }
30473}
30474/// This data object type describes the NetBIOS configuration of
30475/// an operating system.
30476pub trait NetBiosConfigInfoTrait : super::traits::DataObjectTrait {
30477    /// NetBIOS configuration mode.
30478    /// 
30479    /// The supported values are described by
30480    /// *NetBIOSConfigInfoMode_enum*.
30481    fn get_mode(&self) -> &str;
30482}
30483impl<'s> serde::Serialize for dyn NetBiosConfigInfoTrait + 's {
30484            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30485            where
30486                S: serde::Serializer,
30487            {
30488                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30489            }
30490        }
30491impl<'de> serde::Deserialize<'de> for Box<dyn NetBiosConfigInfoTrait> {
30492            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30493                deserializer.deserialize_map(NetBiosConfigInfoVisitor)
30494            }
30495        }
30496
30497struct NetBiosConfigInfoVisitor;
30498
30499impl<'de> de::Visitor<'de> for NetBiosConfigInfoVisitor {
30500    type Value = Box<dyn NetBiosConfigInfoTrait>;
30501
30502    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30503        formatter.write_str("a valid NetBiosConfigInfoTrait JSON object with a _typeName field")
30504    }
30505
30506    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30507    where
30508        A: de::MapAccess<'de>,
30509    {
30510        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30511        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30512        match any {
30513            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30514                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30515            VimAny::Value(value) => Err(de::Error::custom(format!(
30516                "expected object not wrapped value: {:?}",
30517                value))),
30518        }
30519    }
30520}
30521
30522impl NetBiosConfigInfoTrait for NetBiosConfigInfo {
30523    fn get_mode(&self) -> &str { &self.mode }
30524}
30525impl NetBiosConfigInfoTrait for WinNetBiosConfigInfo {
30526    fn get_mode(&self) -> &str { &self.mode }
30527}
30528impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NetBiosConfigInfoTrait {
30529    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30530        let data_type = from.data_type();
30531        match data_type {
30532            StructType::NetBiosConfigInfo => Some(from.as_any_ref().downcast_ref::<NetBiosConfigInfo>()?),
30533            StructType::WinNetBiosConfigInfo => Some(from.as_any_ref().downcast_ref::<WinNetBiosConfigInfo>()?),
30534            _ => None,
30535        }
30536    }
30537    
30538    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30539        let data_type = from.data_type();
30540        match data_type {
30541            StructType::NetBiosConfigInfo => Ok(from.as_any_box().downcast::<NetBiosConfigInfo>()?),
30542            StructType::WinNetBiosConfigInfo => Ok(from.as_any_box().downcast::<WinNetBiosConfigInfo>()?),
30543            _ => Err(from.as_any_box()),
30544        }
30545    }
30546}
30547/// An ArrayUpdateSpec data object type is a common superclass
30548/// for supporting incremental updates to arrays.
30549/// 
30550/// The common code pattern is:
30551/// 
30552///          class MyTypeSpec extrends ArrayUpdateSpec {
30553///                MyTypeInfo info;
30554///          }
30555/// The ArrayUpdateSpec contains the following:
30556/// - **operation**: the type of operation being performed.
30557/// - **removeKey**: In the case of a remove operation, the
30558///   key value that identifies the array to be removed.
30559pub trait ArrayUpdateSpecTrait : super::traits::DataObjectTrait {
30560    /// The type of operation being performed on the specified virtual device.
30561    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum;
30562    /// Key for the element to be removed.
30563    /// 
30564    /// Only used if the operation
30565    /// is "remove".
30566    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny>;
30567}
30568impl<'s> serde::Serialize for dyn ArrayUpdateSpecTrait + 's {
30569            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30570            where
30571                S: serde::Serializer,
30572            {
30573                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30574            }
30575        }
30576impl<'de> serde::Deserialize<'de> for Box<dyn ArrayUpdateSpecTrait> {
30577            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30578                deserializer.deserialize_map(ArrayUpdateSpecVisitor)
30579            }
30580        }
30581
30582struct ArrayUpdateSpecVisitor;
30583
30584impl<'de> de::Visitor<'de> for ArrayUpdateSpecVisitor {
30585    type Value = Box<dyn ArrayUpdateSpecTrait>;
30586
30587    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30588        formatter.write_str("a valid ArrayUpdateSpecTrait JSON object with a _typeName field")
30589    }
30590
30591    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30592    where
30593        A: de::MapAccess<'de>,
30594    {
30595        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30596        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30597        match any {
30598            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30599                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30600            VimAny::Value(value) => Err(de::Error::custom(format!(
30601                "expected object not wrapped value: {:?}",
30602                value))),
30603        }
30604    }
30605}
30606
30607impl ArrayUpdateSpecTrait for ArrayUpdateSpec {
30608    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30609    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30610}
30611impl ArrayUpdateSpecTrait for ClusterDasVmConfigSpec {
30612    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30613    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30614}
30615impl ArrayUpdateSpecTrait for ClusterDatastoreUpdateSpec {
30616    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30617    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30618}
30619impl ArrayUpdateSpecTrait for ClusterDpmHostConfigSpec {
30620    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30621    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30622}
30623impl ArrayUpdateSpecTrait for ClusterDrsVmConfigSpec {
30624    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30625    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30626}
30627impl ArrayUpdateSpecTrait for ClusterGroupSpec {
30628    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30629    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30630}
30631impl ArrayUpdateSpecTrait for ClusterPreemptibleVmPairSpec {
30632    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30633    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30634}
30635impl ArrayUpdateSpecTrait for ClusterRuleSpec {
30636    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30637    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30638}
30639impl ArrayUpdateSpecTrait for ClusterTagCategoryUpdateSpec {
30640    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30641    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30642}
30643impl ArrayUpdateSpecTrait for ClusterVmOrchestrationSpec {
30644    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30645    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30646}
30647impl ArrayUpdateSpecTrait for StorageDrsOptionSpec {
30648    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30649    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30650}
30651impl ArrayUpdateSpecTrait for StorageDrsVmConfigSpec {
30652    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30653    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30654}
30655impl ArrayUpdateSpecTrait for VAppOvfSectionSpec {
30656    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30657    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30658}
30659impl ArrayUpdateSpecTrait for VAppProductSpec {
30660    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30661    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30662}
30663impl ArrayUpdateSpecTrait for VAppPropertySpec {
30664    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30665    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30666}
30667impl ArrayUpdateSpecTrait for VirtualMachineCpuIdInfoSpec {
30668    fn get_operation(&self) -> &super::enums::ArrayUpdateOperationEnum { &self.operation }
30669    fn get_remove_key(&self) -> &Option<super::vim_any::VimAny> { &self.remove_key }
30670}
30671impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ArrayUpdateSpecTrait {
30672    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30673        let data_type = from.data_type();
30674        match data_type {
30675            StructType::ArrayUpdateSpec => Some(from.as_any_ref().downcast_ref::<ArrayUpdateSpec>()?),
30676            StructType::ClusterDasVmConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDasVmConfigSpec>()?),
30677            StructType::ClusterDatastoreUpdateSpec => Some(from.as_any_ref().downcast_ref::<ClusterDatastoreUpdateSpec>()?),
30678            StructType::ClusterDpmHostConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDpmHostConfigSpec>()?),
30679            StructType::ClusterDrsVmConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterDrsVmConfigSpec>()?),
30680            StructType::ClusterGroupSpec => Some(from.as_any_ref().downcast_ref::<ClusterGroupSpec>()?),
30681            StructType::ClusterPreemptibleVmPairSpec => Some(from.as_any_ref().downcast_ref::<ClusterPreemptibleVmPairSpec>()?),
30682            StructType::ClusterRuleSpec => Some(from.as_any_ref().downcast_ref::<ClusterRuleSpec>()?),
30683            StructType::ClusterTagCategoryUpdateSpec => Some(from.as_any_ref().downcast_ref::<ClusterTagCategoryUpdateSpec>()?),
30684            StructType::ClusterVmOrchestrationSpec => Some(from.as_any_ref().downcast_ref::<ClusterVmOrchestrationSpec>()?),
30685            StructType::StorageDrsOptionSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsOptionSpec>()?),
30686            StructType::StorageDrsVmConfigSpec => Some(from.as_any_ref().downcast_ref::<StorageDrsVmConfigSpec>()?),
30687            StructType::VAppOvfSectionSpec => Some(from.as_any_ref().downcast_ref::<VAppOvfSectionSpec>()?),
30688            StructType::VAppProductSpec => Some(from.as_any_ref().downcast_ref::<VAppProductSpec>()?),
30689            StructType::VAppPropertySpec => Some(from.as_any_ref().downcast_ref::<VAppPropertySpec>()?),
30690            StructType::VirtualMachineCpuIdInfoSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineCpuIdInfoSpec>()?),
30691            _ => None,
30692        }
30693    }
30694    
30695    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30696        let data_type = from.data_type();
30697        match data_type {
30698            StructType::ArrayUpdateSpec => Ok(from.as_any_box().downcast::<ArrayUpdateSpec>()?),
30699            StructType::ClusterDasVmConfigSpec => Ok(from.as_any_box().downcast::<ClusterDasVmConfigSpec>()?),
30700            StructType::ClusterDatastoreUpdateSpec => Ok(from.as_any_box().downcast::<ClusterDatastoreUpdateSpec>()?),
30701            StructType::ClusterDpmHostConfigSpec => Ok(from.as_any_box().downcast::<ClusterDpmHostConfigSpec>()?),
30702            StructType::ClusterDrsVmConfigSpec => Ok(from.as_any_box().downcast::<ClusterDrsVmConfigSpec>()?),
30703            StructType::ClusterGroupSpec => Ok(from.as_any_box().downcast::<ClusterGroupSpec>()?),
30704            StructType::ClusterPreemptibleVmPairSpec => Ok(from.as_any_box().downcast::<ClusterPreemptibleVmPairSpec>()?),
30705            StructType::ClusterRuleSpec => Ok(from.as_any_box().downcast::<ClusterRuleSpec>()?),
30706            StructType::ClusterTagCategoryUpdateSpec => Ok(from.as_any_box().downcast::<ClusterTagCategoryUpdateSpec>()?),
30707            StructType::ClusterVmOrchestrationSpec => Ok(from.as_any_box().downcast::<ClusterVmOrchestrationSpec>()?),
30708            StructType::StorageDrsOptionSpec => Ok(from.as_any_box().downcast::<StorageDrsOptionSpec>()?),
30709            StructType::StorageDrsVmConfigSpec => Ok(from.as_any_box().downcast::<StorageDrsVmConfigSpec>()?),
30710            StructType::VAppOvfSectionSpec => Ok(from.as_any_box().downcast::<VAppOvfSectionSpec>()?),
30711            StructType::VAppProductSpec => Ok(from.as_any_box().downcast::<VAppProductSpec>()?),
30712            StructType::VAppPropertySpec => Ok(from.as_any_box().downcast::<VAppPropertySpec>()?),
30713            StructType::VirtualMachineCpuIdInfoSpec => Ok(from.as_any_box().downcast::<VirtualMachineCpuIdInfoSpec>()?),
30714            _ => Err(from.as_any_box()),
30715        }
30716    }
30717}
30718/// The base data object type for all options.
30719pub trait OptionTypeTrait : super::traits::DataObjectTrait {
30720    /// The flag to indicate whether or not a user
30721    /// can modify a value belonging to this option type.
30722    /// 
30723    /// If
30724    /// the flag is not set, the value can be modified.
30725    fn get_value_is_readonly(&self) -> Option<bool>;
30726}
30727impl<'s> serde::Serialize for dyn OptionTypeTrait + 's {
30728            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30729            where
30730                S: serde::Serializer,
30731            {
30732                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30733            }
30734        }
30735impl<'de> serde::Deserialize<'de> for Box<dyn OptionTypeTrait> {
30736            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30737                deserializer.deserialize_map(OptionTypeVisitor)
30738            }
30739        }
30740
30741struct OptionTypeVisitor;
30742
30743impl<'de> de::Visitor<'de> for OptionTypeVisitor {
30744    type Value = Box<dyn OptionTypeTrait>;
30745
30746    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30747        formatter.write_str("a valid OptionTypeTrait JSON object with a _typeName field")
30748    }
30749
30750    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30751    where
30752        A: de::MapAccess<'de>,
30753    {
30754        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30755        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30756        match any {
30757            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30758                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30759            VimAny::Value(value) => Err(de::Error::custom(format!(
30760                "expected object not wrapped value: {:?}",
30761                value))),
30762        }
30763    }
30764}
30765
30766impl OptionTypeTrait for OptionType {
30767    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30768}
30769impl OptionTypeTrait for BoolOption {
30770    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30771}
30772impl OptionTypeTrait for ChoiceOption {
30773    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30774}
30775impl OptionTypeTrait for FloatOption {
30776    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30777}
30778impl OptionTypeTrait for IntOption {
30779    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30780}
30781impl OptionTypeTrait for LongOption {
30782    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30783}
30784impl OptionTypeTrait for StringOption {
30785    fn get_value_is_readonly(&self) -> Option<bool> { self.value_is_readonly }
30786}
30787impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn OptionTypeTrait {
30788    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30789        let data_type = from.data_type();
30790        match data_type {
30791            StructType::OptionType => Some(from.as_any_ref().downcast_ref::<OptionType>()?),
30792            StructType::BoolOption => Some(from.as_any_ref().downcast_ref::<BoolOption>()?),
30793            StructType::ChoiceOption => Some(from.as_any_ref().downcast_ref::<ChoiceOption>()?),
30794            StructType::FloatOption => Some(from.as_any_ref().downcast_ref::<FloatOption>()?),
30795            StructType::IntOption => Some(from.as_any_ref().downcast_ref::<IntOption>()?),
30796            StructType::LongOption => Some(from.as_any_ref().downcast_ref::<LongOption>()?),
30797            StructType::StringOption => Some(from.as_any_ref().downcast_ref::<StringOption>()?),
30798            _ => None,
30799        }
30800    }
30801    
30802    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30803        let data_type = from.data_type();
30804        match data_type {
30805            StructType::OptionType => Ok(from.as_any_box().downcast::<OptionType>()?),
30806            StructType::BoolOption => Ok(from.as_any_box().downcast::<BoolOption>()?),
30807            StructType::ChoiceOption => Ok(from.as_any_box().downcast::<ChoiceOption>()?),
30808            StructType::FloatOption => Ok(from.as_any_box().downcast::<FloatOption>()?),
30809            StructType::IntOption => Ok(from.as_any_box().downcast::<IntOption>()?),
30810            StructType::LongOption => Ok(from.as_any_box().downcast::<LongOption>()?),
30811            StructType::StringOption => Ok(from.as_any_box().downcast::<StringOption>()?),
30812            _ => Err(from.as_any_box()),
30813        }
30814    }
30815}
30816/// Describes the key/value pair of a configured option.
30817pub trait OptionValueTrait : super::traits::DataObjectTrait {
30818    /// The name of the option using dot notation to reflect the
30819    /// option's position in a hierarchy.
30820    /// 
30821    /// For example, you might
30822    /// have an option called "Ethernet" and another option that is
30823    /// a child of that called "Connection". In this case, the key
30824    /// for the latter could be defined as "Ethernet.Connection"
30825    fn get_key(&self) -> &str;
30826    /// The value of the option.
30827    /// 
30828    /// The Any data object type enables you to
30829    /// define any value for the option. Typically, however, the value
30830    /// of an option is of type String or Integer.
30831    fn get_value(&self) -> &Option<super::vim_any::VimAny>;
30832}
30833impl<'s> serde::Serialize for dyn OptionValueTrait + 's {
30834            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30835            where
30836                S: serde::Serializer,
30837            {
30838                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30839            }
30840        }
30841impl<'de> serde::Deserialize<'de> for Box<dyn OptionValueTrait> {
30842            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30843                deserializer.deserialize_map(OptionValueVisitor)
30844            }
30845        }
30846
30847struct OptionValueVisitor;
30848
30849impl<'de> de::Visitor<'de> for OptionValueVisitor {
30850    type Value = Box<dyn OptionValueTrait>;
30851
30852    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30853        formatter.write_str("a valid OptionValueTrait JSON object with a _typeName field")
30854    }
30855
30856    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30857    where
30858        A: de::MapAccess<'de>,
30859    {
30860        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30861        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30862        match any {
30863            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30864                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30865            VimAny::Value(value) => Err(de::Error::custom(format!(
30866                "expected object not wrapped value: {:?}",
30867                value))),
30868        }
30869    }
30870}
30871
30872impl OptionValueTrait for OptionValue {
30873    fn get_key(&self) -> &str { &self.key }
30874    fn get_value(&self) -> &Option<super::vim_any::VimAny> { &self.value }
30875}
30876impl OptionValueTrait for HostInternetScsiHbaParamValue {
30877    fn get_key(&self) -> &str { &self.key }
30878    fn get_value(&self) -> &Option<super::vim_any::VimAny> { &self.value }
30879}
30880impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn OptionValueTrait {
30881    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
30882        let data_type = from.data_type();
30883        match data_type {
30884            StructType::OptionValue => Some(from.as_any_ref().downcast_ref::<OptionValue>()?),
30885            StructType::HostInternetScsiHbaParamValue => Some(from.as_any_ref().downcast_ref::<HostInternetScsiHbaParamValue>()?),
30886            _ => None,
30887        }
30888    }
30889    
30890    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
30891        let data_type = from.data_type();
30892        match data_type {
30893            StructType::OptionValue => Ok(from.as_any_box().downcast::<OptionValue>()?),
30894            StructType::HostInternetScsiHbaParamValue => Ok(from.as_any_box().downcast::<HostInternetScsiHbaParamValue>()?),
30895            _ => Err(from.as_any_box()),
30896        }
30897    }
30898}
30899/// The *ApplyProfile* data object is the base class for all data objects
30900/// that define profile configuration data.
30901/// 
30902/// <code>ApplyProfile</code> defines ESX configuration data storage and it
30903/// supports recursive profile definition for the profile plug-in architecture.
30904pub trait ApplyProfileTrait : super::traits::DataObjectTrait {
30905    /// Indicates whether the profile is enabled.
30906    fn get_enabled(&self) -> bool;
30907    /// The list of policies comprising the profile.
30908    /// 
30909    /// A *ProfilePolicy*
30910    /// stores one or more configuration data values in a *PolicyOption*.
30911    /// The policy option is one of the configuration options from the
30912    /// *ProfilePolicyMetadata*.*ProfilePolicyMetadata.possibleOption*
30913    /// list.
30914    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>>;
30915    /// Identifies the profile type.
30916    fn get_profile_type_name(&self) -> &Option<String>;
30917    /// Profile engine version.
30918    fn get_profile_version(&self) -> &Option<String>;
30919    /// List of subprofiles for this profile.
30920    /// 
30921    /// This list can change depending on which profile plug-ins are available in the system.
30922    /// Subprofiles can be nested to arbitrary depths to represent host capabilities.
30923    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>>;
30924    /// Indicates whether this profile is marked as "favorite".
30925    fn get_favorite(&self) -> Option<bool>;
30926    /// Indicates whether this profile is marked as to-be-merged.
30927    fn get_to_be_merged(&self) -> Option<bool>;
30928    /// Indicates whether the selected array elements, with the current
30929    /// as one of them, replace the profile array in the target host
30930    /// profile.
30931    fn get_to_replace_with(&self) -> Option<bool>;
30932    /// Indicates whether this profile is marked as to-be-deleted.
30933    fn get_to_be_deleted(&self) -> Option<bool>;
30934    /// Indicates that the member variable <code>enabled</code> of this profile
30935    /// will be copied from source profile to target profiles at host profile
30936    /// composition.
30937    fn get_copy_enable_status(&self) -> Option<bool>;
30938    /// Indicates whether this profile will be displayed or not.
30939    fn get_hidden(&self) -> Option<bool>;
30940}
30941impl<'s> serde::Serialize for dyn ApplyProfileTrait + 's {
30942            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
30943            where
30944                S: serde::Serializer,
30945            {
30946                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
30947            }
30948        }
30949impl<'de> serde::Deserialize<'de> for Box<dyn ApplyProfileTrait> {
30950            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
30951                deserializer.deserialize_map(ApplyProfileVisitor)
30952            }
30953        }
30954
30955struct ApplyProfileVisitor;
30956
30957impl<'de> de::Visitor<'de> for ApplyProfileVisitor {
30958    type Value = Box<dyn ApplyProfileTrait>;
30959
30960    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30961        formatter.write_str("a valid ApplyProfileTrait JSON object with a _typeName field")
30962    }
30963
30964    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
30965    where
30966        A: de::MapAccess<'de>,
30967    {
30968        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
30969        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
30970        match any {
30971            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
30972                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
30973            VimAny::Value(value) => Err(de::Error::custom(format!(
30974                "expected object not wrapped value: {:?}",
30975                value))),
30976        }
30977    }
30978}
30979
30980impl ApplyProfileTrait for ApplyProfile {
30981    fn get_enabled(&self) -> bool { self.enabled }
30982    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
30983    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
30984    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
30985    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
30986    fn get_favorite(&self) -> Option<bool> { self.favorite }
30987    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
30988    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
30989    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
30990    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
30991    fn get_hidden(&self) -> Option<bool> { self.hidden }
30992}
30993impl ApplyProfileTrait for ProfileApplyProfileElement {
30994    fn get_enabled(&self) -> bool { self.enabled }
30995    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
30996    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
30997    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
30998    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
30999    fn get_favorite(&self) -> Option<bool> { self.favorite }
31000    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31001    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31002    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31003    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31004    fn get_hidden(&self) -> Option<bool> { self.hidden }
31005}
31006impl ApplyProfileTrait for ActiveDirectoryProfile {
31007    fn get_enabled(&self) -> bool { self.enabled }
31008    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31009    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31010    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31011    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31012    fn get_favorite(&self) -> Option<bool> { self.favorite }
31013    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31014    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31015    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31016    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31017    fn get_hidden(&self) -> Option<bool> { self.hidden }
31018}
31019impl ApplyProfileTrait for AuthenticationProfile {
31020    fn get_enabled(&self) -> bool { self.enabled }
31021    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31022    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31023    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31024    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31025    fn get_favorite(&self) -> Option<bool> { self.favorite }
31026    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31027    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31028    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31029    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31030    fn get_hidden(&self) -> Option<bool> { self.hidden }
31031}
31032impl ApplyProfileTrait for DateTimeProfile {
31033    fn get_enabled(&self) -> bool { self.enabled }
31034    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31035    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31036    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31037    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31038    fn get_favorite(&self) -> Option<bool> { self.favorite }
31039    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31040    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31041    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31042    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31043    fn get_hidden(&self) -> Option<bool> { self.hidden }
31044}
31045impl ApplyProfileTrait for DvsProfile {
31046    fn get_enabled(&self) -> bool { self.enabled }
31047    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31048    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31049    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31050    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31051    fn get_favorite(&self) -> Option<bool> { self.favorite }
31052    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31053    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31054    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31055    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31056    fn get_hidden(&self) -> Option<bool> { self.hidden }
31057}
31058impl ApplyProfileTrait for DvsVNicProfile {
31059    fn get_enabled(&self) -> bool { self.enabled }
31060    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31061    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31062    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31063    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31064    fn get_favorite(&self) -> Option<bool> { self.favorite }
31065    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31066    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31067    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31068    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31069    fn get_hidden(&self) -> Option<bool> { self.hidden }
31070}
31071impl ApplyProfileTrait for DvsHostVNicProfile {
31072    fn get_enabled(&self) -> bool { self.enabled }
31073    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31074    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31075    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31076    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31077    fn get_favorite(&self) -> Option<bool> { self.favorite }
31078    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31079    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31080    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31081    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31082    fn get_hidden(&self) -> Option<bool> { self.hidden }
31083}
31084impl ApplyProfileTrait for DvsServiceConsoleVNicProfile {
31085    fn get_enabled(&self) -> bool { self.enabled }
31086    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31087    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31088    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31089    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31090    fn get_favorite(&self) -> Option<bool> { self.favorite }
31091    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31092    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31093    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31094    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31095    fn get_hidden(&self) -> Option<bool> { self.hidden }
31096}
31097impl ApplyProfileTrait for FirewallProfile {
31098    fn get_enabled(&self) -> bool { self.enabled }
31099    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31100    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31101    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31102    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31103    fn get_favorite(&self) -> Option<bool> { self.favorite }
31104    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31105    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31106    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31107    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31108    fn get_hidden(&self) -> Option<bool> { self.hidden }
31109}
31110impl ApplyProfileTrait for FirewallProfileRulesetProfile {
31111    fn get_enabled(&self) -> bool { self.enabled }
31112    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31113    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31114    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31115    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31116    fn get_favorite(&self) -> Option<bool> { self.favorite }
31117    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31118    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31119    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31120    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31121    fn get_hidden(&self) -> Option<bool> { self.hidden }
31122}
31123impl ApplyProfileTrait for HostApplyProfile {
31124    fn get_enabled(&self) -> bool { self.enabled }
31125    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31126    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31127    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31128    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31129    fn get_favorite(&self) -> Option<bool> { self.favorite }
31130    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31131    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31132    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31133    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31134    fn get_hidden(&self) -> Option<bool> { self.hidden }
31135}
31136impl ApplyProfileTrait for HostMemoryProfile {
31137    fn get_enabled(&self) -> bool { self.enabled }
31138    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31139    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31140    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31141    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31142    fn get_favorite(&self) -> Option<bool> { self.favorite }
31143    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31144    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31145    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31146    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31147    fn get_hidden(&self) -> Option<bool> { self.hidden }
31148}
31149impl ApplyProfileTrait for IpAddressProfile {
31150    fn get_enabled(&self) -> bool { self.enabled }
31151    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31152    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31153    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31154    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31155    fn get_favorite(&self) -> Option<bool> { self.favorite }
31156    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31157    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31158    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31159    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31160    fn get_hidden(&self) -> Option<bool> { self.hidden }
31161}
31162impl ApplyProfileTrait for IpRouteProfile {
31163    fn get_enabled(&self) -> bool { self.enabled }
31164    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31165    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31166    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31167    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31168    fn get_favorite(&self) -> Option<bool> { self.favorite }
31169    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31170    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31171    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31172    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31173    fn get_hidden(&self) -> Option<bool> { self.hidden }
31174}
31175impl ApplyProfileTrait for NasStorageProfile {
31176    fn get_enabled(&self) -> bool { self.enabled }
31177    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31178    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31179    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31180    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31181    fn get_favorite(&self) -> Option<bool> { self.favorite }
31182    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31183    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31184    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31185    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31186    fn get_hidden(&self) -> Option<bool> { self.hidden }
31187}
31188impl ApplyProfileTrait for NetStackInstanceProfile {
31189    fn get_enabled(&self) -> bool { self.enabled }
31190    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31191    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31192    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31193    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31194    fn get_favorite(&self) -> Option<bool> { self.favorite }
31195    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31196    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31197    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31198    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31199    fn get_hidden(&self) -> Option<bool> { self.hidden }
31200}
31201impl ApplyProfileTrait for NetworkPolicyProfile {
31202    fn get_enabled(&self) -> bool { self.enabled }
31203    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31204    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31205    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31206    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31207    fn get_favorite(&self) -> Option<bool> { self.favorite }
31208    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31209    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31210    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31211    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31212    fn get_hidden(&self) -> Option<bool> { self.hidden }
31213}
31214impl ApplyProfileTrait for NetworkProfile {
31215    fn get_enabled(&self) -> bool { self.enabled }
31216    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31217    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31218    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31219    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31220    fn get_favorite(&self) -> Option<bool> { self.favorite }
31221    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31222    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31223    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31224    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31225    fn get_hidden(&self) -> Option<bool> { self.hidden }
31226}
31227impl ApplyProfileTrait for NetworkProfileDnsConfigProfile {
31228    fn get_enabled(&self) -> bool { self.enabled }
31229    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31230    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31231    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31232    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31233    fn get_favorite(&self) -> Option<bool> { self.favorite }
31234    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31235    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31236    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31237    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31238    fn get_hidden(&self) -> Option<bool> { self.hidden }
31239}
31240impl ApplyProfileTrait for NsxHostVNicProfile {
31241    fn get_enabled(&self) -> bool { self.enabled }
31242    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31243    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31244    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31245    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31246    fn get_favorite(&self) -> Option<bool> { self.favorite }
31247    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31248    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31249    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31250    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31251    fn get_hidden(&self) -> Option<bool> { self.hidden }
31252}
31253impl ApplyProfileTrait for OpaqueSwitchProfile {
31254    fn get_enabled(&self) -> bool { self.enabled }
31255    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31256    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31257    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31258    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31259    fn get_favorite(&self) -> Option<bool> { self.favorite }
31260    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31261    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31262    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31263    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31264    fn get_hidden(&self) -> Option<bool> { self.hidden }
31265}
31266impl ApplyProfileTrait for OptionProfile {
31267    fn get_enabled(&self) -> bool { self.enabled }
31268    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31269    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31270    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31271    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31272    fn get_favorite(&self) -> Option<bool> { self.favorite }
31273    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31274    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31275    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31276    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31277    fn get_hidden(&self) -> Option<bool> { self.hidden }
31278}
31279impl ApplyProfileTrait for PermissionProfile {
31280    fn get_enabled(&self) -> bool { self.enabled }
31281    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31282    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31283    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31284    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31285    fn get_favorite(&self) -> Option<bool> { self.favorite }
31286    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31287    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31288    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31289    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31290    fn get_hidden(&self) -> Option<bool> { self.hidden }
31291}
31292impl ApplyProfileTrait for PhysicalNicProfile {
31293    fn get_enabled(&self) -> bool { self.enabled }
31294    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31295    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31296    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31297    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31298    fn get_favorite(&self) -> Option<bool> { self.favorite }
31299    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31300    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31301    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31302    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31303    fn get_hidden(&self) -> Option<bool> { self.hidden }
31304}
31305impl ApplyProfileTrait for PnicUplinkProfile {
31306    fn get_enabled(&self) -> bool { self.enabled }
31307    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31308    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31309    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31310    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31311    fn get_favorite(&self) -> Option<bool> { self.favorite }
31312    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31313    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31314    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31315    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31316    fn get_hidden(&self) -> Option<bool> { self.hidden }
31317}
31318impl ApplyProfileTrait for PortGroupProfile {
31319    fn get_enabled(&self) -> bool { self.enabled }
31320    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31321    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31322    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31323    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31324    fn get_favorite(&self) -> Option<bool> { self.favorite }
31325    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31326    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31327    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31328    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31329    fn get_hidden(&self) -> Option<bool> { self.hidden }
31330}
31331impl ApplyProfileTrait for HostPortGroupProfile {
31332    fn get_enabled(&self) -> bool { self.enabled }
31333    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31334    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31335    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31336    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31337    fn get_favorite(&self) -> Option<bool> { self.favorite }
31338    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31339    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31340    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31341    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31342    fn get_hidden(&self) -> Option<bool> { self.hidden }
31343}
31344impl ApplyProfileTrait for ServiceConsolePortGroupProfile {
31345    fn get_enabled(&self) -> bool { self.enabled }
31346    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31347    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31348    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31349    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31350    fn get_favorite(&self) -> Option<bool> { self.favorite }
31351    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31352    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31353    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31354    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31355    fn get_hidden(&self) -> Option<bool> { self.hidden }
31356}
31357impl ApplyProfileTrait for VmPortGroupProfile {
31358    fn get_enabled(&self) -> bool { self.enabled }
31359    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31360    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31361    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31362    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31363    fn get_favorite(&self) -> Option<bool> { self.favorite }
31364    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31365    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31366    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31367    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31368    fn get_hidden(&self) -> Option<bool> { self.hidden }
31369}
31370impl ApplyProfileTrait for VirtualSwitchSelectionProfile {
31371    fn get_enabled(&self) -> bool { self.enabled }
31372    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31373    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31374    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31375    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31376    fn get_favorite(&self) -> Option<bool> { self.favorite }
31377    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31378    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31379    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31380    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31381    fn get_hidden(&self) -> Option<bool> { self.hidden }
31382}
31383impl ApplyProfileTrait for VlanProfile {
31384    fn get_enabled(&self) -> bool { self.enabled }
31385    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31386    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31387    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31388    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31389    fn get_favorite(&self) -> Option<bool> { self.favorite }
31390    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31391    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31392    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31393    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31394    fn get_hidden(&self) -> Option<bool> { self.hidden }
31395}
31396impl ApplyProfileTrait for SecurityProfile {
31397    fn get_enabled(&self) -> bool { self.enabled }
31398    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31399    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31400    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31401    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31402    fn get_favorite(&self) -> Option<bool> { self.favorite }
31403    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31404    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31405    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31406    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31407    fn get_hidden(&self) -> Option<bool> { self.hidden }
31408}
31409impl ApplyProfileTrait for ServiceProfile {
31410    fn get_enabled(&self) -> bool { self.enabled }
31411    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31412    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31413    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31414    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31415    fn get_favorite(&self) -> Option<bool> { self.favorite }
31416    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31417    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31418    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31419    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31420    fn get_hidden(&self) -> Option<bool> { self.hidden }
31421}
31422impl ApplyProfileTrait for StaticRouteProfile {
31423    fn get_enabled(&self) -> bool { self.enabled }
31424    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31425    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31426    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31427    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31428    fn get_favorite(&self) -> Option<bool> { self.favorite }
31429    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31430    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31431    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31432    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31433    fn get_hidden(&self) -> Option<bool> { self.hidden }
31434}
31435impl ApplyProfileTrait for StorageProfile {
31436    fn get_enabled(&self) -> bool { self.enabled }
31437    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31438    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31439    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31440    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31441    fn get_favorite(&self) -> Option<bool> { self.favorite }
31442    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31443    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31444    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31445    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31446    fn get_hidden(&self) -> Option<bool> { self.hidden }
31447}
31448impl ApplyProfileTrait for UserGroupProfile {
31449    fn get_enabled(&self) -> bool { self.enabled }
31450    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31451    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31452    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31453    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31454    fn get_favorite(&self) -> Option<bool> { self.favorite }
31455    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31456    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31457    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31458    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31459    fn get_hidden(&self) -> Option<bool> { self.hidden }
31460}
31461impl ApplyProfileTrait for UserProfile {
31462    fn get_enabled(&self) -> bool { self.enabled }
31463    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31464    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31465    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31466    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31467    fn get_favorite(&self) -> Option<bool> { self.favorite }
31468    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31469    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31470    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31471    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31472    fn get_hidden(&self) -> Option<bool> { self.hidden }
31473}
31474impl ApplyProfileTrait for VirtualSwitchProfile {
31475    fn get_enabled(&self) -> bool { self.enabled }
31476    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31477    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31478    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31479    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31480    fn get_favorite(&self) -> Option<bool> { self.favorite }
31481    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31482    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31483    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31484    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31485    fn get_hidden(&self) -> Option<bool> { self.hidden }
31486}
31487impl ApplyProfileTrait for LinkProfile {
31488    fn get_enabled(&self) -> bool { self.enabled }
31489    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31490    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31491    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31492    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31493    fn get_favorite(&self) -> Option<bool> { self.favorite }
31494    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31495    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31496    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31497    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31498    fn get_hidden(&self) -> Option<bool> { self.hidden }
31499}
31500impl ApplyProfileTrait for NumPortsProfile {
31501    fn get_enabled(&self) -> bool { self.enabled }
31502    fn get_policy(&self) -> &Option<Vec<super::structs::ProfilePolicy>> { &self.policy }
31503    fn get_profile_type_name(&self) -> &Option<String> { &self.profile_type_name }
31504    fn get_profile_version(&self) -> &Option<String> { &self.profile_version }
31505    fn get_property(&self) -> &Option<Vec<super::structs::ProfileApplyProfileProperty>> { &self.property }
31506    fn get_favorite(&self) -> Option<bool> { self.favorite }
31507    fn get_to_be_merged(&self) -> Option<bool> { self.to_be_merged }
31508    fn get_to_replace_with(&self) -> Option<bool> { self.to_replace_with }
31509    fn get_to_be_deleted(&self) -> Option<bool> { self.to_be_deleted }
31510    fn get_copy_enable_status(&self) -> Option<bool> { self.copy_enable_status }
31511    fn get_hidden(&self) -> Option<bool> { self.hidden }
31512}
31513impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ApplyProfileTrait {
31514    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
31515        let data_type = from.data_type();
31516        match data_type {
31517            StructType::ApplyProfile => Some(from.as_any_ref().downcast_ref::<ApplyProfile>()?),
31518            StructType::ProfileApplyProfileElement => Some(from.as_any_ref().downcast_ref::<ProfileApplyProfileElement>()?),
31519            StructType::ActiveDirectoryProfile => Some(from.as_any_ref().downcast_ref::<ActiveDirectoryProfile>()?),
31520            StructType::AuthenticationProfile => Some(from.as_any_ref().downcast_ref::<AuthenticationProfile>()?),
31521            StructType::DateTimeProfile => Some(from.as_any_ref().downcast_ref::<DateTimeProfile>()?),
31522            StructType::DvsProfile => Some(from.as_any_ref().downcast_ref::<DvsProfile>()?),
31523            StructType::DvsVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsVNicProfile>()?),
31524            StructType::DvsHostVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsHostVNicProfile>()?),
31525            StructType::DvsServiceConsoleVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsServiceConsoleVNicProfile>()?),
31526            StructType::FirewallProfile => Some(from.as_any_ref().downcast_ref::<FirewallProfile>()?),
31527            StructType::FirewallProfileRulesetProfile => Some(from.as_any_ref().downcast_ref::<FirewallProfileRulesetProfile>()?),
31528            StructType::HostApplyProfile => Some(from.as_any_ref().downcast_ref::<HostApplyProfile>()?),
31529            StructType::HostMemoryProfile => Some(from.as_any_ref().downcast_ref::<HostMemoryProfile>()?),
31530            StructType::IpAddressProfile => Some(from.as_any_ref().downcast_ref::<IpAddressProfile>()?),
31531            StructType::IpRouteProfile => Some(from.as_any_ref().downcast_ref::<IpRouteProfile>()?),
31532            StructType::NasStorageProfile => Some(from.as_any_ref().downcast_ref::<NasStorageProfile>()?),
31533            StructType::NetStackInstanceProfile => Some(from.as_any_ref().downcast_ref::<NetStackInstanceProfile>()?),
31534            StructType::NetworkPolicyProfile => Some(from.as_any_ref().downcast_ref::<NetworkPolicyProfile>()?),
31535            StructType::NetworkProfile => Some(from.as_any_ref().downcast_ref::<NetworkProfile>()?),
31536            StructType::NetworkProfileDnsConfigProfile => Some(from.as_any_ref().downcast_ref::<NetworkProfileDnsConfigProfile>()?),
31537            StructType::NsxHostVNicProfile => Some(from.as_any_ref().downcast_ref::<NsxHostVNicProfile>()?),
31538            StructType::OpaqueSwitchProfile => Some(from.as_any_ref().downcast_ref::<OpaqueSwitchProfile>()?),
31539            StructType::OptionProfile => Some(from.as_any_ref().downcast_ref::<OptionProfile>()?),
31540            StructType::PermissionProfile => Some(from.as_any_ref().downcast_ref::<PermissionProfile>()?),
31541            StructType::PhysicalNicProfile => Some(from.as_any_ref().downcast_ref::<PhysicalNicProfile>()?),
31542            StructType::PnicUplinkProfile => Some(from.as_any_ref().downcast_ref::<PnicUplinkProfile>()?),
31543            StructType::PortGroupProfile => Some(from.as_any_ref().downcast_ref::<PortGroupProfile>()?),
31544            StructType::HostPortGroupProfile => Some(from.as_any_ref().downcast_ref::<HostPortGroupProfile>()?),
31545            StructType::ServiceConsolePortGroupProfile => Some(from.as_any_ref().downcast_ref::<ServiceConsolePortGroupProfile>()?),
31546            StructType::VmPortGroupProfile => Some(from.as_any_ref().downcast_ref::<VmPortGroupProfile>()?),
31547            StructType::VirtualSwitchSelectionProfile => Some(from.as_any_ref().downcast_ref::<VirtualSwitchSelectionProfile>()?),
31548            StructType::VlanProfile => Some(from.as_any_ref().downcast_ref::<VlanProfile>()?),
31549            StructType::SecurityProfile => Some(from.as_any_ref().downcast_ref::<SecurityProfile>()?),
31550            StructType::ServiceProfile => Some(from.as_any_ref().downcast_ref::<ServiceProfile>()?),
31551            StructType::StaticRouteProfile => Some(from.as_any_ref().downcast_ref::<StaticRouteProfile>()?),
31552            StructType::StorageProfile => Some(from.as_any_ref().downcast_ref::<StorageProfile>()?),
31553            StructType::UserGroupProfile => Some(from.as_any_ref().downcast_ref::<UserGroupProfile>()?),
31554            StructType::UserProfile => Some(from.as_any_ref().downcast_ref::<UserProfile>()?),
31555            StructType::VirtualSwitchProfile => Some(from.as_any_ref().downcast_ref::<VirtualSwitchProfile>()?),
31556            StructType::LinkProfile => Some(from.as_any_ref().downcast_ref::<LinkProfile>()?),
31557            StructType::NumPortsProfile => Some(from.as_any_ref().downcast_ref::<NumPortsProfile>()?),
31558            _ => None,
31559        }
31560    }
31561    
31562    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
31563        let data_type = from.data_type();
31564        match data_type {
31565            StructType::ApplyProfile => Ok(from.as_any_box().downcast::<ApplyProfile>()?),
31566            StructType::ProfileApplyProfileElement => Ok(from.as_any_box().downcast::<ProfileApplyProfileElement>()?),
31567            StructType::ActiveDirectoryProfile => Ok(from.as_any_box().downcast::<ActiveDirectoryProfile>()?),
31568            StructType::AuthenticationProfile => Ok(from.as_any_box().downcast::<AuthenticationProfile>()?),
31569            StructType::DateTimeProfile => Ok(from.as_any_box().downcast::<DateTimeProfile>()?),
31570            StructType::DvsProfile => Ok(from.as_any_box().downcast::<DvsProfile>()?),
31571            StructType::DvsVNicProfile => Ok(from.as_any_box().downcast::<DvsVNicProfile>()?),
31572            StructType::DvsHostVNicProfile => Ok(from.as_any_box().downcast::<DvsHostVNicProfile>()?),
31573            StructType::DvsServiceConsoleVNicProfile => Ok(from.as_any_box().downcast::<DvsServiceConsoleVNicProfile>()?),
31574            StructType::FirewallProfile => Ok(from.as_any_box().downcast::<FirewallProfile>()?),
31575            StructType::FirewallProfileRulesetProfile => Ok(from.as_any_box().downcast::<FirewallProfileRulesetProfile>()?),
31576            StructType::HostApplyProfile => Ok(from.as_any_box().downcast::<HostApplyProfile>()?),
31577            StructType::HostMemoryProfile => Ok(from.as_any_box().downcast::<HostMemoryProfile>()?),
31578            StructType::IpAddressProfile => Ok(from.as_any_box().downcast::<IpAddressProfile>()?),
31579            StructType::IpRouteProfile => Ok(from.as_any_box().downcast::<IpRouteProfile>()?),
31580            StructType::NasStorageProfile => Ok(from.as_any_box().downcast::<NasStorageProfile>()?),
31581            StructType::NetStackInstanceProfile => Ok(from.as_any_box().downcast::<NetStackInstanceProfile>()?),
31582            StructType::NetworkPolicyProfile => Ok(from.as_any_box().downcast::<NetworkPolicyProfile>()?),
31583            StructType::NetworkProfile => Ok(from.as_any_box().downcast::<NetworkProfile>()?),
31584            StructType::NetworkProfileDnsConfigProfile => Ok(from.as_any_box().downcast::<NetworkProfileDnsConfigProfile>()?),
31585            StructType::NsxHostVNicProfile => Ok(from.as_any_box().downcast::<NsxHostVNicProfile>()?),
31586            StructType::OpaqueSwitchProfile => Ok(from.as_any_box().downcast::<OpaqueSwitchProfile>()?),
31587            StructType::OptionProfile => Ok(from.as_any_box().downcast::<OptionProfile>()?),
31588            StructType::PermissionProfile => Ok(from.as_any_box().downcast::<PermissionProfile>()?),
31589            StructType::PhysicalNicProfile => Ok(from.as_any_box().downcast::<PhysicalNicProfile>()?),
31590            StructType::PnicUplinkProfile => Ok(from.as_any_box().downcast::<PnicUplinkProfile>()?),
31591            StructType::PortGroupProfile => Ok(from.as_any_box().downcast::<PortGroupProfile>()?),
31592            StructType::HostPortGroupProfile => Ok(from.as_any_box().downcast::<HostPortGroupProfile>()?),
31593            StructType::ServiceConsolePortGroupProfile => Ok(from.as_any_box().downcast::<ServiceConsolePortGroupProfile>()?),
31594            StructType::VmPortGroupProfile => Ok(from.as_any_box().downcast::<VmPortGroupProfile>()?),
31595            StructType::VirtualSwitchSelectionProfile => Ok(from.as_any_box().downcast::<VirtualSwitchSelectionProfile>()?),
31596            StructType::VlanProfile => Ok(from.as_any_box().downcast::<VlanProfile>()?),
31597            StructType::SecurityProfile => Ok(from.as_any_box().downcast::<SecurityProfile>()?),
31598            StructType::ServiceProfile => Ok(from.as_any_box().downcast::<ServiceProfile>()?),
31599            StructType::StaticRouteProfile => Ok(from.as_any_box().downcast::<StaticRouteProfile>()?),
31600            StructType::StorageProfile => Ok(from.as_any_box().downcast::<StorageProfile>()?),
31601            StructType::UserGroupProfile => Ok(from.as_any_box().downcast::<UserGroupProfile>()?),
31602            StructType::UserProfile => Ok(from.as_any_box().downcast::<UserProfile>()?),
31603            StructType::VirtualSwitchProfile => Ok(from.as_any_box().downcast::<VirtualSwitchProfile>()?),
31604            StructType::LinkProfile => Ok(from.as_any_box().downcast::<LinkProfile>()?),
31605            StructType::NumPortsProfile => Ok(from.as_any_box().downcast::<NumPortsProfile>()?),
31606            _ => Err(from.as_any_box()),
31607        }
31608    }
31609}
31610/// The *DvsVNicProfile* data object is the base object
31611/// for host and service console Virtual NIC subprofiles.
31612/// 
31613/// If a profile plug-in defines additional policies or subprofiles, use the
31614/// *ApplyProfile.policy* or *ApplyProfile.property*
31615/// list to access the configuration data.
31616pub trait DvsVNicProfileTrait : super::traits::ApplyProfileTrait {
31617    /// Linkable identifier.
31618    fn get_key(&self) -> &str;
31619    /// IP address for the Virtual NIC belonging to a distributed virtual switch.
31620    fn get_ip_config(&self) -> &super::structs::IpAddressProfile;
31621}
31622impl<'s> serde::Serialize for dyn DvsVNicProfileTrait + 's {
31623            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
31624            where
31625                S: serde::Serializer,
31626            {
31627                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
31628            }
31629        }
31630impl<'de> serde::Deserialize<'de> for Box<dyn DvsVNicProfileTrait> {
31631            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
31632                deserializer.deserialize_map(DvsVNicProfileVisitor)
31633            }
31634        }
31635
31636struct DvsVNicProfileVisitor;
31637
31638impl<'de> de::Visitor<'de> for DvsVNicProfileVisitor {
31639    type Value = Box<dyn DvsVNicProfileTrait>;
31640
31641    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
31642        formatter.write_str("a valid DvsVNicProfileTrait JSON object with a _typeName field")
31643    }
31644
31645    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
31646    where
31647        A: de::MapAccess<'de>,
31648    {
31649        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
31650        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
31651        match any {
31652            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
31653                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
31654            VimAny::Value(value) => Err(de::Error::custom(format!(
31655                "expected object not wrapped value: {:?}",
31656                value))),
31657        }
31658    }
31659}
31660
31661impl DvsVNicProfileTrait for DvsVNicProfile {
31662    fn get_key(&self) -> &str { &self.key }
31663    fn get_ip_config(&self) -> &super::structs::IpAddressProfile { &self.ip_config }
31664}
31665impl DvsVNicProfileTrait for DvsHostVNicProfile {
31666    fn get_key(&self) -> &str { &self.key }
31667    fn get_ip_config(&self) -> &super::structs::IpAddressProfile { &self.ip_config }
31668}
31669impl DvsVNicProfileTrait for DvsServiceConsoleVNicProfile {
31670    fn get_key(&self) -> &str { &self.key }
31671    fn get_ip_config(&self) -> &super::structs::IpAddressProfile { &self.ip_config }
31672}
31673impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DvsVNicProfileTrait {
31674    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
31675        let data_type = from.data_type();
31676        match data_type {
31677            StructType::DvsVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsVNicProfile>()?),
31678            StructType::DvsHostVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsHostVNicProfile>()?),
31679            StructType::DvsServiceConsoleVNicProfile => Some(from.as_any_ref().downcast_ref::<DvsServiceConsoleVNicProfile>()?),
31680            _ => None,
31681        }
31682    }
31683    
31684    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
31685        let data_type = from.data_type();
31686        match data_type {
31687            StructType::DvsVNicProfile => Ok(from.as_any_box().downcast::<DvsVNicProfile>()?),
31688            StructType::DvsHostVNicProfile => Ok(from.as_any_box().downcast::<DvsHostVNicProfile>()?),
31689            StructType::DvsServiceConsoleVNicProfile => Ok(from.as_any_box().downcast::<DvsServiceConsoleVNicProfile>()?),
31690            _ => Err(from.as_any_box()),
31691        }
31692    }
31693}
31694/// *PortGroupProfile* is the base class for the different port group
31695/// subprofile objects.
31696pub trait PortGroupProfileTrait : super::traits::ApplyProfileTrait {
31697    /// Linkable identifier.
31698    fn get_key(&self) -> &str;
31699    /// Name of the portgroup.
31700    fn get_name(&self) -> &str;
31701    /// VLAN identifier for the port group.
31702    fn get_vlan(&self) -> &super::structs::VlanProfile;
31703    /// Virtual switch to which the port group is connected.
31704    fn get_vswitch(&self) -> &super::structs::VirtualSwitchSelectionProfile;
31705    /// The network policy/policies applicable on the port group.
31706    fn get_network_policy(&self) -> &super::structs::NetworkPolicyProfile;
31707}
31708impl<'s> serde::Serialize for dyn PortGroupProfileTrait + 's {
31709            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
31710            where
31711                S: serde::Serializer,
31712            {
31713                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
31714            }
31715        }
31716impl<'de> serde::Deserialize<'de> for Box<dyn PortGroupProfileTrait> {
31717            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
31718                deserializer.deserialize_map(PortGroupProfileVisitor)
31719            }
31720        }
31721
31722struct PortGroupProfileVisitor;
31723
31724impl<'de> de::Visitor<'de> for PortGroupProfileVisitor {
31725    type Value = Box<dyn PortGroupProfileTrait>;
31726
31727    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
31728        formatter.write_str("a valid PortGroupProfileTrait JSON object with a _typeName field")
31729    }
31730
31731    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
31732    where
31733        A: de::MapAccess<'de>,
31734    {
31735        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
31736        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
31737        match any {
31738            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
31739                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
31740            VimAny::Value(value) => Err(de::Error::custom(format!(
31741                "expected object not wrapped value: {:?}",
31742                value))),
31743        }
31744    }
31745}
31746
31747impl PortGroupProfileTrait for PortGroupProfile {
31748    fn get_key(&self) -> &str { &self.key }
31749    fn get_name(&self) -> &str { &self.name }
31750    fn get_vlan(&self) -> &super::structs::VlanProfile { &self.vlan }
31751    fn get_vswitch(&self) -> &super::structs::VirtualSwitchSelectionProfile { &self.vswitch }
31752    fn get_network_policy(&self) -> &super::structs::NetworkPolicyProfile { &self.network_policy }
31753}
31754impl PortGroupProfileTrait for HostPortGroupProfile {
31755    fn get_key(&self) -> &str { &self.key }
31756    fn get_name(&self) -> &str { &self.name }
31757    fn get_vlan(&self) -> &super::structs::VlanProfile { &self.vlan }
31758    fn get_vswitch(&self) -> &super::structs::VirtualSwitchSelectionProfile { &self.vswitch }
31759    fn get_network_policy(&self) -> &super::structs::NetworkPolicyProfile { &self.network_policy }
31760}
31761impl PortGroupProfileTrait for ServiceConsolePortGroupProfile {
31762    fn get_key(&self) -> &str { &self.key }
31763    fn get_name(&self) -> &str { &self.name }
31764    fn get_vlan(&self) -> &super::structs::VlanProfile { &self.vlan }
31765    fn get_vswitch(&self) -> &super::structs::VirtualSwitchSelectionProfile { &self.vswitch }
31766    fn get_network_policy(&self) -> &super::structs::NetworkPolicyProfile { &self.network_policy }
31767}
31768impl PortGroupProfileTrait for VmPortGroupProfile {
31769    fn get_key(&self) -> &str { &self.key }
31770    fn get_name(&self) -> &str { &self.name }
31771    fn get_vlan(&self) -> &super::structs::VlanProfile { &self.vlan }
31772    fn get_vswitch(&self) -> &super::structs::VirtualSwitchSelectionProfile { &self.vswitch }
31773    fn get_network_policy(&self) -> &super::structs::NetworkPolicyProfile { &self.network_policy }
31774}
31775impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PortGroupProfileTrait {
31776    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
31777        let data_type = from.data_type();
31778        match data_type {
31779            StructType::PortGroupProfile => Some(from.as_any_ref().downcast_ref::<PortGroupProfile>()?),
31780            StructType::HostPortGroupProfile => Some(from.as_any_ref().downcast_ref::<HostPortGroupProfile>()?),
31781            StructType::ServiceConsolePortGroupProfile => Some(from.as_any_ref().downcast_ref::<ServiceConsolePortGroupProfile>()?),
31782            StructType::VmPortGroupProfile => Some(from.as_any_ref().downcast_ref::<VmPortGroupProfile>()?),
31783            _ => None,
31784        }
31785    }
31786    
31787    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
31788        let data_type = from.data_type();
31789        match data_type {
31790            StructType::PortGroupProfile => Ok(from.as_any_box().downcast::<PortGroupProfile>()?),
31791            StructType::HostPortGroupProfile => Ok(from.as_any_box().downcast::<HostPortGroupProfile>()?),
31792            StructType::ServiceConsolePortGroupProfile => Ok(from.as_any_box().downcast::<ServiceConsolePortGroupProfile>()?),
31793            StructType::VmPortGroupProfile => Ok(from.as_any_box().downcast::<VmPortGroupProfile>()?),
31794            _ => Err(from.as_any_box()),
31795        }
31796    }
31797}
31798pub trait ProfileExpressionTrait : super::traits::DataObjectTrait {
31799    /// Identifier of this expression.
31800    /// 
31801    /// The id has to be unique within a Profile.
31802    /// The id can be used as a key while building composite expressions.
31803    fn get_id(&self) -> &str;
31804    /// User visible display name
31805    fn get_display_name(&self) -> &str;
31806    /// Flag indicating if the condition of the expression should be negated.
31807    /// 
31808    /// e.g: conditions like VSwitch0 has vmnic0 connected to it can be turned into
31809    /// VSwitch0 doesn't have vmnic0 connected to it.
31810    fn get_negated(&self) -> bool;
31811}
31812impl<'s> serde::Serialize for dyn ProfileExpressionTrait + 's {
31813            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
31814            where
31815                S: serde::Serializer,
31816            {
31817                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
31818            }
31819        }
31820impl<'de> serde::Deserialize<'de> for Box<dyn ProfileExpressionTrait> {
31821            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
31822                deserializer.deserialize_map(ProfileExpressionVisitor)
31823            }
31824        }
31825
31826struct ProfileExpressionVisitor;
31827
31828impl<'de> de::Visitor<'de> for ProfileExpressionVisitor {
31829    type Value = Box<dyn ProfileExpressionTrait>;
31830
31831    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
31832        formatter.write_str("a valid ProfileExpressionTrait JSON object with a _typeName field")
31833    }
31834
31835    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
31836    where
31837        A: de::MapAccess<'de>,
31838    {
31839        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
31840        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
31841        match any {
31842            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
31843                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
31844            VimAny::Value(value) => Err(de::Error::custom(format!(
31845                "expected object not wrapped value: {:?}",
31846                value))),
31847        }
31848    }
31849}
31850
31851impl ProfileExpressionTrait for ProfileExpression {
31852    fn get_id(&self) -> &str { &self.id }
31853    fn get_display_name(&self) -> &str { &self.display_name }
31854    fn get_negated(&self) -> bool { self.negated }
31855}
31856impl ProfileExpressionTrait for ProfileCompositeExpression {
31857    fn get_id(&self) -> &str { &self.id }
31858    fn get_display_name(&self) -> &str { &self.display_name }
31859    fn get_negated(&self) -> bool { self.negated }
31860}
31861impl ProfileExpressionTrait for ProfileSimpleExpression {
31862    fn get_id(&self) -> &str { &self.id }
31863    fn get_display_name(&self) -> &str { &self.display_name }
31864    fn get_negated(&self) -> bool { self.negated }
31865}
31866impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfileExpressionTrait {
31867    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
31868        let data_type = from.data_type();
31869        match data_type {
31870            StructType::ProfileExpression => Some(from.as_any_ref().downcast_ref::<ProfileExpression>()?),
31871            StructType::ProfileCompositeExpression => Some(from.as_any_ref().downcast_ref::<ProfileCompositeExpression>()?),
31872            StructType::ProfileSimpleExpression => Some(from.as_any_ref().downcast_ref::<ProfileSimpleExpression>()?),
31873            _ => None,
31874        }
31875    }
31876    
31877    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
31878        let data_type = from.data_type();
31879        match data_type {
31880            StructType::ProfileExpression => Ok(from.as_any_box().downcast::<ProfileExpression>()?),
31881            StructType::ProfileCompositeExpression => Ok(from.as_any_box().downcast::<ProfileCompositeExpression>()?),
31882            StructType::ProfileSimpleExpression => Ok(from.as_any_box().downcast::<ProfileSimpleExpression>()?),
31883            _ => Err(from.as_any_box()),
31884        }
31885    }
31886}
31887/// The *PolicyOption* data object represents one or more configuration
31888/// values.
31889/// 
31890/// A policy option is one of the configuration options from the
31891/// *ProfilePolicyMetadata*.*ProfilePolicyMetadata.possibleOption*
31892/// list.
31893pub trait PolicyOptionTrait : super::traits::DataObjectTrait {
31894    /// Identifier for the policy option.
31895    /// 
31896    /// This value matches one of the
31897    /// keys from the list of possible options in the policy metadata
31898    /// (*ProfilePolicyMetadata*.*ProfilePolicyMetadata.possibleOption*\[\].*ProfilePolicyOptionMetadata.id*.*ElementDescription.key*).
31899    fn get_id(&self) -> &str;
31900    /// Parameters for the policy option.
31901    /// 
31902    /// This list must include all parameters that are not marked as optional
31903    /// in the policy option metadata parameter list
31904    /// (*ProfilePolicyMetadata*.*ProfilePolicyMetadata.possibleOption*\[\].*ProfilePolicyOptionMetadata.parameter*\[\].*ProfileParameterMetadata.optional*).
31905    fn get_parameter(&self) -> &Option<Vec<super::structs::KeyAnyValue>>;
31906}
31907impl<'s> serde::Serialize for dyn PolicyOptionTrait + 's {
31908            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
31909            where
31910                S: serde::Serializer,
31911            {
31912                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
31913            }
31914        }
31915impl<'de> serde::Deserialize<'de> for Box<dyn PolicyOptionTrait> {
31916            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
31917                deserializer.deserialize_map(PolicyOptionVisitor)
31918            }
31919        }
31920
31921struct PolicyOptionVisitor;
31922
31923impl<'de> de::Visitor<'de> for PolicyOptionVisitor {
31924    type Value = Box<dyn PolicyOptionTrait>;
31925
31926    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
31927        formatter.write_str("a valid PolicyOptionTrait JSON object with a _typeName field")
31928    }
31929
31930    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
31931    where
31932        A: de::MapAccess<'de>,
31933    {
31934        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
31935        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
31936        match any {
31937            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
31938                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
31939            VimAny::Value(value) => Err(de::Error::custom(format!(
31940                "expected object not wrapped value: {:?}",
31941                value))),
31942        }
31943    }
31944}
31945
31946impl PolicyOptionTrait for PolicyOption {
31947    fn get_id(&self) -> &str { &self.id }
31948    fn get_parameter(&self) -> &Option<Vec<super::structs::KeyAnyValue>> { &self.parameter }
31949}
31950impl PolicyOptionTrait for CompositePolicyOption {
31951    fn get_id(&self) -> &str { &self.id }
31952    fn get_parameter(&self) -> &Option<Vec<super::structs::KeyAnyValue>> { &self.parameter }
31953}
31954impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn PolicyOptionTrait {
31955    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
31956        let data_type = from.data_type();
31957        match data_type {
31958            StructType::PolicyOption => Some(from.as_any_ref().downcast_ref::<PolicyOption>()?),
31959            StructType::CompositePolicyOption => Some(from.as_any_ref().downcast_ref::<CompositePolicyOption>()?),
31960            _ => None,
31961        }
31962    }
31963    
31964    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
31965        let data_type = from.data_type();
31966        match data_type {
31967            StructType::PolicyOption => Ok(from.as_any_box().downcast::<PolicyOption>()?),
31968            StructType::CompositePolicyOption => Ok(from.as_any_box().downcast::<CompositePolicyOption>()?),
31969            _ => Err(from.as_any_box()),
31970        }
31971    }
31972}
31973/// The *ProfilePolicyOptionMetadata* data object contains the metadata information
31974/// for a *PolicyOption*.
31975pub trait ProfilePolicyOptionMetadataTrait : super::traits::DataObjectTrait {
31976    /// Identifier for the policy option.
31977    /// - The <code>id.key</code> value
31978    ///   (*ExtendedElementDescription*.*ElementDescription.key*)
31979    ///   identifies the policy option type.
31980    /// - The <code>id.label</code> property
31981    ///   (*ExtendedElementDescription*.*Description.label*)
31982    ///   contains a brief localizable message describing the policy option.
31983    /// - The <code>id.summary</code> property
31984    ///   (*ExtendedElementDescription*.*Description.summary*)
31985    ///   contains a localizable summary of the policy option.
31986    ///   Summary information can contain embedded variable names which can
31987    ///   be replaced with values from the <code>parameter</code> property.
31988    fn get_id(&self) -> &super::structs::ExtendedElementDescription;
31989    /// Metadata about the parameters for the policy option.
31990    fn get_parameter(&self) -> &Option<Vec<super::structs::ProfileParameterMetadata>>;
31991}
31992impl<'s> serde::Serialize for dyn ProfilePolicyOptionMetadataTrait + 's {
31993            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
31994            where
31995                S: serde::Serializer,
31996            {
31997                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
31998            }
31999        }
32000impl<'de> serde::Deserialize<'de> for Box<dyn ProfilePolicyOptionMetadataTrait> {
32001            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32002                deserializer.deserialize_map(ProfilePolicyOptionMetadataVisitor)
32003            }
32004        }
32005
32006struct ProfilePolicyOptionMetadataVisitor;
32007
32008impl<'de> de::Visitor<'de> for ProfilePolicyOptionMetadataVisitor {
32009    type Value = Box<dyn ProfilePolicyOptionMetadataTrait>;
32010
32011    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32012        formatter.write_str("a valid ProfilePolicyOptionMetadataTrait JSON object with a _typeName field")
32013    }
32014
32015    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32016    where
32017        A: de::MapAccess<'de>,
32018    {
32019        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32020        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32021        match any {
32022            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32023                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32024            VimAny::Value(value) => Err(de::Error::custom(format!(
32025                "expected object not wrapped value: {:?}",
32026                value))),
32027        }
32028    }
32029}
32030
32031impl ProfilePolicyOptionMetadataTrait for ProfilePolicyOptionMetadata {
32032    fn get_id(&self) -> &super::structs::ExtendedElementDescription { &self.id }
32033    fn get_parameter(&self) -> &Option<Vec<super::structs::ProfileParameterMetadata>> { &self.parameter }
32034}
32035impl ProfilePolicyOptionMetadataTrait for ProfileCompositePolicyOptionMetadata {
32036    fn get_id(&self) -> &super::structs::ExtendedElementDescription { &self.id }
32037    fn get_parameter(&self) -> &Option<Vec<super::structs::ProfileParameterMetadata>> { &self.parameter }
32038}
32039impl ProfilePolicyOptionMetadataTrait for UserInputRequiredParameterMetadata {
32040    fn get_id(&self) -> &super::structs::ExtendedElementDescription { &self.id }
32041    fn get_parameter(&self) -> &Option<Vec<super::structs::ProfileParameterMetadata>> { &self.parameter }
32042}
32043impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfilePolicyOptionMetadataTrait {
32044    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32045        let data_type = from.data_type();
32046        match data_type {
32047            StructType::ProfilePolicyOptionMetadata => Some(from.as_any_ref().downcast_ref::<ProfilePolicyOptionMetadata>()?),
32048            StructType::ProfileCompositePolicyOptionMetadata => Some(from.as_any_ref().downcast_ref::<ProfileCompositePolicyOptionMetadata>()?),
32049            StructType::UserInputRequiredParameterMetadata => Some(from.as_any_ref().downcast_ref::<UserInputRequiredParameterMetadata>()?),
32050            _ => None,
32051        }
32052    }
32053    
32054    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32055        let data_type = from.data_type();
32056        match data_type {
32057            StructType::ProfilePolicyOptionMetadata => Ok(from.as_any_box().downcast::<ProfilePolicyOptionMetadata>()?),
32058            StructType::ProfileCompositePolicyOptionMetadata => Ok(from.as_any_box().downcast::<ProfileCompositePolicyOptionMetadata>()?),
32059            StructType::UserInputRequiredParameterMetadata => Ok(from.as_any_box().downcast::<UserInputRequiredParameterMetadata>()?),
32060            _ => Err(from.as_any_box()),
32061        }
32062    }
32063}
32064pub trait ProfileConfigInfoTrait : super::traits::DataObjectTrait {
32065    /// Name of the profile
32066    fn get_name(&self) -> &str;
32067    /// User Provided description of the profile
32068    fn get_annotation(&self) -> &Option<String>;
32069    /// Flag indicating if the Profile is enabled
32070    fn get_enabled(&self) -> bool;
32071}
32072impl<'s> serde::Serialize for dyn ProfileConfigInfoTrait + 's {
32073            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32074            where
32075                S: serde::Serializer,
32076            {
32077                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32078            }
32079        }
32080impl<'de> serde::Deserialize<'de> for Box<dyn ProfileConfigInfoTrait> {
32081            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32082                deserializer.deserialize_map(ProfileConfigInfoVisitor)
32083            }
32084        }
32085
32086struct ProfileConfigInfoVisitor;
32087
32088impl<'de> de::Visitor<'de> for ProfileConfigInfoVisitor {
32089    type Value = Box<dyn ProfileConfigInfoTrait>;
32090
32091    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32092        formatter.write_str("a valid ProfileConfigInfoTrait JSON object with a _typeName field")
32093    }
32094
32095    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32096    where
32097        A: de::MapAccess<'de>,
32098    {
32099        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32100        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32101        match any {
32102            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32103                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32104            VimAny::Value(value) => Err(de::Error::custom(format!(
32105                "expected object not wrapped value: {:?}",
32106                value))),
32107        }
32108    }
32109}
32110
32111impl ProfileConfigInfoTrait for ProfileConfigInfo {
32112    fn get_name(&self) -> &str { &self.name }
32113    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32114    fn get_enabled(&self) -> bool { self.enabled }
32115}
32116impl ProfileConfigInfoTrait for ClusterProfileConfigInfo {
32117    fn get_name(&self) -> &str { &self.name }
32118    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32119    fn get_enabled(&self) -> bool { self.enabled }
32120}
32121impl ProfileConfigInfoTrait for HostProfileConfigInfo {
32122    fn get_name(&self) -> &str { &self.name }
32123    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32124    fn get_enabled(&self) -> bool { self.enabled }
32125}
32126impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfileConfigInfoTrait {
32127    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32128        let data_type = from.data_type();
32129        match data_type {
32130            StructType::ProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<ProfileConfigInfo>()?),
32131            StructType::ClusterProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigInfo>()?),
32132            StructType::HostProfileConfigInfo => Some(from.as_any_ref().downcast_ref::<HostProfileConfigInfo>()?),
32133            _ => None,
32134        }
32135    }
32136    
32137    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32138        let data_type = from.data_type();
32139        match data_type {
32140            StructType::ProfileConfigInfo => Ok(from.as_any_box().downcast::<ProfileConfigInfo>()?),
32141            StructType::ClusterProfileConfigInfo => Ok(from.as_any_box().downcast::<ClusterProfileConfigInfo>()?),
32142            StructType::HostProfileConfigInfo => Ok(from.as_any_box().downcast::<HostProfileConfigInfo>()?),
32143            _ => Err(from.as_any_box()),
32144        }
32145    }
32146}
32147/// Specification describing the parameters during Profile creation
32148pub trait ProfileCreateSpecTrait : super::traits::DataObjectTrait {
32149    /// Name of the profile
32150    fn get_name(&self) -> &Option<String>;
32151    /// User Provided description of the profile
32152    fn get_annotation(&self) -> &Option<String>;
32153    /// Flag indicating if the Profile is enabled
32154    fn get_enabled(&self) -> Option<bool>;
32155}
32156impl<'s> serde::Serialize for dyn ProfileCreateSpecTrait + 's {
32157            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32158            where
32159                S: serde::Serializer,
32160            {
32161                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32162            }
32163        }
32164impl<'de> serde::Deserialize<'de> for Box<dyn ProfileCreateSpecTrait> {
32165            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32166                deserializer.deserialize_map(ProfileCreateSpecVisitor)
32167            }
32168        }
32169
32170struct ProfileCreateSpecVisitor;
32171
32172impl<'de> de::Visitor<'de> for ProfileCreateSpecVisitor {
32173    type Value = Box<dyn ProfileCreateSpecTrait>;
32174
32175    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32176        formatter.write_str("a valid ProfileCreateSpecTrait JSON object with a _typeName field")
32177    }
32178
32179    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32180    where
32181        A: de::MapAccess<'de>,
32182    {
32183        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32184        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32185        match any {
32186            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32187                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32188            VimAny::Value(value) => Err(de::Error::custom(format!(
32189                "expected object not wrapped value: {:?}",
32190                value))),
32191        }
32192    }
32193}
32194
32195impl ProfileCreateSpecTrait for ProfileCreateSpec {
32196    fn get_name(&self) -> &Option<String> { &self.name }
32197    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32198    fn get_enabled(&self) -> Option<bool> { self.enabled }
32199}
32200impl ProfileCreateSpecTrait for ProfileSerializedCreateSpec {
32201    fn get_name(&self) -> &Option<String> { &self.name }
32202    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32203    fn get_enabled(&self) -> Option<bool> { self.enabled }
32204}
32205impl ProfileCreateSpecTrait for HostProfileSerializedHostProfileSpec {
32206    fn get_name(&self) -> &Option<String> { &self.name }
32207    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32208    fn get_enabled(&self) -> Option<bool> { self.enabled }
32209}
32210impl ProfileCreateSpecTrait for ClusterProfileCreateSpec {
32211    fn get_name(&self) -> &Option<String> { &self.name }
32212    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32213    fn get_enabled(&self) -> Option<bool> { self.enabled }
32214}
32215impl ProfileCreateSpecTrait for ClusterProfileConfigSpec {
32216    fn get_name(&self) -> &Option<String> { &self.name }
32217    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32218    fn get_enabled(&self) -> Option<bool> { self.enabled }
32219}
32220impl ProfileCreateSpecTrait for ClusterProfileCompleteConfigSpec {
32221    fn get_name(&self) -> &Option<String> { &self.name }
32222    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32223    fn get_enabled(&self) -> Option<bool> { self.enabled }
32224}
32225impl ProfileCreateSpecTrait for ClusterProfileConfigServiceCreateSpec {
32226    fn get_name(&self) -> &Option<String> { &self.name }
32227    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32228    fn get_enabled(&self) -> Option<bool> { self.enabled }
32229}
32230impl ProfileCreateSpecTrait for HostProfileConfigSpec {
32231    fn get_name(&self) -> &Option<String> { &self.name }
32232    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32233    fn get_enabled(&self) -> Option<bool> { self.enabled }
32234}
32235impl ProfileCreateSpecTrait for HostProfileCompleteConfigSpec {
32236    fn get_name(&self) -> &Option<String> { &self.name }
32237    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32238    fn get_enabled(&self) -> Option<bool> { self.enabled }
32239}
32240impl ProfileCreateSpecTrait for HostProfileHostBasedConfigSpec {
32241    fn get_name(&self) -> &Option<String> { &self.name }
32242    fn get_annotation(&self) -> &Option<String> { &self.annotation }
32243    fn get_enabled(&self) -> Option<bool> { self.enabled }
32244}
32245impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfileCreateSpecTrait {
32246    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32247        let data_type = from.data_type();
32248        match data_type {
32249            StructType::ProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<ProfileCreateSpec>()?),
32250            StructType::ProfileSerializedCreateSpec => Some(from.as_any_ref().downcast_ref::<ProfileSerializedCreateSpec>()?),
32251            StructType::HostProfileSerializedHostProfileSpec => Some(from.as_any_ref().downcast_ref::<HostProfileSerializedHostProfileSpec>()?),
32252            StructType::ClusterProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCreateSpec>()?),
32253            StructType::ClusterProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigSpec>()?),
32254            StructType::ClusterProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCompleteConfigSpec>()?),
32255            StructType::ClusterProfileConfigServiceCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigServiceCreateSpec>()?),
32256            StructType::HostProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileConfigSpec>()?),
32257            StructType::HostProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileCompleteConfigSpec>()?),
32258            StructType::HostProfileHostBasedConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileHostBasedConfigSpec>()?),
32259            _ => None,
32260        }
32261    }
32262    
32263    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32264        let data_type = from.data_type();
32265        match data_type {
32266            StructType::ProfileCreateSpec => Ok(from.as_any_box().downcast::<ProfileCreateSpec>()?),
32267            StructType::ProfileSerializedCreateSpec => Ok(from.as_any_box().downcast::<ProfileSerializedCreateSpec>()?),
32268            StructType::HostProfileSerializedHostProfileSpec => Ok(from.as_any_box().downcast::<HostProfileSerializedHostProfileSpec>()?),
32269            StructType::ClusterProfileCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileCreateSpec>()?),
32270            StructType::ClusterProfileConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigSpec>()?),
32271            StructType::ClusterProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileCompleteConfigSpec>()?),
32272            StructType::ClusterProfileConfigServiceCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigServiceCreateSpec>()?),
32273            StructType::HostProfileConfigSpec => Ok(from.as_any_box().downcast::<HostProfileConfigSpec>()?),
32274            StructType::HostProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<HostProfileCompleteConfigSpec>()?),
32275            StructType::HostProfileHostBasedConfigSpec => Ok(from.as_any_box().downcast::<HostProfileHostBasedConfigSpec>()?),
32276            _ => Err(from.as_any_box()),
32277        }
32278    }
32279}
32280/// The *ProfileSerializedCreateSpec* data object
32281/// defines a string that contains a serialized representation of a host profile.
32282pub trait ProfileSerializedCreateSpecTrait : super::traits::ProfileCreateSpecTrait {
32283    /// Representation of the profile in the string form.
32284    fn get_profile_config_string(&self) -> &str;
32285}
32286impl<'s> serde::Serialize for dyn ProfileSerializedCreateSpecTrait + 's {
32287            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32288            where
32289                S: serde::Serializer,
32290            {
32291                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32292            }
32293        }
32294impl<'de> serde::Deserialize<'de> for Box<dyn ProfileSerializedCreateSpecTrait> {
32295            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32296                deserializer.deserialize_map(ProfileSerializedCreateSpecVisitor)
32297            }
32298        }
32299
32300struct ProfileSerializedCreateSpecVisitor;
32301
32302impl<'de> de::Visitor<'de> for ProfileSerializedCreateSpecVisitor {
32303    type Value = Box<dyn ProfileSerializedCreateSpecTrait>;
32304
32305    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32306        formatter.write_str("a valid ProfileSerializedCreateSpecTrait JSON object with a _typeName field")
32307    }
32308
32309    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32310    where
32311        A: de::MapAccess<'de>,
32312    {
32313        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32314        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32315        match any {
32316            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32317                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32318            VimAny::Value(value) => Err(de::Error::custom(format!(
32319                "expected object not wrapped value: {:?}",
32320                value))),
32321        }
32322    }
32323}
32324
32325impl ProfileSerializedCreateSpecTrait for ProfileSerializedCreateSpec {
32326    fn get_profile_config_string(&self) -> &str { &self.profile_config_string }
32327}
32328impl ProfileSerializedCreateSpecTrait for HostProfileSerializedHostProfileSpec {
32329    fn get_profile_config_string(&self) -> &str { &self.profile_config_string }
32330}
32331impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfileSerializedCreateSpecTrait {
32332    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32333        let data_type = from.data_type();
32334        match data_type {
32335            StructType::ProfileSerializedCreateSpec => Some(from.as_any_ref().downcast_ref::<ProfileSerializedCreateSpec>()?),
32336            StructType::HostProfileSerializedHostProfileSpec => Some(from.as_any_ref().downcast_ref::<HostProfileSerializedHostProfileSpec>()?),
32337            _ => None,
32338        }
32339    }
32340    
32341    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32342        let data_type = from.data_type();
32343        match data_type {
32344            StructType::ProfileSerializedCreateSpec => Ok(from.as_any_box().downcast::<ProfileSerializedCreateSpec>()?),
32345            StructType::HostProfileSerializedHostProfileSpec => Ok(from.as_any_box().downcast::<HostProfileSerializedHostProfileSpec>()?),
32346            _ => Err(from.as_any_box()),
32347        }
32348    }
32349}
32350/// Base class for Cluster CreateSpecs
32351pub trait ClusterProfileCreateSpecTrait : super::traits::ProfileCreateSpecTrait {
32352}
32353impl<'s> serde::Serialize for dyn ClusterProfileCreateSpecTrait + 's {
32354            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32355            where
32356                S: serde::Serializer,
32357            {
32358                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32359            }
32360        }
32361impl<'de> serde::Deserialize<'de> for Box<dyn ClusterProfileCreateSpecTrait> {
32362            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32363                deserializer.deserialize_map(ClusterProfileCreateSpecVisitor)
32364            }
32365        }
32366
32367struct ClusterProfileCreateSpecVisitor;
32368
32369impl<'de> de::Visitor<'de> for ClusterProfileCreateSpecVisitor {
32370    type Value = Box<dyn ClusterProfileCreateSpecTrait>;
32371
32372    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32373        formatter.write_str("a valid ClusterProfileCreateSpecTrait JSON object with a _typeName field")
32374    }
32375
32376    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32377    where
32378        A: de::MapAccess<'de>,
32379    {
32380        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32381        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32382        match any {
32383            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32384                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32385            VimAny::Value(value) => Err(de::Error::custom(format!(
32386                "expected object not wrapped value: {:?}",
32387                value))),
32388        }
32389    }
32390}
32391
32392impl ClusterProfileCreateSpecTrait for ClusterProfileCreateSpec {
32393}
32394impl ClusterProfileCreateSpecTrait for ClusterProfileConfigSpec {
32395}
32396impl ClusterProfileCreateSpecTrait for ClusterProfileCompleteConfigSpec {
32397}
32398impl ClusterProfileCreateSpecTrait for ClusterProfileConfigServiceCreateSpec {
32399}
32400impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterProfileCreateSpecTrait {
32401    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32402        let data_type = from.data_type();
32403        match data_type {
32404            StructType::ClusterProfileCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCreateSpec>()?),
32405            StructType::ClusterProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigSpec>()?),
32406            StructType::ClusterProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCompleteConfigSpec>()?),
32407            StructType::ClusterProfileConfigServiceCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigServiceCreateSpec>()?),
32408            _ => None,
32409        }
32410    }
32411    
32412    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32413        let data_type = from.data_type();
32414        match data_type {
32415            StructType::ClusterProfileCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileCreateSpec>()?),
32416            StructType::ClusterProfileConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigSpec>()?),
32417            StructType::ClusterProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileCompleteConfigSpec>()?),
32418            StructType::ClusterProfileConfigServiceCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigServiceCreateSpec>()?),
32419            _ => Err(from.as_any_box()),
32420        }
32421    }
32422}
32423/// DataObject which is a baseclass for other configuration
32424/// specifications.
32425pub trait ClusterProfileConfigSpecTrait : super::traits::ClusterProfileCreateSpecTrait {
32426}
32427impl<'s> serde::Serialize for dyn ClusterProfileConfigSpecTrait + 's {
32428            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32429            where
32430                S: serde::Serializer,
32431            {
32432                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32433            }
32434        }
32435impl<'de> serde::Deserialize<'de> for Box<dyn ClusterProfileConfigSpecTrait> {
32436            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32437                deserializer.deserialize_map(ClusterProfileConfigSpecVisitor)
32438            }
32439        }
32440
32441struct ClusterProfileConfigSpecVisitor;
32442
32443impl<'de> de::Visitor<'de> for ClusterProfileConfigSpecVisitor {
32444    type Value = Box<dyn ClusterProfileConfigSpecTrait>;
32445
32446    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32447        formatter.write_str("a valid ClusterProfileConfigSpecTrait JSON object with a _typeName field")
32448    }
32449
32450    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32451    where
32452        A: de::MapAccess<'de>,
32453    {
32454        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32455        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32456        match any {
32457            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32458                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32459            VimAny::Value(value) => Err(de::Error::custom(format!(
32460                "expected object not wrapped value: {:?}",
32461                value))),
32462        }
32463    }
32464}
32465
32466impl ClusterProfileConfigSpecTrait for ClusterProfileConfigSpec {
32467}
32468impl ClusterProfileConfigSpecTrait for ClusterProfileCompleteConfigSpec {
32469}
32470impl ClusterProfileConfigSpecTrait for ClusterProfileConfigServiceCreateSpec {
32471}
32472impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ClusterProfileConfigSpecTrait {
32473    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32474        let data_type = from.data_type();
32475        match data_type {
32476            StructType::ClusterProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigSpec>()?),
32477            StructType::ClusterProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileCompleteConfigSpec>()?),
32478            StructType::ClusterProfileConfigServiceCreateSpec => Some(from.as_any_ref().downcast_ref::<ClusterProfileConfigServiceCreateSpec>()?),
32479            _ => None,
32480        }
32481    }
32482    
32483    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32484        let data_type = from.data_type();
32485        match data_type {
32486            StructType::ClusterProfileConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigSpec>()?),
32487            StructType::ClusterProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<ClusterProfileCompleteConfigSpec>()?),
32488            StructType::ClusterProfileConfigServiceCreateSpec => Ok(from.as_any_box().downcast::<ClusterProfileConfigServiceCreateSpec>()?),
32489            _ => Err(from.as_any_box()),
32490        }
32491    }
32492}
32493/// *HostProfileConfigSpec* is the base data object
32494/// for all *HostProfile* configuration specifications.
32495pub trait HostProfileConfigSpecTrait : super::traits::ProfileCreateSpecTrait {
32496}
32497impl<'s> serde::Serialize for dyn HostProfileConfigSpecTrait + 's {
32498            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32499            where
32500                S: serde::Serializer,
32501            {
32502                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32503            }
32504        }
32505impl<'de> serde::Deserialize<'de> for Box<dyn HostProfileConfigSpecTrait> {
32506            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32507                deserializer.deserialize_map(HostProfileConfigSpecVisitor)
32508            }
32509        }
32510
32511struct HostProfileConfigSpecVisitor;
32512
32513impl<'de> de::Visitor<'de> for HostProfileConfigSpecVisitor {
32514    type Value = Box<dyn HostProfileConfigSpecTrait>;
32515
32516    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32517        formatter.write_str("a valid HostProfileConfigSpecTrait JSON object with a _typeName field")
32518    }
32519
32520    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32521    where
32522        A: de::MapAccess<'de>,
32523    {
32524        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32525        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32526        match any {
32527            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32528                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32529            VimAny::Value(value) => Err(de::Error::custom(format!(
32530                "expected object not wrapped value: {:?}",
32531                value))),
32532        }
32533    }
32534}
32535
32536impl HostProfileConfigSpecTrait for HostProfileConfigSpec {
32537}
32538impl HostProfileConfigSpecTrait for HostProfileCompleteConfigSpec {
32539}
32540impl HostProfileConfigSpecTrait for HostProfileHostBasedConfigSpec {
32541}
32542impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostProfileConfigSpecTrait {
32543    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32544        let data_type = from.data_type();
32545        match data_type {
32546            StructType::HostProfileConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileConfigSpec>()?),
32547            StructType::HostProfileCompleteConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileCompleteConfigSpec>()?),
32548            StructType::HostProfileHostBasedConfigSpec => Some(from.as_any_ref().downcast_ref::<HostProfileHostBasedConfigSpec>()?),
32549            _ => None,
32550        }
32551    }
32552    
32553    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32554        let data_type = from.data_type();
32555        match data_type {
32556            StructType::HostProfileConfigSpec => Ok(from.as_any_box().downcast::<HostProfileConfigSpec>()?),
32557            StructType::HostProfileCompleteConfigSpec => Ok(from.as_any_box().downcast::<HostProfileCompleteConfigSpec>()?),
32558            StructType::HostProfileHostBasedConfigSpec => Ok(from.as_any_box().downcast::<HostProfileHostBasedConfigSpec>()?),
32559            _ => Err(from.as_any_box()),
32560        }
32561    }
32562}
32563/// The *ProfileExecuteResult* data object contains the results from a
32564/// *HostProfile*.*HostProfile.ExecuteHostProfile*
32565/// operation.
32566pub trait ProfileExecuteResultTrait : super::traits::DataObjectTrait {
32567    /// Status of the profile execution operation.
32568    /// 
32569    /// The value is a string that contains
32570    /// one of the *ProfileExecuteResultStatus_enum* enumerations.
32571    fn get_status(&self) -> &str;
32572    /// Host configuration specification.
32573    /// 
32574    /// This data is valid only if
32575    /// the <code>status</code> value is <code>success</code>.
32576    /// See *ProfileExecuteResultStatus_enum*.
32577    /// 
32578    /// Use this data object when you apply the configuration
32579    /// to a host. See the <code>configSpec</code> parameter to the
32580    /// *HostProfileManager*.*HostProfileManager.ApplyHostConfig_Task*
32581    /// method.
32582    fn get_config_spec(&self) -> &Option<super::structs::HostConfigSpec>;
32583    /// List of property paths.
32584    /// 
32585    /// Each path identifies a policy that does not apply
32586    /// to this host. For example, if the precheck policies for a port group are not satisfied,
32587    /// the port group will not be created when you apply the profile to the host.
32588    /// Based on this information, the client might not display that part of the profile tree.
32589    fn get_inapplicable_path(&self) -> &Option<Vec<String>>;
32590    /// List that describes the required input for host configuration and identifies
32591    /// any policy options that still require parameter data.
32592    /// 
32593    /// Each entry in the list
32594    /// specifies the path to a policy and a parameter list. If the call to
32595    /// *HostProfile.ExecuteHostProfile* includes deferred parameters,
32596    /// the <code>requireInput</code> entries
32597    /// (<code>requireInput\[\].</code>*ProfileDeferredPolicyOptionParameter.parameter*\[\])
32598    /// will be populated with the parameter data that was passed to the execute method.
32599    /// For policies that still require input data, the parameter list in the corresponding
32600    /// entry will be null.
32601    /// 
32602    /// A vSphere client that displays a GUI can use this information to show the host-specific
32603    /// configuration policy options. The client can highlight required input fields
32604    /// and ask the user for data in increments instead of collecting all of the input at once.
32605    /// For example, in the first pass, the client collects a minimum of user input and
32606    /// sends that to the Server. The Server evaluates the profile and might decide to
32607    /// invalidate a particular part of the subtree or enable a new
32608    /// subtree in the profile. This would result in a new set of invalid paths
32609    /// (*ProfileExecuteResult.inapplicablePath*\[\]) and
32610    /// required input property paths
32611    /// (*ProfileDeferredPolicyOptionParameter*.*ProfileDeferredPolicyOptionParameter.inputPath*).
32612    /// The client can make a series of calls to the method until it achieves a success status.
32613    /// 
32614    /// When *HostProfile.ExecuteHostProfile* returns a success status,
32615    /// the <code>requireInput</code> list contains the complete list of parameters,
32616    /// consisting of the following data:
32617    /// - Deferred parameter values resolved through successive calls to
32618    ///   *HostProfile.ExecuteHostProfile*.
32619    /// - Default parameter values from the host configuration.
32620    /// - User-specified values that override the defaults.
32621    ///   
32622    /// You can specify the returned <code>requireInput</code> list in the
32623    /// <code>userInput</code> parameter to the
32624    /// *HostProfileManager*.*HostProfileManager.ApplyHostConfig_Task*
32625    /// method. The Server will use the list to update the *AnswerFile*
32626    /// associated with the host.
32627    fn get_require_input(&self) -> &Option<Vec<super::structs::ProfileDeferredPolicyOptionParameter>>;
32628    /// List of errors that were encountered during execute.
32629    /// 
32630    /// This field will be set if status is set to error.
32631    fn get_error(&self) -> &Option<Vec<super::structs::ProfileExecuteError>>;
32632}
32633impl<'s> serde::Serialize for dyn ProfileExecuteResultTrait + 's {
32634            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32635            where
32636                S: serde::Serializer,
32637            {
32638                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32639            }
32640        }
32641impl<'de> serde::Deserialize<'de> for Box<dyn ProfileExecuteResultTrait> {
32642            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32643                deserializer.deserialize_map(ProfileExecuteResultVisitor)
32644            }
32645        }
32646
32647struct ProfileExecuteResultVisitor;
32648
32649impl<'de> de::Visitor<'de> for ProfileExecuteResultVisitor {
32650    type Value = Box<dyn ProfileExecuteResultTrait>;
32651
32652    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32653        formatter.write_str("a valid ProfileExecuteResultTrait JSON object with a _typeName field")
32654    }
32655
32656    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32657    where
32658        A: de::MapAccess<'de>,
32659    {
32660        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32661        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32662        match any {
32663            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32664                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32665            VimAny::Value(value) => Err(de::Error::custom(format!(
32666                "expected object not wrapped value: {:?}",
32667                value))),
32668        }
32669    }
32670}
32671
32672impl ProfileExecuteResultTrait for ProfileExecuteResult {
32673    fn get_status(&self) -> &str { &self.status }
32674    fn get_config_spec(&self) -> &Option<super::structs::HostConfigSpec> { &self.config_spec }
32675    fn get_inapplicable_path(&self) -> &Option<Vec<String>> { &self.inapplicable_path }
32676    fn get_require_input(&self) -> &Option<Vec<super::structs::ProfileDeferredPolicyOptionParameter>> { &self.require_input }
32677    fn get_error(&self) -> &Option<Vec<super::structs::ProfileExecuteError>> { &self.error }
32678}
32679impl ProfileExecuteResultTrait for ApplyHostProfileConfigurationSpec {
32680    fn get_status(&self) -> &str { &self.status }
32681    fn get_config_spec(&self) -> &Option<super::structs::HostConfigSpec> { &self.config_spec }
32682    fn get_inapplicable_path(&self) -> &Option<Vec<String>> { &self.inapplicable_path }
32683    fn get_require_input(&self) -> &Option<Vec<super::structs::ProfileDeferredPolicyOptionParameter>> { &self.require_input }
32684    fn get_error(&self) -> &Option<Vec<super::structs::ProfileExecuteError>> { &self.error }
32685}
32686impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ProfileExecuteResultTrait {
32687    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32688        let data_type = from.data_type();
32689        match data_type {
32690            StructType::ProfileExecuteResult => Some(from.as_any_ref().downcast_ref::<ProfileExecuteResult>()?),
32691            StructType::ApplyHostProfileConfigurationSpec => Some(from.as_any_ref().downcast_ref::<ApplyHostProfileConfigurationSpec>()?),
32692            _ => None,
32693        }
32694    }
32695    
32696    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32697        let data_type = from.data_type();
32698        match data_type {
32699            StructType::ProfileExecuteResult => Ok(from.as_any_box().downcast::<ProfileExecuteResult>()?),
32700            StructType::ApplyHostProfileConfigurationSpec => Ok(from.as_any_box().downcast::<ApplyHostProfileConfigurationSpec>()?),
32701            _ => Err(from.as_any_box()),
32702        }
32703    }
32704}
32705/// Base class for host-specific answer file options.
32706pub trait AnswerFileCreateSpecTrait : super::traits::DataObjectTrait {
32707    /// If "false", then the answer file will be saved without being validated.
32708    /// 
32709    /// The default if not specified is "true".
32710    /// This option should be used with caution, since the resulting answer
32711    /// file will not be checked for errors.
32712    fn get_validating(&self) -> Option<bool>;
32713}
32714impl<'s> serde::Serialize for dyn AnswerFileCreateSpecTrait + 's {
32715            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32716            where
32717                S: serde::Serializer,
32718            {
32719                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32720            }
32721        }
32722impl<'de> serde::Deserialize<'de> for Box<dyn AnswerFileCreateSpecTrait> {
32723            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32724                deserializer.deserialize_map(AnswerFileCreateSpecVisitor)
32725            }
32726        }
32727
32728struct AnswerFileCreateSpecVisitor;
32729
32730impl<'de> de::Visitor<'de> for AnswerFileCreateSpecVisitor {
32731    type Value = Box<dyn AnswerFileCreateSpecTrait>;
32732
32733    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32734        formatter.write_str("a valid AnswerFileCreateSpecTrait JSON object with a _typeName field")
32735    }
32736
32737    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32738    where
32739        A: de::MapAccess<'de>,
32740    {
32741        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32742        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32743        match any {
32744            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32745                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32746            VimAny::Value(value) => Err(de::Error::custom(format!(
32747                "expected object not wrapped value: {:?}",
32748                value))),
32749        }
32750    }
32751}
32752
32753impl AnswerFileCreateSpecTrait for AnswerFileCreateSpec {
32754    fn get_validating(&self) -> Option<bool> { self.validating }
32755}
32756impl AnswerFileCreateSpecTrait for AnswerFileOptionsCreateSpec {
32757    fn get_validating(&self) -> Option<bool> { self.validating }
32758}
32759impl AnswerFileCreateSpecTrait for AnswerFileSerializedCreateSpec {
32760    fn get_validating(&self) -> Option<bool> { self.validating }
32761}
32762impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn AnswerFileCreateSpecTrait {
32763    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32764        let data_type = from.data_type();
32765        match data_type {
32766            StructType::AnswerFileCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileCreateSpec>()?),
32767            StructType::AnswerFileOptionsCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileOptionsCreateSpec>()?),
32768            StructType::AnswerFileSerializedCreateSpec => Some(from.as_any_ref().downcast_ref::<AnswerFileSerializedCreateSpec>()?),
32769            _ => None,
32770        }
32771    }
32772    
32773    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32774        let data_type = from.data_type();
32775        match data_type {
32776            StructType::AnswerFileCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileCreateSpec>()?),
32777            StructType::AnswerFileOptionsCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileOptionsCreateSpec>()?),
32778            StructType::AnswerFileSerializedCreateSpec => Ok(from.as_any_box().downcast::<AnswerFileSerializedCreateSpec>()?),
32779            _ => Err(from.as_any_box()),
32780        }
32781    }
32782}
32783/// Data type used to contain a representation of host or cluster customization
32784/// data in a *HostProfilesCustomizationData* object.
32785/// 
32786/// Subclasses of this must be defined to provide host or cluster customization
32787/// data in specific formats.
32788pub trait HostProfilesEntityCustomizationsTrait : super::traits::DataObjectTrait {
32789}
32790impl<'s> serde::Serialize for dyn HostProfilesEntityCustomizationsTrait + 's {
32791            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32792            where
32793                S: serde::Serializer,
32794            {
32795                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32796            }
32797        }
32798impl<'de> serde::Deserialize<'de> for Box<dyn HostProfilesEntityCustomizationsTrait> {
32799            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32800                deserializer.deserialize_map(HostProfilesEntityCustomizationsVisitor)
32801            }
32802        }
32803
32804struct HostProfilesEntityCustomizationsVisitor;
32805
32806impl<'de> de::Visitor<'de> for HostProfilesEntityCustomizationsVisitor {
32807    type Value = Box<dyn HostProfilesEntityCustomizationsTrait>;
32808
32809    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32810        formatter.write_str("a valid HostProfilesEntityCustomizationsTrait JSON object with a _typeName field")
32811    }
32812
32813    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32814    where
32815        A: de::MapAccess<'de>,
32816    {
32817        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32818        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32819        match any {
32820            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32821                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32822            VimAny::Value(value) => Err(de::Error::custom(format!(
32823                "expected object not wrapped value: {:?}",
32824                value))),
32825        }
32826    }
32827}
32828
32829impl HostProfilesEntityCustomizationsTrait for HostProfilesEntityCustomizations {
32830}
32831impl HostProfilesEntityCustomizationsTrait for StructuredCustomizations {
32832}
32833impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HostProfilesEntityCustomizationsTrait {
32834    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32835        let data_type = from.data_type();
32836        match data_type {
32837            StructType::HostProfilesEntityCustomizations => Some(from.as_any_ref().downcast_ref::<HostProfilesEntityCustomizations>()?),
32838            StructType::StructuredCustomizations => Some(from.as_any_ref().downcast_ref::<StructuredCustomizations>()?),
32839            _ => None,
32840        }
32841    }
32842    
32843    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32844        let data_type = from.data_type();
32845        match data_type {
32846            StructType::HostProfilesEntityCustomizations => Ok(from.as_any_box().downcast::<HostProfilesEntityCustomizations>()?),
32847            StructType::StructuredCustomizations => Ok(from.as_any_box().downcast::<StructuredCustomizations>()?),
32848            _ => Err(from.as_any_box()),
32849        }
32850    }
32851}
32852/// Parameters for scheduled task creation.
32853pub trait ScheduledTaskSpecTrait : super::traits::DataObjectTrait {
32854    /// Name of the scheduled task.
32855    fn get_name(&self) -> &str;
32856    /// Description of the scheduled task.
32857    fn get_description(&self) -> &str;
32858    /// Flag to indicate whether the scheduled task is enabled or disabled.
32859    fn get_enabled(&self) -> bool;
32860    /// The time scheduler that determines when the scheduled task runs.
32861    fn get_scheduler(&self) -> &Box<dyn super::traits::TaskSchedulerTrait>;
32862    /// The action of the scheduled task, to be done when the scheduled task runs.
32863    fn get_action(&self) -> &Box<dyn super::traits::ActionTrait>;
32864    /// The email notification.
32865    /// 
32866    /// If not set, this property is set to empty string, indicating no notification.
32867    fn get_notification(&self) -> &Option<String>;
32868}
32869impl<'s> serde::Serialize for dyn ScheduledTaskSpecTrait + 's {
32870            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32871            where
32872                S: serde::Serializer,
32873            {
32874                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32875            }
32876        }
32877impl<'de> serde::Deserialize<'de> for Box<dyn ScheduledTaskSpecTrait> {
32878            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32879                deserializer.deserialize_map(ScheduledTaskSpecVisitor)
32880            }
32881        }
32882
32883struct ScheduledTaskSpecVisitor;
32884
32885impl<'de> de::Visitor<'de> for ScheduledTaskSpecVisitor {
32886    type Value = Box<dyn ScheduledTaskSpecTrait>;
32887
32888    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
32889        formatter.write_str("a valid ScheduledTaskSpecTrait JSON object with a _typeName field")
32890    }
32891
32892    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
32893    where
32894        A: de::MapAccess<'de>,
32895    {
32896        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
32897        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
32898        match any {
32899            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
32900                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
32901            VimAny::Value(value) => Err(de::Error::custom(format!(
32902                "expected object not wrapped value: {:?}",
32903                value))),
32904        }
32905    }
32906}
32907
32908impl ScheduledTaskSpecTrait for ScheduledTaskSpec {
32909    fn get_name(&self) -> &str { &self.name }
32910    fn get_description(&self) -> &str { &self.description }
32911    fn get_enabled(&self) -> bool { self.enabled }
32912    fn get_scheduler(&self) -> &Box<dyn super::traits::TaskSchedulerTrait> { &self.scheduler }
32913    fn get_action(&self) -> &Box<dyn super::traits::ActionTrait> { &self.action }
32914    fn get_notification(&self) -> &Option<String> { &self.notification }
32915}
32916impl ScheduledTaskSpecTrait for ScheduledTaskInfo {
32917    fn get_name(&self) -> &str { &self.name }
32918    fn get_description(&self) -> &str { &self.description }
32919    fn get_enabled(&self) -> bool { self.enabled }
32920    fn get_scheduler(&self) -> &Box<dyn super::traits::TaskSchedulerTrait> { &self.scheduler }
32921    fn get_action(&self) -> &Box<dyn super::traits::ActionTrait> { &self.action }
32922    fn get_notification(&self) -> &Option<String> { &self.notification }
32923}
32924impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn ScheduledTaskSpecTrait {
32925    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
32926        let data_type = from.data_type();
32927        match data_type {
32928            StructType::ScheduledTaskSpec => Some(from.as_any_ref().downcast_ref::<ScheduledTaskSpec>()?),
32929            StructType::ScheduledTaskInfo => Some(from.as_any_ref().downcast_ref::<ScheduledTaskInfo>()?),
32930            _ => None,
32931        }
32932    }
32933    
32934    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
32935        let data_type = from.data_type();
32936        match data_type {
32937            StructType::ScheduledTaskSpec => Ok(from.as_any_box().downcast::<ScheduledTaskSpec>()?),
32938            StructType::ScheduledTaskInfo => Ok(from.as_any_box().downcast::<ScheduledTaskInfo>()?),
32939            _ => Err(from.as_any_box()),
32940        }
32941    }
32942}
32943/// The *TaskScheduler* data object is the base type for the scheduler objects.
32944/// 
32945/// The hierarchy of scheduler objects is as follows:
32946/// 
32947///         TaskScheduler
32948///             *AfterStartupTaskScheduler*
32949///             *OnceTaskScheduler*
32950///             *RecurrentTaskScheduler*
32951///                 *HourlyTaskScheduler*
32952///                     *DailyTaskScheduler*
32953///                         *WeeklyTaskScheduler*
32954///                         *MonthlyTaskScheduler*
32955///                             *MonthlyByDayTaskScheduler*
32956///                             *MonthlyByWeekdayTaskScheduler*
32957/// 
32958/// Use a scheduler object to set the time(s) for task execution.
32959/// You can use two scheduling modes - single execution or
32960/// recurring execution:
32961/// - Use the *AfterStartupTaskScheduler* or the *OnceTaskScheduler*
32962///   to schedule a single instance of task execution.
32963/// - Use one of the recurrent task schedulers to schedule
32964///   hourly, daily, weekly, or monthly task execution.
32965///   
32966/// After you have established the task timing, use the scheduler
32967/// object for the *ScheduledTaskSpec*
32968/// *ScheduledTaskSpec.scheduler* property value.
32969pub trait TaskSchedulerTrait : super::traits::DataObjectTrait {
32970    /// The time that the schedule for the task takes effect.
32971    /// 
32972    /// Task activation is distinct from task execution.
32973    /// When you activate a task, its schedule starts,
32974    /// and when the next execution time occurs, the task will run.
32975    /// If you do not set activeTime, the activation time defaults to
32976    /// the time that you create the scheduled task.
32977    fn get_active_time(&self) -> &Option<String>;
32978    /// The time the schedule for the task expires.
32979    /// 
32980    /// If you do not set expireTime, the schedule does not expire.
32981    fn get_expire_time(&self) -> &Option<String>;
32982}
32983impl<'s> serde::Serialize for dyn TaskSchedulerTrait + 's {
32984            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
32985            where
32986                S: serde::Serializer,
32987            {
32988                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
32989            }
32990        }
32991impl<'de> serde::Deserialize<'de> for Box<dyn TaskSchedulerTrait> {
32992            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
32993                deserializer.deserialize_map(TaskSchedulerVisitor)
32994            }
32995        }
32996
32997struct TaskSchedulerVisitor;
32998
32999impl<'de> de::Visitor<'de> for TaskSchedulerVisitor {
33000    type Value = Box<dyn TaskSchedulerTrait>;
33001
33002    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33003        formatter.write_str("a valid TaskSchedulerTrait JSON object with a _typeName field")
33004    }
33005
33006    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33007    where
33008        A: de::MapAccess<'de>,
33009    {
33010        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33011        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33012        match any {
33013            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33014                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33015            VimAny::Value(value) => Err(de::Error::custom(format!(
33016                "expected object not wrapped value: {:?}",
33017                value))),
33018        }
33019    }
33020}
33021
33022impl TaskSchedulerTrait for TaskScheduler {
33023    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33024    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33025}
33026impl TaskSchedulerTrait for AfterStartupTaskScheduler {
33027    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33028    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33029}
33030impl TaskSchedulerTrait for OnceTaskScheduler {
33031    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33032    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33033}
33034impl TaskSchedulerTrait for RecurrentTaskScheduler {
33035    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33036    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33037}
33038impl TaskSchedulerTrait for HourlyTaskScheduler {
33039    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33040    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33041}
33042impl TaskSchedulerTrait for DailyTaskScheduler {
33043    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33044    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33045}
33046impl TaskSchedulerTrait for MonthlyTaskScheduler {
33047    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33048    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33049}
33050impl TaskSchedulerTrait for MonthlyByDayTaskScheduler {
33051    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33052    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33053}
33054impl TaskSchedulerTrait for MonthlyByWeekdayTaskScheduler {
33055    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33056    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33057}
33058impl TaskSchedulerTrait for WeeklyTaskScheduler {
33059    fn get_active_time(&self) -> &Option<String> { &self.active_time }
33060    fn get_expire_time(&self) -> &Option<String> { &self.expire_time }
33061}
33062impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn TaskSchedulerTrait {
33063    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33064        let data_type = from.data_type();
33065        match data_type {
33066            StructType::TaskScheduler => Some(from.as_any_ref().downcast_ref::<TaskScheduler>()?),
33067            StructType::AfterStartupTaskScheduler => Some(from.as_any_ref().downcast_ref::<AfterStartupTaskScheduler>()?),
33068            StructType::OnceTaskScheduler => Some(from.as_any_ref().downcast_ref::<OnceTaskScheduler>()?),
33069            StructType::RecurrentTaskScheduler => Some(from.as_any_ref().downcast_ref::<RecurrentTaskScheduler>()?),
33070            StructType::HourlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<HourlyTaskScheduler>()?),
33071            StructType::DailyTaskScheduler => Some(from.as_any_ref().downcast_ref::<DailyTaskScheduler>()?),
33072            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
33073            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
33074            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
33075            StructType::WeeklyTaskScheduler => Some(from.as_any_ref().downcast_ref::<WeeklyTaskScheduler>()?),
33076            _ => None,
33077        }
33078    }
33079    
33080    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33081        let data_type = from.data_type();
33082        match data_type {
33083            StructType::TaskScheduler => Ok(from.as_any_box().downcast::<TaskScheduler>()?),
33084            StructType::AfterStartupTaskScheduler => Ok(from.as_any_box().downcast::<AfterStartupTaskScheduler>()?),
33085            StructType::OnceTaskScheduler => Ok(from.as_any_box().downcast::<OnceTaskScheduler>()?),
33086            StructType::RecurrentTaskScheduler => Ok(from.as_any_box().downcast::<RecurrentTaskScheduler>()?),
33087            StructType::HourlyTaskScheduler => Ok(from.as_any_box().downcast::<HourlyTaskScheduler>()?),
33088            StructType::DailyTaskScheduler => Ok(from.as_any_box().downcast::<DailyTaskScheduler>()?),
33089            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
33090            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
33091            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
33092            StructType::WeeklyTaskScheduler => Ok(from.as_any_box().downcast::<WeeklyTaskScheduler>()?),
33093            _ => Err(from.as_any_box()),
33094        }
33095    }
33096}
33097/// The *RecurrentTaskScheduler* data object is the base type for
33098/// the hierarchy that includes hourly, daily, weekly, and monthly task schedulers.
33099pub trait RecurrentTaskSchedulerTrait : super::traits::TaskSchedulerTrait {
33100    /// How often to run the scheduled task.
33101    /// 
33102    /// The value must be greater than
33103    /// or equal to 1 and less than 1000. The default value is 1.
33104    /// The interval acts as a multiplier for the unit of time associated
33105    /// with a particular scheduler (hours, days, weeks, or months).
33106    /// For example, setting the *HourlyTaskScheduler* interval
33107    /// to 4 causes the task to run every 4 hours.
33108    fn get_interval(&self) -> i32;
33109}
33110impl<'s> serde::Serialize for dyn RecurrentTaskSchedulerTrait + 's {
33111            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33112            where
33113                S: serde::Serializer,
33114            {
33115                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33116            }
33117        }
33118impl<'de> serde::Deserialize<'de> for Box<dyn RecurrentTaskSchedulerTrait> {
33119            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33120                deserializer.deserialize_map(RecurrentTaskSchedulerVisitor)
33121            }
33122        }
33123
33124struct RecurrentTaskSchedulerVisitor;
33125
33126impl<'de> de::Visitor<'de> for RecurrentTaskSchedulerVisitor {
33127    type Value = Box<dyn RecurrentTaskSchedulerTrait>;
33128
33129    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33130        formatter.write_str("a valid RecurrentTaskSchedulerTrait JSON object with a _typeName field")
33131    }
33132
33133    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33134    where
33135        A: de::MapAccess<'de>,
33136    {
33137        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33138        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33139        match any {
33140            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33141                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33142            VimAny::Value(value) => Err(de::Error::custom(format!(
33143                "expected object not wrapped value: {:?}",
33144                value))),
33145        }
33146    }
33147}
33148
33149impl RecurrentTaskSchedulerTrait for RecurrentTaskScheduler {
33150    fn get_interval(&self) -> i32 { self.interval }
33151}
33152impl RecurrentTaskSchedulerTrait for HourlyTaskScheduler {
33153    fn get_interval(&self) -> i32 { self.interval }
33154}
33155impl RecurrentTaskSchedulerTrait for DailyTaskScheduler {
33156    fn get_interval(&self) -> i32 { self.interval }
33157}
33158impl RecurrentTaskSchedulerTrait for MonthlyTaskScheduler {
33159    fn get_interval(&self) -> i32 { self.interval }
33160}
33161impl RecurrentTaskSchedulerTrait for MonthlyByDayTaskScheduler {
33162    fn get_interval(&self) -> i32 { self.interval }
33163}
33164impl RecurrentTaskSchedulerTrait for MonthlyByWeekdayTaskScheduler {
33165    fn get_interval(&self) -> i32 { self.interval }
33166}
33167impl RecurrentTaskSchedulerTrait for WeeklyTaskScheduler {
33168    fn get_interval(&self) -> i32 { self.interval }
33169}
33170impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn RecurrentTaskSchedulerTrait {
33171    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33172        let data_type = from.data_type();
33173        match data_type {
33174            StructType::RecurrentTaskScheduler => Some(from.as_any_ref().downcast_ref::<RecurrentTaskScheduler>()?),
33175            StructType::HourlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<HourlyTaskScheduler>()?),
33176            StructType::DailyTaskScheduler => Some(from.as_any_ref().downcast_ref::<DailyTaskScheduler>()?),
33177            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
33178            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
33179            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
33180            StructType::WeeklyTaskScheduler => Some(from.as_any_ref().downcast_ref::<WeeklyTaskScheduler>()?),
33181            _ => None,
33182        }
33183    }
33184    
33185    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33186        let data_type = from.data_type();
33187        match data_type {
33188            StructType::RecurrentTaskScheduler => Ok(from.as_any_box().downcast::<RecurrentTaskScheduler>()?),
33189            StructType::HourlyTaskScheduler => Ok(from.as_any_box().downcast::<HourlyTaskScheduler>()?),
33190            StructType::DailyTaskScheduler => Ok(from.as_any_box().downcast::<DailyTaskScheduler>()?),
33191            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
33192            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
33193            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
33194            StructType::WeeklyTaskScheduler => Ok(from.as_any_box().downcast::<WeeklyTaskScheduler>()?),
33195            _ => Err(from.as_any_box()),
33196        }
33197    }
33198}
33199/// The *HourlyTaskScheduler* data object sets the time for hourly
33200/// task execution.
33201/// 
33202/// By default, the scheduled task will run once every hour,
33203/// at the specified minute.
33204/// 
33205/// If you set the interval to a value greater than 1, the task will
33206/// execute at the specified hourly interval. (For example, an interval
33207/// of 2 will cause the task to execute at the specified minute every 2 hours.)
33208pub trait HourlyTaskSchedulerTrait : super::traits::RecurrentTaskSchedulerTrait {
33209    /// The minute at which the *RecurrentTaskScheduler* runs
33210    /// the task.
33211    /// 
33212    /// Specify the minute value as a UTC (Coordinated Universal Time)
33213    /// value in the range 0 to 59.
33214    /// 
33215    /// For vCenter 2.x and prior releases, use the server's local time.
33216    /// For example, use Australia Northern Territory (UTC +9:30) or Indian (UTC +5:30)
33217    /// time values, rather than a UTC value.
33218    fn get_minute(&self) -> i32;
33219}
33220impl<'s> serde::Serialize for dyn HourlyTaskSchedulerTrait + 's {
33221            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33222            where
33223                S: serde::Serializer,
33224            {
33225                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33226            }
33227        }
33228impl<'de> serde::Deserialize<'de> for Box<dyn HourlyTaskSchedulerTrait> {
33229            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33230                deserializer.deserialize_map(HourlyTaskSchedulerVisitor)
33231            }
33232        }
33233
33234struct HourlyTaskSchedulerVisitor;
33235
33236impl<'de> de::Visitor<'de> for HourlyTaskSchedulerVisitor {
33237    type Value = Box<dyn HourlyTaskSchedulerTrait>;
33238
33239    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33240        formatter.write_str("a valid HourlyTaskSchedulerTrait JSON object with a _typeName field")
33241    }
33242
33243    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33244    where
33245        A: de::MapAccess<'de>,
33246    {
33247        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33248        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33249        match any {
33250            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33251                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33252            VimAny::Value(value) => Err(de::Error::custom(format!(
33253                "expected object not wrapped value: {:?}",
33254                value))),
33255        }
33256    }
33257}
33258
33259impl HourlyTaskSchedulerTrait for HourlyTaskScheduler {
33260    fn get_minute(&self) -> i32 { self.minute }
33261}
33262impl HourlyTaskSchedulerTrait for DailyTaskScheduler {
33263    fn get_minute(&self) -> i32 { self.minute }
33264}
33265impl HourlyTaskSchedulerTrait for MonthlyTaskScheduler {
33266    fn get_minute(&self) -> i32 { self.minute }
33267}
33268impl HourlyTaskSchedulerTrait for MonthlyByDayTaskScheduler {
33269    fn get_minute(&self) -> i32 { self.minute }
33270}
33271impl HourlyTaskSchedulerTrait for MonthlyByWeekdayTaskScheduler {
33272    fn get_minute(&self) -> i32 { self.minute }
33273}
33274impl HourlyTaskSchedulerTrait for WeeklyTaskScheduler {
33275    fn get_minute(&self) -> i32 { self.minute }
33276}
33277impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn HourlyTaskSchedulerTrait {
33278    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33279        let data_type = from.data_type();
33280        match data_type {
33281            StructType::HourlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<HourlyTaskScheduler>()?),
33282            StructType::DailyTaskScheduler => Some(from.as_any_ref().downcast_ref::<DailyTaskScheduler>()?),
33283            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
33284            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
33285            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
33286            StructType::WeeklyTaskScheduler => Some(from.as_any_ref().downcast_ref::<WeeklyTaskScheduler>()?),
33287            _ => None,
33288        }
33289    }
33290    
33291    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33292        let data_type = from.data_type();
33293        match data_type {
33294            StructType::HourlyTaskScheduler => Ok(from.as_any_box().downcast::<HourlyTaskScheduler>()?),
33295            StructType::DailyTaskScheduler => Ok(from.as_any_box().downcast::<DailyTaskScheduler>()?),
33296            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
33297            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
33298            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
33299            StructType::WeeklyTaskScheduler => Ok(from.as_any_box().downcast::<WeeklyTaskScheduler>()?),
33300            _ => Err(from.as_any_box()),
33301        }
33302    }
33303}
33304/// The *DailyTaskScheduler* data object sets the time for daily
33305/// task execution.
33306/// 
33307/// You set the hour and the inherited minute
33308/// property to complete the schedule. By default, the scheduled task
33309/// will run once every day at the specified hour and minute.
33310/// 
33311/// If you set the interval to a value greater than 1, the task will
33312/// execute at the specified daily interval. (For example, an interval
33313/// of 2 will cause the task to execute at the specified hour and minute
33314/// every 2 days.)
33315pub trait DailyTaskSchedulerTrait : super::traits::HourlyTaskSchedulerTrait {
33316    /// The hour at which the *RecurrentTaskScheduler* runs the task.
33317    /// 
33318    /// Use UTC (Coordinated Universal Time) values in the range
33319    /// 0 to 23, where 0 = 12:00 a.m. (UTC) and 12 = 12:00 p.m. (UTC).
33320    /// 
33321    /// For vCenter 2.x and prior releases, use the server's local time.
33322    /// For example, use Eastern Standard Time (EST) or Pacific Daylight Time (PDT),
33323    /// rather than UTC.
33324    fn get_hour(&self) -> i32;
33325}
33326impl<'s> serde::Serialize for dyn DailyTaskSchedulerTrait + 's {
33327            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33328            where
33329                S: serde::Serializer,
33330            {
33331                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33332            }
33333        }
33334impl<'de> serde::Deserialize<'de> for Box<dyn DailyTaskSchedulerTrait> {
33335            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33336                deserializer.deserialize_map(DailyTaskSchedulerVisitor)
33337            }
33338        }
33339
33340struct DailyTaskSchedulerVisitor;
33341
33342impl<'de> de::Visitor<'de> for DailyTaskSchedulerVisitor {
33343    type Value = Box<dyn DailyTaskSchedulerTrait>;
33344
33345    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33346        formatter.write_str("a valid DailyTaskSchedulerTrait JSON object with a _typeName field")
33347    }
33348
33349    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33350    where
33351        A: de::MapAccess<'de>,
33352    {
33353        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33354        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33355        match any {
33356            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33357                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33358            VimAny::Value(value) => Err(de::Error::custom(format!(
33359                "expected object not wrapped value: {:?}",
33360                value))),
33361        }
33362    }
33363}
33364
33365impl DailyTaskSchedulerTrait for DailyTaskScheduler {
33366    fn get_hour(&self) -> i32 { self.hour }
33367}
33368impl DailyTaskSchedulerTrait for MonthlyTaskScheduler {
33369    fn get_hour(&self) -> i32 { self.hour }
33370}
33371impl DailyTaskSchedulerTrait for MonthlyByDayTaskScheduler {
33372    fn get_hour(&self) -> i32 { self.hour }
33373}
33374impl DailyTaskSchedulerTrait for MonthlyByWeekdayTaskScheduler {
33375    fn get_hour(&self) -> i32 { self.hour }
33376}
33377impl DailyTaskSchedulerTrait for WeeklyTaskScheduler {
33378    fn get_hour(&self) -> i32 { self.hour }
33379}
33380impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn DailyTaskSchedulerTrait {
33381    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33382        let data_type = from.data_type();
33383        match data_type {
33384            StructType::DailyTaskScheduler => Some(from.as_any_ref().downcast_ref::<DailyTaskScheduler>()?),
33385            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
33386            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
33387            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
33388            StructType::WeeklyTaskScheduler => Some(from.as_any_ref().downcast_ref::<WeeklyTaskScheduler>()?),
33389            _ => None,
33390        }
33391    }
33392    
33393    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33394        let data_type = from.data_type();
33395        match data_type {
33396            StructType::DailyTaskScheduler => Ok(from.as_any_box().downcast::<DailyTaskScheduler>()?),
33397            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
33398            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
33399            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
33400            StructType::WeeklyTaskScheduler => Ok(from.as_any_box().downcast::<WeeklyTaskScheduler>()?),
33401            _ => Err(from.as_any_box()),
33402        }
33403    }
33404}
33405/// The *MonthlyTaskScheduler* data object is the base type for
33406/// the monthly schedulers (*MonthlyByDayTaskScheduler* and
33407/// *MonthlyByWeekdayTaskScheduler*).
33408pub trait MonthlyTaskSchedulerTrait : super::traits::DailyTaskSchedulerTrait {
33409}
33410impl<'s> serde::Serialize for dyn MonthlyTaskSchedulerTrait + 's {
33411            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33412            where
33413                S: serde::Serializer,
33414            {
33415                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33416            }
33417        }
33418impl<'de> serde::Deserialize<'de> for Box<dyn MonthlyTaskSchedulerTrait> {
33419            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33420                deserializer.deserialize_map(MonthlyTaskSchedulerVisitor)
33421            }
33422        }
33423
33424struct MonthlyTaskSchedulerVisitor;
33425
33426impl<'de> de::Visitor<'de> for MonthlyTaskSchedulerVisitor {
33427    type Value = Box<dyn MonthlyTaskSchedulerTrait>;
33428
33429    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33430        formatter.write_str("a valid MonthlyTaskSchedulerTrait JSON object with a _typeName field")
33431    }
33432
33433    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33434    where
33435        A: de::MapAccess<'de>,
33436    {
33437        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33438        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33439        match any {
33440            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33441                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33442            VimAny::Value(value) => Err(de::Error::custom(format!(
33443                "expected object not wrapped value: {:?}",
33444                value))),
33445        }
33446    }
33447}
33448
33449impl MonthlyTaskSchedulerTrait for MonthlyTaskScheduler {
33450}
33451impl MonthlyTaskSchedulerTrait for MonthlyByDayTaskScheduler {
33452}
33453impl MonthlyTaskSchedulerTrait for MonthlyByWeekdayTaskScheduler {
33454}
33455impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn MonthlyTaskSchedulerTrait {
33456    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33457        let data_type = from.data_type();
33458        match data_type {
33459            StructType::MonthlyTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyTaskScheduler>()?),
33460            StructType::MonthlyByDayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByDayTaskScheduler>()?),
33461            StructType::MonthlyByWeekdayTaskScheduler => Some(from.as_any_ref().downcast_ref::<MonthlyByWeekdayTaskScheduler>()?),
33462            _ => None,
33463        }
33464    }
33465    
33466    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33467        let data_type = from.data_type();
33468        match data_type {
33469            StructType::MonthlyTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyTaskScheduler>()?),
33470            StructType::MonthlyByDayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByDayTaskScheduler>()?),
33471            StructType::MonthlyByWeekdayTaskScheduler => Ok(from.as_any_box().downcast::<MonthlyByWeekdayTaskScheduler>()?),
33472            _ => Err(from.as_any_box()),
33473        }
33474    }
33475}
33476/// VM Configuration.
33477pub trait VmConfigInfoTrait : super::traits::DataObjectTrait {
33478    /// Information about the package content.
33479    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductInfo>>;
33480    /// List of properties
33481    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertyInfo>>;
33482    /// IP assignment policy and DHCP support configuration.
33483    fn get_ip_assignment(&self) -> &super::structs::VAppIpAssignmentInfo;
33484    /// End User Liceses Agreements.
33485    fn get_eula(&self) -> &Option<Vec<String>>;
33486    /// List of uninterpreted OVF meta-data sections.
33487    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionInfo>>;
33488    /// List the transports to use for properties.
33489    /// 
33490    /// Supported values are: iso and
33491    /// com.vmware.guestInfo.
33492    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>>;
33493    /// Specifies whether the VM needs an initial boot before the deployment is complete.
33494    /// 
33495    /// Not relevant for vApps. This means that the value is always false when reading the
33496    /// configuration and is ignored when setting the configuration.
33497    /// 
33498    /// If a vApp requires an install boot (because one of its VMs does), this is visible
33499    /// on the *VirtualAppSummary.installBootRequired* field of the vApp.
33500    fn get_install_boot_required(&self) -> bool;
33501    /// Specifies the delay in seconds to wait for the VM to power off after the initial
33502    /// boot (used only if installBootRequired is true).
33503    /// 
33504    /// A value of 0 means wait forever.
33505    /// 
33506    /// Not relevant for vApps. This means that the value is always false when reading the
33507    /// configuration and is ignored when setting the configuration.
33508    fn get_install_boot_stop_delay(&self) -> i32;
33509}
33510impl<'s> serde::Serialize for dyn VmConfigInfoTrait + 's {
33511            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33512            where
33513                S: serde::Serializer,
33514            {
33515                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33516            }
33517        }
33518impl<'de> serde::Deserialize<'de> for Box<dyn VmConfigInfoTrait> {
33519            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33520                deserializer.deserialize_map(VmConfigInfoVisitor)
33521            }
33522        }
33523
33524struct VmConfigInfoVisitor;
33525
33526impl<'de> de::Visitor<'de> for VmConfigInfoVisitor {
33527    type Value = Box<dyn VmConfigInfoTrait>;
33528
33529    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33530        formatter.write_str("a valid VmConfigInfoTrait JSON object with a _typeName field")
33531    }
33532
33533    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33534    where
33535        A: de::MapAccess<'de>,
33536    {
33537        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33538        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33539        match any {
33540            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33541                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33542            VimAny::Value(value) => Err(de::Error::custom(format!(
33543                "expected object not wrapped value: {:?}",
33544                value))),
33545        }
33546    }
33547}
33548
33549impl VmConfigInfoTrait for VmConfigInfo {
33550    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductInfo>> { &self.product }
33551    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertyInfo>> { &self.property }
33552    fn get_ip_assignment(&self) -> &super::structs::VAppIpAssignmentInfo { &self.ip_assignment }
33553    fn get_eula(&self) -> &Option<Vec<String>> { &self.eula }
33554    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionInfo>> { &self.ovf_section }
33555    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>> { &self.ovf_environment_transport }
33556    fn get_install_boot_required(&self) -> bool { self.install_boot_required }
33557    fn get_install_boot_stop_delay(&self) -> i32 { self.install_boot_stop_delay }
33558}
33559impl VmConfigInfoTrait for VAppConfigInfo {
33560    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductInfo>> { &self.product }
33561    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertyInfo>> { &self.property }
33562    fn get_ip_assignment(&self) -> &super::structs::VAppIpAssignmentInfo { &self.ip_assignment }
33563    fn get_eula(&self) -> &Option<Vec<String>> { &self.eula }
33564    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionInfo>> { &self.ovf_section }
33565    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>> { &self.ovf_environment_transport }
33566    fn get_install_boot_required(&self) -> bool { self.install_boot_required }
33567    fn get_install_boot_stop_delay(&self) -> i32 { self.install_boot_stop_delay }
33568}
33569impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmConfigInfoTrait {
33570    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33571        let data_type = from.data_type();
33572        match data_type {
33573            StructType::VmConfigInfo => Some(from.as_any_ref().downcast_ref::<VmConfigInfo>()?),
33574            StructType::VAppConfigInfo => Some(from.as_any_ref().downcast_ref::<VAppConfigInfo>()?),
33575            _ => None,
33576        }
33577    }
33578    
33579    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33580        let data_type = from.data_type();
33581        match data_type {
33582            StructType::VmConfigInfo => Ok(from.as_any_box().downcast::<VmConfigInfo>()?),
33583            StructType::VAppConfigInfo => Ok(from.as_any_box().downcast::<VAppConfigInfo>()?),
33584            _ => Err(from.as_any_box()),
33585        }
33586    }
33587}
33588/// vApp related configuration of a VM.
33589pub trait VmConfigSpecTrait : super::traits::DataObjectTrait {
33590    /// Information about the product.
33591    /// 
33592    /// Reconfigure privilege: VApp.ApplicationConfig
33593    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductSpec>>;
33594    /// List of properties.
33595    /// 
33596    /// Adding and editing properties requires various privileges depending on which fields
33597    /// are affected. See *VAppPropertyInfo* for details.
33598    /// 
33599    /// Deleting properties requires the privilege VApp.ApplicationConfig.
33600    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertySpec>>;
33601    /// IP assignment policy and DHCP support configuration.
33602    /// 
33603    /// Reconfigure privilege: See *VAppIPAssignmentInfo*
33604    fn get_ip_assignment(&self) -> &Option<super::structs::VAppIpAssignmentInfo>;
33605    /// End User Liceses Agreements.
33606    /// 
33607    /// If this list is set, it replaces all exiting licenses. An empty list will not
33608    /// make any changes to installed licenses. A list with a single element {""} will
33609    /// remove all licenses and leave an empty list.
33610    /// 
33611    /// Reconfigure privilege: VApp.ApplicationConfig
33612    fn get_eula(&self) -> &Option<Vec<String>>;
33613    /// List of uninterpreted OVF meta-data sections.
33614    /// 
33615    /// Reconfigure privilege: VApp.ApplicationConfig
33616    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionSpec>>;
33617    /// List the transports to use for properties.
33618    /// 
33619    /// Supported values are: iso and
33620    /// com.vmware.guestInfo.
33621    /// 
33622    /// If this list is set, it replaces all exiting entries. An empty list will not make
33623    /// any changes. A list with a single element {""} will clear the list of transports.
33624    /// 
33625    /// Reconfigure privilege: VApp.ApplicationConfig
33626    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>>;
33627    /// If this is on a VirtualMachine object, it specifies whether the VM needs an
33628    /// initial boot before the deployment is complete.
33629    /// 
33630    /// If this is on a vApp object,
33631    /// it indicates than one or more VMs needs an initial reboot. This flag is
33632    /// automatically reset once the reboot has happened.
33633    /// 
33634    /// Reconfigure privilege: VApp.ApplicationConfig
33635    fn get_install_boot_required(&self) -> Option<bool>;
33636    /// Specifies the delay in seconds to wait for the VM to power off after the initial
33637    /// boot (used only if installBootRequired is true).
33638    /// 
33639    /// A value of 0 means wait forever.
33640    /// 
33641    /// Reconfigure privilege: VApp.ApplicationConfig
33642    fn get_install_boot_stop_delay(&self) -> Option<i32>;
33643}
33644impl<'s> serde::Serialize for dyn VmConfigSpecTrait + 's {
33645            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33646            where
33647                S: serde::Serializer,
33648            {
33649                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33650            }
33651        }
33652impl<'de> serde::Deserialize<'de> for Box<dyn VmConfigSpecTrait> {
33653            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33654                deserializer.deserialize_map(VmConfigSpecVisitor)
33655            }
33656        }
33657
33658struct VmConfigSpecVisitor;
33659
33660impl<'de> de::Visitor<'de> for VmConfigSpecVisitor {
33661    type Value = Box<dyn VmConfigSpecTrait>;
33662
33663    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33664        formatter.write_str("a valid VmConfigSpecTrait JSON object with a _typeName field")
33665    }
33666
33667    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33668    where
33669        A: de::MapAccess<'de>,
33670    {
33671        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33672        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33673        match any {
33674            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33675                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33676            VimAny::Value(value) => Err(de::Error::custom(format!(
33677                "expected object not wrapped value: {:?}",
33678                value))),
33679        }
33680    }
33681}
33682
33683impl VmConfigSpecTrait for VmConfigSpec {
33684    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductSpec>> { &self.product }
33685    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertySpec>> { &self.property }
33686    fn get_ip_assignment(&self) -> &Option<super::structs::VAppIpAssignmentInfo> { &self.ip_assignment }
33687    fn get_eula(&self) -> &Option<Vec<String>> { &self.eula }
33688    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionSpec>> { &self.ovf_section }
33689    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>> { &self.ovf_environment_transport }
33690    fn get_install_boot_required(&self) -> Option<bool> { self.install_boot_required }
33691    fn get_install_boot_stop_delay(&self) -> Option<i32> { self.install_boot_stop_delay }
33692}
33693impl VmConfigSpecTrait for VAppConfigSpec {
33694    fn get_product(&self) -> &Option<Vec<super::structs::VAppProductSpec>> { &self.product }
33695    fn get_property(&self) -> &Option<Vec<super::structs::VAppPropertySpec>> { &self.property }
33696    fn get_ip_assignment(&self) -> &Option<super::structs::VAppIpAssignmentInfo> { &self.ip_assignment }
33697    fn get_eula(&self) -> &Option<Vec<String>> { &self.eula }
33698    fn get_ovf_section(&self) -> &Option<Vec<super::structs::VAppOvfSectionSpec>> { &self.ovf_section }
33699    fn get_ovf_environment_transport(&self) -> &Option<Vec<String>> { &self.ovf_environment_transport }
33700    fn get_install_boot_required(&self) -> Option<bool> { self.install_boot_required }
33701    fn get_install_boot_stop_delay(&self) -> Option<i32> { self.install_boot_stop_delay }
33702}
33703impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VmConfigSpecTrait {
33704    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33705        let data_type = from.data_type();
33706        match data_type {
33707            StructType::VmConfigSpec => Some(from.as_any_ref().downcast_ref::<VmConfigSpec>()?),
33708            StructType::VAppConfigSpec => Some(from.as_any_ref().downcast_ref::<VAppConfigSpec>()?),
33709            _ => None,
33710        }
33711    }
33712    
33713    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33714        let data_type = from.data_type();
33715        match data_type {
33716            StructType::VmConfigSpec => Ok(from.as_any_box().downcast::<VmConfigSpec>()?),
33717            StructType::VAppConfigSpec => Ok(from.as_any_box().downcast::<VAppConfigSpec>()?),
33718            _ => Err(from.as_any_box()),
33719        }
33720    }
33721}
33722/// The NodeDeploymentSpec class defines location
33723/// specification of the nodes the VCHA Cluster along with Management
33724/// vCenter Server information that manages node VM.
33725pub trait NodeDeploymentSpecTrait : super::traits::DataObjectTrait {
33726    /// ESX host on which the VM is to be deployed.
33727    /// 
33728    /// For behavior when an esxHost is not specified,
33729    /// 
33730    /// See also *VirtualMachineRelocateSpec.host*.
33731    /// 
33732    /// Refers instance of *HostSystem*.
33733    fn get_esx_host(&self) -> &Option<super::structs::ManagedObjectReference>;
33734    /// Datastore used for deploying the VM.
33735    /// 
33736    /// For behavior when a datastore is not specified,
33737    /// 
33738    /// See also *VirtualMachineRelocateSpec.datastore*.
33739    /// 
33740    /// Refers instance of *Datastore*.
33741    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference>;
33742    /// Name of the portgroup that is associated with the public IP address
33743    /// where clients connect to vCenter Server.
33744    /// 
33745    /// If a portgroup is not
33746    /// specified same portgroup present on source is used to deploy the VM
33747    /// with an assumption that portgroup is present on destination.
33748    /// 
33749    /// Refers instance of *Network*.
33750    fn get_public_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference>;
33751    /// Name of the portgroup that is associated with the VCHA Cluster IP
33752    /// address where clients connect to vCenter Server.
33753    /// 
33754    /// If a portgroup is not
33755    /// specified same portgroup present on source is used to deploy the VM
33756    /// with an assumption that portgroup is present on destination.
33757    /// 
33758    /// Refers instance of *Network*.
33759    fn get_cluster_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference>;
33760    /// Folder in which the VM is to be created.
33761    /// 
33762    /// Refers instance of *Folder*.
33763    fn get_folder(&self) -> &super::structs::ManagedObjectReference;
33764    /// ResourcePool that will be used to deploy this node.
33765    /// 
33766    /// If the ResourcePool is not specified, the root resource pool for the
33767    /// host will be used.
33768    /// 
33769    /// Refers instance of *ResourcePool*.
33770    fn get_resource_pool(&self) -> &Option<super::structs::ManagedObjectReference>;
33771    /// Management vCenter Server managing this VM.
33772    /// 
33773    /// If the managementVc is not specified, managementVc specified as
33774    /// part of SourceNodeSpec is used.
33775    fn get_management_vc(&self) -> &Option<super::structs::ServiceLocator>;
33776    /// nodeName here refers to a name that will be assigned to the VM to which
33777    /// this node will be deployed to.
33778    fn get_node_name(&self) -> &str;
33779    /// VCHA Cluster network configuration of the node.
33780    /// 
33781    /// All cluster communication (state replication, heartbeat,
33782    /// cluster messages) happens over this network.
33783    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings;
33784}
33785impl<'s> serde::Serialize for dyn NodeDeploymentSpecTrait + 's {
33786            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33787            where
33788                S: serde::Serializer,
33789            {
33790                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33791            }
33792        }
33793impl<'de> serde::Deserialize<'de> for Box<dyn NodeDeploymentSpecTrait> {
33794            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33795                deserializer.deserialize_map(NodeDeploymentSpecVisitor)
33796            }
33797        }
33798
33799struct NodeDeploymentSpecVisitor;
33800
33801impl<'de> de::Visitor<'de> for NodeDeploymentSpecVisitor {
33802    type Value = Box<dyn NodeDeploymentSpecTrait>;
33803
33804    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33805        formatter.write_str("a valid NodeDeploymentSpecTrait JSON object with a _typeName field")
33806    }
33807
33808    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33809    where
33810        A: de::MapAccess<'de>,
33811    {
33812        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33813        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33814        match any {
33815            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33816                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33817            VimAny::Value(value) => Err(de::Error::custom(format!(
33818                "expected object not wrapped value: {:?}",
33819                value))),
33820        }
33821    }
33822}
33823
33824impl NodeDeploymentSpecTrait for NodeDeploymentSpec {
33825    fn get_esx_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.esx_host }
33826    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
33827    fn get_public_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference> { &self.public_network_port_group }
33828    fn get_cluster_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster_network_port_group }
33829    fn get_folder(&self) -> &super::structs::ManagedObjectReference { &self.folder }
33830    fn get_resource_pool(&self) -> &Option<super::structs::ManagedObjectReference> { &self.resource_pool }
33831    fn get_management_vc(&self) -> &Option<super::structs::ServiceLocator> { &self.management_vc }
33832    fn get_node_name(&self) -> &str { &self.node_name }
33833    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings { &self.ip_settings }
33834}
33835impl NodeDeploymentSpecTrait for PassiveNodeDeploymentSpec {
33836    fn get_esx_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.esx_host }
33837    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
33838    fn get_public_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference> { &self.public_network_port_group }
33839    fn get_cluster_network_port_group(&self) -> &Option<super::structs::ManagedObjectReference> { &self.cluster_network_port_group }
33840    fn get_folder(&self) -> &super::structs::ManagedObjectReference { &self.folder }
33841    fn get_resource_pool(&self) -> &Option<super::structs::ManagedObjectReference> { &self.resource_pool }
33842    fn get_management_vc(&self) -> &Option<super::structs::ServiceLocator> { &self.management_vc }
33843    fn get_node_name(&self) -> &str { &self.node_name }
33844    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings { &self.ip_settings }
33845}
33846impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NodeDeploymentSpecTrait {
33847    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33848        let data_type = from.data_type();
33849        match data_type {
33850            StructType::NodeDeploymentSpec => Some(from.as_any_ref().downcast_ref::<NodeDeploymentSpec>()?),
33851            StructType::PassiveNodeDeploymentSpec => Some(from.as_any_ref().downcast_ref::<PassiveNodeDeploymentSpec>()?),
33852            _ => None,
33853        }
33854    }
33855    
33856    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33857        let data_type = from.data_type();
33858        match data_type {
33859            StructType::NodeDeploymentSpec => Ok(from.as_any_box().downcast::<NodeDeploymentSpec>()?),
33860            StructType::PassiveNodeDeploymentSpec => Ok(from.as_any_box().downcast::<PassiveNodeDeploymentSpec>()?),
33861            _ => Err(from.as_any_box()),
33862        }
33863    }
33864}
33865/// The NodeNetworkSpec class defines network specification of a node
33866/// in the VCHA Cluster.
33867pub trait NodeNetworkSpecTrait : super::traits::DataObjectTrait {
33868    /// VCHA Cluster network configuration of the node.
33869    /// 
33870    /// All cluster communication (state replication, heartbeat,
33871    /// cluster messages) happens over this network.
33872    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings;
33873}
33874impl<'s> serde::Serialize for dyn NodeNetworkSpecTrait + 's {
33875            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33876            where
33877                S: serde::Serializer,
33878            {
33879                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33880            }
33881        }
33882impl<'de> serde::Deserialize<'de> for Box<dyn NodeNetworkSpecTrait> {
33883            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33884                deserializer.deserialize_map(NodeNetworkSpecVisitor)
33885            }
33886        }
33887
33888struct NodeNetworkSpecVisitor;
33889
33890impl<'de> de::Visitor<'de> for NodeNetworkSpecVisitor {
33891    type Value = Box<dyn NodeNetworkSpecTrait>;
33892
33893    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33894        formatter.write_str("a valid NodeNetworkSpecTrait JSON object with a _typeName field")
33895    }
33896
33897    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33898    where
33899        A: de::MapAccess<'de>,
33900    {
33901        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33902        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33903        match any {
33904            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33905                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33906            VimAny::Value(value) => Err(de::Error::custom(format!(
33907                "expected object not wrapped value: {:?}",
33908                value))),
33909        }
33910    }
33911}
33912
33913impl NodeNetworkSpecTrait for NodeNetworkSpec {
33914    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings { &self.ip_settings }
33915}
33916impl NodeNetworkSpecTrait for PassiveNodeNetworkSpec {
33917    fn get_ip_settings(&self) -> &super::structs::CustomizationIpSettings { &self.ip_settings }
33918}
33919impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn NodeNetworkSpecTrait {
33920    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33921        let data_type = from.data_type();
33922        match data_type {
33923            StructType::NodeNetworkSpec => Some(from.as_any_ref().downcast_ref::<NodeNetworkSpec>()?),
33924            StructType::PassiveNodeNetworkSpec => Some(from.as_any_ref().downcast_ref::<PassiveNodeNetworkSpec>()?),
33925            _ => None,
33926        }
33927    }
33928    
33929    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
33930        let data_type = from.data_type();
33931        match data_type {
33932            StructType::NodeNetworkSpec => Ok(from.as_any_box().downcast::<NodeNetworkSpec>()?),
33933            StructType::PassiveNodeNetworkSpec => Ok(from.as_any_box().downcast::<PassiveNodeNetworkSpec>()?),
33934            _ => Err(from.as_any_box()),
33935        }
33936    }
33937}
33938/// The BaseIndependentFilterSpec is base class for two different types
33939/// of independent filter specs *VirtualMachineIndependentFilterSpec*
33940/// and *VirtualMachineEmptyIndependentFilterSpec* which are used to specify
33941/// independent filters to be attached/removed on VMs virtual disk.
33942/// 
33943/// ***Since:*** vSphere API Release 7.0.2.1
33944pub trait VirtualMachineBaseIndependentFilterSpecTrait : super::traits::DataObjectTrait {
33945}
33946impl<'s> serde::Serialize for dyn VirtualMachineBaseIndependentFilterSpecTrait + 's {
33947            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
33948            where
33949                S: serde::Serializer,
33950            {
33951                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
33952            }
33953        }
33954impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineBaseIndependentFilterSpecTrait> {
33955            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
33956                deserializer.deserialize_map(VirtualMachineBaseIndependentFilterSpecVisitor)
33957            }
33958        }
33959
33960struct VirtualMachineBaseIndependentFilterSpecVisitor;
33961
33962impl<'de> de::Visitor<'de> for VirtualMachineBaseIndependentFilterSpecVisitor {
33963    type Value = Box<dyn VirtualMachineBaseIndependentFilterSpecTrait>;
33964
33965    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
33966        formatter.write_str("a valid VirtualMachineBaseIndependentFilterSpecTrait JSON object with a _typeName field")
33967    }
33968
33969    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
33970    where
33971        A: de::MapAccess<'de>,
33972    {
33973        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
33974        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
33975        match any {
33976            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
33977                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
33978            VimAny::Value(value) => Err(de::Error::custom(format!(
33979                "expected object not wrapped value: {:?}",
33980                value))),
33981        }
33982    }
33983}
33984
33985impl VirtualMachineBaseIndependentFilterSpecTrait for VirtualMachineBaseIndependentFilterSpec {
33986}
33987impl VirtualMachineBaseIndependentFilterSpecTrait for VirtualMachineEmptyIndependentFilterSpec {
33988}
33989impl VirtualMachineBaseIndependentFilterSpecTrait for VirtualMachineIndependentFilterSpec {
33990}
33991impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineBaseIndependentFilterSpecTrait {
33992    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
33993        let data_type = from.data_type();
33994        match data_type {
33995            StructType::VirtualMachineBaseIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineBaseIndependentFilterSpec>()?),
33996            StructType::VirtualMachineEmptyIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineEmptyIndependentFilterSpec>()?),
33997            StructType::VirtualMachineIndependentFilterSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineIndependentFilterSpec>()?),
33998            _ => None,
33999        }
34000    }
34001    
34002    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34003        let data_type = from.data_type();
34004        match data_type {
34005            StructType::VirtualMachineBaseIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineBaseIndependentFilterSpec>()?),
34006            StructType::VirtualMachineEmptyIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineEmptyIndependentFilterSpec>()?),
34007            StructType::VirtualMachineIndependentFilterSpec => Ok(from.as_any_box().downcast::<VirtualMachineIndependentFilterSpec>()?),
34008            _ => Err(from.as_any_box()),
34009        }
34010    }
34011}
34012/// Bootable device.
34013pub trait VirtualMachineBootOptionsBootableDeviceTrait : super::traits::DataObjectTrait {
34014}
34015impl<'s> serde::Serialize for dyn VirtualMachineBootOptionsBootableDeviceTrait + 's {
34016            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34017            where
34018                S: serde::Serializer,
34019            {
34020                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34021            }
34022        }
34023impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineBootOptionsBootableDeviceTrait> {
34024            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34025                deserializer.deserialize_map(VirtualMachineBootOptionsBootableDeviceVisitor)
34026            }
34027        }
34028
34029struct VirtualMachineBootOptionsBootableDeviceVisitor;
34030
34031impl<'de> de::Visitor<'de> for VirtualMachineBootOptionsBootableDeviceVisitor {
34032    type Value = Box<dyn VirtualMachineBootOptionsBootableDeviceTrait>;
34033
34034    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34035        formatter.write_str("a valid VirtualMachineBootOptionsBootableDeviceTrait JSON object with a _typeName field")
34036    }
34037
34038    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34039    where
34040        A: de::MapAccess<'de>,
34041    {
34042        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34043        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34044        match any {
34045            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34046                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34047            VimAny::Value(value) => Err(de::Error::custom(format!(
34048                "expected object not wrapped value: {:?}",
34049                value))),
34050        }
34051    }
34052}
34053
34054impl VirtualMachineBootOptionsBootableDeviceTrait for VirtualMachineBootOptionsBootableDevice {
34055}
34056impl VirtualMachineBootOptionsBootableDeviceTrait for VirtualMachineBootOptionsBootableCdromDevice {
34057}
34058impl VirtualMachineBootOptionsBootableDeviceTrait for VirtualMachineBootOptionsBootableDiskDevice {
34059}
34060impl VirtualMachineBootOptionsBootableDeviceTrait for VirtualMachineBootOptionsBootableEthernetDevice {
34061}
34062impl VirtualMachineBootOptionsBootableDeviceTrait for VirtualMachineBootOptionsBootableFloppyDevice {
34063}
34064impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineBootOptionsBootableDeviceTrait {
34065    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34066        let data_type = from.data_type();
34067        match data_type {
34068            StructType::VirtualMachineBootOptionsBootableDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableDevice>()?),
34069            StructType::VirtualMachineBootOptionsBootableCdromDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableCdromDevice>()?),
34070            StructType::VirtualMachineBootOptionsBootableDiskDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableDiskDevice>()?),
34071            StructType::VirtualMachineBootOptionsBootableEthernetDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableEthernetDevice>()?),
34072            StructType::VirtualMachineBootOptionsBootableFloppyDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineBootOptionsBootableFloppyDevice>()?),
34073            _ => None,
34074        }
34075    }
34076    
34077    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34078        let data_type = from.data_type();
34079        match data_type {
34080            StructType::VirtualMachineBootOptionsBootableDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableDevice>()?),
34081            StructType::VirtualMachineBootOptionsBootableCdromDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableCdromDevice>()?),
34082            StructType::VirtualMachineBootOptionsBootableDiskDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableDiskDevice>()?),
34083            StructType::VirtualMachineBootOptionsBootableEthernetDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableEthernetDevice>()?),
34084            StructType::VirtualMachineBootOptionsBootableFloppyDevice => Ok(from.as_any_box().downcast::<VirtualMachineBootOptionsBootableFloppyDevice>()?),
34085            _ => Err(from.as_any_box()),
34086        }
34087    }
34088}
34089/// Runtime state of a device.
34090/// 
34091/// Subclassed for information that is specific
34092/// to certain device types.
34093pub trait VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait : super::traits::DataObjectTrait {
34094}
34095impl<'s> serde::Serialize for dyn VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait + 's {
34096            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34097            where
34098                S: serde::Serializer,
34099            {
34100                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34101            }
34102        }
34103impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait> {
34104            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34105                deserializer.deserialize_map(VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateVisitor)
34106            }
34107        }
34108
34109struct VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateVisitor;
34110
34111impl<'de> de::Visitor<'de> for VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateVisitor {
34112    type Value = Box<dyn VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait>;
34113
34114    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34115        formatter.write_str("a valid VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait JSON object with a _typeName field")
34116    }
34117
34118    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34119    where
34120        A: de::MapAccess<'de>,
34121    {
34122        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34123        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34124        match any {
34125            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34126                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34127            VimAny::Value(value) => Err(de::Error::custom(format!(
34128                "expected object not wrapped value: {:?}",
34129                value))),
34130        }
34131    }
34132}
34133
34134impl VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait for VirtualMachineDeviceRuntimeInfoDeviceRuntimeState {
34135}
34136impl VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait for VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState {
34137}
34138impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineDeviceRuntimeInfoDeviceRuntimeStateTrait {
34139    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34140        let data_type = from.data_type();
34141        match data_type {
34142            StructType::VirtualMachineDeviceRuntimeInfoDeviceRuntimeState => Some(from.as_any_ref().downcast_ref::<VirtualMachineDeviceRuntimeInfoDeviceRuntimeState>()?),
34143            StructType::VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState => Some(from.as_any_ref().downcast_ref::<VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState>()?),
34144            _ => None,
34145        }
34146    }
34147    
34148    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34149        let data_type = from.data_type();
34150        match data_type {
34151            StructType::VirtualMachineDeviceRuntimeInfoDeviceRuntimeState => Ok(from.as_any_box().downcast::<VirtualMachineDeviceRuntimeInfoDeviceRuntimeState>()?),
34152            StructType::VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState => Ok(from.as_any_box().downcast::<VirtualMachineDeviceRuntimeInfoVirtualEthernetCardRuntimeState>()?),
34153            _ => Err(from.as_any_box()),
34154        }
34155    }
34156}
34157/// FaultToleranceConfigInfo is a data object type containing Fault Tolerance
34158/// settings for this virtual machine.
34159/// 
34160/// role, instanceUuids and configPaths contain information about the
34161/// whole fault tolerance group.
34162pub trait FaultToleranceConfigInfoTrait : super::traits::DataObjectTrait {
34163    /// The index of the current VM in instanceUuids array starting from 1, so
34164    /// 1 means that it is the primary VM.
34165    fn get_role(&self) -> i32;
34166    /// The instanceUuid of all the VMs in this fault tolerance group.
34167    /// 
34168    /// The
34169    /// first element is the instanceUuid of the primary VM.
34170    fn get_instance_uuids(&self) -> &Vec<String>;
34171    /// The configuration file path for all the VMs in this fault tolerance
34172    /// group.
34173    fn get_config_paths(&self) -> &Vec<String>;
34174    /// Indicates whether a secondary VM is orphaned (no longer associated with
34175    /// the primary VM).
34176    fn get_orphaned(&self) -> Option<bool>;
34177}
34178impl<'s> serde::Serialize for dyn FaultToleranceConfigInfoTrait + 's {
34179            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34180            where
34181                S: serde::Serializer,
34182            {
34183                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34184            }
34185        }
34186impl<'de> serde::Deserialize<'de> for Box<dyn FaultToleranceConfigInfoTrait> {
34187            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34188                deserializer.deserialize_map(FaultToleranceConfigInfoVisitor)
34189            }
34190        }
34191
34192struct FaultToleranceConfigInfoVisitor;
34193
34194impl<'de> de::Visitor<'de> for FaultToleranceConfigInfoVisitor {
34195    type Value = Box<dyn FaultToleranceConfigInfoTrait>;
34196
34197    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34198        formatter.write_str("a valid FaultToleranceConfigInfoTrait JSON object with a _typeName field")
34199    }
34200
34201    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34202    where
34203        A: de::MapAccess<'de>,
34204    {
34205        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34206        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34207        match any {
34208            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34209                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34210            VimAny::Value(value) => Err(de::Error::custom(format!(
34211                "expected object not wrapped value: {:?}",
34212                value))),
34213        }
34214    }
34215}
34216
34217impl FaultToleranceConfigInfoTrait for FaultToleranceConfigInfo {
34218    fn get_role(&self) -> i32 { self.role }
34219    fn get_instance_uuids(&self) -> &Vec<String> { &self.instance_uuids }
34220    fn get_config_paths(&self) -> &Vec<String> { &self.config_paths }
34221    fn get_orphaned(&self) -> Option<bool> { self.orphaned }
34222}
34223impl FaultToleranceConfigInfoTrait for FaultTolerancePrimaryConfigInfo {
34224    fn get_role(&self) -> i32 { self.role }
34225    fn get_instance_uuids(&self) -> &Vec<String> { &self.instance_uuids }
34226    fn get_config_paths(&self) -> &Vec<String> { &self.config_paths }
34227    fn get_orphaned(&self) -> Option<bool> { self.orphaned }
34228}
34229impl FaultToleranceConfigInfoTrait for FaultToleranceSecondaryConfigInfo {
34230    fn get_role(&self) -> i32 { self.role }
34231    fn get_instance_uuids(&self) -> &Vec<String> { &self.instance_uuids }
34232    fn get_config_paths(&self) -> &Vec<String> { &self.config_paths }
34233    fn get_orphaned(&self) -> Option<bool> { self.orphaned }
34234}
34235impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FaultToleranceConfigInfoTrait {
34236    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34237        let data_type = from.data_type();
34238        match data_type {
34239            StructType::FaultToleranceConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultToleranceConfigInfo>()?),
34240            StructType::FaultTolerancePrimaryConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultTolerancePrimaryConfigInfo>()?),
34241            StructType::FaultToleranceSecondaryConfigInfo => Some(from.as_any_ref().downcast_ref::<FaultToleranceSecondaryConfigInfo>()?),
34242            _ => None,
34243        }
34244    }
34245    
34246    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34247        let data_type = from.data_type();
34248        match data_type {
34249            StructType::FaultToleranceConfigInfo => Ok(from.as_any_box().downcast::<FaultToleranceConfigInfo>()?),
34250            StructType::FaultTolerancePrimaryConfigInfo => Ok(from.as_any_box().downcast::<FaultTolerancePrimaryConfigInfo>()?),
34251            StructType::FaultToleranceSecondaryConfigInfo => Ok(from.as_any_box().downcast::<FaultToleranceSecondaryConfigInfo>()?),
34252            _ => Err(from.as_any_box()),
34253        }
34254    }
34255}
34256/// This data object type encapsulates configuration settings
34257/// when creating a virtual machine quiesced snapshot.
34258pub trait VirtualMachineGuestQuiesceSpecTrait : super::traits::DataObjectTrait {
34259    /// The property to indicate maximum time in minutes for snapshot operation
34260    /// to be performed on the virtual machine.
34261    /// 
34262    /// The timeout can not be less than 5 minutes or more than 240 minutes.
34263    fn get_timeout(&self) -> Option<i32>;
34264}
34265impl<'s> serde::Serialize for dyn VirtualMachineGuestQuiesceSpecTrait + 's {
34266            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34267            where
34268                S: serde::Serializer,
34269            {
34270                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34271            }
34272        }
34273impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineGuestQuiesceSpecTrait> {
34274            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34275                deserializer.deserialize_map(VirtualMachineGuestQuiesceSpecVisitor)
34276            }
34277        }
34278
34279struct VirtualMachineGuestQuiesceSpecVisitor;
34280
34281impl<'de> de::Visitor<'de> for VirtualMachineGuestQuiesceSpecVisitor {
34282    type Value = Box<dyn VirtualMachineGuestQuiesceSpecTrait>;
34283
34284    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34285        formatter.write_str("a valid VirtualMachineGuestQuiesceSpecTrait JSON object with a _typeName field")
34286    }
34287
34288    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34289    where
34290        A: de::MapAccess<'de>,
34291    {
34292        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34293        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34294        match any {
34295            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34296                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34297            VimAny::Value(value) => Err(de::Error::custom(format!(
34298                "expected object not wrapped value: {:?}",
34299                value))),
34300        }
34301    }
34302}
34303
34304impl VirtualMachineGuestQuiesceSpecTrait for VirtualMachineGuestQuiesceSpec {
34305    fn get_timeout(&self) -> Option<i32> { self.timeout }
34306}
34307impl VirtualMachineGuestQuiesceSpecTrait for VirtualMachineWindowsQuiesceSpec {
34308    fn get_timeout(&self) -> Option<i32> { self.timeout }
34309}
34310impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineGuestQuiesceSpecTrait {
34311    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34312        let data_type = from.data_type();
34313        match data_type {
34314            StructType::VirtualMachineGuestQuiesceSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineGuestQuiesceSpec>()?),
34315            StructType::VirtualMachineWindowsQuiesceSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineWindowsQuiesceSpec>()?),
34316            _ => None,
34317        }
34318    }
34319    
34320    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34321        let data_type = from.data_type();
34322        match data_type {
34323            StructType::VirtualMachineGuestQuiesceSpec => Ok(from.as_any_box().downcast::<VirtualMachineGuestQuiesceSpec>()?),
34324            StructType::VirtualMachineWindowsQuiesceSpec => Ok(from.as_any_box().downcast::<VirtualMachineWindowsQuiesceSpec>()?),
34325            _ => Err(from.as_any_box()),
34326        }
34327    }
34328}
34329/// The ProfileSpec data object is used to specify the Storage Policy to be
34330/// associated with a Virtual Machine Home or a Virtual Disk.
34331pub trait VirtualMachineProfileSpecTrait : super::traits::DataObjectTrait {
34332}
34333impl<'s> serde::Serialize for dyn VirtualMachineProfileSpecTrait + 's {
34334            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34335            where
34336                S: serde::Serializer,
34337            {
34338                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34339            }
34340        }
34341impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineProfileSpecTrait> {
34342            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34343                deserializer.deserialize_map(VirtualMachineProfileSpecVisitor)
34344            }
34345        }
34346
34347struct VirtualMachineProfileSpecVisitor;
34348
34349impl<'de> de::Visitor<'de> for VirtualMachineProfileSpecVisitor {
34350    type Value = Box<dyn VirtualMachineProfileSpecTrait>;
34351
34352    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34353        formatter.write_str("a valid VirtualMachineProfileSpecTrait JSON object with a _typeName field")
34354    }
34355
34356    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34357    where
34358        A: de::MapAccess<'de>,
34359    {
34360        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34361        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34362        match any {
34363            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34364                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34365            VimAny::Value(value) => Err(de::Error::custom(format!(
34366                "expected object not wrapped value: {:?}",
34367                value))),
34368        }
34369    }
34370}
34371
34372impl VirtualMachineProfileSpecTrait for VirtualMachineProfileSpec {
34373}
34374impl VirtualMachineProfileSpecTrait for VirtualMachineDefaultProfileSpec {
34375}
34376impl VirtualMachineProfileSpecTrait for VirtualMachineDefinedProfileSpec {
34377}
34378impl VirtualMachineProfileSpecTrait for VirtualMachineEmptyProfileSpec {
34379}
34380impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineProfileSpecTrait {
34381    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34382        let data_type = from.data_type();
34383        match data_type {
34384            StructType::VirtualMachineProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineProfileSpec>()?),
34385            StructType::VirtualMachineDefaultProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineDefaultProfileSpec>()?),
34386            StructType::VirtualMachineDefinedProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineDefinedProfileSpec>()?),
34387            StructType::VirtualMachineEmptyProfileSpec => Some(from.as_any_ref().downcast_ref::<VirtualMachineEmptyProfileSpec>()?),
34388            _ => None,
34389        }
34390    }
34391    
34392    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34393        let data_type = from.data_type();
34394        match data_type {
34395            StructType::VirtualMachineProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineProfileSpec>()?),
34396            StructType::VirtualMachineDefaultProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineDefaultProfileSpec>()?),
34397            StructType::VirtualMachineDefinedProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineDefinedProfileSpec>()?),
34398            StructType::VirtualMachineEmptyProfileSpec => Ok(from.as_any_box().downcast::<VirtualMachineEmptyProfileSpec>()?),
34399            _ => Err(from.as_any_box()),
34400        }
34401    }
34402}
34403pub trait VirtualMachineSriovDevicePoolInfoTrait : super::traits::DataObjectTrait {
34404    /// To be used for extending to other device types
34405    fn get_key(&self) -> &str;
34406}
34407impl<'s> serde::Serialize for dyn VirtualMachineSriovDevicePoolInfoTrait + 's {
34408            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34409            where
34410                S: serde::Serializer,
34411            {
34412                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34413            }
34414        }
34415impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineSriovDevicePoolInfoTrait> {
34416            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34417                deserializer.deserialize_map(VirtualMachineSriovDevicePoolInfoVisitor)
34418            }
34419        }
34420
34421struct VirtualMachineSriovDevicePoolInfoVisitor;
34422
34423impl<'de> de::Visitor<'de> for VirtualMachineSriovDevicePoolInfoVisitor {
34424    type Value = Box<dyn VirtualMachineSriovDevicePoolInfoTrait>;
34425
34426    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34427        formatter.write_str("a valid VirtualMachineSriovDevicePoolInfoTrait JSON object with a _typeName field")
34428    }
34429
34430    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34431    where
34432        A: de::MapAccess<'de>,
34433    {
34434        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34435        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34436        match any {
34437            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34438                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34439            VimAny::Value(value) => Err(de::Error::custom(format!(
34440                "expected object not wrapped value: {:?}",
34441                value))),
34442        }
34443    }
34444}
34445
34446impl VirtualMachineSriovDevicePoolInfoTrait for VirtualMachineSriovDevicePoolInfo {
34447    fn get_key(&self) -> &str { &self.key }
34448}
34449impl VirtualMachineSriovDevicePoolInfoTrait for VirtualMachineSriovNetworkDevicePoolInfo {
34450    fn get_key(&self) -> &str { &self.key }
34451}
34452impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineSriovDevicePoolInfoTrait {
34453    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34454        let data_type = from.data_type();
34455        match data_type {
34456            StructType::VirtualMachineSriovDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovDevicePoolInfo>()?),
34457            StructType::VirtualMachineSriovNetworkDevicePoolInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovNetworkDevicePoolInfo>()?),
34458            _ => None,
34459        }
34460    }
34461    
34462    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34463        let data_type = from.data_type();
34464        match data_type {
34465            StructType::VirtualMachineSriovDevicePoolInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovDevicePoolInfo>()?),
34466            StructType::VirtualMachineSriovNetworkDevicePoolInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovNetworkDevicePoolInfo>()?),
34467            _ => Err(from.as_any_box()),
34468        }
34469    }
34470}
34471/// The TargetInfo specified a value that can be used in the device backings to
34472/// connect the virtual machine to a physical (or logical) host device.
34473pub trait VirtualMachineTargetInfoTrait : super::traits::DataObjectTrait {
34474    /// The identification of the endpoint on the host.
34475    /// 
34476    /// The format of this depends
34477    /// on the kind of virtual device this endpoints is used for. For example,
34478    /// for a VirtualEthernetCard this would be a networkname, and for a VirtualCDROM
34479    /// it would be a device name.
34480    fn get_name(&self) -> &str;
34481    /// List of configurations that this device is available for.
34482    /// 
34483    /// This is only filled
34484    /// out if more than one configuration is requested.
34485    fn get_configuration_tag(&self) -> &Option<Vec<String>>;
34486}
34487impl<'s> serde::Serialize for dyn VirtualMachineTargetInfoTrait + 's {
34488            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34489            where
34490                S: serde::Serializer,
34491            {
34492                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34493            }
34494        }
34495impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineTargetInfoTrait> {
34496            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34497                deserializer.deserialize_map(VirtualMachineTargetInfoVisitor)
34498            }
34499        }
34500
34501struct VirtualMachineTargetInfoVisitor;
34502
34503impl<'de> de::Visitor<'de> for VirtualMachineTargetInfoVisitor {
34504    type Value = Box<dyn VirtualMachineTargetInfoTrait>;
34505
34506    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34507        formatter.write_str("a valid VirtualMachineTargetInfoTrait JSON object with a _typeName field")
34508    }
34509
34510    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34511    where
34512        A: de::MapAccess<'de>,
34513    {
34514        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34515        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34516        match any {
34517            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34518                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34519            VimAny::Value(value) => Err(de::Error::custom(format!(
34520                "expected object not wrapped value: {:?}",
34521                value))),
34522        }
34523    }
34524}
34525
34526impl VirtualMachineTargetInfoTrait for VirtualMachineTargetInfo {
34527    fn get_name(&self) -> &str { &self.name }
34528    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34529}
34530impl VirtualMachineTargetInfoTrait for VirtualMachineCdromInfo {
34531    fn get_name(&self) -> &str { &self.name }
34532    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34533}
34534impl VirtualMachineTargetInfoTrait for VirtualMachineDatastoreInfo {
34535    fn get_name(&self) -> &str { &self.name }
34536    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34537}
34538impl VirtualMachineTargetInfoTrait for VirtualMachineDiskDeviceInfo {
34539    fn get_name(&self) -> &str { &self.name }
34540    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34541}
34542impl VirtualMachineTargetInfoTrait for VirtualMachineIdeDiskDeviceInfo {
34543    fn get_name(&self) -> &str { &self.name }
34544    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34545}
34546impl VirtualMachineTargetInfoTrait for VirtualMachineScsiDiskDeviceInfo {
34547    fn get_name(&self) -> &str { &self.name }
34548    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34549}
34550impl VirtualMachineTargetInfoTrait for VirtualMachineDynamicPassthroughInfo {
34551    fn get_name(&self) -> &str { &self.name }
34552    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34553}
34554impl VirtualMachineTargetInfoTrait for VirtualMachineFloppyInfo {
34555    fn get_name(&self) -> &str { &self.name }
34556    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34557}
34558impl VirtualMachineTargetInfoTrait for VirtualMachineNetworkInfo {
34559    fn get_name(&self) -> &str { &self.name }
34560    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34561}
34562impl VirtualMachineTargetInfoTrait for OpaqueNetworkTargetInfo {
34563    fn get_name(&self) -> &str { &self.name }
34564    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34565}
34566impl VirtualMachineTargetInfoTrait for VirtualMachineParallelInfo {
34567    fn get_name(&self) -> &str { &self.name }
34568    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34569}
34570impl VirtualMachineTargetInfoTrait for VirtualMachinePciPassthroughInfo {
34571    fn get_name(&self) -> &str { &self.name }
34572    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34573}
34574impl VirtualMachineTargetInfoTrait for VirtualMachineSriovInfo {
34575    fn get_name(&self) -> &str { &self.name }
34576    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34577}
34578impl VirtualMachineTargetInfoTrait for VirtualMachinePciSharedGpuPassthroughInfo {
34579    fn get_name(&self) -> &str { &self.name }
34580    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34581}
34582impl VirtualMachineTargetInfoTrait for VirtualMachinePrecisionClockInfo {
34583    fn get_name(&self) -> &str { &self.name }
34584    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34585}
34586impl VirtualMachineTargetInfoTrait for VirtualMachineScsiPassthroughInfo {
34587    fn get_name(&self) -> &str { &self.name }
34588    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34589}
34590impl VirtualMachineTargetInfoTrait for VirtualMachineSerialInfo {
34591    fn get_name(&self) -> &str { &self.name }
34592    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34593}
34594impl VirtualMachineTargetInfoTrait for VirtualMachineSgxTargetInfo {
34595    fn get_name(&self) -> &str { &self.name }
34596    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34597}
34598impl VirtualMachineTargetInfoTrait for VirtualMachineSoundInfo {
34599    fn get_name(&self) -> &str { &self.name }
34600    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34601}
34602impl VirtualMachineTargetInfoTrait for SubnetInfo {
34603    fn get_name(&self) -> &str { &self.name }
34604    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34605}
34606impl VirtualMachineTargetInfoTrait for VirtualMachineUsbInfo {
34607    fn get_name(&self) -> &str { &self.name }
34608    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34609}
34610impl VirtualMachineTargetInfoTrait for VirtualMachineVFlashModuleInfo {
34611    fn get_name(&self) -> &str { &self.name }
34612    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34613}
34614impl VirtualMachineTargetInfoTrait for VirtualMachineVMotionStunTimeInfo {
34615    fn get_name(&self) -> &str { &self.name }
34616    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34617}
34618impl VirtualMachineTargetInfoTrait for VirtualMachineVendorDeviceGroupInfo {
34619    fn get_name(&self) -> &str { &self.name }
34620    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34621}
34622impl VirtualMachineTargetInfoTrait for VirtualMachineVgpuDeviceInfo {
34623    fn get_name(&self) -> &str { &self.name }
34624    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34625}
34626impl VirtualMachineTargetInfoTrait for VirtualMachineVgpuProfileInfo {
34627    fn get_name(&self) -> &str { &self.name }
34628    fn get_configuration_tag(&self) -> &Option<Vec<String>> { &self.configuration_tag }
34629}
34630impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineTargetInfoTrait {
34631    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34632        let data_type = from.data_type();
34633        match data_type {
34634            StructType::VirtualMachineTargetInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineTargetInfo>()?),
34635            StructType::VirtualMachineCdromInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineCdromInfo>()?),
34636            StructType::VirtualMachineDatastoreInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDatastoreInfo>()?),
34637            StructType::VirtualMachineDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDiskDeviceInfo>()?),
34638            StructType::VirtualMachineIdeDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineIdeDiskDeviceInfo>()?),
34639            StructType::VirtualMachineScsiDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineScsiDiskDeviceInfo>()?),
34640            StructType::VirtualMachineDynamicPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDynamicPassthroughInfo>()?),
34641            StructType::VirtualMachineFloppyInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineFloppyInfo>()?),
34642            StructType::VirtualMachineNetworkInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineNetworkInfo>()?),
34643            StructType::OpaqueNetworkTargetInfo => Some(from.as_any_ref().downcast_ref::<OpaqueNetworkTargetInfo>()?),
34644            StructType::VirtualMachineParallelInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineParallelInfo>()?),
34645            StructType::VirtualMachinePciPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePciPassthroughInfo>()?),
34646            StructType::VirtualMachineSriovInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovInfo>()?),
34647            StructType::VirtualMachinePciSharedGpuPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePciSharedGpuPassthroughInfo>()?),
34648            StructType::VirtualMachinePrecisionClockInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePrecisionClockInfo>()?),
34649            StructType::VirtualMachineScsiPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineScsiPassthroughInfo>()?),
34650            StructType::VirtualMachineSerialInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSerialInfo>()?),
34651            StructType::VirtualMachineSgxTargetInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSgxTargetInfo>()?),
34652            StructType::VirtualMachineSoundInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSoundInfo>()?),
34653            StructType::SubnetInfo => Some(from.as_any_ref().downcast_ref::<SubnetInfo>()?),
34654            StructType::VirtualMachineUsbInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineUsbInfo>()?),
34655            StructType::VirtualMachineVFlashModuleInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVFlashModuleInfo>()?),
34656            StructType::VirtualMachineVMotionStunTimeInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVMotionStunTimeInfo>()?),
34657            StructType::VirtualMachineVendorDeviceGroupInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVendorDeviceGroupInfo>()?),
34658            StructType::VirtualMachineVgpuDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVgpuDeviceInfo>()?),
34659            StructType::VirtualMachineVgpuProfileInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineVgpuProfileInfo>()?),
34660            _ => None,
34661        }
34662    }
34663    
34664    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34665        let data_type = from.data_type();
34666        match data_type {
34667            StructType::VirtualMachineTargetInfo => Ok(from.as_any_box().downcast::<VirtualMachineTargetInfo>()?),
34668            StructType::VirtualMachineCdromInfo => Ok(from.as_any_box().downcast::<VirtualMachineCdromInfo>()?),
34669            StructType::VirtualMachineDatastoreInfo => Ok(from.as_any_box().downcast::<VirtualMachineDatastoreInfo>()?),
34670            StructType::VirtualMachineDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineDiskDeviceInfo>()?),
34671            StructType::VirtualMachineIdeDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineIdeDiskDeviceInfo>()?),
34672            StructType::VirtualMachineScsiDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineScsiDiskDeviceInfo>()?),
34673            StructType::VirtualMachineDynamicPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachineDynamicPassthroughInfo>()?),
34674            StructType::VirtualMachineFloppyInfo => Ok(from.as_any_box().downcast::<VirtualMachineFloppyInfo>()?),
34675            StructType::VirtualMachineNetworkInfo => Ok(from.as_any_box().downcast::<VirtualMachineNetworkInfo>()?),
34676            StructType::OpaqueNetworkTargetInfo => Ok(from.as_any_box().downcast::<OpaqueNetworkTargetInfo>()?),
34677            StructType::VirtualMachineParallelInfo => Ok(from.as_any_box().downcast::<VirtualMachineParallelInfo>()?),
34678            StructType::VirtualMachinePciPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachinePciPassthroughInfo>()?),
34679            StructType::VirtualMachineSriovInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovInfo>()?),
34680            StructType::VirtualMachinePciSharedGpuPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachinePciSharedGpuPassthroughInfo>()?),
34681            StructType::VirtualMachinePrecisionClockInfo => Ok(from.as_any_box().downcast::<VirtualMachinePrecisionClockInfo>()?),
34682            StructType::VirtualMachineScsiPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachineScsiPassthroughInfo>()?),
34683            StructType::VirtualMachineSerialInfo => Ok(from.as_any_box().downcast::<VirtualMachineSerialInfo>()?),
34684            StructType::VirtualMachineSgxTargetInfo => Ok(from.as_any_box().downcast::<VirtualMachineSgxTargetInfo>()?),
34685            StructType::VirtualMachineSoundInfo => Ok(from.as_any_box().downcast::<VirtualMachineSoundInfo>()?),
34686            StructType::SubnetInfo => Ok(from.as_any_box().downcast::<SubnetInfo>()?),
34687            StructType::VirtualMachineUsbInfo => Ok(from.as_any_box().downcast::<VirtualMachineUsbInfo>()?),
34688            StructType::VirtualMachineVFlashModuleInfo => Ok(from.as_any_box().downcast::<VirtualMachineVFlashModuleInfo>()?),
34689            StructType::VirtualMachineVMotionStunTimeInfo => Ok(from.as_any_box().downcast::<VirtualMachineVMotionStunTimeInfo>()?),
34690            StructType::VirtualMachineVendorDeviceGroupInfo => Ok(from.as_any_box().downcast::<VirtualMachineVendorDeviceGroupInfo>()?),
34691            StructType::VirtualMachineVgpuDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineVgpuDeviceInfo>()?),
34692            StructType::VirtualMachineVgpuProfileInfo => Ok(from.as_any_box().downcast::<VirtualMachineVgpuProfileInfo>()?),
34693            _ => Err(from.as_any_box()),
34694        }
34695    }
34696}
34697/// The DiskDeviceInfo class contains basic information about a specific disk hardware
34698/// device.
34699pub trait VirtualMachineDiskDeviceInfoTrait : super::traits::VirtualMachineTargetInfoTrait {
34700    /// Size of disk
34701    fn get_capacity(&self) -> Option<i64>;
34702    /// List of known virtual machines using this physical disk as a backing
34703    /// 
34704    /// Refers instances of *VirtualMachine*.
34705    fn get_vm(&self) -> &Option<Vec<super::structs::ManagedObjectReference>>;
34706}
34707impl<'s> serde::Serialize for dyn VirtualMachineDiskDeviceInfoTrait + 's {
34708            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34709            where
34710                S: serde::Serializer,
34711            {
34712                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34713            }
34714        }
34715impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineDiskDeviceInfoTrait> {
34716            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34717                deserializer.deserialize_map(VirtualMachineDiskDeviceInfoVisitor)
34718            }
34719        }
34720
34721struct VirtualMachineDiskDeviceInfoVisitor;
34722
34723impl<'de> de::Visitor<'de> for VirtualMachineDiskDeviceInfoVisitor {
34724    type Value = Box<dyn VirtualMachineDiskDeviceInfoTrait>;
34725
34726    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34727        formatter.write_str("a valid VirtualMachineDiskDeviceInfoTrait JSON object with a _typeName field")
34728    }
34729
34730    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34731    where
34732        A: de::MapAccess<'de>,
34733    {
34734        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34735        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34736        match any {
34737            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34738                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34739            VimAny::Value(value) => Err(de::Error::custom(format!(
34740                "expected object not wrapped value: {:?}",
34741                value))),
34742        }
34743    }
34744}
34745
34746impl VirtualMachineDiskDeviceInfoTrait for VirtualMachineDiskDeviceInfo {
34747    fn get_capacity(&self) -> Option<i64> { self.capacity }
34748    fn get_vm(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.vm }
34749}
34750impl VirtualMachineDiskDeviceInfoTrait for VirtualMachineIdeDiskDeviceInfo {
34751    fn get_capacity(&self) -> Option<i64> { self.capacity }
34752    fn get_vm(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.vm }
34753}
34754impl VirtualMachineDiskDeviceInfoTrait for VirtualMachineScsiDiskDeviceInfo {
34755    fn get_capacity(&self) -> Option<i64> { self.capacity }
34756    fn get_vm(&self) -> &Option<Vec<super::structs::ManagedObjectReference>> { &self.vm }
34757}
34758impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineDiskDeviceInfoTrait {
34759    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34760        let data_type = from.data_type();
34761        match data_type {
34762            StructType::VirtualMachineDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineDiskDeviceInfo>()?),
34763            StructType::VirtualMachineIdeDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineIdeDiskDeviceInfo>()?),
34764            StructType::VirtualMachineScsiDiskDeviceInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineScsiDiskDeviceInfo>()?),
34765            _ => None,
34766        }
34767    }
34768    
34769    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34770        let data_type = from.data_type();
34771        match data_type {
34772            StructType::VirtualMachineDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineDiskDeviceInfo>()?),
34773            StructType::VirtualMachineIdeDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineIdeDiskDeviceInfo>()?),
34774            StructType::VirtualMachineScsiDiskDeviceInfo => Ok(from.as_any_box().downcast::<VirtualMachineScsiDiskDeviceInfo>()?),
34775            _ => Err(from.as_any_box()),
34776        }
34777    }
34778}
34779/// Description of a generic PCI device that can be attached to a virtual machine.
34780pub trait VirtualMachinePciPassthroughInfoTrait : super::traits::VirtualMachineTargetInfoTrait {
34781    /// Details of the PCI device, including vendor, class and
34782    /// device identification information.
34783    fn get_pci_device(&self) -> &super::structs::HostPciDevice;
34784    /// The ID of the system the PCI device is attached to.
34785    fn get_system_id(&self) -> &str;
34786}
34787impl<'s> serde::Serialize for dyn VirtualMachinePciPassthroughInfoTrait + 's {
34788            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34789            where
34790                S: serde::Serializer,
34791            {
34792                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34793            }
34794        }
34795impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachinePciPassthroughInfoTrait> {
34796            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34797                deserializer.deserialize_map(VirtualMachinePciPassthroughInfoVisitor)
34798            }
34799        }
34800
34801struct VirtualMachinePciPassthroughInfoVisitor;
34802
34803impl<'de> de::Visitor<'de> for VirtualMachinePciPassthroughInfoVisitor {
34804    type Value = Box<dyn VirtualMachinePciPassthroughInfoTrait>;
34805
34806    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34807        formatter.write_str("a valid VirtualMachinePciPassthroughInfoTrait JSON object with a _typeName field")
34808    }
34809
34810    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34811    where
34812        A: de::MapAccess<'de>,
34813    {
34814        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34815        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34816        match any {
34817            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34818                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34819            VimAny::Value(value) => Err(de::Error::custom(format!(
34820                "expected object not wrapped value: {:?}",
34821                value))),
34822        }
34823    }
34824}
34825
34826impl VirtualMachinePciPassthroughInfoTrait for VirtualMachinePciPassthroughInfo {
34827    fn get_pci_device(&self) -> &super::structs::HostPciDevice { &self.pci_device }
34828    fn get_system_id(&self) -> &str { &self.system_id }
34829}
34830impl VirtualMachinePciPassthroughInfoTrait for VirtualMachineSriovInfo {
34831    fn get_pci_device(&self) -> &super::structs::HostPciDevice { &self.pci_device }
34832    fn get_system_id(&self) -> &str { &self.system_id }
34833}
34834impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachinePciPassthroughInfoTrait {
34835    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34836        let data_type = from.data_type();
34837        match data_type {
34838            StructType::VirtualMachinePciPassthroughInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachinePciPassthroughInfo>()?),
34839            StructType::VirtualMachineSriovInfo => Some(from.as_any_ref().downcast_ref::<VirtualMachineSriovInfo>()?),
34840            _ => None,
34841        }
34842    }
34843    
34844    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34845        let data_type = from.data_type();
34846        match data_type {
34847            StructType::VirtualMachinePciPassthroughInfo => Ok(from.as_any_box().downcast::<VirtualMachinePciPassthroughInfo>()?),
34848            StructType::VirtualMachineSriovInfo => Ok(from.as_any_box().downcast::<VirtualMachineSriovInfo>()?),
34849            _ => Err(from.as_any_box()),
34850        }
34851    }
34852}
34853/// Base device group type.
34854pub trait VirtualMachineVirtualDeviceGroupsDeviceGroupTrait : super::traits::DataObjectTrait {
34855    /// Group instance key.
34856    /// 
34857    /// Unique integer referencing
34858    /// device group. During group creation client should
34859    /// use a temporary negative number. Once group is
34860    /// added to the virtual machine, server generates non-negative
34861    /// integer that stays constant during group lifetime.
34862    /// See *VirtualDevice.key* for details.
34863    fn get_group_instance_key(&self) -> i32;
34864    /// Provides a label and summary information for the device.
34865    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>>;
34866}
34867impl<'s> serde::Serialize for dyn VirtualMachineVirtualDeviceGroupsDeviceGroupTrait + 's {
34868            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34869            where
34870                S: serde::Serializer,
34871            {
34872                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34873            }
34874        }
34875impl<'de> serde::Deserialize<'de> for Box<dyn VirtualMachineVirtualDeviceGroupsDeviceGroupTrait> {
34876            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34877                deserializer.deserialize_map(VirtualMachineVirtualDeviceGroupsDeviceGroupVisitor)
34878            }
34879        }
34880
34881struct VirtualMachineVirtualDeviceGroupsDeviceGroupVisitor;
34882
34883impl<'de> de::Visitor<'de> for VirtualMachineVirtualDeviceGroupsDeviceGroupVisitor {
34884    type Value = Box<dyn VirtualMachineVirtualDeviceGroupsDeviceGroupTrait>;
34885
34886    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34887        formatter.write_str("a valid VirtualMachineVirtualDeviceGroupsDeviceGroupTrait JSON object with a _typeName field")
34888    }
34889
34890    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34891    where
34892        A: de::MapAccess<'de>,
34893    {
34894        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34895        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34896        match any {
34897            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34898                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34899            VimAny::Value(value) => Err(de::Error::custom(format!(
34900                "expected object not wrapped value: {:?}",
34901                value))),
34902        }
34903    }
34904}
34905
34906impl VirtualMachineVirtualDeviceGroupsDeviceGroupTrait for VirtualMachineVirtualDeviceGroupsDeviceGroup {
34907    fn get_group_instance_key(&self) -> i32 { self.group_instance_key }
34908    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
34909}
34910impl VirtualMachineVirtualDeviceGroupsDeviceGroupTrait for VirtualMachineVirtualDeviceGroupsVendorDeviceGroup {
34911    fn get_group_instance_key(&self) -> i32 { self.group_instance_key }
34912    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
34913}
34914impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualMachineVirtualDeviceGroupsDeviceGroupTrait {
34915    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34916        let data_type = from.data_type();
34917        match data_type {
34918            StructType::VirtualMachineVirtualDeviceGroupsDeviceGroup => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceGroupsDeviceGroup>()?),
34919            StructType::VirtualMachineVirtualDeviceGroupsVendorDeviceGroup => Some(from.as_any_ref().downcast_ref::<VirtualMachineVirtualDeviceGroupsVendorDeviceGroup>()?),
34920            _ => None,
34921        }
34922    }
34923    
34924    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34925        let data_type = from.data_type();
34926        match data_type {
34927            StructType::VirtualMachineVirtualDeviceGroupsDeviceGroup => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceGroupsDeviceGroup>()?),
34928            StructType::VirtualMachineVirtualDeviceGroupsVendorDeviceGroup => Ok(from.as_any_box().downcast::<VirtualMachineVirtualDeviceGroupsVendorDeviceGroup>()?),
34929            _ => Err(from.as_any_box()),
34930        }
34931    }
34932}
34933/// Base type for sysprep, sysprepText, or linuxPrep object type.
34934pub trait CustomizationIdentitySettingsTrait : super::traits::DataObjectTrait {
34935}
34936impl<'s> serde::Serialize for dyn CustomizationIdentitySettingsTrait + 's {
34937            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
34938            where
34939                S: serde::Serializer,
34940            {
34941                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
34942            }
34943        }
34944impl<'de> serde::Deserialize<'de> for Box<dyn CustomizationIdentitySettingsTrait> {
34945            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
34946                deserializer.deserialize_map(CustomizationIdentitySettingsVisitor)
34947            }
34948        }
34949
34950struct CustomizationIdentitySettingsVisitor;
34951
34952impl<'de> de::Visitor<'de> for CustomizationIdentitySettingsVisitor {
34953    type Value = Box<dyn CustomizationIdentitySettingsTrait>;
34954
34955    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
34956        formatter.write_str("a valid CustomizationIdentitySettingsTrait JSON object with a _typeName field")
34957    }
34958
34959    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
34960    where
34961        A: de::MapAccess<'de>,
34962    {
34963        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
34964        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
34965        match any {
34966            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
34967                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
34968            VimAny::Value(value) => Err(de::Error::custom(format!(
34969                "expected object not wrapped value: {:?}",
34970                value))),
34971        }
34972    }
34973}
34974
34975impl CustomizationIdentitySettingsTrait for CustomizationIdentitySettings {
34976}
34977impl CustomizationIdentitySettingsTrait for CustomizationCloudinitPrep {
34978}
34979impl CustomizationIdentitySettingsTrait for CustomizationLinuxPrep {
34980}
34981impl CustomizationIdentitySettingsTrait for CustomizationSysprep {
34982}
34983impl CustomizationIdentitySettingsTrait for CustomizationSysprepText {
34984}
34985impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomizationIdentitySettingsTrait {
34986    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
34987        let data_type = from.data_type();
34988        match data_type {
34989            StructType::CustomizationIdentitySettings => Some(from.as_any_ref().downcast_ref::<CustomizationIdentitySettings>()?),
34990            StructType::CustomizationCloudinitPrep => Some(from.as_any_ref().downcast_ref::<CustomizationCloudinitPrep>()?),
34991            StructType::CustomizationLinuxPrep => Some(from.as_any_ref().downcast_ref::<CustomizationLinuxPrep>()?),
34992            StructType::CustomizationSysprep => Some(from.as_any_ref().downcast_ref::<CustomizationSysprep>()?),
34993            StructType::CustomizationSysprepText => Some(from.as_any_ref().downcast_ref::<CustomizationSysprepText>()?),
34994            _ => None,
34995        }
34996    }
34997    
34998    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
34999        let data_type = from.data_type();
35000        match data_type {
35001            StructType::CustomizationIdentitySettings => Ok(from.as_any_box().downcast::<CustomizationIdentitySettings>()?),
35002            StructType::CustomizationCloudinitPrep => Ok(from.as_any_box().downcast::<CustomizationCloudinitPrep>()?),
35003            StructType::CustomizationLinuxPrep => Ok(from.as_any_box().downcast::<CustomizationLinuxPrep>()?),
35004            StructType::CustomizationSysprep => Ok(from.as_any_box().downcast::<CustomizationSysprep>()?),
35005            StructType::CustomizationSysprepText => Ok(from.as_any_box().downcast::<CustomizationSysprepText>()?),
35006            _ => Err(from.as_any_box()),
35007        }
35008    }
35009}
35010/// Base type for the various IP specification possibilities.
35011pub trait CustomizationIpGeneratorTrait : super::traits::DataObjectTrait {
35012}
35013impl<'s> serde::Serialize for dyn CustomizationIpGeneratorTrait + 's {
35014            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
35015            where
35016                S: serde::Serializer,
35017            {
35018                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
35019            }
35020        }
35021impl<'de> serde::Deserialize<'de> for Box<dyn CustomizationIpGeneratorTrait> {
35022            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
35023                deserializer.deserialize_map(CustomizationIpGeneratorVisitor)
35024            }
35025        }
35026
35027struct CustomizationIpGeneratorVisitor;
35028
35029impl<'de> de::Visitor<'de> for CustomizationIpGeneratorVisitor {
35030    type Value = Box<dyn CustomizationIpGeneratorTrait>;
35031
35032    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
35033        formatter.write_str("a valid CustomizationIpGeneratorTrait JSON object with a _typeName field")
35034    }
35035
35036    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
35037    where
35038        A: de::MapAccess<'de>,
35039    {
35040        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
35041        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
35042        match any {
35043            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
35044                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
35045            VimAny::Value(value) => Err(de::Error::custom(format!(
35046                "expected object not wrapped value: {:?}",
35047                value))),
35048        }
35049    }
35050}
35051
35052impl CustomizationIpGeneratorTrait for CustomizationIpGenerator {
35053}
35054impl CustomizationIpGeneratorTrait for CustomizationCustomIpGenerator {
35055}
35056impl CustomizationIpGeneratorTrait for CustomizationDhcpIpGenerator {
35057}
35058impl CustomizationIpGeneratorTrait for CustomizationFixedIp {
35059}
35060impl CustomizationIpGeneratorTrait for CustomizationUnknownIpGenerator {
35061}
35062impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomizationIpGeneratorTrait {
35063    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
35064        let data_type = from.data_type();
35065        match data_type {
35066            StructType::CustomizationIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationIpGenerator>()?),
35067            StructType::CustomizationCustomIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationCustomIpGenerator>()?),
35068            StructType::CustomizationDhcpIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationDhcpIpGenerator>()?),
35069            StructType::CustomizationFixedIp => Some(from.as_any_ref().downcast_ref::<CustomizationFixedIp>()?),
35070            StructType::CustomizationUnknownIpGenerator => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownIpGenerator>()?),
35071            _ => None,
35072        }
35073    }
35074    
35075    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
35076        let data_type = from.data_type();
35077        match data_type {
35078            StructType::CustomizationIpGenerator => Ok(from.as_any_box().downcast::<CustomizationIpGenerator>()?),
35079            StructType::CustomizationCustomIpGenerator => Ok(from.as_any_box().downcast::<CustomizationCustomIpGenerator>()?),
35080            StructType::CustomizationDhcpIpGenerator => Ok(from.as_any_box().downcast::<CustomizationDhcpIpGenerator>()?),
35081            StructType::CustomizationFixedIp => Ok(from.as_any_box().downcast::<CustomizationFixedIp>()?),
35082            StructType::CustomizationUnknownIpGenerator => Ok(from.as_any_box().downcast::<CustomizationUnknownIpGenerator>()?),
35083            _ => Err(from.as_any_box()),
35084        }
35085    }
35086}
35087/// Base type for the various IpV6 specification possibilities
35088pub trait CustomizationIpV6GeneratorTrait : super::traits::DataObjectTrait {
35089}
35090impl<'s> serde::Serialize for dyn CustomizationIpV6GeneratorTrait + 's {
35091            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
35092            where
35093                S: serde::Serializer,
35094            {
35095                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
35096            }
35097        }
35098impl<'de> serde::Deserialize<'de> for Box<dyn CustomizationIpV6GeneratorTrait> {
35099            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
35100                deserializer.deserialize_map(CustomizationIpV6GeneratorVisitor)
35101            }
35102        }
35103
35104struct CustomizationIpV6GeneratorVisitor;
35105
35106impl<'de> de::Visitor<'de> for CustomizationIpV6GeneratorVisitor {
35107    type Value = Box<dyn CustomizationIpV6GeneratorTrait>;
35108
35109    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
35110        formatter.write_str("a valid CustomizationIpV6GeneratorTrait JSON object with a _typeName field")
35111    }
35112
35113    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
35114    where
35115        A: de::MapAccess<'de>,
35116    {
35117        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
35118        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
35119        match any {
35120            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
35121                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
35122            VimAny::Value(value) => Err(de::Error::custom(format!(
35123                "expected object not wrapped value: {:?}",
35124                value))),
35125        }
35126    }
35127}
35128
35129impl CustomizationIpV6GeneratorTrait for CustomizationIpV6Generator {
35130}
35131impl CustomizationIpV6GeneratorTrait for CustomizationAutoIpV6Generator {
35132}
35133impl CustomizationIpV6GeneratorTrait for CustomizationCustomIpV6Generator {
35134}
35135impl CustomizationIpV6GeneratorTrait for CustomizationDhcpIpV6Generator {
35136}
35137impl CustomizationIpV6GeneratorTrait for CustomizationFixedIpV6 {
35138}
35139impl CustomizationIpV6GeneratorTrait for CustomizationStatelessIpV6Generator {
35140}
35141impl CustomizationIpV6GeneratorTrait for CustomizationUnknownIpV6Generator {
35142}
35143impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomizationIpV6GeneratorTrait {
35144    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
35145        let data_type = from.data_type();
35146        match data_type {
35147            StructType::CustomizationIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationIpV6Generator>()?),
35148            StructType::CustomizationAutoIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationAutoIpV6Generator>()?),
35149            StructType::CustomizationCustomIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationCustomIpV6Generator>()?),
35150            StructType::CustomizationDhcpIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationDhcpIpV6Generator>()?),
35151            StructType::CustomizationFixedIpV6 => Some(from.as_any_ref().downcast_ref::<CustomizationFixedIpV6>()?),
35152            StructType::CustomizationStatelessIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationStatelessIpV6Generator>()?),
35153            StructType::CustomizationUnknownIpV6Generator => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownIpV6Generator>()?),
35154            _ => None,
35155        }
35156    }
35157    
35158    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
35159        let data_type = from.data_type();
35160        match data_type {
35161            StructType::CustomizationIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationIpV6Generator>()?),
35162            StructType::CustomizationAutoIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationAutoIpV6Generator>()?),
35163            StructType::CustomizationCustomIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationCustomIpV6Generator>()?),
35164            StructType::CustomizationDhcpIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationDhcpIpV6Generator>()?),
35165            StructType::CustomizationFixedIpV6 => Ok(from.as_any_box().downcast::<CustomizationFixedIpV6>()?),
35166            StructType::CustomizationStatelessIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationStatelessIpV6Generator>()?),
35167            StructType::CustomizationUnknownIpV6Generator => Ok(from.as_any_box().downcast::<CustomizationUnknownIpV6Generator>()?),
35168            _ => Err(from.as_any_box()),
35169        }
35170    }
35171}
35172/// A base object type for a virtual machine name that can be either fixed or
35173/// auto-generated.
35174pub trait CustomizationNameTrait : super::traits::DataObjectTrait {
35175}
35176impl<'s> serde::Serialize for dyn CustomizationNameTrait + 's {
35177            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
35178            where
35179                S: serde::Serializer,
35180            {
35181                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
35182            }
35183        }
35184impl<'de> serde::Deserialize<'de> for Box<dyn CustomizationNameTrait> {
35185            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
35186                deserializer.deserialize_map(CustomizationNameVisitor)
35187            }
35188        }
35189
35190struct CustomizationNameVisitor;
35191
35192impl<'de> de::Visitor<'de> for CustomizationNameVisitor {
35193    type Value = Box<dyn CustomizationNameTrait>;
35194
35195    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
35196        formatter.write_str("a valid CustomizationNameTrait JSON object with a _typeName field")
35197    }
35198
35199    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
35200    where
35201        A: de::MapAccess<'de>,
35202    {
35203        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
35204        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
35205        match any {
35206            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
35207                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
35208            VimAny::Value(value) => Err(de::Error::custom(format!(
35209                "expected object not wrapped value: {:?}",
35210                value))),
35211        }
35212    }
35213}
35214
35215impl CustomizationNameTrait for CustomizationName {
35216}
35217impl CustomizationNameTrait for CustomizationCustomName {
35218}
35219impl CustomizationNameTrait for CustomizationFixedName {
35220}
35221impl CustomizationNameTrait for CustomizationPrefixName {
35222}
35223impl CustomizationNameTrait for CustomizationUnknownName {
35224}
35225impl CustomizationNameTrait for CustomizationVirtualMachineName {
35226}
35227impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomizationNameTrait {
35228    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
35229        let data_type = from.data_type();
35230        match data_type {
35231            StructType::CustomizationName => Some(from.as_any_ref().downcast_ref::<CustomizationName>()?),
35232            StructType::CustomizationCustomName => Some(from.as_any_ref().downcast_ref::<CustomizationCustomName>()?),
35233            StructType::CustomizationFixedName => Some(from.as_any_ref().downcast_ref::<CustomizationFixedName>()?),
35234            StructType::CustomizationPrefixName => Some(from.as_any_ref().downcast_ref::<CustomizationPrefixName>()?),
35235            StructType::CustomizationUnknownName => Some(from.as_any_ref().downcast_ref::<CustomizationUnknownName>()?),
35236            StructType::CustomizationVirtualMachineName => Some(from.as_any_ref().downcast_ref::<CustomizationVirtualMachineName>()?),
35237            _ => None,
35238        }
35239    }
35240    
35241    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
35242        let data_type = from.data_type();
35243        match data_type {
35244            StructType::CustomizationName => Ok(from.as_any_box().downcast::<CustomizationName>()?),
35245            StructType::CustomizationCustomName => Ok(from.as_any_box().downcast::<CustomizationCustomName>()?),
35246            StructType::CustomizationFixedName => Ok(from.as_any_box().downcast::<CustomizationFixedName>()?),
35247            StructType::CustomizationPrefixName => Ok(from.as_any_box().downcast::<CustomizationPrefixName>()?),
35248            StructType::CustomizationUnknownName => Ok(from.as_any_box().downcast::<CustomizationUnknownName>()?),
35249            StructType::CustomizationVirtualMachineName => Ok(from.as_any_box().downcast::<CustomizationVirtualMachineName>()?),
35250            _ => Err(from.as_any_box()),
35251        }
35252    }
35253}
35254/// Base object type for optional operations supported by the customization process.
35255pub trait CustomizationOptionsTrait : super::traits::DataObjectTrait {
35256}
35257impl<'s> serde::Serialize for dyn CustomizationOptionsTrait + 's {
35258            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
35259            where
35260                S: serde::Serializer,
35261            {
35262                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
35263            }
35264        }
35265impl<'de> serde::Deserialize<'de> for Box<dyn CustomizationOptionsTrait> {
35266            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
35267                deserializer.deserialize_map(CustomizationOptionsVisitor)
35268            }
35269        }
35270
35271struct CustomizationOptionsVisitor;
35272
35273impl<'de> de::Visitor<'de> for CustomizationOptionsVisitor {
35274    type Value = Box<dyn CustomizationOptionsTrait>;
35275
35276    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
35277        formatter.write_str("a valid CustomizationOptionsTrait JSON object with a _typeName field")
35278    }
35279
35280    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
35281    where
35282        A: de::MapAccess<'de>,
35283    {
35284        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
35285        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
35286        match any {
35287            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
35288                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
35289            VimAny::Value(value) => Err(de::Error::custom(format!(
35290                "expected object not wrapped value: {:?}",
35291                value))),
35292        }
35293    }
35294}
35295
35296impl CustomizationOptionsTrait for CustomizationOptions {
35297}
35298impl CustomizationOptionsTrait for CustomizationLinuxOptions {
35299}
35300impl CustomizationOptionsTrait for CustomizationWinOptions {
35301}
35302impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn CustomizationOptionsTrait {
35303    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
35304        let data_type = from.data_type();
35305        match data_type {
35306            StructType::CustomizationOptions => Some(from.as_any_ref().downcast_ref::<CustomizationOptions>()?),
35307            StructType::CustomizationLinuxOptions => Some(from.as_any_ref().downcast_ref::<CustomizationLinuxOptions>()?),
35308            StructType::CustomizationWinOptions => Some(from.as_any_ref().downcast_ref::<CustomizationWinOptions>()?),
35309            _ => None,
35310        }
35311    }
35312    
35313    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
35314        let data_type = from.data_type();
35315        match data_type {
35316            StructType::CustomizationOptions => Ok(from.as_any_box().downcast::<CustomizationOptions>()?),
35317            StructType::CustomizationLinuxOptions => Ok(from.as_any_box().downcast::<CustomizationLinuxOptions>()?),
35318            StructType::CustomizationWinOptions => Ok(from.as_any_box().downcast::<CustomizationWinOptions>()?),
35319            _ => Err(from.as_any_box()),
35320        }
35321    }
35322}
35323/// VirtualDevice is the base data object type for devices in a virtual machine.
35324/// 
35325/// This type contains enough information about a virtual device to allow clients
35326/// to display devices they do not recognize. For example, a client with an
35327/// older version than the server to which it connects may see a device
35328/// without knowing what it is.
35329pub trait VirtualDeviceTrait : super::traits::DataObjectTrait {
35330    /// A unique key that distinguishes this device from other
35331    /// devices in the same virtual machine.
35332    /// 
35333    /// Keys are immutable but may be
35334    /// recycled; that is, a key does not change as long as the device is
35335    /// associated with a particular virtual machine. However, once a device is
35336    /// removed, its key may be used when another device is added.
35337    /// 
35338    /// This property is not read-only, but the client cannot control its value.
35339    /// Persistent device keys are always assigned and managed by the server, which
35340    /// guarantees that all devices will have non-negative key values.
35341    /// 
35342    /// When adding new devices, it may be necessary for a client to assign keys
35343    /// temporarily in order to associate controllers with devices in
35344    /// configuring a virtual machine. However, the server does not allow a
35345    /// client to reassign a device key, and the server may assign a different
35346    /// value from the one passed during configuration. Clients should ensure
35347    /// that existing device keys are not reused as temporary key values for the
35348    /// new device to be added (for example, by using unique negative integers as
35349    /// temporary keys).
35350    /// 
35351    /// When editing or deleting a device, clients must use the server-provided key
35352    /// to refer to an existing device.
35353    fn get_key(&self) -> i32;
35354    /// Provides a label and summary information for the device.
35355    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>>;
35356    /// Information about the backing of this virtual device presented
35357    /// in the context of the virtual machine's environment.
35358    /// 
35359    /// Not all devices are required to have backing information.
35360    /// 
35361    /// See also *VirtualMachineConfigOption*.
35362    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>>;
35363    /// Provides information about restrictions on removing this device while
35364    /// a virtual machine is running.
35365    /// 
35366    /// If the device is not removable, then
35367    /// this property is null.
35368    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo>;
35369    /// Information about the bus slot of a device in a virtual machine.
35370    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>>;
35371    /// Object key for the controller object for this device.
35372    /// 
35373    /// This property contains the key property value of the controller device
35374    /// object.
35375    fn get_controller_key(&self) -> Option<i32>;
35376    /// The unit number of this device on its controller.
35377    /// 
35378    /// This property is null if
35379    /// the controller property is null (for example, when the device is not
35380    /// attached to a specific controller object).
35381    /// 
35382    /// Normally, two devices on the same controller
35383    /// may not be assigned the same unit number. If
35384    /// multiple devices could exist on a controller,
35385    /// then unit number has to be specified to
35386    /// configure respective devices.
35387    fn get_unit_number(&self) -> Option<i32>;
35388    /// The virtual NUMA node.
35389    /// 
35390    /// A negative number means there is no
35391    /// affinity for the device. A positive number is a vNUMA node.
35392    /// An unset value of numaNode is status-quo during Reconfigure time.
35393    /// If numaNode is unset during ConfigInfo, then it means there is no
35394    /// affinity for the device.
35395    /// 
35396    /// ***Since:*** vSphere API Release 8.0.0.1
35397    fn get_numa_node(&self) -> Option<i32>;
35398    /// Information about device group device is part of.
35399    /// 
35400    /// Devices in the device group cannot be added/removed individually,
35401    /// whole group has to be added/removed at once. Value can be set
35402    /// during device add, it cannot be modified later.
35403    /// 
35404    /// ***Since:*** vSphere API Release 8.0.0.1
35405    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo>;
35406}
35407impl<'s> serde::Serialize for dyn VirtualDeviceTrait + 's {
35408            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
35409            where
35410                S: serde::Serializer,
35411            {
35412                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
35413            }
35414        }
35415impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceTrait> {
35416            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
35417                deserializer.deserialize_map(VirtualDeviceVisitor)
35418            }
35419        }
35420
35421struct VirtualDeviceVisitor;
35422
35423impl<'de> de::Visitor<'de> for VirtualDeviceVisitor {
35424    type Value = Box<dyn VirtualDeviceTrait>;
35425
35426    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
35427        formatter.write_str("a valid VirtualDeviceTrait JSON object with a _typeName field")
35428    }
35429
35430    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
35431    where
35432        A: de::MapAccess<'de>,
35433    {
35434        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
35435        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
35436        match any {
35437            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
35438                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
35439            VimAny::Value(value) => Err(de::Error::custom(format!(
35440                "expected object not wrapped value: {:?}",
35441                value))),
35442        }
35443    }
35444}
35445
35446impl VirtualDeviceTrait for VirtualDevice {
35447    fn get_key(&self) -> i32 { self.key }
35448    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35449    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35450    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35451    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35452    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35453    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35454    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35455    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35456}
35457impl VirtualDeviceTrait for VirtualCdrom {
35458    fn get_key(&self) -> i32 { self.key }
35459    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35460    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35461    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35462    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35463    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35464    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35465    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35466    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35467}
35468impl VirtualDeviceTrait for VirtualController {
35469    fn get_key(&self) -> i32 { self.key }
35470    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35471    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35472    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35473    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35474    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35475    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35476    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35477    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35478}
35479impl VirtualDeviceTrait for VirtualIdeController {
35480    fn get_key(&self) -> i32 { self.key }
35481    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35482    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35483    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35484    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35485    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35486    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35487    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35488    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35489}
35490impl VirtualDeviceTrait for VirtualNvdimmController {
35491    fn get_key(&self) -> i32 { self.key }
35492    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35493    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35494    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35495    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35496    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35497    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35498    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35499    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35500}
35501impl VirtualDeviceTrait for VirtualNvmeController {
35502    fn get_key(&self) -> i32 { self.key }
35503    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35504    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35505    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35506    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35507    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35508    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35509    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35510    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35511}
35512impl VirtualDeviceTrait for VirtualPciController {
35513    fn get_key(&self) -> i32 { self.key }
35514    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35515    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35516    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35517    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35518    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35519    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35520    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35521    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35522}
35523impl VirtualDeviceTrait for VirtualPs2Controller {
35524    fn get_key(&self) -> i32 { self.key }
35525    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35526    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35527    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35528    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35529    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35530    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35531    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35532    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35533}
35534impl VirtualDeviceTrait for VirtualSataController {
35535    fn get_key(&self) -> i32 { self.key }
35536    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35537    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35538    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35539    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35540    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35541    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35542    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35543    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35544}
35545impl VirtualDeviceTrait for VirtualAhciController {
35546    fn get_key(&self) -> i32 { self.key }
35547    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35548    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35549    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35550    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35551    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35552    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35553    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35554    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35555}
35556impl VirtualDeviceTrait for VirtualScsiController {
35557    fn get_key(&self) -> i32 { self.key }
35558    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35559    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35560    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35561    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35562    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35563    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35564    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35565    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35566}
35567impl VirtualDeviceTrait for ParaVirtualScsiController {
35568    fn get_key(&self) -> i32 { self.key }
35569    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35570    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35571    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35572    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35573    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35574    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35575    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35576    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35577}
35578impl VirtualDeviceTrait for VirtualBusLogicController {
35579    fn get_key(&self) -> i32 { self.key }
35580    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35581    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35582    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35583    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35584    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35585    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35586    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35587    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35588}
35589impl VirtualDeviceTrait for VirtualLsiLogicController {
35590    fn get_key(&self) -> i32 { self.key }
35591    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35592    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35593    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35594    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35595    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35596    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35597    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35598    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35599}
35600impl VirtualDeviceTrait for VirtualLsiLogicSasController {
35601    fn get_key(&self) -> i32 { self.key }
35602    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35603    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35604    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35605    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35606    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35607    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35608    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35609    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35610}
35611impl VirtualDeviceTrait for VirtualSioController {
35612    fn get_key(&self) -> i32 { self.key }
35613    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35614    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35615    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35616    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35617    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35618    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35619    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35620    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35621}
35622impl VirtualDeviceTrait for VirtualUsbController {
35623    fn get_key(&self) -> i32 { self.key }
35624    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35625    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35626    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35627    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35628    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35629    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35630    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35631    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35632}
35633impl VirtualDeviceTrait for VirtualUsbxhciController {
35634    fn get_key(&self) -> i32 { self.key }
35635    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35636    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35637    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35638    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35639    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35640    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35641    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35642    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35643}
35644impl VirtualDeviceTrait for VirtualDisk {
35645    fn get_key(&self) -> i32 { self.key }
35646    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35647    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35648    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35649    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35650    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35651    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35652    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35653    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35654}
35655impl VirtualDeviceTrait for VirtualEthernetCard {
35656    fn get_key(&self) -> i32 { self.key }
35657    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35658    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35659    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35660    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35661    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35662    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35663    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35664    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35665}
35666impl VirtualDeviceTrait for VirtualE1000 {
35667    fn get_key(&self) -> i32 { self.key }
35668    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35669    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35670    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35671    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35672    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35673    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35674    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35675    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35676}
35677impl VirtualDeviceTrait for VirtualE1000E {
35678    fn get_key(&self) -> i32 { self.key }
35679    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35680    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35681    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35682    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35683    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35684    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35685    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35686    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35687}
35688impl VirtualDeviceTrait for VirtualPcNet32 {
35689    fn get_key(&self) -> i32 { self.key }
35690    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35691    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35692    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35693    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35694    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35695    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35696    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35697    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35698}
35699impl VirtualDeviceTrait for VirtualSriovEthernetCard {
35700    fn get_key(&self) -> i32 { self.key }
35701    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35702    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35703    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35704    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35705    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35706    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35707    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35708    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35709}
35710impl VirtualDeviceTrait for VirtualVmxnet {
35711    fn get_key(&self) -> i32 { self.key }
35712    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35713    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35714    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35715    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35716    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35717    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35718    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35719    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35720}
35721impl VirtualDeviceTrait for VirtualVmxnet2 {
35722    fn get_key(&self) -> i32 { self.key }
35723    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35724    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35725    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35726    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35727    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35728    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35729    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35730    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35731}
35732impl VirtualDeviceTrait for VirtualVmxnet3 {
35733    fn get_key(&self) -> i32 { self.key }
35734    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35735    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35736    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35737    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35738    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35739    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35740    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35741    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35742}
35743impl VirtualDeviceTrait for VirtualVmxnet3Vrdma {
35744    fn get_key(&self) -> i32 { self.key }
35745    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35746    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35747    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35748    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35749    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35750    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35751    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35752    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35753}
35754impl VirtualDeviceTrait for VirtualFloppy {
35755    fn get_key(&self) -> i32 { self.key }
35756    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35757    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35758    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35759    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35760    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35761    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35762    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35763    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35764}
35765impl VirtualDeviceTrait for VirtualKeyboard {
35766    fn get_key(&self) -> i32 { self.key }
35767    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35768    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35769    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35770    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35771    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35772    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35773    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35774    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35775}
35776impl VirtualDeviceTrait for VirtualNvdimm {
35777    fn get_key(&self) -> i32 { self.key }
35778    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35779    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35780    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35781    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35782    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35783    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35784    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35785    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35786}
35787impl VirtualDeviceTrait for VirtualPciPassthrough {
35788    fn get_key(&self) -> i32 { self.key }
35789    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35790    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35791    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35792    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35793    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35794    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35795    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35796    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35797}
35798impl VirtualDeviceTrait for VirtualParallelPort {
35799    fn get_key(&self) -> i32 { self.key }
35800    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35801    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35802    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35803    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35804    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35805    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35806    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35807    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35808}
35809impl VirtualDeviceTrait for VirtualPointingDevice {
35810    fn get_key(&self) -> i32 { self.key }
35811    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35812    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35813    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35814    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35815    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35816    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35817    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35818    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35819}
35820impl VirtualDeviceTrait for VirtualPrecisionClock {
35821    fn get_key(&self) -> i32 { self.key }
35822    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35823    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35824    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35825    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35826    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35827    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35828    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35829    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35830}
35831impl VirtualDeviceTrait for VirtualScsiPassthrough {
35832    fn get_key(&self) -> i32 { self.key }
35833    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35834    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35835    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35836    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35837    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35838    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35839    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35840    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35841}
35842impl VirtualDeviceTrait for VirtualSerialPort {
35843    fn get_key(&self) -> i32 { self.key }
35844    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35845    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35846    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35847    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35848    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35849    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35850    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35851    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35852}
35853impl VirtualDeviceTrait for VirtualSoundCard {
35854    fn get_key(&self) -> i32 { self.key }
35855    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35856    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35857    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35858    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35859    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35860    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35861    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35862    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35863}
35864impl VirtualDeviceTrait for VirtualEnsoniq1371 {
35865    fn get_key(&self) -> i32 { self.key }
35866    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35867    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35868    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35869    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35870    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35871    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35872    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35873    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35874}
35875impl VirtualDeviceTrait for VirtualHdAudioCard {
35876    fn get_key(&self) -> i32 { self.key }
35877    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35878    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35879    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35880    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35881    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35882    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35883    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35884    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35885}
35886impl VirtualDeviceTrait for VirtualSoundBlaster16 {
35887    fn get_key(&self) -> i32 { self.key }
35888    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35889    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35890    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35891    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35892    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35893    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35894    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35895    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35896}
35897impl VirtualDeviceTrait for VirtualTpm {
35898    fn get_key(&self) -> i32 { self.key }
35899    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35900    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35901    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35902    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35903    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35904    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35905    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35906    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35907}
35908impl VirtualDeviceTrait for VirtualUsb {
35909    fn get_key(&self) -> i32 { self.key }
35910    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35911    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35912    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35913    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35914    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35915    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35916    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35917    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35918}
35919impl VirtualDeviceTrait for VirtualMachineVmciDevice {
35920    fn get_key(&self) -> i32 { self.key }
35921    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35922    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35923    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35924    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35925    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35926    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35927    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35928    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35929}
35930impl VirtualDeviceTrait for VirtualMachineVmirom {
35931    fn get_key(&self) -> i32 { self.key }
35932    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35933    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35934    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35935    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35936    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35937    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35938    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35939    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35940}
35941impl VirtualDeviceTrait for VirtualMachineVideoCard {
35942    fn get_key(&self) -> i32 { self.key }
35943    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35944    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35945    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35946    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35947    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35948    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35949    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35950    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35951}
35952impl VirtualDeviceTrait for VirtualWdt {
35953    fn get_key(&self) -> i32 { self.key }
35954    fn get_device_info(&self) -> &Option<Box<dyn super::traits::DescriptionTrait>> { &self.device_info }
35955    fn get_backing(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBackingInfoTrait>> { &self.backing }
35956    fn get_connectable(&self) -> &Option<super::structs::VirtualDeviceConnectInfo> { &self.connectable }
35957    fn get_slot_info(&self) -> &Option<Box<dyn super::traits::VirtualDeviceBusSlotInfoTrait>> { &self.slot_info }
35958    fn get_controller_key(&self) -> Option<i32> { self.controller_key }
35959    fn get_unit_number(&self) -> Option<i32> { self.unit_number }
35960    fn get_numa_node(&self) -> Option<i32> { self.numa_node }
35961    fn get_device_group_info(&self) -> &Option<super::structs::VirtualDeviceDeviceGroupInfo> { &self.device_group_info }
35962}
35963impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceTrait {
35964    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
35965        let data_type = from.data_type();
35966        match data_type {
35967            StructType::VirtualDevice => Some(from.as_any_ref().downcast_ref::<VirtualDevice>()?),
35968            StructType::VirtualCdrom => Some(from.as_any_ref().downcast_ref::<VirtualCdrom>()?),
35969            StructType::VirtualController => Some(from.as_any_ref().downcast_ref::<VirtualController>()?),
35970            StructType::VirtualIdeController => Some(from.as_any_ref().downcast_ref::<VirtualIdeController>()?),
35971            StructType::VirtualNvdimmController => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmController>()?),
35972            StructType::VirtualNvmeController => Some(from.as_any_ref().downcast_ref::<VirtualNvmeController>()?),
35973            StructType::VirtualPciController => Some(from.as_any_ref().downcast_ref::<VirtualPciController>()?),
35974            StructType::VirtualPs2Controller => Some(from.as_any_ref().downcast_ref::<VirtualPs2Controller>()?),
35975            StructType::VirtualSataController => Some(from.as_any_ref().downcast_ref::<VirtualSataController>()?),
35976            StructType::VirtualAhciController => Some(from.as_any_ref().downcast_ref::<VirtualAhciController>()?),
35977            StructType::VirtualScsiController => Some(from.as_any_ref().downcast_ref::<VirtualScsiController>()?),
35978            StructType::ParaVirtualScsiController => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiController>()?),
35979            StructType::VirtualBusLogicController => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicController>()?),
35980            StructType::VirtualLsiLogicController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicController>()?),
35981            StructType::VirtualLsiLogicSasController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasController>()?),
35982            StructType::VirtualSioController => Some(from.as_any_ref().downcast_ref::<VirtualSioController>()?),
35983            StructType::VirtualUsbController => Some(from.as_any_ref().downcast_ref::<VirtualUsbController>()?),
35984            StructType::VirtualUsbxhciController => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciController>()?),
35985            StructType::VirtualDisk => Some(from.as_any_ref().downcast_ref::<VirtualDisk>()?),
35986            StructType::VirtualEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCard>()?),
35987            StructType::VirtualE1000 => Some(from.as_any_ref().downcast_ref::<VirtualE1000>()?),
35988            StructType::VirtualE1000E => Some(from.as_any_ref().downcast_ref::<VirtualE1000E>()?),
35989            StructType::VirtualPcNet32 => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32>()?),
35990            StructType::VirtualSriovEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCard>()?),
35991            StructType::VirtualVmxnet => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet>()?),
35992            StructType::VirtualVmxnet2 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2>()?),
35993            StructType::VirtualVmxnet3 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3>()?),
35994            StructType::VirtualVmxnet3Vrdma => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Vrdma>()?),
35995            StructType::VirtualFloppy => Some(from.as_any_ref().downcast_ref::<VirtualFloppy>()?),
35996            StructType::VirtualKeyboard => Some(from.as_any_ref().downcast_ref::<VirtualKeyboard>()?),
35997            StructType::VirtualNvdimm => Some(from.as_any_ref().downcast_ref::<VirtualNvdimm>()?),
35998            StructType::VirtualPciPassthrough => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthrough>()?),
35999            StructType::VirtualParallelPort => Some(from.as_any_ref().downcast_ref::<VirtualParallelPort>()?),
36000            StructType::VirtualPointingDevice => Some(from.as_any_ref().downcast_ref::<VirtualPointingDevice>()?),
36001            StructType::VirtualPrecisionClock => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClock>()?),
36002            StructType::VirtualScsiPassthrough => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthrough>()?),
36003            StructType::VirtualSerialPort => Some(from.as_any_ref().downcast_ref::<VirtualSerialPort>()?),
36004            StructType::VirtualSoundCard => Some(from.as_any_ref().downcast_ref::<VirtualSoundCard>()?),
36005            StructType::VirtualEnsoniq1371 => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371>()?),
36006            StructType::VirtualHdAudioCard => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCard>()?),
36007            StructType::VirtualSoundBlaster16 => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16>()?),
36008            StructType::VirtualTpm => Some(from.as_any_ref().downcast_ref::<VirtualTpm>()?),
36009            StructType::VirtualUsb => Some(from.as_any_ref().downcast_ref::<VirtualUsb>()?),
36010            StructType::VirtualMachineVmciDevice => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDevice>()?),
36011            StructType::VirtualMachineVmirom => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmirom>()?),
36012            StructType::VirtualMachineVideoCard => Some(from.as_any_ref().downcast_ref::<VirtualMachineVideoCard>()?),
36013            StructType::VirtualWdt => Some(from.as_any_ref().downcast_ref::<VirtualWdt>()?),
36014            _ => None,
36015        }
36016    }
36017    
36018    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36019        let data_type = from.data_type();
36020        match data_type {
36021            StructType::VirtualDevice => Ok(from.as_any_box().downcast::<VirtualDevice>()?),
36022            StructType::VirtualCdrom => Ok(from.as_any_box().downcast::<VirtualCdrom>()?),
36023            StructType::VirtualController => Ok(from.as_any_box().downcast::<VirtualController>()?),
36024            StructType::VirtualIdeController => Ok(from.as_any_box().downcast::<VirtualIdeController>()?),
36025            StructType::VirtualNvdimmController => Ok(from.as_any_box().downcast::<VirtualNvdimmController>()?),
36026            StructType::VirtualNvmeController => Ok(from.as_any_box().downcast::<VirtualNvmeController>()?),
36027            StructType::VirtualPciController => Ok(from.as_any_box().downcast::<VirtualPciController>()?),
36028            StructType::VirtualPs2Controller => Ok(from.as_any_box().downcast::<VirtualPs2Controller>()?),
36029            StructType::VirtualSataController => Ok(from.as_any_box().downcast::<VirtualSataController>()?),
36030            StructType::VirtualAhciController => Ok(from.as_any_box().downcast::<VirtualAhciController>()?),
36031            StructType::VirtualScsiController => Ok(from.as_any_box().downcast::<VirtualScsiController>()?),
36032            StructType::ParaVirtualScsiController => Ok(from.as_any_box().downcast::<ParaVirtualScsiController>()?),
36033            StructType::VirtualBusLogicController => Ok(from.as_any_box().downcast::<VirtualBusLogicController>()?),
36034            StructType::VirtualLsiLogicController => Ok(from.as_any_box().downcast::<VirtualLsiLogicController>()?),
36035            StructType::VirtualLsiLogicSasController => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasController>()?),
36036            StructType::VirtualSioController => Ok(from.as_any_box().downcast::<VirtualSioController>()?),
36037            StructType::VirtualUsbController => Ok(from.as_any_box().downcast::<VirtualUsbController>()?),
36038            StructType::VirtualUsbxhciController => Ok(from.as_any_box().downcast::<VirtualUsbxhciController>()?),
36039            StructType::VirtualDisk => Ok(from.as_any_box().downcast::<VirtualDisk>()?),
36040            StructType::VirtualEthernetCard => Ok(from.as_any_box().downcast::<VirtualEthernetCard>()?),
36041            StructType::VirtualE1000 => Ok(from.as_any_box().downcast::<VirtualE1000>()?),
36042            StructType::VirtualE1000E => Ok(from.as_any_box().downcast::<VirtualE1000E>()?),
36043            StructType::VirtualPcNet32 => Ok(from.as_any_box().downcast::<VirtualPcNet32>()?),
36044            StructType::VirtualSriovEthernetCard => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCard>()?),
36045            StructType::VirtualVmxnet => Ok(from.as_any_box().downcast::<VirtualVmxnet>()?),
36046            StructType::VirtualVmxnet2 => Ok(from.as_any_box().downcast::<VirtualVmxnet2>()?),
36047            StructType::VirtualVmxnet3 => Ok(from.as_any_box().downcast::<VirtualVmxnet3>()?),
36048            StructType::VirtualVmxnet3Vrdma => Ok(from.as_any_box().downcast::<VirtualVmxnet3Vrdma>()?),
36049            StructType::VirtualFloppy => Ok(from.as_any_box().downcast::<VirtualFloppy>()?),
36050            StructType::VirtualKeyboard => Ok(from.as_any_box().downcast::<VirtualKeyboard>()?),
36051            StructType::VirtualNvdimm => Ok(from.as_any_box().downcast::<VirtualNvdimm>()?),
36052            StructType::VirtualPciPassthrough => Ok(from.as_any_box().downcast::<VirtualPciPassthrough>()?),
36053            StructType::VirtualParallelPort => Ok(from.as_any_box().downcast::<VirtualParallelPort>()?),
36054            StructType::VirtualPointingDevice => Ok(from.as_any_box().downcast::<VirtualPointingDevice>()?),
36055            StructType::VirtualPrecisionClock => Ok(from.as_any_box().downcast::<VirtualPrecisionClock>()?),
36056            StructType::VirtualScsiPassthrough => Ok(from.as_any_box().downcast::<VirtualScsiPassthrough>()?),
36057            StructType::VirtualSerialPort => Ok(from.as_any_box().downcast::<VirtualSerialPort>()?),
36058            StructType::VirtualSoundCard => Ok(from.as_any_box().downcast::<VirtualSoundCard>()?),
36059            StructType::VirtualEnsoniq1371 => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371>()?),
36060            StructType::VirtualHdAudioCard => Ok(from.as_any_box().downcast::<VirtualHdAudioCard>()?),
36061            StructType::VirtualSoundBlaster16 => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16>()?),
36062            StructType::VirtualTpm => Ok(from.as_any_box().downcast::<VirtualTpm>()?),
36063            StructType::VirtualUsb => Ok(from.as_any_box().downcast::<VirtualUsb>()?),
36064            StructType::VirtualMachineVmciDevice => Ok(from.as_any_box().downcast::<VirtualMachineVmciDevice>()?),
36065            StructType::VirtualMachineVmirom => Ok(from.as_any_box().downcast::<VirtualMachineVmirom>()?),
36066            StructType::VirtualMachineVideoCard => Ok(from.as_any_box().downcast::<VirtualMachineVideoCard>()?),
36067            StructType::VirtualWdt => Ok(from.as_any_box().downcast::<VirtualWdt>()?),
36068            _ => Err(from.as_any_box()),
36069        }
36070    }
36071}
36072/// VirtualController is the base data object type for a device controller in
36073/// a virtual machine.
36074/// 
36075/// VirtualController extends
36076/// *VirtualDevice* to inherit
36077/// general information about a controller (such as name and description), and to allow
36078/// controllers to appear in a generic list of virtual devices.
36079pub trait VirtualControllerTrait : super::traits::VirtualDeviceTrait {
36080    /// Bus number associated with this controller.
36081    fn get_bus_number(&self) -> i32;
36082    /// List of devices currently controlled by this controller.
36083    /// 
36084    /// Each entry contains the *VirtualDevice.key* property of the
36085    /// corresponding device object.
36086    fn get_device(&self) -> &Option<Vec<i32>>;
36087}
36088impl<'s> serde::Serialize for dyn VirtualControllerTrait + 's {
36089            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36090            where
36091                S: serde::Serializer,
36092            {
36093                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36094            }
36095        }
36096impl<'de> serde::Deserialize<'de> for Box<dyn VirtualControllerTrait> {
36097            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36098                deserializer.deserialize_map(VirtualControllerVisitor)
36099            }
36100        }
36101
36102struct VirtualControllerVisitor;
36103
36104impl<'de> de::Visitor<'de> for VirtualControllerVisitor {
36105    type Value = Box<dyn VirtualControllerTrait>;
36106
36107    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36108        formatter.write_str("a valid VirtualControllerTrait JSON object with a _typeName field")
36109    }
36110
36111    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36112    where
36113        A: de::MapAccess<'de>,
36114    {
36115        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36116        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36117        match any {
36118            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36119                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36120            VimAny::Value(value) => Err(de::Error::custom(format!(
36121                "expected object not wrapped value: {:?}",
36122                value))),
36123        }
36124    }
36125}
36126
36127impl VirtualControllerTrait for VirtualController {
36128    fn get_bus_number(&self) -> i32 { self.bus_number }
36129    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36130}
36131impl VirtualControllerTrait for VirtualIdeController {
36132    fn get_bus_number(&self) -> i32 { self.bus_number }
36133    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36134}
36135impl VirtualControllerTrait for VirtualNvdimmController {
36136    fn get_bus_number(&self) -> i32 { self.bus_number }
36137    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36138}
36139impl VirtualControllerTrait for VirtualNvmeController {
36140    fn get_bus_number(&self) -> i32 { self.bus_number }
36141    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36142}
36143impl VirtualControllerTrait for VirtualPciController {
36144    fn get_bus_number(&self) -> i32 { self.bus_number }
36145    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36146}
36147impl VirtualControllerTrait for VirtualPs2Controller {
36148    fn get_bus_number(&self) -> i32 { self.bus_number }
36149    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36150}
36151impl VirtualControllerTrait for VirtualSataController {
36152    fn get_bus_number(&self) -> i32 { self.bus_number }
36153    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36154}
36155impl VirtualControllerTrait for VirtualAhciController {
36156    fn get_bus_number(&self) -> i32 { self.bus_number }
36157    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36158}
36159impl VirtualControllerTrait for VirtualScsiController {
36160    fn get_bus_number(&self) -> i32 { self.bus_number }
36161    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36162}
36163impl VirtualControllerTrait for ParaVirtualScsiController {
36164    fn get_bus_number(&self) -> i32 { self.bus_number }
36165    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36166}
36167impl VirtualControllerTrait for VirtualBusLogicController {
36168    fn get_bus_number(&self) -> i32 { self.bus_number }
36169    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36170}
36171impl VirtualControllerTrait for VirtualLsiLogicController {
36172    fn get_bus_number(&self) -> i32 { self.bus_number }
36173    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36174}
36175impl VirtualControllerTrait for VirtualLsiLogicSasController {
36176    fn get_bus_number(&self) -> i32 { self.bus_number }
36177    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36178}
36179impl VirtualControllerTrait for VirtualSioController {
36180    fn get_bus_number(&self) -> i32 { self.bus_number }
36181    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36182}
36183impl VirtualControllerTrait for VirtualUsbController {
36184    fn get_bus_number(&self) -> i32 { self.bus_number }
36185    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36186}
36187impl VirtualControllerTrait for VirtualUsbxhciController {
36188    fn get_bus_number(&self) -> i32 { self.bus_number }
36189    fn get_device(&self) -> &Option<Vec<i32>> { &self.device }
36190}
36191impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualControllerTrait {
36192    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36193        let data_type = from.data_type();
36194        match data_type {
36195            StructType::VirtualController => Some(from.as_any_ref().downcast_ref::<VirtualController>()?),
36196            StructType::VirtualIdeController => Some(from.as_any_ref().downcast_ref::<VirtualIdeController>()?),
36197            StructType::VirtualNvdimmController => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmController>()?),
36198            StructType::VirtualNvmeController => Some(from.as_any_ref().downcast_ref::<VirtualNvmeController>()?),
36199            StructType::VirtualPciController => Some(from.as_any_ref().downcast_ref::<VirtualPciController>()?),
36200            StructType::VirtualPs2Controller => Some(from.as_any_ref().downcast_ref::<VirtualPs2Controller>()?),
36201            StructType::VirtualSataController => Some(from.as_any_ref().downcast_ref::<VirtualSataController>()?),
36202            StructType::VirtualAhciController => Some(from.as_any_ref().downcast_ref::<VirtualAhciController>()?),
36203            StructType::VirtualScsiController => Some(from.as_any_ref().downcast_ref::<VirtualScsiController>()?),
36204            StructType::ParaVirtualScsiController => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiController>()?),
36205            StructType::VirtualBusLogicController => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicController>()?),
36206            StructType::VirtualLsiLogicController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicController>()?),
36207            StructType::VirtualLsiLogicSasController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasController>()?),
36208            StructType::VirtualSioController => Some(from.as_any_ref().downcast_ref::<VirtualSioController>()?),
36209            StructType::VirtualUsbController => Some(from.as_any_ref().downcast_ref::<VirtualUsbController>()?),
36210            StructType::VirtualUsbxhciController => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciController>()?),
36211            _ => None,
36212        }
36213    }
36214    
36215    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36216        let data_type = from.data_type();
36217        match data_type {
36218            StructType::VirtualController => Ok(from.as_any_box().downcast::<VirtualController>()?),
36219            StructType::VirtualIdeController => Ok(from.as_any_box().downcast::<VirtualIdeController>()?),
36220            StructType::VirtualNvdimmController => Ok(from.as_any_box().downcast::<VirtualNvdimmController>()?),
36221            StructType::VirtualNvmeController => Ok(from.as_any_box().downcast::<VirtualNvmeController>()?),
36222            StructType::VirtualPciController => Ok(from.as_any_box().downcast::<VirtualPciController>()?),
36223            StructType::VirtualPs2Controller => Ok(from.as_any_box().downcast::<VirtualPs2Controller>()?),
36224            StructType::VirtualSataController => Ok(from.as_any_box().downcast::<VirtualSataController>()?),
36225            StructType::VirtualAhciController => Ok(from.as_any_box().downcast::<VirtualAhciController>()?),
36226            StructType::VirtualScsiController => Ok(from.as_any_box().downcast::<VirtualScsiController>()?),
36227            StructType::ParaVirtualScsiController => Ok(from.as_any_box().downcast::<ParaVirtualScsiController>()?),
36228            StructType::VirtualBusLogicController => Ok(from.as_any_box().downcast::<VirtualBusLogicController>()?),
36229            StructType::VirtualLsiLogicController => Ok(from.as_any_box().downcast::<VirtualLsiLogicController>()?),
36230            StructType::VirtualLsiLogicSasController => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasController>()?),
36231            StructType::VirtualSioController => Ok(from.as_any_box().downcast::<VirtualSioController>()?),
36232            StructType::VirtualUsbController => Ok(from.as_any_box().downcast::<VirtualUsbController>()?),
36233            StructType::VirtualUsbxhciController => Ok(from.as_any_box().downcast::<VirtualUsbxhciController>()?),
36234            _ => Err(from.as_any_box()),
36235        }
36236    }
36237}
36238/// The VirtualSATAController data object type represents
36239/// a SATA controller in a virtual machine.
36240pub trait VirtualSataControllerTrait : super::traits::VirtualControllerTrait {
36241}
36242impl<'s> serde::Serialize for dyn VirtualSataControllerTrait + 's {
36243            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36244            where
36245                S: serde::Serializer,
36246            {
36247                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36248            }
36249        }
36250impl<'de> serde::Deserialize<'de> for Box<dyn VirtualSataControllerTrait> {
36251            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36252                deserializer.deserialize_map(VirtualSataControllerVisitor)
36253            }
36254        }
36255
36256struct VirtualSataControllerVisitor;
36257
36258impl<'de> de::Visitor<'de> for VirtualSataControllerVisitor {
36259    type Value = Box<dyn VirtualSataControllerTrait>;
36260
36261    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36262        formatter.write_str("a valid VirtualSataControllerTrait JSON object with a _typeName field")
36263    }
36264
36265    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36266    where
36267        A: de::MapAccess<'de>,
36268    {
36269        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36270        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36271        match any {
36272            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36273                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36274            VimAny::Value(value) => Err(de::Error::custom(format!(
36275                "expected object not wrapped value: {:?}",
36276                value))),
36277        }
36278    }
36279}
36280
36281impl VirtualSataControllerTrait for VirtualSataController {
36282}
36283impl VirtualSataControllerTrait for VirtualAhciController {
36284}
36285impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualSataControllerTrait {
36286    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36287        let data_type = from.data_type();
36288        match data_type {
36289            StructType::VirtualSataController => Some(from.as_any_ref().downcast_ref::<VirtualSataController>()?),
36290            StructType::VirtualAhciController => Some(from.as_any_ref().downcast_ref::<VirtualAhciController>()?),
36291            _ => None,
36292        }
36293    }
36294    
36295    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36296        let data_type = from.data_type();
36297        match data_type {
36298            StructType::VirtualSataController => Ok(from.as_any_box().downcast::<VirtualSataController>()?),
36299            StructType::VirtualAhciController => Ok(from.as_any_box().downcast::<VirtualAhciController>()?),
36300            _ => Err(from.as_any_box()),
36301        }
36302    }
36303}
36304/// The VirtualSCSIController data object type represents
36305/// a SCSI controller in a virtual machine.
36306pub trait VirtualScsiControllerTrait : super::traits::VirtualControllerTrait {
36307    /// All SCSI controllers support hot adding and removing of devices.
36308    /// 
36309    /// This
36310    /// support can't be toggled in the current implementation. Therefore, this
36311    /// option is ignored when reconfiguring a SCSI controller and is always set
36312    /// to "true" when reading an existing configuration.
36313    fn get_hot_add_remove(&self) -> Option<bool>;
36314    /// Mode for sharing the SCSI bus.
36315    /// 
36316    /// The modes are physicalSharing,
36317    /// virtualSharing, and noSharing. See the
36318    /// *Sharing*
36319    /// data object type for an explanation of these modes.
36320    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum;
36321    /// The unit number of the SCSI controller.
36322    /// 
36323    /// The SCSI controller sits on its
36324    /// own bus, so this field defines which slot the controller is using.
36325    fn get_scsi_ctlr_unit_number(&self) -> Option<i32>;
36326}
36327impl<'s> serde::Serialize for dyn VirtualScsiControllerTrait + 's {
36328            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36329            where
36330                S: serde::Serializer,
36331            {
36332                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36333            }
36334        }
36335impl<'de> serde::Deserialize<'de> for Box<dyn VirtualScsiControllerTrait> {
36336            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36337                deserializer.deserialize_map(VirtualScsiControllerVisitor)
36338            }
36339        }
36340
36341struct VirtualScsiControllerVisitor;
36342
36343impl<'de> de::Visitor<'de> for VirtualScsiControllerVisitor {
36344    type Value = Box<dyn VirtualScsiControllerTrait>;
36345
36346    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36347        formatter.write_str("a valid VirtualScsiControllerTrait JSON object with a _typeName field")
36348    }
36349
36350    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36351    where
36352        A: de::MapAccess<'de>,
36353    {
36354        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36355        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36356        match any {
36357            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36358                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36359            VimAny::Value(value) => Err(de::Error::custom(format!(
36360                "expected object not wrapped value: {:?}",
36361                value))),
36362        }
36363    }
36364}
36365
36366impl VirtualScsiControllerTrait for VirtualScsiController {
36367    fn get_hot_add_remove(&self) -> Option<bool> { self.hot_add_remove }
36368    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum { &self.shared_bus }
36369    fn get_scsi_ctlr_unit_number(&self) -> Option<i32> { self.scsi_ctlr_unit_number }
36370}
36371impl VirtualScsiControllerTrait for ParaVirtualScsiController {
36372    fn get_hot_add_remove(&self) -> Option<bool> { self.hot_add_remove }
36373    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum { &self.shared_bus }
36374    fn get_scsi_ctlr_unit_number(&self) -> Option<i32> { self.scsi_ctlr_unit_number }
36375}
36376impl VirtualScsiControllerTrait for VirtualBusLogicController {
36377    fn get_hot_add_remove(&self) -> Option<bool> { self.hot_add_remove }
36378    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum { &self.shared_bus }
36379    fn get_scsi_ctlr_unit_number(&self) -> Option<i32> { self.scsi_ctlr_unit_number }
36380}
36381impl VirtualScsiControllerTrait for VirtualLsiLogicController {
36382    fn get_hot_add_remove(&self) -> Option<bool> { self.hot_add_remove }
36383    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum { &self.shared_bus }
36384    fn get_scsi_ctlr_unit_number(&self) -> Option<i32> { self.scsi_ctlr_unit_number }
36385}
36386impl VirtualScsiControllerTrait for VirtualLsiLogicSasController {
36387    fn get_hot_add_remove(&self) -> Option<bool> { self.hot_add_remove }
36388    fn get_shared_bus(&self) -> &super::enums::VirtualScsiSharingEnum { &self.shared_bus }
36389    fn get_scsi_ctlr_unit_number(&self) -> Option<i32> { self.scsi_ctlr_unit_number }
36390}
36391impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualScsiControllerTrait {
36392    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36393        let data_type = from.data_type();
36394        match data_type {
36395            StructType::VirtualScsiController => Some(from.as_any_ref().downcast_ref::<VirtualScsiController>()?),
36396            StructType::ParaVirtualScsiController => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiController>()?),
36397            StructType::VirtualBusLogicController => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicController>()?),
36398            StructType::VirtualLsiLogicController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicController>()?),
36399            StructType::VirtualLsiLogicSasController => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasController>()?),
36400            _ => None,
36401        }
36402    }
36403    
36404    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36405        let data_type = from.data_type();
36406        match data_type {
36407            StructType::VirtualScsiController => Ok(from.as_any_box().downcast::<VirtualScsiController>()?),
36408            StructType::ParaVirtualScsiController => Ok(from.as_any_box().downcast::<ParaVirtualScsiController>()?),
36409            StructType::VirtualBusLogicController => Ok(from.as_any_box().downcast::<VirtualBusLogicController>()?),
36410            StructType::VirtualLsiLogicController => Ok(from.as_any_box().downcast::<VirtualLsiLogicController>()?),
36411            StructType::VirtualLsiLogicSasController => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasController>()?),
36412            _ => Err(from.as_any_box()),
36413        }
36414    }
36415}
36416/// The *VirtualEthernetCard* data object contains the properties
36417/// of an Ethernet adapter attached to a virtual machine.
36418pub trait VirtualEthernetCardTrait : super::traits::VirtualDeviceTrait {
36419    /// Set of dynamic properties.
36420    /// 
36421    /// This property is optional because only the
36422    /// properties of an object that are unknown to a client will be part of this set.
36423    /// This property is not readonly just in case we want to send such properties
36424    /// from a client in the future.
36425    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>>;
36426    /// MAC address type.
36427    /// 
36428    /// Valid values for address type are:
36429    /// <dl>
36430    /// <dt>Manual</dt>
36431    /// <dd>Statically assigned MAC address.</dd>
36432    /// <dt>Generated</dt>
36433    /// <dd>Automatically generated MAC address.</dd>
36434    /// <dt>Assigned</dt>
36435    /// <dd>MAC address assigned by VirtualCenter.</dd>
36436    /// </dl>
36437    fn get_address_type(&self) -> &Option<String>;
36438    /// MAC address assigned to the virtual network adapter.
36439    /// 
36440    /// Clients can
36441    /// set this property to any of the allowed address types. The server might
36442    /// override the specified value for "Generated" or "Assigned" if it does not
36443    /// fall in the right ranges or is determined to be a duplicate.
36444    fn get_mac_address(&self) -> &Option<String>;
36445    /// Indicates whether wake-on-LAN is enabled on this virtual network adapter.
36446    /// 
36447    /// Clients
36448    /// can set this property to selectively enable or disable wake-on-LAN.
36449    fn get_wake_on_lan_enabled(&self) -> Option<bool>;
36450    /// Resource requirements of the virtual network adapter
36451    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation>;
36452    /// An ID assigned to the virtual network adapter by external management plane or
36453    /// controller.
36454    /// 
36455    /// The value and format of this property is determined by external
36456    /// management plane or controller, and vSphere doesn't do any validation. It's
36457    /// also up to external management plane or controller to set, unset or maintain
36458    /// this property. Setting this property with an empty string value will unset the
36459    /// property.
36460    fn get_external_id(&self) -> &Option<String>;
36461    /// Deprecated as of vSphere API 8.0. VMDirectPath Gen 2 is no longer supported and
36462    /// there is no replacement.
36463    /// 
36464    /// Indicates whether UPT(Universal Pass-through) compatibility is enabled
36465    /// on this network adapter.
36466    /// 
36467    /// UPT is only compatible for Vmxnet3 adapter.
36468    /// Clients can set this property enabled or disabled if ethernet
36469    /// virtual device is Vmxnet3.
36470    fn get_upt_compatibility_enabled(&self) -> Option<bool>;
36471    /// The ID of the subnet the virtual network adapter connects to.
36472    /// 
36473    /// It
36474    /// is only set when the virtual network adapter is connected
36475    /// to a subnet.
36476    /// 
36477    /// ***Since:*** vSphere API Release 9.0.0.0
36478    fn get_subnet_id(&self) -> &Option<String>;
36479}
36480impl<'s> serde::Serialize for dyn VirtualEthernetCardTrait + 's {
36481            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36482            where
36483                S: serde::Serializer,
36484            {
36485                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36486            }
36487        }
36488impl<'de> serde::Deserialize<'de> for Box<dyn VirtualEthernetCardTrait> {
36489            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36490                deserializer.deserialize_map(VirtualEthernetCardVisitor)
36491            }
36492        }
36493
36494struct VirtualEthernetCardVisitor;
36495
36496impl<'de> de::Visitor<'de> for VirtualEthernetCardVisitor {
36497    type Value = Box<dyn VirtualEthernetCardTrait>;
36498
36499    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36500        formatter.write_str("a valid VirtualEthernetCardTrait JSON object with a _typeName field")
36501    }
36502
36503    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36504    where
36505        A: de::MapAccess<'de>,
36506    {
36507        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36508        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36509        match any {
36510            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36511                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36512            VimAny::Value(value) => Err(de::Error::custom(format!(
36513                "expected object not wrapped value: {:?}",
36514                value))),
36515        }
36516    }
36517}
36518
36519impl VirtualEthernetCardTrait for VirtualEthernetCard {
36520    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36521    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36522    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36523    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36524    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36525    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36526    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36527    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36528}
36529impl VirtualEthernetCardTrait for VirtualE1000 {
36530    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36531    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36532    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36533    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36534    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36535    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36536    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36537    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36538}
36539impl VirtualEthernetCardTrait for VirtualE1000E {
36540    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36541    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36542    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36543    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36544    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36545    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36546    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36547    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36548}
36549impl VirtualEthernetCardTrait for VirtualPcNet32 {
36550    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36551    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36552    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36553    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36554    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36555    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36556    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36557    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36558}
36559impl VirtualEthernetCardTrait for VirtualSriovEthernetCard {
36560    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36561    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36562    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36563    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36564    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36565    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36566    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36567    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36568}
36569impl VirtualEthernetCardTrait for VirtualVmxnet {
36570    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36571    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36572    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36573    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36574    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36575    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36576    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36577    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36578}
36579impl VirtualEthernetCardTrait for VirtualVmxnet2 {
36580    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36581    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36582    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36583    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36584    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36585    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36586    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36587    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36588}
36589impl VirtualEthernetCardTrait for VirtualVmxnet3 {
36590    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36591    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36592    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36593    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36594    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36595    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36596    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36597    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36598}
36599impl VirtualEthernetCardTrait for VirtualVmxnet3Vrdma {
36600    fn get_dynamic_property(&self) -> &Option<Vec<super::structs::DynamicProperty>> { &self.dynamic_property }
36601    fn get_address_type(&self) -> &Option<String> { &self.address_type }
36602    fn get_mac_address(&self) -> &Option<String> { &self.mac_address }
36603    fn get_wake_on_lan_enabled(&self) -> Option<bool> { self.wake_on_lan_enabled }
36604    fn get_resource_allocation(&self) -> &Option<super::structs::VirtualEthernetCardResourceAllocation> { &self.resource_allocation }
36605    fn get_external_id(&self) -> &Option<String> { &self.external_id }
36606    fn get_upt_compatibility_enabled(&self) -> Option<bool> { self.upt_compatibility_enabled }
36607    fn get_subnet_id(&self) -> &Option<String> { &self.subnet_id }
36608}
36609impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualEthernetCardTrait {
36610    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36611        let data_type = from.data_type();
36612        match data_type {
36613            StructType::VirtualEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCard>()?),
36614            StructType::VirtualE1000 => Some(from.as_any_ref().downcast_ref::<VirtualE1000>()?),
36615            StructType::VirtualE1000E => Some(from.as_any_ref().downcast_ref::<VirtualE1000E>()?),
36616            StructType::VirtualPcNet32 => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32>()?),
36617            StructType::VirtualSriovEthernetCard => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCard>()?),
36618            StructType::VirtualVmxnet => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet>()?),
36619            StructType::VirtualVmxnet2 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2>()?),
36620            StructType::VirtualVmxnet3 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3>()?),
36621            StructType::VirtualVmxnet3Vrdma => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Vrdma>()?),
36622            _ => None,
36623        }
36624    }
36625    
36626    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36627        let data_type = from.data_type();
36628        match data_type {
36629            StructType::VirtualEthernetCard => Ok(from.as_any_box().downcast::<VirtualEthernetCard>()?),
36630            StructType::VirtualE1000 => Ok(from.as_any_box().downcast::<VirtualE1000>()?),
36631            StructType::VirtualE1000E => Ok(from.as_any_box().downcast::<VirtualE1000E>()?),
36632            StructType::VirtualPcNet32 => Ok(from.as_any_box().downcast::<VirtualPcNet32>()?),
36633            StructType::VirtualSriovEthernetCard => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCard>()?),
36634            StructType::VirtualVmxnet => Ok(from.as_any_box().downcast::<VirtualVmxnet>()?),
36635            StructType::VirtualVmxnet2 => Ok(from.as_any_box().downcast::<VirtualVmxnet2>()?),
36636            StructType::VirtualVmxnet3 => Ok(from.as_any_box().downcast::<VirtualVmxnet3>()?),
36637            StructType::VirtualVmxnet3Vrdma => Ok(from.as_any_box().downcast::<VirtualVmxnet3Vrdma>()?),
36638            _ => Err(from.as_any_box()),
36639        }
36640    }
36641}
36642/// The VirtualVmxnet data object type represents an instance
36643/// of the Vmxnet virtual Ethernet adapter attached to a virtual machine.
36644pub trait VirtualVmxnetTrait : super::traits::VirtualEthernetCardTrait {
36645}
36646impl<'s> serde::Serialize for dyn VirtualVmxnetTrait + 's {
36647            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36648            where
36649                S: serde::Serializer,
36650            {
36651                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36652            }
36653        }
36654impl<'de> serde::Deserialize<'de> for Box<dyn VirtualVmxnetTrait> {
36655            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36656                deserializer.deserialize_map(VirtualVmxnetVisitor)
36657            }
36658        }
36659
36660struct VirtualVmxnetVisitor;
36661
36662impl<'de> de::Visitor<'de> for VirtualVmxnetVisitor {
36663    type Value = Box<dyn VirtualVmxnetTrait>;
36664
36665    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36666        formatter.write_str("a valid VirtualVmxnetTrait JSON object with a _typeName field")
36667    }
36668
36669    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36670    where
36671        A: de::MapAccess<'de>,
36672    {
36673        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36674        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36675        match any {
36676            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36677                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36678            VimAny::Value(value) => Err(de::Error::custom(format!(
36679                "expected object not wrapped value: {:?}",
36680                value))),
36681        }
36682    }
36683}
36684
36685impl VirtualVmxnetTrait for VirtualVmxnet {
36686}
36687impl VirtualVmxnetTrait for VirtualVmxnet2 {
36688}
36689impl VirtualVmxnetTrait for VirtualVmxnet3 {
36690}
36691impl VirtualVmxnetTrait for VirtualVmxnet3Vrdma {
36692}
36693impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualVmxnetTrait {
36694    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36695        let data_type = from.data_type();
36696        match data_type {
36697            StructType::VirtualVmxnet => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet>()?),
36698            StructType::VirtualVmxnet2 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2>()?),
36699            StructType::VirtualVmxnet3 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3>()?),
36700            StructType::VirtualVmxnet3Vrdma => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Vrdma>()?),
36701            _ => None,
36702        }
36703    }
36704    
36705    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36706        let data_type = from.data_type();
36707        match data_type {
36708            StructType::VirtualVmxnet => Ok(from.as_any_box().downcast::<VirtualVmxnet>()?),
36709            StructType::VirtualVmxnet2 => Ok(from.as_any_box().downcast::<VirtualVmxnet2>()?),
36710            StructType::VirtualVmxnet3 => Ok(from.as_any_box().downcast::<VirtualVmxnet3>()?),
36711            StructType::VirtualVmxnet3Vrdma => Ok(from.as_any_box().downcast::<VirtualVmxnet3Vrdma>()?),
36712            _ => Err(from.as_any_box()),
36713        }
36714    }
36715}
36716/// The VirtualVmxnet3 data object type represents an instance
36717/// of the Vmxnet3 virtual Ethernet adapter attached to a virtual machine.
36718pub trait VirtualVmxnet3Trait : super::traits::VirtualVmxnetTrait {
36719    /// Indicates whether UPTv2(Uniform Pass-through version 2) compatibility is
36720    /// enabled on this network adapter.
36721    /// 
36722    /// UPTv2 is only available on Vmxnet3
36723    /// adapter. Clients can set this property enabled or disabled if ethernet
36724    /// virtual device is Vmxnet3. It requires the VM hardware version is
36725    /// compatible with ESXi version which has enabled smartnic feature.
36726    /// 
36727    /// ***Since:*** vSphere API Release 8.0.0.1
36728    fn get_uptv_2_enabled(&self) -> Option<bool>;
36729    /// Indicates whether strict latency parameters are configured on this
36730    /// network adapter.
36731    /// 
36732    /// Clients can set these parameters to control behaviors
36733    /// on this network adapter, e.g., set the TX/RX ring size, etc. Requires
36734    /// VM hardware version compatible with ESXi release supporting the
36735    /// "real-time switch" feature.
36736    /// 
36737    /// ***Since:*** vSphere API Release 8.0.3.1
36738    fn get_strict_latency_config(&self) -> &Option<super::structs::VirtualVmxnet3StrictLatencyConfig>;
36739}
36740impl<'s> serde::Serialize for dyn VirtualVmxnet3Trait + 's {
36741            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36742            where
36743                S: serde::Serializer,
36744            {
36745                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36746            }
36747        }
36748impl<'de> serde::Deserialize<'de> for Box<dyn VirtualVmxnet3Trait> {
36749            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36750                deserializer.deserialize_map(VirtualVmxnet3Visitor)
36751            }
36752        }
36753
36754struct VirtualVmxnet3Visitor;
36755
36756impl<'de> de::Visitor<'de> for VirtualVmxnet3Visitor {
36757    type Value = Box<dyn VirtualVmxnet3Trait>;
36758
36759    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36760        formatter.write_str("a valid VirtualVmxnet3Trait JSON object with a _typeName field")
36761    }
36762
36763    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36764    where
36765        A: de::MapAccess<'de>,
36766    {
36767        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36768        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36769        match any {
36770            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36771                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36772            VimAny::Value(value) => Err(de::Error::custom(format!(
36773                "expected object not wrapped value: {:?}",
36774                value))),
36775        }
36776    }
36777}
36778
36779impl VirtualVmxnet3Trait for VirtualVmxnet3 {
36780    fn get_uptv_2_enabled(&self) -> Option<bool> { self.uptv_2_enabled }
36781    fn get_strict_latency_config(&self) -> &Option<super::structs::VirtualVmxnet3StrictLatencyConfig> { &self.strict_latency_config }
36782}
36783impl VirtualVmxnet3Trait for VirtualVmxnet3Vrdma {
36784    fn get_uptv_2_enabled(&self) -> Option<bool> { self.uptv_2_enabled }
36785    fn get_strict_latency_config(&self) -> &Option<super::structs::VirtualVmxnet3StrictLatencyConfig> { &self.strict_latency_config }
36786}
36787impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualVmxnet3Trait {
36788    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36789        let data_type = from.data_type();
36790        match data_type {
36791            StructType::VirtualVmxnet3 => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3>()?),
36792            StructType::VirtualVmxnet3Vrdma => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Vrdma>()?),
36793            _ => None,
36794        }
36795    }
36796    
36797    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36798        let data_type = from.data_type();
36799        match data_type {
36800            StructType::VirtualVmxnet3 => Ok(from.as_any_box().downcast::<VirtualVmxnet3>()?),
36801            StructType::VirtualVmxnet3Vrdma => Ok(from.as_any_box().downcast::<VirtualVmxnet3Vrdma>()?),
36802            _ => Err(from.as_any_box()),
36803        }
36804    }
36805}
36806/// This data object type represents a sound card in
36807/// a virtual machine.
36808pub trait VirtualSoundCardTrait : super::traits::VirtualDeviceTrait {
36809}
36810impl<'s> serde::Serialize for dyn VirtualSoundCardTrait + 's {
36811            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36812            where
36813                S: serde::Serializer,
36814            {
36815                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36816            }
36817        }
36818impl<'de> serde::Deserialize<'de> for Box<dyn VirtualSoundCardTrait> {
36819            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36820                deserializer.deserialize_map(VirtualSoundCardVisitor)
36821            }
36822        }
36823
36824struct VirtualSoundCardVisitor;
36825
36826impl<'de> de::Visitor<'de> for VirtualSoundCardVisitor {
36827    type Value = Box<dyn VirtualSoundCardTrait>;
36828
36829    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36830        formatter.write_str("a valid VirtualSoundCardTrait JSON object with a _typeName field")
36831    }
36832
36833    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36834    where
36835        A: de::MapAccess<'de>,
36836    {
36837        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36838        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36839        match any {
36840            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36841                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36842            VimAny::Value(value) => Err(de::Error::custom(format!(
36843                "expected object not wrapped value: {:?}",
36844                value))),
36845        }
36846    }
36847}
36848
36849impl VirtualSoundCardTrait for VirtualSoundCard {
36850}
36851impl VirtualSoundCardTrait for VirtualEnsoniq1371 {
36852}
36853impl VirtualSoundCardTrait for VirtualHdAudioCard {
36854}
36855impl VirtualSoundCardTrait for VirtualSoundBlaster16 {
36856}
36857impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualSoundCardTrait {
36858    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
36859        let data_type = from.data_type();
36860        match data_type {
36861            StructType::VirtualSoundCard => Some(from.as_any_ref().downcast_ref::<VirtualSoundCard>()?),
36862            StructType::VirtualEnsoniq1371 => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371>()?),
36863            StructType::VirtualHdAudioCard => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCard>()?),
36864            StructType::VirtualSoundBlaster16 => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16>()?),
36865            _ => None,
36866        }
36867    }
36868    
36869    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
36870        let data_type = from.data_type();
36871        match data_type {
36872            StructType::VirtualSoundCard => Ok(from.as_any_box().downcast::<VirtualSoundCard>()?),
36873            StructType::VirtualEnsoniq1371 => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371>()?),
36874            StructType::VirtualHdAudioCard => Ok(from.as_any_box().downcast::<VirtualHdAudioCard>()?),
36875            StructType::VirtualSoundBlaster16 => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16>()?),
36876            _ => Err(from.as_any_box()),
36877        }
36878    }
36879}
36880/// <code>*VirtualDeviceBackingInfo*</code> is a base data object type
36881/// for information about the backing of a device in a virtual machine.
36882/// 
36883/// This base type does not define any properties. It is used as a namespace
36884/// for general-purpose subtypes. Specific devices are represented by subtypes
36885/// which define properties for device-specific backing information.
36886pub trait VirtualDeviceBackingInfoTrait : super::traits::DataObjectTrait {
36887}
36888impl<'s> serde::Serialize for dyn VirtualDeviceBackingInfoTrait + 's {
36889            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
36890            where
36891                S: serde::Serializer,
36892            {
36893                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
36894            }
36895        }
36896impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceBackingInfoTrait> {
36897            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
36898                deserializer.deserialize_map(VirtualDeviceBackingInfoVisitor)
36899            }
36900        }
36901
36902struct VirtualDeviceBackingInfoVisitor;
36903
36904impl<'de> de::Visitor<'de> for VirtualDeviceBackingInfoVisitor {
36905    type Value = Box<dyn VirtualDeviceBackingInfoTrait>;
36906
36907    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
36908        formatter.write_str("a valid VirtualDeviceBackingInfoTrait JSON object with a _typeName field")
36909    }
36910
36911    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
36912    where
36913        A: de::MapAccess<'de>,
36914    {
36915        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
36916        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
36917        match any {
36918            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
36919                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
36920            VimAny::Value(value) => Err(de::Error::custom(format!(
36921                "expected object not wrapped value: {:?}",
36922                value))),
36923        }
36924    }
36925}
36926
36927impl VirtualDeviceBackingInfoTrait for VirtualDeviceBackingInfo {
36928}
36929impl VirtualDeviceBackingInfoTrait for VirtualDeviceDeviceBackingInfo {
36930}
36931impl VirtualDeviceBackingInfoTrait for VirtualCdromAtapiBackingInfo {
36932}
36933impl VirtualDeviceBackingInfoTrait for VirtualCdromPassthroughBackingInfo {
36934}
36935impl VirtualDeviceBackingInfoTrait for VirtualDiskRawDiskVer2BackingInfo {
36936}
36937impl VirtualDeviceBackingInfoTrait for VirtualDiskPartitionedRawDiskVer2BackingInfo {
36938}
36939impl VirtualDeviceBackingInfoTrait for VirtualEthernetCardLegacyNetworkBackingInfo {
36940}
36941impl VirtualDeviceBackingInfoTrait for VirtualEthernetCardNetworkBackingInfo {
36942}
36943impl VirtualDeviceBackingInfoTrait for VirtualFloppyDeviceBackingInfo {
36944}
36945impl VirtualDeviceBackingInfoTrait for VirtualPciPassthroughDeviceBackingInfo {
36946}
36947impl VirtualDeviceBackingInfoTrait for VirtualPciPassthroughDynamicBackingInfo {
36948}
36949impl VirtualDeviceBackingInfoTrait for VirtualParallelPortDeviceBackingInfo {
36950}
36951impl VirtualDeviceBackingInfoTrait for VirtualPointingDeviceDeviceBackingInfo {
36952}
36953impl VirtualDeviceBackingInfoTrait for VirtualScsiPassthroughDeviceBackingInfo {
36954}
36955impl VirtualDeviceBackingInfoTrait for VirtualSerialPortDeviceBackingInfo {
36956}
36957impl VirtualDeviceBackingInfoTrait for VirtualSoundCardDeviceBackingInfo {
36958}
36959impl VirtualDeviceBackingInfoTrait for VirtualUsbRemoteHostBackingInfo {
36960}
36961impl VirtualDeviceBackingInfoTrait for VirtualUsbusbBackingInfo {
36962}
36963impl VirtualDeviceBackingInfoTrait for VirtualDeviceFileBackingInfo {
36964}
36965impl VirtualDeviceBackingInfoTrait for VirtualCdromIsoBackingInfo {
36966}
36967impl VirtualDeviceBackingInfoTrait for VirtualDiskFlatVer1BackingInfo {
36968}
36969impl VirtualDeviceBackingInfoTrait for VirtualDiskFlatVer2BackingInfo {
36970}
36971impl VirtualDeviceBackingInfoTrait for VirtualDiskLocalPMemBackingInfo {
36972}
36973impl VirtualDeviceBackingInfoTrait for VirtualDiskRawDiskMappingVer1BackingInfo {
36974}
36975impl VirtualDeviceBackingInfoTrait for VirtualDiskSeSparseBackingInfo {
36976}
36977impl VirtualDeviceBackingInfoTrait for VirtualDiskSparseVer1BackingInfo {
36978}
36979impl VirtualDeviceBackingInfoTrait for VirtualDiskSparseVer2BackingInfo {
36980}
36981impl VirtualDeviceBackingInfoTrait for VirtualFloppyImageBackingInfo {
36982}
36983impl VirtualDeviceBackingInfoTrait for VirtualNvdimmBackingInfo {
36984}
36985impl VirtualDeviceBackingInfoTrait for VirtualParallelPortFileBackingInfo {
36986}
36987impl VirtualDeviceBackingInfoTrait for VirtualSerialPortFileBackingInfo {
36988}
36989impl VirtualDeviceBackingInfoTrait for VirtualDevicePipeBackingInfo {
36990}
36991impl VirtualDeviceBackingInfoTrait for VirtualSerialPortPipeBackingInfo {
36992}
36993impl VirtualDeviceBackingInfoTrait for VirtualDeviceRemoteDeviceBackingInfo {
36994}
36995impl VirtualDeviceBackingInfoTrait for VirtualCdromRemoteAtapiBackingInfo {
36996}
36997impl VirtualDeviceBackingInfoTrait for VirtualCdromRemotePassthroughBackingInfo {
36998}
36999impl VirtualDeviceBackingInfoTrait for VirtualFloppyRemoteDeviceBackingInfo {
37000}
37001impl VirtualDeviceBackingInfoTrait for VirtualUsbRemoteClientBackingInfo {
37002}
37003impl VirtualDeviceBackingInfoTrait for VirtualDeviceUriBackingInfo {
37004}
37005impl VirtualDeviceBackingInfoTrait for VirtualSerialPortUriBackingInfo {
37006}
37007impl VirtualDeviceBackingInfoTrait for VirtualEthernetCardDistributedVirtualPortBackingInfo {
37008}
37009impl VirtualDeviceBackingInfoTrait for VirtualEthernetCardOpaqueNetworkBackingInfo {
37010}
37011impl VirtualDeviceBackingInfoTrait for VirtualPciPassthroughDvxBackingInfo {
37012}
37013impl VirtualDeviceBackingInfoTrait for VirtualPciPassthroughPluginBackingInfo {
37014}
37015impl VirtualDeviceBackingInfoTrait for VirtualPciPassthroughVmiopBackingInfo {
37016}
37017impl VirtualDeviceBackingInfoTrait for VirtualPrecisionClockSystemClockBackingInfo {
37018}
37019impl VirtualDeviceBackingInfoTrait for VirtualSerialPortThinPrintBackingInfo {
37020}
37021impl VirtualDeviceBackingInfoTrait for VirtualSriovEthernetCardSriovBackingInfo {
37022}
37023impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceBackingInfoTrait {
37024    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37025        let data_type = from.data_type();
37026        match data_type {
37027            StructType::VirtualDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBackingInfo>()?),
37028            StructType::VirtualDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingInfo>()?),
37029            StructType::VirtualCdromAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingInfo>()?),
37030            StructType::VirtualCdromPassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingInfo>()?),
37031            StructType::VirtualDiskRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingInfo>()?),
37032            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37033            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
37034            StructType::VirtualEthernetCardNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingInfo>()?),
37035            StructType::VirtualFloppyDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingInfo>()?),
37036            StructType::VirtualPciPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingInfo>()?),
37037            StructType::VirtualPciPassthroughDynamicBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingInfo>()?),
37038            StructType::VirtualParallelPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingInfo>()?),
37039            StructType::VirtualPointingDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceDeviceBackingInfo>()?),
37040            StructType::VirtualScsiPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingInfo>()?),
37041            StructType::VirtualSerialPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingInfo>()?),
37042            StructType::VirtualSoundCardDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingInfo>()?),
37043            StructType::VirtualUsbRemoteHostBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingInfo>()?),
37044            StructType::VirtualUsbusbBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingInfo>()?),
37045            StructType::VirtualDeviceFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingInfo>()?),
37046            StructType::VirtualCdromIsoBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingInfo>()?),
37047            StructType::VirtualDiskFlatVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingInfo>()?),
37048            StructType::VirtualDiskFlatVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingInfo>()?),
37049            StructType::VirtualDiskLocalPMemBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingInfo>()?),
37050            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
37051            StructType::VirtualDiskSeSparseBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingInfo>()?),
37052            StructType::VirtualDiskSparseVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingInfo>()?),
37053            StructType::VirtualDiskSparseVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingInfo>()?),
37054            StructType::VirtualFloppyImageBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingInfo>()?),
37055            StructType::VirtualNvdimmBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmBackingInfo>()?),
37056            StructType::VirtualParallelPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingInfo>()?),
37057            StructType::VirtualSerialPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingInfo>()?),
37058            StructType::VirtualDevicePipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingInfo>()?),
37059            StructType::VirtualSerialPortPipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingInfo>()?),
37060            StructType::VirtualDeviceRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingInfo>()?),
37061            StructType::VirtualCdromRemoteAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingInfo>()?),
37062            StructType::VirtualCdromRemotePassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingInfo>()?),
37063            StructType::VirtualFloppyRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingInfo>()?),
37064            StructType::VirtualUsbRemoteClientBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingInfo>()?),
37065            StructType::VirtualDeviceUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingInfo>()?),
37066            StructType::VirtualSerialPortUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingInfo>()?),
37067            StructType::VirtualEthernetCardDistributedVirtualPortBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardDistributedVirtualPortBackingInfo>()?),
37068            StructType::VirtualEthernetCardOpaqueNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOpaqueNetworkBackingInfo>()?),
37069            StructType::VirtualPciPassthroughDvxBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDvxBackingInfo>()?),
37070            StructType::VirtualPciPassthroughPluginBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingInfo>()?),
37071            StructType::VirtualPciPassthroughVmiopBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingInfo>()?),
37072            StructType::VirtualPrecisionClockSystemClockBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockSystemClockBackingInfo>()?),
37073            StructType::VirtualSerialPortThinPrintBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortThinPrintBackingInfo>()?),
37074            StructType::VirtualSriovEthernetCardSriovBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardSriovBackingInfo>()?),
37075            _ => None,
37076        }
37077    }
37078    
37079    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37080        let data_type = from.data_type();
37081        match data_type {
37082            StructType::VirtualDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceBackingInfo>()?),
37083            StructType::VirtualDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingInfo>()?),
37084            StructType::VirtualCdromAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingInfo>()?),
37085            StructType::VirtualCdromPassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingInfo>()?),
37086            StructType::VirtualDiskRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingInfo>()?),
37087            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37088            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
37089            StructType::VirtualEthernetCardNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingInfo>()?),
37090            StructType::VirtualFloppyDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingInfo>()?),
37091            StructType::VirtualPciPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingInfo>()?),
37092            StructType::VirtualPciPassthroughDynamicBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingInfo>()?),
37093            StructType::VirtualParallelPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingInfo>()?),
37094            StructType::VirtualPointingDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPointingDeviceDeviceBackingInfo>()?),
37095            StructType::VirtualScsiPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingInfo>()?),
37096            StructType::VirtualSerialPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingInfo>()?),
37097            StructType::VirtualSoundCardDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingInfo>()?),
37098            StructType::VirtualUsbRemoteHostBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingInfo>()?),
37099            StructType::VirtualUsbusbBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingInfo>()?),
37100            StructType::VirtualDeviceFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingInfo>()?),
37101            StructType::VirtualCdromIsoBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingInfo>()?),
37102            StructType::VirtualDiskFlatVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingInfo>()?),
37103            StructType::VirtualDiskFlatVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingInfo>()?),
37104            StructType::VirtualDiskLocalPMemBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingInfo>()?),
37105            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
37106            StructType::VirtualDiskSeSparseBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingInfo>()?),
37107            StructType::VirtualDiskSparseVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingInfo>()?),
37108            StructType::VirtualDiskSparseVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingInfo>()?),
37109            StructType::VirtualFloppyImageBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingInfo>()?),
37110            StructType::VirtualNvdimmBackingInfo => Ok(from.as_any_box().downcast::<VirtualNvdimmBackingInfo>()?),
37111            StructType::VirtualParallelPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingInfo>()?),
37112            StructType::VirtualSerialPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingInfo>()?),
37113            StructType::VirtualDevicePipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingInfo>()?),
37114            StructType::VirtualSerialPortPipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingInfo>()?),
37115            StructType::VirtualDeviceRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingInfo>()?),
37116            StructType::VirtualCdromRemoteAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingInfo>()?),
37117            StructType::VirtualCdromRemotePassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingInfo>()?),
37118            StructType::VirtualFloppyRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingInfo>()?),
37119            StructType::VirtualUsbRemoteClientBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingInfo>()?),
37120            StructType::VirtualDeviceUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingInfo>()?),
37121            StructType::VirtualSerialPortUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingInfo>()?),
37122            StructType::VirtualEthernetCardDistributedVirtualPortBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardDistributedVirtualPortBackingInfo>()?),
37123            StructType::VirtualEthernetCardOpaqueNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardOpaqueNetworkBackingInfo>()?),
37124            StructType::VirtualPciPassthroughDvxBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDvxBackingInfo>()?),
37125            StructType::VirtualPciPassthroughPluginBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingInfo>()?),
37126            StructType::VirtualPciPassthroughVmiopBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingInfo>()?),
37127            StructType::VirtualPrecisionClockSystemClockBackingInfo => Ok(from.as_any_box().downcast::<VirtualPrecisionClockSystemClockBackingInfo>()?),
37128            StructType::VirtualSerialPortThinPrintBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortThinPrintBackingInfo>()?),
37129            StructType::VirtualSriovEthernetCardSriovBackingInfo => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardSriovBackingInfo>()?),
37130            _ => Err(from.as_any_box()),
37131        }
37132    }
37133}
37134/// The <code>*VirtualDeviceDeviceBackingInfo*</code> data object type
37135/// defines information about a host device or resource that backs a device
37136/// in a virtual machine.
37137pub trait VirtualDeviceDeviceBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37138    /// The name of the device on the host system.
37139    fn get_device_name(&self) -> &str;
37140    /// Indicates whether the device should be auto detected
37141    /// instead of directly specified.
37142    /// 
37143    /// If this value is set to TRUE,
37144    /// deviceName is ignored.
37145    fn get_use_auto_detect(&self) -> Option<bool>;
37146}
37147impl<'s> serde::Serialize for dyn VirtualDeviceDeviceBackingInfoTrait + 's {
37148            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37149            where
37150                S: serde::Serializer,
37151            {
37152                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37153            }
37154        }
37155impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceDeviceBackingInfoTrait> {
37156            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37157                deserializer.deserialize_map(VirtualDeviceDeviceBackingInfoVisitor)
37158            }
37159        }
37160
37161struct VirtualDeviceDeviceBackingInfoVisitor;
37162
37163impl<'de> de::Visitor<'de> for VirtualDeviceDeviceBackingInfoVisitor {
37164    type Value = Box<dyn VirtualDeviceDeviceBackingInfoTrait>;
37165
37166    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37167        formatter.write_str("a valid VirtualDeviceDeviceBackingInfoTrait JSON object with a _typeName field")
37168    }
37169
37170    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37171    where
37172        A: de::MapAccess<'de>,
37173    {
37174        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37175        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37176        match any {
37177            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37178                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37179            VimAny::Value(value) => Err(de::Error::custom(format!(
37180                "expected object not wrapped value: {:?}",
37181                value))),
37182        }
37183    }
37184}
37185
37186impl VirtualDeviceDeviceBackingInfoTrait for VirtualDeviceDeviceBackingInfo {
37187    fn get_device_name(&self) -> &str { &self.device_name }
37188    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37189}
37190impl VirtualDeviceDeviceBackingInfoTrait for VirtualCdromAtapiBackingInfo {
37191    fn get_device_name(&self) -> &str { &self.device_name }
37192    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37193}
37194impl VirtualDeviceDeviceBackingInfoTrait for VirtualCdromPassthroughBackingInfo {
37195    fn get_device_name(&self) -> &str { &self.device_name }
37196    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37197}
37198impl VirtualDeviceDeviceBackingInfoTrait for VirtualDiskRawDiskVer2BackingInfo {
37199    fn get_device_name(&self) -> &str { &self.device_name }
37200    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37201}
37202impl VirtualDeviceDeviceBackingInfoTrait for VirtualDiskPartitionedRawDiskVer2BackingInfo {
37203    fn get_device_name(&self) -> &str { &self.device_name }
37204    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37205}
37206impl VirtualDeviceDeviceBackingInfoTrait for VirtualEthernetCardLegacyNetworkBackingInfo {
37207    fn get_device_name(&self) -> &str { &self.device_name }
37208    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37209}
37210impl VirtualDeviceDeviceBackingInfoTrait for VirtualEthernetCardNetworkBackingInfo {
37211    fn get_device_name(&self) -> &str { &self.device_name }
37212    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37213}
37214impl VirtualDeviceDeviceBackingInfoTrait for VirtualFloppyDeviceBackingInfo {
37215    fn get_device_name(&self) -> &str { &self.device_name }
37216    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37217}
37218impl VirtualDeviceDeviceBackingInfoTrait for VirtualPciPassthroughDeviceBackingInfo {
37219    fn get_device_name(&self) -> &str { &self.device_name }
37220    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37221}
37222impl VirtualDeviceDeviceBackingInfoTrait for VirtualPciPassthroughDynamicBackingInfo {
37223    fn get_device_name(&self) -> &str { &self.device_name }
37224    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37225}
37226impl VirtualDeviceDeviceBackingInfoTrait for VirtualParallelPortDeviceBackingInfo {
37227    fn get_device_name(&self) -> &str { &self.device_name }
37228    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37229}
37230impl VirtualDeviceDeviceBackingInfoTrait for VirtualPointingDeviceDeviceBackingInfo {
37231    fn get_device_name(&self) -> &str { &self.device_name }
37232    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37233}
37234impl VirtualDeviceDeviceBackingInfoTrait for VirtualScsiPassthroughDeviceBackingInfo {
37235    fn get_device_name(&self) -> &str { &self.device_name }
37236    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37237}
37238impl VirtualDeviceDeviceBackingInfoTrait for VirtualSerialPortDeviceBackingInfo {
37239    fn get_device_name(&self) -> &str { &self.device_name }
37240    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37241}
37242impl VirtualDeviceDeviceBackingInfoTrait for VirtualSoundCardDeviceBackingInfo {
37243    fn get_device_name(&self) -> &str { &self.device_name }
37244    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37245}
37246impl VirtualDeviceDeviceBackingInfoTrait for VirtualUsbRemoteHostBackingInfo {
37247    fn get_device_name(&self) -> &str { &self.device_name }
37248    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37249}
37250impl VirtualDeviceDeviceBackingInfoTrait for VirtualUsbusbBackingInfo {
37251    fn get_device_name(&self) -> &str { &self.device_name }
37252    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37253}
37254impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceDeviceBackingInfoTrait {
37255    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37256        let data_type = from.data_type();
37257        match data_type {
37258            StructType::VirtualDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingInfo>()?),
37259            StructType::VirtualCdromAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingInfo>()?),
37260            StructType::VirtualCdromPassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingInfo>()?),
37261            StructType::VirtualDiskRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingInfo>()?),
37262            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37263            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
37264            StructType::VirtualEthernetCardNetworkBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingInfo>()?),
37265            StructType::VirtualFloppyDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingInfo>()?),
37266            StructType::VirtualPciPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingInfo>()?),
37267            StructType::VirtualPciPassthroughDynamicBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingInfo>()?),
37268            StructType::VirtualParallelPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingInfo>()?),
37269            StructType::VirtualPointingDeviceDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceDeviceBackingInfo>()?),
37270            StructType::VirtualScsiPassthroughDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingInfo>()?),
37271            StructType::VirtualSerialPortDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingInfo>()?),
37272            StructType::VirtualSoundCardDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingInfo>()?),
37273            StructType::VirtualUsbRemoteHostBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingInfo>()?),
37274            StructType::VirtualUsbusbBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingInfo>()?),
37275            _ => None,
37276        }
37277    }
37278    
37279    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37280        let data_type = from.data_type();
37281        match data_type {
37282            StructType::VirtualDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingInfo>()?),
37283            StructType::VirtualCdromAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingInfo>()?),
37284            StructType::VirtualCdromPassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingInfo>()?),
37285            StructType::VirtualDiskRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingInfo>()?),
37286            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37287            StructType::VirtualEthernetCardLegacyNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingInfo>()?),
37288            StructType::VirtualEthernetCardNetworkBackingInfo => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingInfo>()?),
37289            StructType::VirtualFloppyDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingInfo>()?),
37290            StructType::VirtualPciPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingInfo>()?),
37291            StructType::VirtualPciPassthroughDynamicBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingInfo>()?),
37292            StructType::VirtualParallelPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingInfo>()?),
37293            StructType::VirtualPointingDeviceDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualPointingDeviceDeviceBackingInfo>()?),
37294            StructType::VirtualScsiPassthroughDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingInfo>()?),
37295            StructType::VirtualSerialPortDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingInfo>()?),
37296            StructType::VirtualSoundCardDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingInfo>()?),
37297            StructType::VirtualUsbRemoteHostBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingInfo>()?),
37298            StructType::VirtualUsbusbBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingInfo>()?),
37299            _ => Err(from.as_any_box()),
37300        }
37301    }
37302}
37303/// This data object type contains information about backing a virtual disk by
37304/// using a host device, as used by VMware Server.
37305pub trait VirtualDiskRawDiskVer2BackingInfoTrait : super::traits::VirtualDeviceDeviceBackingInfoTrait {
37306    /// The name of the raw disk descriptor file.
37307    fn get_descriptor_file_name(&self) -> &str;
37308    /// Disk UUID for the virtual disk, if available.
37309    fn get_uuid(&self) -> &Option<String>;
37310    /// The change ID of the virtual disk for the corresponding
37311    /// snapshot or virtual machine.
37312    /// 
37313    /// This can be used to track
37314    /// incremental changes to a virtual disk. See
37315    /// *VirtualMachine.QueryChangedDiskAreas*.
37316    fn get_change_id(&self) -> &Option<String>;
37317    /// The sharing mode of the virtual disk.
37318    /// 
37319    /// See *VirtualDiskSharing_enum*. The default value is
37320    /// no sharing.
37321    fn get_sharing(&self) -> &Option<String>;
37322}
37323impl<'s> serde::Serialize for dyn VirtualDiskRawDiskVer2BackingInfoTrait + 's {
37324            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37325            where
37326                S: serde::Serializer,
37327            {
37328                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37329            }
37330        }
37331impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDiskRawDiskVer2BackingInfoTrait> {
37332            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37333                deserializer.deserialize_map(VirtualDiskRawDiskVer2BackingInfoVisitor)
37334            }
37335        }
37336
37337struct VirtualDiskRawDiskVer2BackingInfoVisitor;
37338
37339impl<'de> de::Visitor<'de> for VirtualDiskRawDiskVer2BackingInfoVisitor {
37340    type Value = Box<dyn VirtualDiskRawDiskVer2BackingInfoTrait>;
37341
37342    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37343        formatter.write_str("a valid VirtualDiskRawDiskVer2BackingInfoTrait JSON object with a _typeName field")
37344    }
37345
37346    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37347    where
37348        A: de::MapAccess<'de>,
37349    {
37350        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37351        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37352        match any {
37353            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37354                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37355            VimAny::Value(value) => Err(de::Error::custom(format!(
37356                "expected object not wrapped value: {:?}",
37357                value))),
37358        }
37359    }
37360}
37361
37362impl VirtualDiskRawDiskVer2BackingInfoTrait for VirtualDiskRawDiskVer2BackingInfo {
37363    fn get_descriptor_file_name(&self) -> &str { &self.descriptor_file_name }
37364    fn get_uuid(&self) -> &Option<String> { &self.uuid }
37365    fn get_change_id(&self) -> &Option<String> { &self.change_id }
37366    fn get_sharing(&self) -> &Option<String> { &self.sharing }
37367}
37368impl VirtualDiskRawDiskVer2BackingInfoTrait for VirtualDiskPartitionedRawDiskVer2BackingInfo {
37369    fn get_descriptor_file_name(&self) -> &str { &self.descriptor_file_name }
37370    fn get_uuid(&self) -> &Option<String> { &self.uuid }
37371    fn get_change_id(&self) -> &Option<String> { &self.change_id }
37372    fn get_sharing(&self) -> &Option<String> { &self.sharing }
37373}
37374impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDiskRawDiskVer2BackingInfoTrait {
37375    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37376        let data_type = from.data_type();
37377        match data_type {
37378            StructType::VirtualDiskRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingInfo>()?),
37379            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37380            _ => None,
37381        }
37382    }
37383    
37384    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37385        let data_type = from.data_type();
37386        match data_type {
37387            StructType::VirtualDiskRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingInfo>()?),
37388            StructType::VirtualDiskPartitionedRawDiskVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingInfo>()?),
37389            _ => Err(from.as_any_box()),
37390        }
37391    }
37392}
37393/// <code>*VirtualDeviceFileBackingInfo*</code> is a data object type
37394/// for information about file backing for a device in a virtual machine.
37395pub trait VirtualDeviceFileBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37396    /// Filename for the host file used in this backing.
37397    fn get_file_name(&self) -> &str;
37398    /// Reference to the datastore managed object where this file is stored.
37399    /// 
37400    /// If the file is not located on a datastore, then this reference is null.
37401    /// This is not used for configuration.
37402    /// 
37403    /// Refers instance of *Datastore*.
37404    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference>;
37405    /// Backing object's durable and unmutable identifier.
37406    /// 
37407    /// Each backing object has a unique identifier which is not settable.
37408    fn get_backing_object_id(&self) -> &Option<String>;
37409}
37410impl<'s> serde::Serialize for dyn VirtualDeviceFileBackingInfoTrait + 's {
37411            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37412            where
37413                S: serde::Serializer,
37414            {
37415                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37416            }
37417        }
37418impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceFileBackingInfoTrait> {
37419            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37420                deserializer.deserialize_map(VirtualDeviceFileBackingInfoVisitor)
37421            }
37422        }
37423
37424struct VirtualDeviceFileBackingInfoVisitor;
37425
37426impl<'de> de::Visitor<'de> for VirtualDeviceFileBackingInfoVisitor {
37427    type Value = Box<dyn VirtualDeviceFileBackingInfoTrait>;
37428
37429    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37430        formatter.write_str("a valid VirtualDeviceFileBackingInfoTrait JSON object with a _typeName field")
37431    }
37432
37433    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37434    where
37435        A: de::MapAccess<'de>,
37436    {
37437        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37438        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37439        match any {
37440            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37441                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37442            VimAny::Value(value) => Err(de::Error::custom(format!(
37443                "expected object not wrapped value: {:?}",
37444                value))),
37445        }
37446    }
37447}
37448
37449impl VirtualDeviceFileBackingInfoTrait for VirtualDeviceFileBackingInfo {
37450    fn get_file_name(&self) -> &str { &self.file_name }
37451    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37452    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37453}
37454impl VirtualDeviceFileBackingInfoTrait for VirtualCdromIsoBackingInfo {
37455    fn get_file_name(&self) -> &str { &self.file_name }
37456    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37457    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37458}
37459impl VirtualDeviceFileBackingInfoTrait for VirtualDiskFlatVer1BackingInfo {
37460    fn get_file_name(&self) -> &str { &self.file_name }
37461    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37462    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37463}
37464impl VirtualDeviceFileBackingInfoTrait for VirtualDiskFlatVer2BackingInfo {
37465    fn get_file_name(&self) -> &str { &self.file_name }
37466    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37467    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37468}
37469impl VirtualDeviceFileBackingInfoTrait for VirtualDiskLocalPMemBackingInfo {
37470    fn get_file_name(&self) -> &str { &self.file_name }
37471    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37472    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37473}
37474impl VirtualDeviceFileBackingInfoTrait for VirtualDiskRawDiskMappingVer1BackingInfo {
37475    fn get_file_name(&self) -> &str { &self.file_name }
37476    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37477    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37478}
37479impl VirtualDeviceFileBackingInfoTrait for VirtualDiskSeSparseBackingInfo {
37480    fn get_file_name(&self) -> &str { &self.file_name }
37481    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37482    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37483}
37484impl VirtualDeviceFileBackingInfoTrait for VirtualDiskSparseVer1BackingInfo {
37485    fn get_file_name(&self) -> &str { &self.file_name }
37486    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37487    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37488}
37489impl VirtualDeviceFileBackingInfoTrait for VirtualDiskSparseVer2BackingInfo {
37490    fn get_file_name(&self) -> &str { &self.file_name }
37491    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37492    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37493}
37494impl VirtualDeviceFileBackingInfoTrait for VirtualFloppyImageBackingInfo {
37495    fn get_file_name(&self) -> &str { &self.file_name }
37496    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37497    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37498}
37499impl VirtualDeviceFileBackingInfoTrait for VirtualNvdimmBackingInfo {
37500    fn get_file_name(&self) -> &str { &self.file_name }
37501    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37502    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37503}
37504impl VirtualDeviceFileBackingInfoTrait for VirtualParallelPortFileBackingInfo {
37505    fn get_file_name(&self) -> &str { &self.file_name }
37506    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37507    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37508}
37509impl VirtualDeviceFileBackingInfoTrait for VirtualSerialPortFileBackingInfo {
37510    fn get_file_name(&self) -> &str { &self.file_name }
37511    fn get_datastore(&self) -> &Option<super::structs::ManagedObjectReference> { &self.datastore }
37512    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
37513}
37514impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceFileBackingInfoTrait {
37515    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37516        let data_type = from.data_type();
37517        match data_type {
37518            StructType::VirtualDeviceFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingInfo>()?),
37519            StructType::VirtualCdromIsoBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingInfo>()?),
37520            StructType::VirtualDiskFlatVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingInfo>()?),
37521            StructType::VirtualDiskFlatVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingInfo>()?),
37522            StructType::VirtualDiskLocalPMemBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingInfo>()?),
37523            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
37524            StructType::VirtualDiskSeSparseBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingInfo>()?),
37525            StructType::VirtualDiskSparseVer1BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingInfo>()?),
37526            StructType::VirtualDiskSparseVer2BackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingInfo>()?),
37527            StructType::VirtualFloppyImageBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingInfo>()?),
37528            StructType::VirtualNvdimmBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmBackingInfo>()?),
37529            StructType::VirtualParallelPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingInfo>()?),
37530            StructType::VirtualSerialPortFileBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingInfo>()?),
37531            _ => None,
37532        }
37533    }
37534    
37535    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37536        let data_type = from.data_type();
37537        match data_type {
37538            StructType::VirtualDeviceFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingInfo>()?),
37539            StructType::VirtualCdromIsoBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingInfo>()?),
37540            StructType::VirtualDiskFlatVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingInfo>()?),
37541            StructType::VirtualDiskFlatVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingInfo>()?),
37542            StructType::VirtualDiskLocalPMemBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingInfo>()?),
37543            StructType::VirtualDiskRawDiskMappingVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingInfo>()?),
37544            StructType::VirtualDiskSeSparseBackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingInfo>()?),
37545            StructType::VirtualDiskSparseVer1BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingInfo>()?),
37546            StructType::VirtualDiskSparseVer2BackingInfo => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingInfo>()?),
37547            StructType::VirtualFloppyImageBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingInfo>()?),
37548            StructType::VirtualNvdimmBackingInfo => Ok(from.as_any_box().downcast::<VirtualNvdimmBackingInfo>()?),
37549            StructType::VirtualParallelPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingInfo>()?),
37550            StructType::VirtualSerialPortFileBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingInfo>()?),
37551            _ => Err(from.as_any_box()),
37552        }
37553    }
37554}
37555/// The <code>*VirtualDevicePipeBackingInfo*</code> data object type
37556/// defines information for using a named pipe as backing for a device
37557/// in a virtual machine.
37558pub trait VirtualDevicePipeBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37559    /// Pipe name for the host pipe associated with this backing.
37560    fn get_pipe_name(&self) -> &str;
37561}
37562impl<'s> serde::Serialize for dyn VirtualDevicePipeBackingInfoTrait + 's {
37563            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37564            where
37565                S: serde::Serializer,
37566            {
37567                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37568            }
37569        }
37570impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDevicePipeBackingInfoTrait> {
37571            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37572                deserializer.deserialize_map(VirtualDevicePipeBackingInfoVisitor)
37573            }
37574        }
37575
37576struct VirtualDevicePipeBackingInfoVisitor;
37577
37578impl<'de> de::Visitor<'de> for VirtualDevicePipeBackingInfoVisitor {
37579    type Value = Box<dyn VirtualDevicePipeBackingInfoTrait>;
37580
37581    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37582        formatter.write_str("a valid VirtualDevicePipeBackingInfoTrait JSON object with a _typeName field")
37583    }
37584
37585    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37586    where
37587        A: de::MapAccess<'de>,
37588    {
37589        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37590        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37591        match any {
37592            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37593                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37594            VimAny::Value(value) => Err(de::Error::custom(format!(
37595                "expected object not wrapped value: {:?}",
37596                value))),
37597        }
37598    }
37599}
37600
37601impl VirtualDevicePipeBackingInfoTrait for VirtualDevicePipeBackingInfo {
37602    fn get_pipe_name(&self) -> &str { &self.pipe_name }
37603}
37604impl VirtualDevicePipeBackingInfoTrait for VirtualSerialPortPipeBackingInfo {
37605    fn get_pipe_name(&self) -> &str { &self.pipe_name }
37606}
37607impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDevicePipeBackingInfoTrait {
37608    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37609        let data_type = from.data_type();
37610        match data_type {
37611            StructType::VirtualDevicePipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingInfo>()?),
37612            StructType::VirtualSerialPortPipeBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingInfo>()?),
37613            _ => None,
37614        }
37615    }
37616    
37617    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37618        let data_type = from.data_type();
37619        match data_type {
37620            StructType::VirtualDevicePipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingInfo>()?),
37621            StructType::VirtualSerialPortPipeBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingInfo>()?),
37622            _ => Err(from.as_any_box()),
37623        }
37624    }
37625}
37626/// <code>*VirtualDeviceRemoteDeviceBackingInfo*</code> is a data object type
37627/// for information
37628/// about a remote device backing used by a device in a virtual machine.
37629/// 
37630/// The primary difference between a remote device backing and a
37631/// local device backing is that the VirtualCenter server cannot provide a list
37632/// of remote host devices available for this virtual device backing.
37633pub trait VirtualDeviceRemoteDeviceBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37634    /// The name of the device on the remote system.
37635    fn get_device_name(&self) -> &str;
37636    /// Indicates whether the device should be auto detected
37637    /// instead of directly specified.
37638    /// 
37639    /// If this value is set to TRUE,
37640    /// <code>deviceName</code> is ignored.
37641    fn get_use_auto_detect(&self) -> Option<bool>;
37642}
37643impl<'s> serde::Serialize for dyn VirtualDeviceRemoteDeviceBackingInfoTrait + 's {
37644            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37645            where
37646                S: serde::Serializer,
37647            {
37648                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37649            }
37650        }
37651impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceRemoteDeviceBackingInfoTrait> {
37652            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37653                deserializer.deserialize_map(VirtualDeviceRemoteDeviceBackingInfoVisitor)
37654            }
37655        }
37656
37657struct VirtualDeviceRemoteDeviceBackingInfoVisitor;
37658
37659impl<'de> de::Visitor<'de> for VirtualDeviceRemoteDeviceBackingInfoVisitor {
37660    type Value = Box<dyn VirtualDeviceRemoteDeviceBackingInfoTrait>;
37661
37662    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37663        formatter.write_str("a valid VirtualDeviceRemoteDeviceBackingInfoTrait JSON object with a _typeName field")
37664    }
37665
37666    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37667    where
37668        A: de::MapAccess<'de>,
37669    {
37670        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37671        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37672        match any {
37673            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37674                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37675            VimAny::Value(value) => Err(de::Error::custom(format!(
37676                "expected object not wrapped value: {:?}",
37677                value))),
37678        }
37679    }
37680}
37681
37682impl VirtualDeviceRemoteDeviceBackingInfoTrait for VirtualDeviceRemoteDeviceBackingInfo {
37683    fn get_device_name(&self) -> &str { &self.device_name }
37684    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37685}
37686impl VirtualDeviceRemoteDeviceBackingInfoTrait for VirtualCdromRemoteAtapiBackingInfo {
37687    fn get_device_name(&self) -> &str { &self.device_name }
37688    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37689}
37690impl VirtualDeviceRemoteDeviceBackingInfoTrait for VirtualCdromRemotePassthroughBackingInfo {
37691    fn get_device_name(&self) -> &str { &self.device_name }
37692    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37693}
37694impl VirtualDeviceRemoteDeviceBackingInfoTrait for VirtualFloppyRemoteDeviceBackingInfo {
37695    fn get_device_name(&self) -> &str { &self.device_name }
37696    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37697}
37698impl VirtualDeviceRemoteDeviceBackingInfoTrait for VirtualUsbRemoteClientBackingInfo {
37699    fn get_device_name(&self) -> &str { &self.device_name }
37700    fn get_use_auto_detect(&self) -> Option<bool> { self.use_auto_detect }
37701}
37702impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceRemoteDeviceBackingInfoTrait {
37703    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37704        let data_type = from.data_type();
37705        match data_type {
37706            StructType::VirtualDeviceRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingInfo>()?),
37707            StructType::VirtualCdromRemoteAtapiBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingInfo>()?),
37708            StructType::VirtualCdromRemotePassthroughBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingInfo>()?),
37709            StructType::VirtualFloppyRemoteDeviceBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingInfo>()?),
37710            StructType::VirtualUsbRemoteClientBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingInfo>()?),
37711            _ => None,
37712        }
37713    }
37714    
37715    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37716        let data_type = from.data_type();
37717        match data_type {
37718            StructType::VirtualDeviceRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingInfo>()?),
37719            StructType::VirtualCdromRemoteAtapiBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingInfo>()?),
37720            StructType::VirtualCdromRemotePassthroughBackingInfo => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingInfo>()?),
37721            StructType::VirtualFloppyRemoteDeviceBackingInfo => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingInfo>()?),
37722            StructType::VirtualUsbRemoteClientBackingInfo => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingInfo>()?),
37723            _ => Err(from.as_any_box()),
37724        }
37725    }
37726}
37727/// The <code>*VirtualDeviceURIBackingInfo*</code> data object type
37728/// defines information for using a network socket as backing for a virtual device.
37729pub trait VirtualDeviceUriBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37730    /// Identifies the local host or a system on the network,
37731    /// depending on the value of <code>*VirtualDeviceURIBackingInfo.direction*</code>.
37732    /// - If you use the virtual machine as a server, the URI identifies
37733    ///   the host on which the virtual machine runs. In this case,
37734    ///   the host name part of the URI should be empty, or it should
37735    ///   specify the address of the local host.
37736    /// - If you use the virtual machine as a client, the URI identifies
37737    ///   the remote system on the network.
37738    fn get_service_uri(&self) -> &str;
37739    /// The direction of the connection.
37740    /// 
37741    /// For possible values see
37742    /// *VirtualDeviceURIBackingOptionDirection_enum*
37743    fn get_direction(&self) -> &str;
37744    /// Identifies a proxy service that provides network access to the
37745    /// <code>*VirtualDeviceURIBackingInfo.serviceURI*</code>.
37746    /// 
37747    /// If you specify a proxy URI, the virtual machine initiates
37748    /// a connection with the proxy service and forwards the
37749    /// *VirtualDeviceURIBackingInfo.serviceURI* and *VirtualDeviceURIBackingInfo.direction* to the proxy.
37750    fn get_proxy_uri(&self) -> &Option<String>;
37751}
37752impl<'s> serde::Serialize for dyn VirtualDeviceUriBackingInfoTrait + 's {
37753            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37754            where
37755                S: serde::Serializer,
37756            {
37757                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37758            }
37759        }
37760impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceUriBackingInfoTrait> {
37761            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37762                deserializer.deserialize_map(VirtualDeviceUriBackingInfoVisitor)
37763            }
37764        }
37765
37766struct VirtualDeviceUriBackingInfoVisitor;
37767
37768impl<'de> de::Visitor<'de> for VirtualDeviceUriBackingInfoVisitor {
37769    type Value = Box<dyn VirtualDeviceUriBackingInfoTrait>;
37770
37771    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37772        formatter.write_str("a valid VirtualDeviceUriBackingInfoTrait JSON object with a _typeName field")
37773    }
37774
37775    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37776    where
37777        A: de::MapAccess<'de>,
37778    {
37779        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37780        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37781        match any {
37782            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37783                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37784            VimAny::Value(value) => Err(de::Error::custom(format!(
37785                "expected object not wrapped value: {:?}",
37786                value))),
37787        }
37788    }
37789}
37790
37791impl VirtualDeviceUriBackingInfoTrait for VirtualDeviceUriBackingInfo {
37792    fn get_service_uri(&self) -> &str { &self.service_uri }
37793    fn get_direction(&self) -> &str { &self.direction }
37794    fn get_proxy_uri(&self) -> &Option<String> { &self.proxy_uri }
37795}
37796impl VirtualDeviceUriBackingInfoTrait for VirtualSerialPortUriBackingInfo {
37797    fn get_service_uri(&self) -> &str { &self.service_uri }
37798    fn get_direction(&self) -> &str { &self.direction }
37799    fn get_proxy_uri(&self) -> &Option<String> { &self.proxy_uri }
37800}
37801impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceUriBackingInfoTrait {
37802    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37803        let data_type = from.data_type();
37804        match data_type {
37805            StructType::VirtualDeviceUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingInfo>()?),
37806            StructType::VirtualSerialPortUriBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingInfo>()?),
37807            _ => None,
37808        }
37809    }
37810    
37811    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37812        let data_type = from.data_type();
37813        match data_type {
37814            StructType::VirtualDeviceUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingInfo>()?),
37815            StructType::VirtualSerialPortUriBackingInfo => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingInfo>()?),
37816            _ => Err(from.as_any_box()),
37817        }
37818    }
37819}
37820/// The VirtualPCIPassthrough.PluginBackingInfo is a base data object type
37821/// for encoding plugin-specific information.
37822/// 
37823/// This base type does not define
37824/// any properties. Specific plugin types are represented by subtypes which
37825/// define properties for subtype-specific backing information.
37826pub trait VirtualPciPassthroughPluginBackingInfoTrait : super::traits::VirtualDeviceBackingInfoTrait {
37827}
37828impl<'s> serde::Serialize for dyn VirtualPciPassthroughPluginBackingInfoTrait + 's {
37829            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37830            where
37831                S: serde::Serializer,
37832            {
37833                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37834            }
37835        }
37836impl<'de> serde::Deserialize<'de> for Box<dyn VirtualPciPassthroughPluginBackingInfoTrait> {
37837            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37838                deserializer.deserialize_map(VirtualPciPassthroughPluginBackingInfoVisitor)
37839            }
37840        }
37841
37842struct VirtualPciPassthroughPluginBackingInfoVisitor;
37843
37844impl<'de> de::Visitor<'de> for VirtualPciPassthroughPluginBackingInfoVisitor {
37845    type Value = Box<dyn VirtualPciPassthroughPluginBackingInfoTrait>;
37846
37847    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37848        formatter.write_str("a valid VirtualPciPassthroughPluginBackingInfoTrait JSON object with a _typeName field")
37849    }
37850
37851    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37852    where
37853        A: de::MapAccess<'de>,
37854    {
37855        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37856        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37857        match any {
37858            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37859                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37860            VimAny::Value(value) => Err(de::Error::custom(format!(
37861                "expected object not wrapped value: {:?}",
37862                value))),
37863        }
37864    }
37865}
37866
37867impl VirtualPciPassthroughPluginBackingInfoTrait for VirtualPciPassthroughPluginBackingInfo {
37868}
37869impl VirtualPciPassthroughPluginBackingInfoTrait for VirtualPciPassthroughVmiopBackingInfo {
37870}
37871impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualPciPassthroughPluginBackingInfoTrait {
37872    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37873        let data_type = from.data_type();
37874        match data_type {
37875            StructType::VirtualPciPassthroughPluginBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingInfo>()?),
37876            StructType::VirtualPciPassthroughVmiopBackingInfo => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingInfo>()?),
37877            _ => None,
37878        }
37879    }
37880    
37881    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37882        let data_type = from.data_type();
37883        match data_type {
37884            StructType::VirtualPciPassthroughPluginBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingInfo>()?),
37885            StructType::VirtualPciPassthroughVmiopBackingInfo => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingInfo>()?),
37886            _ => Err(from.as_any_box()),
37887        }
37888    }
37889}
37890/// <code>*VirtualDeviceBusSlotInfo*</code> is a base data object type
37891/// for information about device connection to its bus.
37892/// 
37893/// This base type does not
37894/// define any properties. It is used as a namespace for general-purpose subtypes.
37895/// Specific devices types are represented by subtypes which define properties for
37896/// device-specific backing information.
37897pub trait VirtualDeviceBusSlotInfoTrait : super::traits::DataObjectTrait {
37898}
37899impl<'s> serde::Serialize for dyn VirtualDeviceBusSlotInfoTrait + 's {
37900            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37901            where
37902                S: serde::Serializer,
37903            {
37904                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37905            }
37906        }
37907impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceBusSlotInfoTrait> {
37908            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37909                deserializer.deserialize_map(VirtualDeviceBusSlotInfoVisitor)
37910            }
37911        }
37912
37913struct VirtualDeviceBusSlotInfoVisitor;
37914
37915impl<'de> de::Visitor<'de> for VirtualDeviceBusSlotInfoVisitor {
37916    type Value = Box<dyn VirtualDeviceBusSlotInfoTrait>;
37917
37918    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
37919        formatter.write_str("a valid VirtualDeviceBusSlotInfoTrait JSON object with a _typeName field")
37920    }
37921
37922    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
37923    where
37924        A: de::MapAccess<'de>,
37925    {
37926        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
37927        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
37928        match any {
37929            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
37930                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
37931            VimAny::Value(value) => Err(de::Error::custom(format!(
37932                "expected object not wrapped value: {:?}",
37933                value))),
37934        }
37935    }
37936}
37937
37938impl VirtualDeviceBusSlotInfoTrait for VirtualDeviceBusSlotInfo {
37939}
37940impl VirtualDeviceBusSlotInfoTrait for VirtualDevicePciBusSlotInfo {
37941}
37942impl VirtualDeviceBusSlotInfoTrait for VirtualUsbControllerPciBusSlotInfo {
37943}
37944impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceBusSlotInfoTrait {
37945    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
37946        let data_type = from.data_type();
37947        match data_type {
37948            StructType::VirtualDeviceBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBusSlotInfo>()?),
37949            StructType::VirtualDevicePciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePciBusSlotInfo>()?),
37950            StructType::VirtualUsbControllerPciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerPciBusSlotInfo>()?),
37951            _ => None,
37952        }
37953    }
37954    
37955    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
37956        let data_type = from.data_type();
37957        match data_type {
37958            StructType::VirtualDeviceBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualDeviceBusSlotInfo>()?),
37959            StructType::VirtualDevicePciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualDevicePciBusSlotInfo>()?),
37960            StructType::VirtualUsbControllerPciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualUsbControllerPciBusSlotInfo>()?),
37961            _ => Err(from.as_any_box()),
37962        }
37963    }
37964}
37965/// The <code>*VirtualDevicePciBusSlotInfo*</code> data object type
37966/// defines information about a pci bus slot of pci device in a virtual machine.
37967pub trait VirtualDevicePciBusSlotInfoTrait : super::traits::VirtualDeviceBusSlotInfoTrait {
37968    /// The pci slot number of the virtual device.
37969    /// 
37970    /// The pci slot number assignment should generally be left to the system.
37971    /// If assigned a value, and the value is invalid or duplicated, it will
37972    /// automatically be reassigned. This will not cause an error.
37973    /// 
37974    /// Generally, the PCI slot numbers should never be specified in an
37975    /// Reconfigure operation, and only in a CreateVM operation if i) they
37976    /// are specified for all devices, and ii) the numbers have been
37977    /// determined by looking at an existing VM configuration of similar
37978    /// hardware version. In other words, when the virtual hardware configuration
37979    /// is duplicated.
37980    fn get_pci_slot_number(&self) -> i32;
37981}
37982impl<'s> serde::Serialize for dyn VirtualDevicePciBusSlotInfoTrait + 's {
37983            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
37984            where
37985                S: serde::Serializer,
37986            {
37987                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
37988            }
37989        }
37990impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDevicePciBusSlotInfoTrait> {
37991            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
37992                deserializer.deserialize_map(VirtualDevicePciBusSlotInfoVisitor)
37993            }
37994        }
37995
37996struct VirtualDevicePciBusSlotInfoVisitor;
37997
37998impl<'de> de::Visitor<'de> for VirtualDevicePciBusSlotInfoVisitor {
37999    type Value = Box<dyn VirtualDevicePciBusSlotInfoTrait>;
38000
38001    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
38002        formatter.write_str("a valid VirtualDevicePciBusSlotInfoTrait JSON object with a _typeName field")
38003    }
38004
38005    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
38006    where
38007        A: de::MapAccess<'de>,
38008    {
38009        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
38010        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
38011        match any {
38012            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
38013                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
38014            VimAny::Value(value) => Err(de::Error::custom(format!(
38015                "expected object not wrapped value: {:?}",
38016                value))),
38017        }
38018    }
38019}
38020
38021impl VirtualDevicePciBusSlotInfoTrait for VirtualDevicePciBusSlotInfo {
38022    fn get_pci_slot_number(&self) -> i32 { self.pci_slot_number }
38023}
38024impl VirtualDevicePciBusSlotInfoTrait for VirtualUsbControllerPciBusSlotInfo {
38025    fn get_pci_slot_number(&self) -> i32 { self.pci_slot_number }
38026}
38027impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDevicePciBusSlotInfoTrait {
38028    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
38029        let data_type = from.data_type();
38030        match data_type {
38031            StructType::VirtualDevicePciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualDevicePciBusSlotInfo>()?),
38032            StructType::VirtualUsbControllerPciBusSlotInfo => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerPciBusSlotInfo>()?),
38033            _ => None,
38034        }
38035    }
38036    
38037    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
38038        let data_type = from.data_type();
38039        match data_type {
38040            StructType::VirtualDevicePciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualDevicePciBusSlotInfo>()?),
38041            StructType::VirtualUsbControllerPciBusSlotInfo => Ok(from.as_any_box().downcast::<VirtualUsbControllerPciBusSlotInfo>()?),
38042            _ => Err(from.as_any_box()),
38043        }
38044    }
38045}
38046/// The VirtualDeviceOption data object type contains information about
38047/// a virtual device type, the options for configuring the virtual device,
38048/// and the relationship between this virtual device and other devices.
38049/// 
38050/// The vSphere API groups device configurations that are mutually exclusive
38051/// into different configuration objects; each of these configuration objects
38052/// may define subtypes for virtual device backing options
38053/// that are independent of the virtual device.
38054/// Backing-dependent options should appear in a subtype of
38055/// *VirtualDeviceBackingOption*.
38056pub trait VirtualDeviceOptionTrait : super::traits::DataObjectTrait {
38057    /// The name of the run-time class the client should instantiate
38058    /// to create a run-time instance of this device.
38059    fn get_type(&self) -> &str;
38060    /// If the device is connectable, then the connectOption
38061    /// describes the connect options and defaults.
38062    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption>;
38063    /// If the device can use a bus slot configuration, then the busSlotOption
38064    /// describes the bus slot options.
38065    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption>;
38066    /// Data object type that denotes the controller option object that is
38067    /// valid for controlling this device.
38068    fn get_controller_type(&self) -> &Option<String>;
38069    /// Flag to indicate whether or not this device will be auto-assigned a controller
38070    /// if one is required.
38071    /// 
38072    /// If this is true, then a client need not explicitly create
38073    /// the controller that this device will plug into.
38074    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption>;
38075    /// A list of backing options that can be used to map the virtual
38076    /// device to the host.
38077    /// 
38078    /// The list is optional, since some devices exist only within
38079    /// the virtual machine; for example, a VirtualController.
38080    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>>;
38081    /// Index into the backingOption list, indicating the default backing.
38082    fn get_default_backing_option_index(&self) -> Option<i32>;
38083    /// List of property names enforced by a licensing restriction
38084    /// of the underlying product.
38085    /// 
38086    /// For example, a limit that is not
38087    /// derived based on the product or hardware features; the
38088    /// property name "numCPU".
38089    fn get_licensing_limit(&self) -> &Option<Vec<String>>;
38090    /// Indicates whether this device is deprecated.
38091    /// 
38092    /// Hence, if set the device
38093    /// cannot be used when creating a new virtual machine or be added to an existing
38094    /// virtual machine. However, the device is still supported by the platform.
38095    fn get_deprecated(&self) -> bool;
38096    /// Indicates if this type of device can be hot-added to the virtual machine
38097    /// via a reconfigure operation when the virtual machine is powered on.
38098    fn get_plug_and_play(&self) -> bool;
38099    /// Indicates if this type of device can be hot-removed from the virtual machine
38100    /// via a reconfigure operation when the virtual machine is powered on.
38101    fn get_hot_remove_supported(&self) -> bool;
38102    /// ***Since:*** vSphere API Release 8.0.0.1
38103    fn get_numa_supported(&self) -> Option<bool>;
38104}
38105impl<'s> serde::Serialize for dyn VirtualDeviceOptionTrait + 's {
38106            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
38107            where
38108                S: serde::Serializer,
38109            {
38110                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
38111            }
38112        }
38113impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceOptionTrait> {
38114            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
38115                deserializer.deserialize_map(VirtualDeviceOptionVisitor)
38116            }
38117        }
38118
38119struct VirtualDeviceOptionVisitor;
38120
38121impl<'de> de::Visitor<'de> for VirtualDeviceOptionVisitor {
38122    type Value = Box<dyn VirtualDeviceOptionTrait>;
38123
38124    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
38125        formatter.write_str("a valid VirtualDeviceOptionTrait JSON object with a _typeName field")
38126    }
38127
38128    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
38129    where
38130        A: de::MapAccess<'de>,
38131    {
38132        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
38133        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
38134        match any {
38135            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
38136                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
38137            VimAny::Value(value) => Err(de::Error::custom(format!(
38138                "expected object not wrapped value: {:?}",
38139                value))),
38140        }
38141    }
38142}
38143
38144impl VirtualDeviceOptionTrait for VirtualDeviceOption {
38145    fn get_type(&self) -> &str { &self.r#type }
38146    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38147    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38148    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38149    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38150    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38151    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38152    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38153    fn get_deprecated(&self) -> bool { self.deprecated }
38154    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38155    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38156    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38157}
38158impl VirtualDeviceOptionTrait for VirtualCdromOption {
38159    fn get_type(&self) -> &str { &self.r#type }
38160    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38161    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38162    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38163    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38164    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38165    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38166    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38167    fn get_deprecated(&self) -> bool { self.deprecated }
38168    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38169    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38170    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38171}
38172impl VirtualDeviceOptionTrait for VirtualControllerOption {
38173    fn get_type(&self) -> &str { &self.r#type }
38174    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38175    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38176    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38177    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38178    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38179    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38180    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38181    fn get_deprecated(&self) -> bool { self.deprecated }
38182    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38183    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38184    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38185}
38186impl VirtualDeviceOptionTrait for VirtualIdeControllerOption {
38187    fn get_type(&self) -> &str { &self.r#type }
38188    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38189    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38190    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38191    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38192    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38193    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38194    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38195    fn get_deprecated(&self) -> bool { self.deprecated }
38196    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38197    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38198    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38199}
38200impl VirtualDeviceOptionTrait for VirtualNvdimmControllerOption {
38201    fn get_type(&self) -> &str { &self.r#type }
38202    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38203    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38204    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38205    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38206    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38207    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38208    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38209    fn get_deprecated(&self) -> bool { self.deprecated }
38210    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38211    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38212    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38213}
38214impl VirtualDeviceOptionTrait for VirtualNvmeControllerOption {
38215    fn get_type(&self) -> &str { &self.r#type }
38216    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38217    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38218    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38219    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38220    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38221    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38222    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38223    fn get_deprecated(&self) -> bool { self.deprecated }
38224    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38225    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38226    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38227}
38228impl VirtualDeviceOptionTrait for VirtualPciControllerOption {
38229    fn get_type(&self) -> &str { &self.r#type }
38230    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38231    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38232    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38233    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38234    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38235    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38236    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38237    fn get_deprecated(&self) -> bool { self.deprecated }
38238    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38239    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38240    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38241}
38242impl VirtualDeviceOptionTrait for VirtualPs2ControllerOption {
38243    fn get_type(&self) -> &str { &self.r#type }
38244    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38245    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38246    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38247    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38248    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38249    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38250    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38251    fn get_deprecated(&self) -> bool { self.deprecated }
38252    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38253    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38254    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38255}
38256impl VirtualDeviceOptionTrait for VirtualSataControllerOption {
38257    fn get_type(&self) -> &str { &self.r#type }
38258    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38259    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38260    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38261    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38262    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38263    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38264    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38265    fn get_deprecated(&self) -> bool { self.deprecated }
38266    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38267    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38268    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38269}
38270impl VirtualDeviceOptionTrait for VirtualAhciControllerOption {
38271    fn get_type(&self) -> &str { &self.r#type }
38272    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38273    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38274    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38275    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38276    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38277    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38278    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38279    fn get_deprecated(&self) -> bool { self.deprecated }
38280    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38281    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38282    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38283}
38284impl VirtualDeviceOptionTrait for VirtualScsiControllerOption {
38285    fn get_type(&self) -> &str { &self.r#type }
38286    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38287    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38288    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38289    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38290    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38291    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38292    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38293    fn get_deprecated(&self) -> bool { self.deprecated }
38294    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38295    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38296    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38297}
38298impl VirtualDeviceOptionTrait for ParaVirtualScsiControllerOption {
38299    fn get_type(&self) -> &str { &self.r#type }
38300    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38301    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38302    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38303    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38304    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38305    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38306    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38307    fn get_deprecated(&self) -> bool { self.deprecated }
38308    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38309    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38310    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38311}
38312impl VirtualDeviceOptionTrait for VirtualBusLogicControllerOption {
38313    fn get_type(&self) -> &str { &self.r#type }
38314    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38315    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38316    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38317    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38318    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38319    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38320    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38321    fn get_deprecated(&self) -> bool { self.deprecated }
38322    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38323    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38324    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38325}
38326impl VirtualDeviceOptionTrait for VirtualLsiLogicControllerOption {
38327    fn get_type(&self) -> &str { &self.r#type }
38328    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38329    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38330    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38331    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38332    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38333    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38334    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38335    fn get_deprecated(&self) -> bool { self.deprecated }
38336    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38337    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38338    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38339}
38340impl VirtualDeviceOptionTrait for VirtualLsiLogicSasControllerOption {
38341    fn get_type(&self) -> &str { &self.r#type }
38342    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38343    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38344    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38345    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38346    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38347    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38348    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38349    fn get_deprecated(&self) -> bool { self.deprecated }
38350    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38351    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38352    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38353}
38354impl VirtualDeviceOptionTrait for VirtualSioControllerOption {
38355    fn get_type(&self) -> &str { &self.r#type }
38356    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38357    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38358    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38359    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38360    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38361    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38362    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38363    fn get_deprecated(&self) -> bool { self.deprecated }
38364    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38365    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38366    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38367}
38368impl VirtualDeviceOptionTrait for VirtualUsbControllerOption {
38369    fn get_type(&self) -> &str { &self.r#type }
38370    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38371    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38372    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38373    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38374    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38375    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38376    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38377    fn get_deprecated(&self) -> bool { self.deprecated }
38378    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38379    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38380    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38381}
38382impl VirtualDeviceOptionTrait for VirtualUsbxhciControllerOption {
38383    fn get_type(&self) -> &str { &self.r#type }
38384    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38385    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38386    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38387    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38388    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38389    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38390    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38391    fn get_deprecated(&self) -> bool { self.deprecated }
38392    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38393    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38394    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38395}
38396impl VirtualDeviceOptionTrait for VirtualDiskOption {
38397    fn get_type(&self) -> &str { &self.r#type }
38398    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38399    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38400    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38401    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38402    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38403    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38404    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38405    fn get_deprecated(&self) -> bool { self.deprecated }
38406    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38407    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38408    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38409}
38410impl VirtualDeviceOptionTrait for VirtualEthernetCardOption {
38411    fn get_type(&self) -> &str { &self.r#type }
38412    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38413    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38414    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38415    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38416    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38417    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38418    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38419    fn get_deprecated(&self) -> bool { self.deprecated }
38420    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38421    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38422    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38423}
38424impl VirtualDeviceOptionTrait for VirtualE1000Option {
38425    fn get_type(&self) -> &str { &self.r#type }
38426    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38427    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38428    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38429    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38430    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38431    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38432    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38433    fn get_deprecated(&self) -> bool { self.deprecated }
38434    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38435    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38436    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38437}
38438impl VirtualDeviceOptionTrait for VirtualE1000EOption {
38439    fn get_type(&self) -> &str { &self.r#type }
38440    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38441    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38442    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38443    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38444    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38445    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38446    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38447    fn get_deprecated(&self) -> bool { self.deprecated }
38448    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38449    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38450    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38451}
38452impl VirtualDeviceOptionTrait for VirtualPcNet32Option {
38453    fn get_type(&self) -> &str { &self.r#type }
38454    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38455    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38456    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38457    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38458    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38459    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38460    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38461    fn get_deprecated(&self) -> bool { self.deprecated }
38462    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38463    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38464    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38465}
38466impl VirtualDeviceOptionTrait for VirtualSriovEthernetCardOption {
38467    fn get_type(&self) -> &str { &self.r#type }
38468    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38469    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38470    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38471    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38472    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38473    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38474    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38475    fn get_deprecated(&self) -> bool { self.deprecated }
38476    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38477    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38478    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38479}
38480impl VirtualDeviceOptionTrait for VirtualVmxnetOption {
38481    fn get_type(&self) -> &str { &self.r#type }
38482    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38483    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38484    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38485    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38486    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38487    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38488    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38489    fn get_deprecated(&self) -> bool { self.deprecated }
38490    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38491    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38492    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38493}
38494impl VirtualDeviceOptionTrait for VirtualVmxnet2Option {
38495    fn get_type(&self) -> &str { &self.r#type }
38496    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38497    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38498    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38499    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38500    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38501    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38502    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38503    fn get_deprecated(&self) -> bool { self.deprecated }
38504    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38505    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38506    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38507}
38508impl VirtualDeviceOptionTrait for VirtualVmxnet3Option {
38509    fn get_type(&self) -> &str { &self.r#type }
38510    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38511    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38512    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38513    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38514    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38515    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38516    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38517    fn get_deprecated(&self) -> bool { self.deprecated }
38518    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38519    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38520    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38521}
38522impl VirtualDeviceOptionTrait for VirtualVmxnet3VrdmaOption {
38523    fn get_type(&self) -> &str { &self.r#type }
38524    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38525    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38526    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38527    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38528    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38529    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38530    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38531    fn get_deprecated(&self) -> bool { self.deprecated }
38532    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38533    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38534    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38535}
38536impl VirtualDeviceOptionTrait for VirtualFloppyOption {
38537    fn get_type(&self) -> &str { &self.r#type }
38538    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38539    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38540    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38541    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38542    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38543    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38544    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38545    fn get_deprecated(&self) -> bool { self.deprecated }
38546    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38547    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38548    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38549}
38550impl VirtualDeviceOptionTrait for VirtualKeyboardOption {
38551    fn get_type(&self) -> &str { &self.r#type }
38552    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38553    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38554    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38555    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38556    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38557    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38558    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38559    fn get_deprecated(&self) -> bool { self.deprecated }
38560    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38561    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38562    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38563}
38564impl VirtualDeviceOptionTrait for VirtualNvdimmOption {
38565    fn get_type(&self) -> &str { &self.r#type }
38566    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38567    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38568    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38569    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38570    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38571    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38572    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38573    fn get_deprecated(&self) -> bool { self.deprecated }
38574    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38575    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38576    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38577}
38578impl VirtualDeviceOptionTrait for VirtualPciPassthroughOption {
38579    fn get_type(&self) -> &str { &self.r#type }
38580    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38581    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38582    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38583    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38584    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38585    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38586    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38587    fn get_deprecated(&self) -> bool { self.deprecated }
38588    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38589    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38590    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38591}
38592impl VirtualDeviceOptionTrait for VirtualParallelPortOption {
38593    fn get_type(&self) -> &str { &self.r#type }
38594    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38595    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38596    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38597    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38598    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38599    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38600    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38601    fn get_deprecated(&self) -> bool { self.deprecated }
38602    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38603    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38604    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38605}
38606impl VirtualDeviceOptionTrait for VirtualPointingDeviceOption {
38607    fn get_type(&self) -> &str { &self.r#type }
38608    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38609    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38610    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38611    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38612    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38613    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38614    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38615    fn get_deprecated(&self) -> bool { self.deprecated }
38616    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38617    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38618    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38619}
38620impl VirtualDeviceOptionTrait for VirtualPrecisionClockOption {
38621    fn get_type(&self) -> &str { &self.r#type }
38622    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38623    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38624    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38625    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38626    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38627    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38628    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38629    fn get_deprecated(&self) -> bool { self.deprecated }
38630    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38631    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38632    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38633}
38634impl VirtualDeviceOptionTrait for VirtualScsiPassthroughOption {
38635    fn get_type(&self) -> &str { &self.r#type }
38636    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38637    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38638    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38639    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38640    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38641    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38642    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38643    fn get_deprecated(&self) -> bool { self.deprecated }
38644    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38645    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38646    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38647}
38648impl VirtualDeviceOptionTrait for VirtualSerialPortOption {
38649    fn get_type(&self) -> &str { &self.r#type }
38650    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38651    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38652    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38653    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38654    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38655    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38656    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38657    fn get_deprecated(&self) -> bool { self.deprecated }
38658    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38659    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38660    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38661}
38662impl VirtualDeviceOptionTrait for VirtualSoundCardOption {
38663    fn get_type(&self) -> &str { &self.r#type }
38664    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38665    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38666    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38667    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38668    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38669    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38670    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38671    fn get_deprecated(&self) -> bool { self.deprecated }
38672    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38673    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38674    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38675}
38676impl VirtualDeviceOptionTrait for VirtualEnsoniq1371Option {
38677    fn get_type(&self) -> &str { &self.r#type }
38678    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38679    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38680    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38681    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38682    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38683    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38684    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38685    fn get_deprecated(&self) -> bool { self.deprecated }
38686    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38687    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38688    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38689}
38690impl VirtualDeviceOptionTrait for VirtualHdAudioCardOption {
38691    fn get_type(&self) -> &str { &self.r#type }
38692    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38693    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38694    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38695    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38696    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38697    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38698    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38699    fn get_deprecated(&self) -> bool { self.deprecated }
38700    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38701    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38702    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38703}
38704impl VirtualDeviceOptionTrait for VirtualSoundBlaster16Option {
38705    fn get_type(&self) -> &str { &self.r#type }
38706    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38707    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38708    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38709    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38710    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38711    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38712    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38713    fn get_deprecated(&self) -> bool { self.deprecated }
38714    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38715    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38716    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38717}
38718impl VirtualDeviceOptionTrait for VirtualTpmOption {
38719    fn get_type(&self) -> &str { &self.r#type }
38720    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38721    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38722    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38723    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38724    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38725    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38726    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38727    fn get_deprecated(&self) -> bool { self.deprecated }
38728    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38729    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38730    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38731}
38732impl VirtualDeviceOptionTrait for VirtualUsbOption {
38733    fn get_type(&self) -> &str { &self.r#type }
38734    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38735    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38736    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38737    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38738    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38739    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38740    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38741    fn get_deprecated(&self) -> bool { self.deprecated }
38742    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38743    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38744    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38745}
38746impl VirtualDeviceOptionTrait for VirtualMachineVmciDeviceOption {
38747    fn get_type(&self) -> &str { &self.r#type }
38748    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38749    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38750    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38751    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38752    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38753    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38754    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38755    fn get_deprecated(&self) -> bool { self.deprecated }
38756    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38757    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38758    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38759}
38760impl VirtualDeviceOptionTrait for VirtualVmiromOption {
38761    fn get_type(&self) -> &str { &self.r#type }
38762    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38763    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38764    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38765    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38766    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38767    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38768    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38769    fn get_deprecated(&self) -> bool { self.deprecated }
38770    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38771    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38772    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38773}
38774impl VirtualDeviceOptionTrait for VirtualVideoCardOption {
38775    fn get_type(&self) -> &str { &self.r#type }
38776    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38777    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38778    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38779    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38780    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38781    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38782    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38783    fn get_deprecated(&self) -> bool { self.deprecated }
38784    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38785    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38786    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38787}
38788impl VirtualDeviceOptionTrait for VirtualWdtOption {
38789    fn get_type(&self) -> &str { &self.r#type }
38790    fn get_connect_option(&self) -> &Option<super::structs::VirtualDeviceConnectOption> { &self.connect_option }
38791    fn get_bus_slot_option(&self) -> &Option<super::structs::VirtualDeviceBusSlotOption> { &self.bus_slot_option }
38792    fn get_controller_type(&self) -> &Option<String> { &self.controller_type }
38793    fn get_auto_assign_controller(&self) -> &Option<super::structs::BoolOption> { &self.auto_assign_controller }
38794    fn get_backing_option(&self) -> &Option<Vec<Box<dyn super::traits::VirtualDeviceBackingOptionTrait>>> { &self.backing_option }
38795    fn get_default_backing_option_index(&self) -> Option<i32> { self.default_backing_option_index }
38796    fn get_licensing_limit(&self) -> &Option<Vec<String>> { &self.licensing_limit }
38797    fn get_deprecated(&self) -> bool { self.deprecated }
38798    fn get_plug_and_play(&self) -> bool { self.plug_and_play }
38799    fn get_hot_remove_supported(&self) -> bool { self.hot_remove_supported }
38800    fn get_numa_supported(&self) -> Option<bool> { self.numa_supported }
38801}
38802impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceOptionTrait {
38803    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
38804        let data_type = from.data_type();
38805        match data_type {
38806            StructType::VirtualDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceOption>()?),
38807            StructType::VirtualCdromOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromOption>()?),
38808            StructType::VirtualControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualControllerOption>()?),
38809            StructType::VirtualIdeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualIdeControllerOption>()?),
38810            StructType::VirtualNvdimmControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmControllerOption>()?),
38811            StructType::VirtualNvmeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvmeControllerOption>()?),
38812            StructType::VirtualPciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPciControllerOption>()?),
38813            StructType::VirtualPs2ControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPs2ControllerOption>()?),
38814            StructType::VirtualSataControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSataControllerOption>()?),
38815            StructType::VirtualAhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualAhciControllerOption>()?),
38816            StructType::VirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiControllerOption>()?),
38817            StructType::ParaVirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiControllerOption>()?),
38818            StructType::VirtualBusLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicControllerOption>()?),
38819            StructType::VirtualLsiLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicControllerOption>()?),
38820            StructType::VirtualLsiLogicSasControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasControllerOption>()?),
38821            StructType::VirtualSioControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSioControllerOption>()?),
38822            StructType::VirtualUsbControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerOption>()?),
38823            StructType::VirtualUsbxhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciControllerOption>()?),
38824            StructType::VirtualDiskOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskOption>()?),
38825            StructType::VirtualEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOption>()?),
38826            StructType::VirtualE1000Option => Some(from.as_any_ref().downcast_ref::<VirtualE1000Option>()?),
38827            StructType::VirtualE1000EOption => Some(from.as_any_ref().downcast_ref::<VirtualE1000EOption>()?),
38828            StructType::VirtualPcNet32Option => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32Option>()?),
38829            StructType::VirtualSriovEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardOption>()?),
38830            StructType::VirtualVmxnetOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnetOption>()?),
38831            StructType::VirtualVmxnet2Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2Option>()?),
38832            StructType::VirtualVmxnet3Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Option>()?),
38833            StructType::VirtualVmxnet3VrdmaOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3VrdmaOption>()?),
38834            StructType::VirtualFloppyOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyOption>()?),
38835            StructType::VirtualKeyboardOption => Some(from.as_any_ref().downcast_ref::<VirtualKeyboardOption>()?),
38836            StructType::VirtualNvdimmOption => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmOption>()?),
38837            StructType::VirtualPciPassthroughOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughOption>()?),
38838            StructType::VirtualParallelPortOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortOption>()?),
38839            StructType::VirtualPointingDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceOption>()?),
38840            StructType::VirtualPrecisionClockOption => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockOption>()?),
38841            StructType::VirtualScsiPassthroughOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughOption>()?),
38842            StructType::VirtualSerialPortOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortOption>()?),
38843            StructType::VirtualSoundCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardOption>()?),
38844            StructType::VirtualEnsoniq1371Option => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371Option>()?),
38845            StructType::VirtualHdAudioCardOption => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCardOption>()?),
38846            StructType::VirtualSoundBlaster16Option => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16Option>()?),
38847            StructType::VirtualTpmOption => Some(from.as_any_ref().downcast_ref::<VirtualTpmOption>()?),
38848            StructType::VirtualUsbOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbOption>()?),
38849            StructType::VirtualMachineVmciDeviceOption => Some(from.as_any_ref().downcast_ref::<VirtualMachineVmciDeviceOption>()?),
38850            StructType::VirtualVmiromOption => Some(from.as_any_ref().downcast_ref::<VirtualVmiromOption>()?),
38851            StructType::VirtualVideoCardOption => Some(from.as_any_ref().downcast_ref::<VirtualVideoCardOption>()?),
38852            StructType::VirtualWdtOption => Some(from.as_any_ref().downcast_ref::<VirtualWdtOption>()?),
38853            _ => None,
38854        }
38855    }
38856    
38857    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
38858        let data_type = from.data_type();
38859        match data_type {
38860            StructType::VirtualDeviceOption => Ok(from.as_any_box().downcast::<VirtualDeviceOption>()?),
38861            StructType::VirtualCdromOption => Ok(from.as_any_box().downcast::<VirtualCdromOption>()?),
38862            StructType::VirtualControllerOption => Ok(from.as_any_box().downcast::<VirtualControllerOption>()?),
38863            StructType::VirtualIdeControllerOption => Ok(from.as_any_box().downcast::<VirtualIdeControllerOption>()?),
38864            StructType::VirtualNvdimmControllerOption => Ok(from.as_any_box().downcast::<VirtualNvdimmControllerOption>()?),
38865            StructType::VirtualNvmeControllerOption => Ok(from.as_any_box().downcast::<VirtualNvmeControllerOption>()?),
38866            StructType::VirtualPciControllerOption => Ok(from.as_any_box().downcast::<VirtualPciControllerOption>()?),
38867            StructType::VirtualPs2ControllerOption => Ok(from.as_any_box().downcast::<VirtualPs2ControllerOption>()?),
38868            StructType::VirtualSataControllerOption => Ok(from.as_any_box().downcast::<VirtualSataControllerOption>()?),
38869            StructType::VirtualAhciControllerOption => Ok(from.as_any_box().downcast::<VirtualAhciControllerOption>()?),
38870            StructType::VirtualScsiControllerOption => Ok(from.as_any_box().downcast::<VirtualScsiControllerOption>()?),
38871            StructType::ParaVirtualScsiControllerOption => Ok(from.as_any_box().downcast::<ParaVirtualScsiControllerOption>()?),
38872            StructType::VirtualBusLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualBusLogicControllerOption>()?),
38873            StructType::VirtualLsiLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicControllerOption>()?),
38874            StructType::VirtualLsiLogicSasControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasControllerOption>()?),
38875            StructType::VirtualSioControllerOption => Ok(from.as_any_box().downcast::<VirtualSioControllerOption>()?),
38876            StructType::VirtualUsbControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbControllerOption>()?),
38877            StructType::VirtualUsbxhciControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbxhciControllerOption>()?),
38878            StructType::VirtualDiskOption => Ok(from.as_any_box().downcast::<VirtualDiskOption>()?),
38879            StructType::VirtualEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardOption>()?),
38880            StructType::VirtualE1000Option => Ok(from.as_any_box().downcast::<VirtualE1000Option>()?),
38881            StructType::VirtualE1000EOption => Ok(from.as_any_box().downcast::<VirtualE1000EOption>()?),
38882            StructType::VirtualPcNet32Option => Ok(from.as_any_box().downcast::<VirtualPcNet32Option>()?),
38883            StructType::VirtualSriovEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardOption>()?),
38884            StructType::VirtualVmxnetOption => Ok(from.as_any_box().downcast::<VirtualVmxnetOption>()?),
38885            StructType::VirtualVmxnet2Option => Ok(from.as_any_box().downcast::<VirtualVmxnet2Option>()?),
38886            StructType::VirtualVmxnet3Option => Ok(from.as_any_box().downcast::<VirtualVmxnet3Option>()?),
38887            StructType::VirtualVmxnet3VrdmaOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3VrdmaOption>()?),
38888            StructType::VirtualFloppyOption => Ok(from.as_any_box().downcast::<VirtualFloppyOption>()?),
38889            StructType::VirtualKeyboardOption => Ok(from.as_any_box().downcast::<VirtualKeyboardOption>()?),
38890            StructType::VirtualNvdimmOption => Ok(from.as_any_box().downcast::<VirtualNvdimmOption>()?),
38891            StructType::VirtualPciPassthroughOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughOption>()?),
38892            StructType::VirtualParallelPortOption => Ok(from.as_any_box().downcast::<VirtualParallelPortOption>()?),
38893            StructType::VirtualPointingDeviceOption => Ok(from.as_any_box().downcast::<VirtualPointingDeviceOption>()?),
38894            StructType::VirtualPrecisionClockOption => Ok(from.as_any_box().downcast::<VirtualPrecisionClockOption>()?),
38895            StructType::VirtualScsiPassthroughOption => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughOption>()?),
38896            StructType::VirtualSerialPortOption => Ok(from.as_any_box().downcast::<VirtualSerialPortOption>()?),
38897            StructType::VirtualSoundCardOption => Ok(from.as_any_box().downcast::<VirtualSoundCardOption>()?),
38898            StructType::VirtualEnsoniq1371Option => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371Option>()?),
38899            StructType::VirtualHdAudioCardOption => Ok(from.as_any_box().downcast::<VirtualHdAudioCardOption>()?),
38900            StructType::VirtualSoundBlaster16Option => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16Option>()?),
38901            StructType::VirtualTpmOption => Ok(from.as_any_box().downcast::<VirtualTpmOption>()?),
38902            StructType::VirtualUsbOption => Ok(from.as_any_box().downcast::<VirtualUsbOption>()?),
38903            StructType::VirtualMachineVmciDeviceOption => Ok(from.as_any_box().downcast::<VirtualMachineVmciDeviceOption>()?),
38904            StructType::VirtualVmiromOption => Ok(from.as_any_box().downcast::<VirtualVmiromOption>()?),
38905            StructType::VirtualVideoCardOption => Ok(from.as_any_box().downcast::<VirtualVideoCardOption>()?),
38906            StructType::VirtualWdtOption => Ok(from.as_any_box().downcast::<VirtualWdtOption>()?),
38907            _ => Err(from.as_any_box()),
38908        }
38909    }
38910}
38911/// The VirtualControllerOption data object type contains information about
38912/// a virtual controller type.
38913pub trait VirtualControllerOptionTrait : super::traits::VirtualDeviceOptionTrait {
38914    /// The minimum and maximum number of devices this controller can control
38915    /// at run time.
38916    fn get_devices(&self) -> &super::structs::IntOption;
38917    /// Array of supported device options for this controller.
38918    fn get_supported_device(&self) -> &Option<Vec<String>>;
38919}
38920impl<'s> serde::Serialize for dyn VirtualControllerOptionTrait + 's {
38921            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
38922            where
38923                S: serde::Serializer,
38924            {
38925                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
38926            }
38927        }
38928impl<'de> serde::Deserialize<'de> for Box<dyn VirtualControllerOptionTrait> {
38929            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
38930                deserializer.deserialize_map(VirtualControllerOptionVisitor)
38931            }
38932        }
38933
38934struct VirtualControllerOptionVisitor;
38935
38936impl<'de> de::Visitor<'de> for VirtualControllerOptionVisitor {
38937    type Value = Box<dyn VirtualControllerOptionTrait>;
38938
38939    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
38940        formatter.write_str("a valid VirtualControllerOptionTrait JSON object with a _typeName field")
38941    }
38942
38943    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
38944    where
38945        A: de::MapAccess<'de>,
38946    {
38947        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
38948        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
38949        match any {
38950            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
38951                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
38952            VimAny::Value(value) => Err(de::Error::custom(format!(
38953                "expected object not wrapped value: {:?}",
38954                value))),
38955        }
38956    }
38957}
38958
38959impl VirtualControllerOptionTrait for VirtualControllerOption {
38960    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38961    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38962}
38963impl VirtualControllerOptionTrait for VirtualIdeControllerOption {
38964    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38965    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38966}
38967impl VirtualControllerOptionTrait for VirtualNvdimmControllerOption {
38968    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38969    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38970}
38971impl VirtualControllerOptionTrait for VirtualNvmeControllerOption {
38972    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38973    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38974}
38975impl VirtualControllerOptionTrait for VirtualPciControllerOption {
38976    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38977    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38978}
38979impl VirtualControllerOptionTrait for VirtualPs2ControllerOption {
38980    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38981    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38982}
38983impl VirtualControllerOptionTrait for VirtualSataControllerOption {
38984    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38985    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38986}
38987impl VirtualControllerOptionTrait for VirtualAhciControllerOption {
38988    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38989    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38990}
38991impl VirtualControllerOptionTrait for VirtualScsiControllerOption {
38992    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38993    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38994}
38995impl VirtualControllerOptionTrait for ParaVirtualScsiControllerOption {
38996    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
38997    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
38998}
38999impl VirtualControllerOptionTrait for VirtualBusLogicControllerOption {
39000    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39001    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39002}
39003impl VirtualControllerOptionTrait for VirtualLsiLogicControllerOption {
39004    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39005    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39006}
39007impl VirtualControllerOptionTrait for VirtualLsiLogicSasControllerOption {
39008    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39009    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39010}
39011impl VirtualControllerOptionTrait for VirtualSioControllerOption {
39012    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39013    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39014}
39015impl VirtualControllerOptionTrait for VirtualUsbControllerOption {
39016    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39017    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39018}
39019impl VirtualControllerOptionTrait for VirtualUsbxhciControllerOption {
39020    fn get_devices(&self) -> &super::structs::IntOption { &self.devices }
39021    fn get_supported_device(&self) -> &Option<Vec<String>> { &self.supported_device }
39022}
39023impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualControllerOptionTrait {
39024    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39025        let data_type = from.data_type();
39026        match data_type {
39027            StructType::VirtualControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualControllerOption>()?),
39028            StructType::VirtualIdeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualIdeControllerOption>()?),
39029            StructType::VirtualNvdimmControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvdimmControllerOption>()?),
39030            StructType::VirtualNvmeControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualNvmeControllerOption>()?),
39031            StructType::VirtualPciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPciControllerOption>()?),
39032            StructType::VirtualPs2ControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualPs2ControllerOption>()?),
39033            StructType::VirtualSataControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSataControllerOption>()?),
39034            StructType::VirtualAhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualAhciControllerOption>()?),
39035            StructType::VirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiControllerOption>()?),
39036            StructType::ParaVirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiControllerOption>()?),
39037            StructType::VirtualBusLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicControllerOption>()?),
39038            StructType::VirtualLsiLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicControllerOption>()?),
39039            StructType::VirtualLsiLogicSasControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasControllerOption>()?),
39040            StructType::VirtualSioControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSioControllerOption>()?),
39041            StructType::VirtualUsbControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbControllerOption>()?),
39042            StructType::VirtualUsbxhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbxhciControllerOption>()?),
39043            _ => None,
39044        }
39045    }
39046    
39047    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39048        let data_type = from.data_type();
39049        match data_type {
39050            StructType::VirtualControllerOption => Ok(from.as_any_box().downcast::<VirtualControllerOption>()?),
39051            StructType::VirtualIdeControllerOption => Ok(from.as_any_box().downcast::<VirtualIdeControllerOption>()?),
39052            StructType::VirtualNvdimmControllerOption => Ok(from.as_any_box().downcast::<VirtualNvdimmControllerOption>()?),
39053            StructType::VirtualNvmeControllerOption => Ok(from.as_any_box().downcast::<VirtualNvmeControllerOption>()?),
39054            StructType::VirtualPciControllerOption => Ok(from.as_any_box().downcast::<VirtualPciControllerOption>()?),
39055            StructType::VirtualPs2ControllerOption => Ok(from.as_any_box().downcast::<VirtualPs2ControllerOption>()?),
39056            StructType::VirtualSataControllerOption => Ok(from.as_any_box().downcast::<VirtualSataControllerOption>()?),
39057            StructType::VirtualAhciControllerOption => Ok(from.as_any_box().downcast::<VirtualAhciControllerOption>()?),
39058            StructType::VirtualScsiControllerOption => Ok(from.as_any_box().downcast::<VirtualScsiControllerOption>()?),
39059            StructType::ParaVirtualScsiControllerOption => Ok(from.as_any_box().downcast::<ParaVirtualScsiControllerOption>()?),
39060            StructType::VirtualBusLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualBusLogicControllerOption>()?),
39061            StructType::VirtualLsiLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicControllerOption>()?),
39062            StructType::VirtualLsiLogicSasControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasControllerOption>()?),
39063            StructType::VirtualSioControllerOption => Ok(from.as_any_box().downcast::<VirtualSioControllerOption>()?),
39064            StructType::VirtualUsbControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbControllerOption>()?),
39065            StructType::VirtualUsbxhciControllerOption => Ok(from.as_any_box().downcast::<VirtualUsbxhciControllerOption>()?),
39066            _ => Err(from.as_any_box()),
39067        }
39068    }
39069}
39070/// The VirtualSATAControllerOption data object type contains the options
39071/// for a virtual SATA controller defined by the
39072/// *VirtualSATAController*
39073/// data object type.
39074pub trait VirtualSataControllerOptionTrait : super::traits::VirtualControllerOptionTrait {
39075    /// Three properties (numSATADisks.min, numSATADisks.max, and
39076    /// numSATADisks.defaultValue) define the minimum, maximum, and default
39077    /// number of SATA VirtualDisk instances available at any given time in the
39078    /// SATA controller.
39079    /// 
39080    /// The number of SATA VirtualDisk instances is
39081    /// also limited by the number of available slots in the SATA controller.
39082    fn get_num_sata_disks(&self) -> &super::structs::IntOption;
39083    /// Three properties (numSATACdroms.min, numSATACdroms.max, and
39084    /// numSATACdroms.defaultValue) define the minimum, maximum, and default
39085    /// number of SATA VirtualCdrom instances available
39086    /// in the SATA controller.
39087    /// 
39088    /// The number of SATA VirtualCdrom instances is
39089    /// also limited by the number of available slots in the SATA controller.
39090    fn get_num_sata_cdroms(&self) -> &super::structs::IntOption;
39091}
39092impl<'s> serde::Serialize for dyn VirtualSataControllerOptionTrait + 's {
39093            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39094            where
39095                S: serde::Serializer,
39096            {
39097                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39098            }
39099        }
39100impl<'de> serde::Deserialize<'de> for Box<dyn VirtualSataControllerOptionTrait> {
39101            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39102                deserializer.deserialize_map(VirtualSataControllerOptionVisitor)
39103            }
39104        }
39105
39106struct VirtualSataControllerOptionVisitor;
39107
39108impl<'de> de::Visitor<'de> for VirtualSataControllerOptionVisitor {
39109    type Value = Box<dyn VirtualSataControllerOptionTrait>;
39110
39111    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39112        formatter.write_str("a valid VirtualSataControllerOptionTrait JSON object with a _typeName field")
39113    }
39114
39115    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39116    where
39117        A: de::MapAccess<'de>,
39118    {
39119        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39120        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39121        match any {
39122            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39123                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39124            VimAny::Value(value) => Err(de::Error::custom(format!(
39125                "expected object not wrapped value: {:?}",
39126                value))),
39127        }
39128    }
39129}
39130
39131impl VirtualSataControllerOptionTrait for VirtualSataControllerOption {
39132    fn get_num_sata_disks(&self) -> &super::structs::IntOption { &self.num_sata_disks }
39133    fn get_num_sata_cdroms(&self) -> &super::structs::IntOption { &self.num_sata_cdroms }
39134}
39135impl VirtualSataControllerOptionTrait for VirtualAhciControllerOption {
39136    fn get_num_sata_disks(&self) -> &super::structs::IntOption { &self.num_sata_disks }
39137    fn get_num_sata_cdroms(&self) -> &super::structs::IntOption { &self.num_sata_cdroms }
39138}
39139impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualSataControllerOptionTrait {
39140    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39141        let data_type = from.data_type();
39142        match data_type {
39143            StructType::VirtualSataControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualSataControllerOption>()?),
39144            StructType::VirtualAhciControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualAhciControllerOption>()?),
39145            _ => None,
39146        }
39147    }
39148    
39149    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39150        let data_type = from.data_type();
39151        match data_type {
39152            StructType::VirtualSataControllerOption => Ok(from.as_any_box().downcast::<VirtualSataControllerOption>()?),
39153            StructType::VirtualAhciControllerOption => Ok(from.as_any_box().downcast::<VirtualAhciControllerOption>()?),
39154            _ => Err(from.as_any_box()),
39155        }
39156    }
39157}
39158/// The VirtualSCSIControllerOption data object type contains the options
39159/// for a virtual SCSI controller defined by the
39160/// *VirtualSCSIController*
39161/// data object type.
39162pub trait VirtualScsiControllerOptionTrait : super::traits::VirtualControllerOptionTrait {
39163    /// Three properties (numSCSIDisks.min, numSCSIDisks.max, and
39164    /// numSCSIDisks.defaultValue) define the minimum, maximum, and default
39165    /// number of SCSI VirtualDisk instances available at any given time in the
39166    /// SCSI controller.
39167    /// 
39168    /// The number of SCSI VirtualDisk instances is
39169    /// also limited by the number of available slots in the SCSI controller.
39170    fn get_num_scsi_disks(&self) -> &super::structs::IntOption;
39171    /// Three properties (numSCSICdroms.min, numSCSICdroms.max, and
39172    /// numSCSICdroms.defaultValue) define the minimum, maximum, and default
39173    /// number of SCSI VirtualCdrom instances available
39174    /// in the SCSI controller.
39175    /// 
39176    /// The number of SCSI VirtualCdrom instances is
39177    /// also limited by the number of available slots in the SCSI controller.
39178    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption;
39179    /// Three properties (numSCSIPassthrough.min, numSCSIPassthrough.max, and
39180    /// numSCSIPassthrough.defaultValue) define the minimum, maximum, and
39181    /// default number of VirtualSCSIPassthrough instances available
39182    /// have at any given time in the SCSI controller.
39183    /// 
39184    /// The number of
39185    /// VirtualSCSIPassthrough instances is also limited by the number of
39186    /// available slots in the SCSI controller.
39187    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption;
39188    /// Supported shared bus modes.
39189    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum>;
39190    /// Index into sharing array specifying the default value.
39191    fn get_default_shared_index(&self) -> i32;
39192    /// All SCSI controllers support hot adding and removing of devices.
39193    /// 
39194    /// This
39195    /// support can't be toggled in the current implementation. Therefore, this
39196    /// option is ignored when reconfiguring a SCSI controller and is always set
39197    /// to "true" when reading an existing configuration.
39198    fn get_hot_add_remove(&self) -> &super::structs::BoolOption;
39199    /// The unit number of the SCSI controller.
39200    /// 
39201    /// The SCSI controller sits on its
39202    /// own bus, so that this field defines which slot the controller will use.
39203    fn get_scsi_ctlr_unit_number(&self) -> i32;
39204}
39205impl<'s> serde::Serialize for dyn VirtualScsiControllerOptionTrait + 's {
39206            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39207            where
39208                S: serde::Serializer,
39209            {
39210                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39211            }
39212        }
39213impl<'de> serde::Deserialize<'de> for Box<dyn VirtualScsiControllerOptionTrait> {
39214            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39215                deserializer.deserialize_map(VirtualScsiControllerOptionVisitor)
39216            }
39217        }
39218
39219struct VirtualScsiControllerOptionVisitor;
39220
39221impl<'de> de::Visitor<'de> for VirtualScsiControllerOptionVisitor {
39222    type Value = Box<dyn VirtualScsiControllerOptionTrait>;
39223
39224    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39225        formatter.write_str("a valid VirtualScsiControllerOptionTrait JSON object with a _typeName field")
39226    }
39227
39228    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39229    where
39230        A: de::MapAccess<'de>,
39231    {
39232        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39233        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39234        match any {
39235            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39236                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39237            VimAny::Value(value) => Err(de::Error::custom(format!(
39238                "expected object not wrapped value: {:?}",
39239                value))),
39240        }
39241    }
39242}
39243
39244impl VirtualScsiControllerOptionTrait for VirtualScsiControllerOption {
39245    fn get_num_scsi_disks(&self) -> &super::structs::IntOption { &self.num_scsi_disks }
39246    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption { &self.num_scsi_cdroms }
39247    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption { &self.num_scsi_passthrough }
39248    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum> { &self.sharing }
39249    fn get_default_shared_index(&self) -> i32 { self.default_shared_index }
39250    fn get_hot_add_remove(&self) -> &super::structs::BoolOption { &self.hot_add_remove }
39251    fn get_scsi_ctlr_unit_number(&self) -> i32 { self.scsi_ctlr_unit_number }
39252}
39253impl VirtualScsiControllerOptionTrait for ParaVirtualScsiControllerOption {
39254    fn get_num_scsi_disks(&self) -> &super::structs::IntOption { &self.num_scsi_disks }
39255    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption { &self.num_scsi_cdroms }
39256    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption { &self.num_scsi_passthrough }
39257    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum> { &self.sharing }
39258    fn get_default_shared_index(&self) -> i32 { self.default_shared_index }
39259    fn get_hot_add_remove(&self) -> &super::structs::BoolOption { &self.hot_add_remove }
39260    fn get_scsi_ctlr_unit_number(&self) -> i32 { self.scsi_ctlr_unit_number }
39261}
39262impl VirtualScsiControllerOptionTrait for VirtualBusLogicControllerOption {
39263    fn get_num_scsi_disks(&self) -> &super::structs::IntOption { &self.num_scsi_disks }
39264    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption { &self.num_scsi_cdroms }
39265    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption { &self.num_scsi_passthrough }
39266    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum> { &self.sharing }
39267    fn get_default_shared_index(&self) -> i32 { self.default_shared_index }
39268    fn get_hot_add_remove(&self) -> &super::structs::BoolOption { &self.hot_add_remove }
39269    fn get_scsi_ctlr_unit_number(&self) -> i32 { self.scsi_ctlr_unit_number }
39270}
39271impl VirtualScsiControllerOptionTrait for VirtualLsiLogicControllerOption {
39272    fn get_num_scsi_disks(&self) -> &super::structs::IntOption { &self.num_scsi_disks }
39273    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption { &self.num_scsi_cdroms }
39274    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption { &self.num_scsi_passthrough }
39275    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum> { &self.sharing }
39276    fn get_default_shared_index(&self) -> i32 { self.default_shared_index }
39277    fn get_hot_add_remove(&self) -> &super::structs::BoolOption { &self.hot_add_remove }
39278    fn get_scsi_ctlr_unit_number(&self) -> i32 { self.scsi_ctlr_unit_number }
39279}
39280impl VirtualScsiControllerOptionTrait for VirtualLsiLogicSasControllerOption {
39281    fn get_num_scsi_disks(&self) -> &super::structs::IntOption { &self.num_scsi_disks }
39282    fn get_num_scsi_cdroms(&self) -> &super::structs::IntOption { &self.num_scsi_cdroms }
39283    fn get_num_scsi_passthrough(&self) -> &super::structs::IntOption { &self.num_scsi_passthrough }
39284    fn get_sharing(&self) -> &Vec<super::enums::VirtualScsiSharingEnum> { &self.sharing }
39285    fn get_default_shared_index(&self) -> i32 { self.default_shared_index }
39286    fn get_hot_add_remove(&self) -> &super::structs::BoolOption { &self.hot_add_remove }
39287    fn get_scsi_ctlr_unit_number(&self) -> i32 { self.scsi_ctlr_unit_number }
39288}
39289impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualScsiControllerOptionTrait {
39290    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39291        let data_type = from.data_type();
39292        match data_type {
39293            StructType::VirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiControllerOption>()?),
39294            StructType::ParaVirtualScsiControllerOption => Some(from.as_any_ref().downcast_ref::<ParaVirtualScsiControllerOption>()?),
39295            StructType::VirtualBusLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualBusLogicControllerOption>()?),
39296            StructType::VirtualLsiLogicControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicControllerOption>()?),
39297            StructType::VirtualLsiLogicSasControllerOption => Some(from.as_any_ref().downcast_ref::<VirtualLsiLogicSasControllerOption>()?),
39298            _ => None,
39299        }
39300    }
39301    
39302    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39303        let data_type = from.data_type();
39304        match data_type {
39305            StructType::VirtualScsiControllerOption => Ok(from.as_any_box().downcast::<VirtualScsiControllerOption>()?),
39306            StructType::ParaVirtualScsiControllerOption => Ok(from.as_any_box().downcast::<ParaVirtualScsiControllerOption>()?),
39307            StructType::VirtualBusLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualBusLogicControllerOption>()?),
39308            StructType::VirtualLsiLogicControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicControllerOption>()?),
39309            StructType::VirtualLsiLogicSasControllerOption => Ok(from.as_any_box().downcast::<VirtualLsiLogicSasControllerOption>()?),
39310            _ => Err(from.as_any_box()),
39311        }
39312    }
39313}
39314/// This data object type contains the options for the
39315/// virtual ethernet card data object type.
39316pub trait VirtualEthernetCardOptionTrait : super::traits::VirtualDeviceOptionTrait {
39317    /// The valid Organizational Unique Identifiers (OUIs)
39318    /// supported by this virtual Ethernet card.
39319    /// 
39320    /// <dl>
39321    /// <dt>Supported OUIs for statically assigned MAC addresses:</dt>
39322    /// <dd>"00:50:56"</dd>
39323    /// </dl>
39324    fn get_supported_oui(&self) -> &super::structs::ChoiceOption;
39325    /// The supported MAC address types.
39326    fn get_mac_type(&self) -> &super::structs::ChoiceOption;
39327    /// Flag to indicate whether or not wake-on-LAN is settable on this device.
39328    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption;
39329    /// Deprecated as of vSphere API 8.0. VMDirectPath Gen 2 is no longer supported and
39330    /// there is no replacement.
39331    /// 
39332    /// Flag to indicate whether VMDirectPath Gen 2 is available on this device.
39333    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool>;
39334    /// Deprecated as of vSphere API 8.0. VMDirectPath Gen 2 is no longer supported and
39335    /// there is no replacement.
39336    /// 
39337    /// Flag to indicate whether Universal Pass-through(UPT) is settable on this device.
39338    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption>;
39339}
39340impl<'s> serde::Serialize for dyn VirtualEthernetCardOptionTrait + 's {
39341            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39342            where
39343                S: serde::Serializer,
39344            {
39345                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39346            }
39347        }
39348impl<'de> serde::Deserialize<'de> for Box<dyn VirtualEthernetCardOptionTrait> {
39349            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39350                deserializer.deserialize_map(VirtualEthernetCardOptionVisitor)
39351            }
39352        }
39353
39354struct VirtualEthernetCardOptionVisitor;
39355
39356impl<'de> de::Visitor<'de> for VirtualEthernetCardOptionVisitor {
39357    type Value = Box<dyn VirtualEthernetCardOptionTrait>;
39358
39359    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39360        formatter.write_str("a valid VirtualEthernetCardOptionTrait JSON object with a _typeName field")
39361    }
39362
39363    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39364    where
39365        A: de::MapAccess<'de>,
39366    {
39367        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39368        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39369        match any {
39370            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39371                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39372            VimAny::Value(value) => Err(de::Error::custom(format!(
39373                "expected object not wrapped value: {:?}",
39374                value))),
39375        }
39376    }
39377}
39378
39379impl VirtualEthernetCardOptionTrait for VirtualEthernetCardOption {
39380    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39381    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39382    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39383    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39384    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39385}
39386impl VirtualEthernetCardOptionTrait for VirtualE1000Option {
39387    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39388    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39389    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39390    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39391    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39392}
39393impl VirtualEthernetCardOptionTrait for VirtualE1000EOption {
39394    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39395    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39396    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39397    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39398    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39399}
39400impl VirtualEthernetCardOptionTrait for VirtualPcNet32Option {
39401    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39402    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39403    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39404    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39405    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39406}
39407impl VirtualEthernetCardOptionTrait for VirtualSriovEthernetCardOption {
39408    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39409    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39410    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39411    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39412    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39413}
39414impl VirtualEthernetCardOptionTrait for VirtualVmxnetOption {
39415    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39416    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39417    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39418    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39419    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39420}
39421impl VirtualEthernetCardOptionTrait for VirtualVmxnet2Option {
39422    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39423    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39424    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39425    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39426    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39427}
39428impl VirtualEthernetCardOptionTrait for VirtualVmxnet3Option {
39429    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39430    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39431    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39432    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39433    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39434}
39435impl VirtualEthernetCardOptionTrait for VirtualVmxnet3VrdmaOption {
39436    fn get_supported_oui(&self) -> &super::structs::ChoiceOption { &self.supported_oui }
39437    fn get_mac_type(&self) -> &super::structs::ChoiceOption { &self.mac_type }
39438    fn get_wake_on_lan_enabled(&self) -> &super::structs::BoolOption { &self.wake_on_lan_enabled }
39439    fn get_vm_direct_path_gen_2_supported(&self) -> Option<bool> { self.vm_direct_path_gen_2_supported }
39440    fn get_upt_compatibility_enabled(&self) -> &Option<super::structs::BoolOption> { &self.upt_compatibility_enabled }
39441}
39442impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualEthernetCardOptionTrait {
39443    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39444        let data_type = from.data_type();
39445        match data_type {
39446            StructType::VirtualEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOption>()?),
39447            StructType::VirtualE1000Option => Some(from.as_any_ref().downcast_ref::<VirtualE1000Option>()?),
39448            StructType::VirtualE1000EOption => Some(from.as_any_ref().downcast_ref::<VirtualE1000EOption>()?),
39449            StructType::VirtualPcNet32Option => Some(from.as_any_ref().downcast_ref::<VirtualPcNet32Option>()?),
39450            StructType::VirtualSriovEthernetCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardOption>()?),
39451            StructType::VirtualVmxnetOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnetOption>()?),
39452            StructType::VirtualVmxnet2Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2Option>()?),
39453            StructType::VirtualVmxnet3Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Option>()?),
39454            StructType::VirtualVmxnet3VrdmaOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3VrdmaOption>()?),
39455            _ => None,
39456        }
39457    }
39458    
39459    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39460        let data_type = from.data_type();
39461        match data_type {
39462            StructType::VirtualEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardOption>()?),
39463            StructType::VirtualE1000Option => Ok(from.as_any_box().downcast::<VirtualE1000Option>()?),
39464            StructType::VirtualE1000EOption => Ok(from.as_any_box().downcast::<VirtualE1000EOption>()?),
39465            StructType::VirtualPcNet32Option => Ok(from.as_any_box().downcast::<VirtualPcNet32Option>()?),
39466            StructType::VirtualSriovEthernetCardOption => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardOption>()?),
39467            StructType::VirtualVmxnetOption => Ok(from.as_any_box().downcast::<VirtualVmxnetOption>()?),
39468            StructType::VirtualVmxnet2Option => Ok(from.as_any_box().downcast::<VirtualVmxnet2Option>()?),
39469            StructType::VirtualVmxnet3Option => Ok(from.as_any_box().downcast::<VirtualVmxnet3Option>()?),
39470            StructType::VirtualVmxnet3VrdmaOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3VrdmaOption>()?),
39471            _ => Err(from.as_any_box()),
39472        }
39473    }
39474}
39475/// The VirtualVmxnetOption data object type contains the options for the
39476/// *VirtualVmxnet* data object type.
39477pub trait VirtualVmxnetOptionTrait : super::traits::VirtualEthernetCardOptionTrait {
39478}
39479impl<'s> serde::Serialize for dyn VirtualVmxnetOptionTrait + 's {
39480            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39481            where
39482                S: serde::Serializer,
39483            {
39484                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39485            }
39486        }
39487impl<'de> serde::Deserialize<'de> for Box<dyn VirtualVmxnetOptionTrait> {
39488            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39489                deserializer.deserialize_map(VirtualVmxnetOptionVisitor)
39490            }
39491        }
39492
39493struct VirtualVmxnetOptionVisitor;
39494
39495impl<'de> de::Visitor<'de> for VirtualVmxnetOptionVisitor {
39496    type Value = Box<dyn VirtualVmxnetOptionTrait>;
39497
39498    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39499        formatter.write_str("a valid VirtualVmxnetOptionTrait JSON object with a _typeName field")
39500    }
39501
39502    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39503    where
39504        A: de::MapAccess<'de>,
39505    {
39506        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39507        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39508        match any {
39509            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39510                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39511            VimAny::Value(value) => Err(de::Error::custom(format!(
39512                "expected object not wrapped value: {:?}",
39513                value))),
39514        }
39515    }
39516}
39517
39518impl VirtualVmxnetOptionTrait for VirtualVmxnetOption {
39519}
39520impl VirtualVmxnetOptionTrait for VirtualVmxnet2Option {
39521}
39522impl VirtualVmxnetOptionTrait for VirtualVmxnet3Option {
39523}
39524impl VirtualVmxnetOptionTrait for VirtualVmxnet3VrdmaOption {
39525}
39526impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualVmxnetOptionTrait {
39527    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39528        let data_type = from.data_type();
39529        match data_type {
39530            StructType::VirtualVmxnetOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnetOption>()?),
39531            StructType::VirtualVmxnet2Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet2Option>()?),
39532            StructType::VirtualVmxnet3Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Option>()?),
39533            StructType::VirtualVmxnet3VrdmaOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3VrdmaOption>()?),
39534            _ => None,
39535        }
39536    }
39537    
39538    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39539        let data_type = from.data_type();
39540        match data_type {
39541            StructType::VirtualVmxnetOption => Ok(from.as_any_box().downcast::<VirtualVmxnetOption>()?),
39542            StructType::VirtualVmxnet2Option => Ok(from.as_any_box().downcast::<VirtualVmxnet2Option>()?),
39543            StructType::VirtualVmxnet3Option => Ok(from.as_any_box().downcast::<VirtualVmxnet3Option>()?),
39544            StructType::VirtualVmxnet3VrdmaOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3VrdmaOption>()?),
39545            _ => Err(from.as_any_box()),
39546        }
39547    }
39548}
39549/// The VirtualVmxnet3Option data object type contains the options for the
39550/// *VirtualVmxnet3* data object type.
39551pub trait VirtualVmxnet3OptionTrait : super::traits::VirtualVmxnetOptionTrait {
39552    /// Flag to indicate whether UPTv2(Uniform Pass-through version 2) is
39553    /// settable on this device.
39554    /// 
39555    /// ***Since:*** vSphere API Release 8.0.0.1
39556    fn get_uptv_2_enabled(&self) -> &Option<super::structs::BoolOption>;
39557    /// Strict latency configure options.
39558    /// 
39559    /// ***Since:*** vSphere API Release 8.0.3.1
39560    fn get_strict_latency_config_option(&self) -> &Option<super::structs::VirtualVmxnet3OptionStrictLatencyConfigOption>;
39561}
39562impl<'s> serde::Serialize for dyn VirtualVmxnet3OptionTrait + 's {
39563            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39564            where
39565                S: serde::Serializer,
39566            {
39567                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39568            }
39569        }
39570impl<'de> serde::Deserialize<'de> for Box<dyn VirtualVmxnet3OptionTrait> {
39571            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39572                deserializer.deserialize_map(VirtualVmxnet3OptionVisitor)
39573            }
39574        }
39575
39576struct VirtualVmxnet3OptionVisitor;
39577
39578impl<'de> de::Visitor<'de> for VirtualVmxnet3OptionVisitor {
39579    type Value = Box<dyn VirtualVmxnet3OptionTrait>;
39580
39581    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39582        formatter.write_str("a valid VirtualVmxnet3OptionTrait JSON object with a _typeName field")
39583    }
39584
39585    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39586    where
39587        A: de::MapAccess<'de>,
39588    {
39589        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39590        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39591        match any {
39592            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39593                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39594            VimAny::Value(value) => Err(de::Error::custom(format!(
39595                "expected object not wrapped value: {:?}",
39596                value))),
39597        }
39598    }
39599}
39600
39601impl VirtualVmxnet3OptionTrait for VirtualVmxnet3Option {
39602    fn get_uptv_2_enabled(&self) -> &Option<super::structs::BoolOption> { &self.uptv_2_enabled }
39603    fn get_strict_latency_config_option(&self) -> &Option<super::structs::VirtualVmxnet3OptionStrictLatencyConfigOption> { &self.strict_latency_config_option }
39604}
39605impl VirtualVmxnet3OptionTrait for VirtualVmxnet3VrdmaOption {
39606    fn get_uptv_2_enabled(&self) -> &Option<super::structs::BoolOption> { &self.uptv_2_enabled }
39607    fn get_strict_latency_config_option(&self) -> &Option<super::structs::VirtualVmxnet3OptionStrictLatencyConfigOption> { &self.strict_latency_config_option }
39608}
39609impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualVmxnet3OptionTrait {
39610    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39611        let data_type = from.data_type();
39612        match data_type {
39613            StructType::VirtualVmxnet3Option => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3Option>()?),
39614            StructType::VirtualVmxnet3VrdmaOption => Some(from.as_any_ref().downcast_ref::<VirtualVmxnet3VrdmaOption>()?),
39615            _ => None,
39616        }
39617    }
39618    
39619    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39620        let data_type = from.data_type();
39621        match data_type {
39622            StructType::VirtualVmxnet3Option => Ok(from.as_any_box().downcast::<VirtualVmxnet3Option>()?),
39623            StructType::VirtualVmxnet3VrdmaOption => Ok(from.as_any_box().downcast::<VirtualVmxnet3VrdmaOption>()?),
39624            _ => Err(from.as_any_box()),
39625        }
39626    }
39627}
39628/// The VirtualSoundCardOption data class contains the options for the
39629/// virtual sound card class.
39630pub trait VirtualSoundCardOptionTrait : super::traits::VirtualDeviceOptionTrait {
39631}
39632impl<'s> serde::Serialize for dyn VirtualSoundCardOptionTrait + 's {
39633            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39634            where
39635                S: serde::Serializer,
39636            {
39637                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39638            }
39639        }
39640impl<'de> serde::Deserialize<'de> for Box<dyn VirtualSoundCardOptionTrait> {
39641            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39642                deserializer.deserialize_map(VirtualSoundCardOptionVisitor)
39643            }
39644        }
39645
39646struct VirtualSoundCardOptionVisitor;
39647
39648impl<'de> de::Visitor<'de> for VirtualSoundCardOptionVisitor {
39649    type Value = Box<dyn VirtualSoundCardOptionTrait>;
39650
39651    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39652        formatter.write_str("a valid VirtualSoundCardOptionTrait JSON object with a _typeName field")
39653    }
39654
39655    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39656    where
39657        A: de::MapAccess<'de>,
39658    {
39659        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39660        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39661        match any {
39662            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39663                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39664            VimAny::Value(value) => Err(de::Error::custom(format!(
39665                "expected object not wrapped value: {:?}",
39666                value))),
39667        }
39668    }
39669}
39670
39671impl VirtualSoundCardOptionTrait for VirtualSoundCardOption {
39672}
39673impl VirtualSoundCardOptionTrait for VirtualEnsoniq1371Option {
39674}
39675impl VirtualSoundCardOptionTrait for VirtualHdAudioCardOption {
39676}
39677impl VirtualSoundCardOptionTrait for VirtualSoundBlaster16Option {
39678}
39679impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualSoundCardOptionTrait {
39680    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39681        let data_type = from.data_type();
39682        match data_type {
39683            StructType::VirtualSoundCardOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardOption>()?),
39684            StructType::VirtualEnsoniq1371Option => Some(from.as_any_ref().downcast_ref::<VirtualEnsoniq1371Option>()?),
39685            StructType::VirtualHdAudioCardOption => Some(from.as_any_ref().downcast_ref::<VirtualHdAudioCardOption>()?),
39686            StructType::VirtualSoundBlaster16Option => Some(from.as_any_ref().downcast_ref::<VirtualSoundBlaster16Option>()?),
39687            _ => None,
39688        }
39689    }
39690    
39691    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39692        let data_type = from.data_type();
39693        match data_type {
39694            StructType::VirtualSoundCardOption => Ok(from.as_any_box().downcast::<VirtualSoundCardOption>()?),
39695            StructType::VirtualEnsoniq1371Option => Ok(from.as_any_box().downcast::<VirtualEnsoniq1371Option>()?),
39696            StructType::VirtualHdAudioCardOption => Ok(from.as_any_box().downcast::<VirtualHdAudioCardOption>()?),
39697            StructType::VirtualSoundBlaster16Option => Ok(from.as_any_box().downcast::<VirtualSoundBlaster16Option>()?),
39698            _ => Err(from.as_any_box()),
39699        }
39700    }
39701}
39702/// The *VirtualDeviceBackingOption* data class
39703/// defines options for device-specific virtual backing objects.
39704pub trait VirtualDeviceBackingOptionTrait : super::traits::DataObjectTrait {
39705    /// The name of the class the client should use to instantiate backing
39706    /// for the virtual device.
39707    fn get_type(&self) -> &str;
39708}
39709impl<'s> serde::Serialize for dyn VirtualDeviceBackingOptionTrait + 's {
39710            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
39711            where
39712                S: serde::Serializer,
39713            {
39714                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
39715            }
39716        }
39717impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceBackingOptionTrait> {
39718            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
39719                deserializer.deserialize_map(VirtualDeviceBackingOptionVisitor)
39720            }
39721        }
39722
39723struct VirtualDeviceBackingOptionVisitor;
39724
39725impl<'de> de::Visitor<'de> for VirtualDeviceBackingOptionVisitor {
39726    type Value = Box<dyn VirtualDeviceBackingOptionTrait>;
39727
39728    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
39729        formatter.write_str("a valid VirtualDeviceBackingOptionTrait JSON object with a _typeName field")
39730    }
39731
39732    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
39733    where
39734        A: de::MapAccess<'de>,
39735    {
39736        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
39737        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
39738        match any {
39739            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
39740                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
39741            VimAny::Value(value) => Err(de::Error::custom(format!(
39742                "expected object not wrapped value: {:?}",
39743                value))),
39744        }
39745    }
39746}
39747
39748impl VirtualDeviceBackingOptionTrait for VirtualDeviceBackingOption {
39749    fn get_type(&self) -> &str { &self.r#type }
39750}
39751impl VirtualDeviceBackingOptionTrait for VirtualDeviceDeviceBackingOption {
39752    fn get_type(&self) -> &str { &self.r#type }
39753}
39754impl VirtualDeviceBackingOptionTrait for VirtualCdromAtapiBackingOption {
39755    fn get_type(&self) -> &str { &self.r#type }
39756}
39757impl VirtualDeviceBackingOptionTrait for VirtualCdromPassthroughBackingOption {
39758    fn get_type(&self) -> &str { &self.r#type }
39759}
39760impl VirtualDeviceBackingOptionTrait for VirtualCdromRemoteAtapiBackingOption {
39761    fn get_type(&self) -> &str { &self.r#type }
39762}
39763impl VirtualDeviceBackingOptionTrait for VirtualDiskRawDiskMappingVer1BackingOption {
39764    fn get_type(&self) -> &str { &self.r#type }
39765}
39766impl VirtualDeviceBackingOptionTrait for VirtualDiskRawDiskVer2BackingOption {
39767    fn get_type(&self) -> &str { &self.r#type }
39768}
39769impl VirtualDeviceBackingOptionTrait for VirtualDiskPartitionedRawDiskVer2BackingOption {
39770    fn get_type(&self) -> &str { &self.r#type }
39771}
39772impl VirtualDeviceBackingOptionTrait for VirtualEthernetCardLegacyNetworkBackingOption {
39773    fn get_type(&self) -> &str { &self.r#type }
39774}
39775impl VirtualDeviceBackingOptionTrait for VirtualEthernetCardNetworkBackingOption {
39776    fn get_type(&self) -> &str { &self.r#type }
39777}
39778impl VirtualDeviceBackingOptionTrait for VirtualFloppyDeviceBackingOption {
39779    fn get_type(&self) -> &str { &self.r#type }
39780}
39781impl VirtualDeviceBackingOptionTrait for VirtualPciPassthroughDeviceBackingOption {
39782    fn get_type(&self) -> &str { &self.r#type }
39783}
39784impl VirtualDeviceBackingOptionTrait for VirtualPciPassthroughDynamicBackingOption {
39785    fn get_type(&self) -> &str { &self.r#type }
39786}
39787impl VirtualDeviceBackingOptionTrait for VirtualParallelPortDeviceBackingOption {
39788    fn get_type(&self) -> &str { &self.r#type }
39789}
39790impl VirtualDeviceBackingOptionTrait for VirtualPointingDeviceBackingOption {
39791    fn get_type(&self) -> &str { &self.r#type }
39792}
39793impl VirtualDeviceBackingOptionTrait for VirtualScsiPassthroughDeviceBackingOption {
39794    fn get_type(&self) -> &str { &self.r#type }
39795}
39796impl VirtualDeviceBackingOptionTrait for VirtualSerialPortDeviceBackingOption {
39797    fn get_type(&self) -> &str { &self.r#type }
39798}
39799impl VirtualDeviceBackingOptionTrait for VirtualSoundCardDeviceBackingOption {
39800    fn get_type(&self) -> &str { &self.r#type }
39801}
39802impl VirtualDeviceBackingOptionTrait for VirtualUsbRemoteHostBackingOption {
39803    fn get_type(&self) -> &str { &self.r#type }
39804}
39805impl VirtualDeviceBackingOptionTrait for VirtualUsbusbBackingOption {
39806    fn get_type(&self) -> &str { &self.r#type }
39807}
39808impl VirtualDeviceBackingOptionTrait for VirtualDeviceFileBackingOption {
39809    fn get_type(&self) -> &str { &self.r#type }
39810}
39811impl VirtualDeviceBackingOptionTrait for VirtualCdromIsoBackingOption {
39812    fn get_type(&self) -> &str { &self.r#type }
39813}
39814impl VirtualDeviceBackingOptionTrait for VirtualDiskFlatVer1BackingOption {
39815    fn get_type(&self) -> &str { &self.r#type }
39816}
39817impl VirtualDeviceBackingOptionTrait for VirtualDiskFlatVer2BackingOption {
39818    fn get_type(&self) -> &str { &self.r#type }
39819}
39820impl VirtualDeviceBackingOptionTrait for VirtualDiskLocalPMemBackingOption {
39821    fn get_type(&self) -> &str { &self.r#type }
39822}
39823impl VirtualDeviceBackingOptionTrait for VirtualDiskSeSparseBackingOption {
39824    fn get_type(&self) -> &str { &self.r#type }
39825}
39826impl VirtualDeviceBackingOptionTrait for VirtualDiskSparseVer1BackingOption {
39827    fn get_type(&self) -> &str { &self.r#type }
39828}
39829impl VirtualDeviceBackingOptionTrait for VirtualDiskSparseVer2BackingOption {
39830    fn get_type(&self) -> &str { &self.r#type }
39831}
39832impl VirtualDeviceBackingOptionTrait for VirtualFloppyImageBackingOption {
39833    fn get_type(&self) -> &str { &self.r#type }
39834}
39835impl VirtualDeviceBackingOptionTrait for VirtualParallelPortFileBackingOption {
39836    fn get_type(&self) -> &str { &self.r#type }
39837}
39838impl VirtualDeviceBackingOptionTrait for VirtualSerialPortFileBackingOption {
39839    fn get_type(&self) -> &str { &self.r#type }
39840}
39841impl VirtualDeviceBackingOptionTrait for VirtualDevicePipeBackingOption {
39842    fn get_type(&self) -> &str { &self.r#type }
39843}
39844impl VirtualDeviceBackingOptionTrait for VirtualSerialPortPipeBackingOption {
39845    fn get_type(&self) -> &str { &self.r#type }
39846}
39847impl VirtualDeviceBackingOptionTrait for VirtualDeviceRemoteDeviceBackingOption {
39848    fn get_type(&self) -> &str { &self.r#type }
39849}
39850impl VirtualDeviceBackingOptionTrait for VirtualCdromRemotePassthroughBackingOption {
39851    fn get_type(&self) -> &str { &self.r#type }
39852}
39853impl VirtualDeviceBackingOptionTrait for VirtualFloppyRemoteDeviceBackingOption {
39854    fn get_type(&self) -> &str { &self.r#type }
39855}
39856impl VirtualDeviceBackingOptionTrait for VirtualUsbRemoteClientBackingOption {
39857    fn get_type(&self) -> &str { &self.r#type }
39858}
39859impl VirtualDeviceBackingOptionTrait for VirtualDeviceUriBackingOption {
39860    fn get_type(&self) -> &str { &self.r#type }
39861}
39862impl VirtualDeviceBackingOptionTrait for VirtualSerialPortUriBackingOption {
39863    fn get_type(&self) -> &str { &self.r#type }
39864}
39865impl VirtualDeviceBackingOptionTrait for VirtualEthernetCardDvPortBackingOption {
39866    fn get_type(&self) -> &str { &self.r#type }
39867}
39868impl VirtualDeviceBackingOptionTrait for VirtualEthernetCardOpaqueNetworkBackingOption {
39869    fn get_type(&self) -> &str { &self.r#type }
39870}
39871impl VirtualDeviceBackingOptionTrait for VirtualPciPassthroughDvxBackingOption {
39872    fn get_type(&self) -> &str { &self.r#type }
39873}
39874impl VirtualDeviceBackingOptionTrait for VirtualPciPassthroughPluginBackingOption {
39875    fn get_type(&self) -> &str { &self.r#type }
39876}
39877impl VirtualDeviceBackingOptionTrait for VirtualPciPassthroughVmiopBackingOption {
39878    fn get_type(&self) -> &str { &self.r#type }
39879}
39880impl VirtualDeviceBackingOptionTrait for VirtualPrecisionClockSystemClockBackingOption {
39881    fn get_type(&self) -> &str { &self.r#type }
39882}
39883impl VirtualDeviceBackingOptionTrait for VirtualSerialPortThinPrintBackingOption {
39884    fn get_type(&self) -> &str { &self.r#type }
39885}
39886impl VirtualDeviceBackingOptionTrait for VirtualSriovEthernetCardSriovBackingOption {
39887    fn get_type(&self) -> &str { &self.r#type }
39888}
39889impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceBackingOptionTrait {
39890    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
39891        let data_type = from.data_type();
39892        match data_type {
39893            StructType::VirtualDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceBackingOption>()?),
39894            StructType::VirtualDeviceDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingOption>()?),
39895            StructType::VirtualCdromAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingOption>()?),
39896            StructType::VirtualCdromPassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingOption>()?),
39897            StructType::VirtualCdromRemoteAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingOption>()?),
39898            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
39899            StructType::VirtualDiskRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingOption>()?),
39900            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
39901            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
39902            StructType::VirtualEthernetCardNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingOption>()?),
39903            StructType::VirtualFloppyDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingOption>()?),
39904            StructType::VirtualPciPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingOption>()?),
39905            StructType::VirtualPciPassthroughDynamicBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingOption>()?),
39906            StructType::VirtualParallelPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingOption>()?),
39907            StructType::VirtualPointingDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceBackingOption>()?),
39908            StructType::VirtualScsiPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingOption>()?),
39909            StructType::VirtualSerialPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingOption>()?),
39910            StructType::VirtualSoundCardDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingOption>()?),
39911            StructType::VirtualUsbRemoteHostBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingOption>()?),
39912            StructType::VirtualUsbusbBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingOption>()?),
39913            StructType::VirtualDeviceFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingOption>()?),
39914            StructType::VirtualCdromIsoBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingOption>()?),
39915            StructType::VirtualDiskFlatVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingOption>()?),
39916            StructType::VirtualDiskFlatVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingOption>()?),
39917            StructType::VirtualDiskLocalPMemBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingOption>()?),
39918            StructType::VirtualDiskSeSparseBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingOption>()?),
39919            StructType::VirtualDiskSparseVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingOption>()?),
39920            StructType::VirtualDiskSparseVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingOption>()?),
39921            StructType::VirtualFloppyImageBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingOption>()?),
39922            StructType::VirtualParallelPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingOption>()?),
39923            StructType::VirtualSerialPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingOption>()?),
39924            StructType::VirtualDevicePipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingOption>()?),
39925            StructType::VirtualSerialPortPipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingOption>()?),
39926            StructType::VirtualDeviceRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingOption>()?),
39927            StructType::VirtualCdromRemotePassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingOption>()?),
39928            StructType::VirtualFloppyRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingOption>()?),
39929            StructType::VirtualUsbRemoteClientBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingOption>()?),
39930            StructType::VirtualDeviceUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingOption>()?),
39931            StructType::VirtualSerialPortUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingOption>()?),
39932            StructType::VirtualEthernetCardDvPortBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardDvPortBackingOption>()?),
39933            StructType::VirtualEthernetCardOpaqueNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardOpaqueNetworkBackingOption>()?),
39934            StructType::VirtualPciPassthroughDvxBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDvxBackingOption>()?),
39935            StructType::VirtualPciPassthroughPluginBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingOption>()?),
39936            StructType::VirtualPciPassthroughVmiopBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingOption>()?),
39937            StructType::VirtualPrecisionClockSystemClockBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPrecisionClockSystemClockBackingOption>()?),
39938            StructType::VirtualSerialPortThinPrintBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortThinPrintBackingOption>()?),
39939            StructType::VirtualSriovEthernetCardSriovBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSriovEthernetCardSriovBackingOption>()?),
39940            _ => None,
39941        }
39942    }
39943    
39944    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
39945        let data_type = from.data_type();
39946        match data_type {
39947            StructType::VirtualDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceBackingOption>()?),
39948            StructType::VirtualDeviceDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingOption>()?),
39949            StructType::VirtualCdromAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingOption>()?),
39950            StructType::VirtualCdromPassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingOption>()?),
39951            StructType::VirtualCdromRemoteAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingOption>()?),
39952            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
39953            StructType::VirtualDiskRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingOption>()?),
39954            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
39955            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
39956            StructType::VirtualEthernetCardNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingOption>()?),
39957            StructType::VirtualFloppyDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingOption>()?),
39958            StructType::VirtualPciPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingOption>()?),
39959            StructType::VirtualPciPassthroughDynamicBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingOption>()?),
39960            StructType::VirtualParallelPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingOption>()?),
39961            StructType::VirtualPointingDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPointingDeviceBackingOption>()?),
39962            StructType::VirtualScsiPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingOption>()?),
39963            StructType::VirtualSerialPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingOption>()?),
39964            StructType::VirtualSoundCardDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingOption>()?),
39965            StructType::VirtualUsbRemoteHostBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingOption>()?),
39966            StructType::VirtualUsbusbBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingOption>()?),
39967            StructType::VirtualDeviceFileBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingOption>()?),
39968            StructType::VirtualCdromIsoBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingOption>()?),
39969            StructType::VirtualDiskFlatVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingOption>()?),
39970            StructType::VirtualDiskFlatVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingOption>()?),
39971            StructType::VirtualDiskLocalPMemBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingOption>()?),
39972            StructType::VirtualDiskSeSparseBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingOption>()?),
39973            StructType::VirtualDiskSparseVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingOption>()?),
39974            StructType::VirtualDiskSparseVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingOption>()?),
39975            StructType::VirtualFloppyImageBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingOption>()?),
39976            StructType::VirtualParallelPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingOption>()?),
39977            StructType::VirtualSerialPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingOption>()?),
39978            StructType::VirtualDevicePipeBackingOption => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingOption>()?),
39979            StructType::VirtualSerialPortPipeBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingOption>()?),
39980            StructType::VirtualDeviceRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingOption>()?),
39981            StructType::VirtualCdromRemotePassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingOption>()?),
39982            StructType::VirtualFloppyRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingOption>()?),
39983            StructType::VirtualUsbRemoteClientBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingOption>()?),
39984            StructType::VirtualDeviceUriBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingOption>()?),
39985            StructType::VirtualSerialPortUriBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingOption>()?),
39986            StructType::VirtualEthernetCardDvPortBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardDvPortBackingOption>()?),
39987            StructType::VirtualEthernetCardOpaqueNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardOpaqueNetworkBackingOption>()?),
39988            StructType::VirtualPciPassthroughDvxBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDvxBackingOption>()?),
39989            StructType::VirtualPciPassthroughPluginBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingOption>()?),
39990            StructType::VirtualPciPassthroughVmiopBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingOption>()?),
39991            StructType::VirtualPrecisionClockSystemClockBackingOption => Ok(from.as_any_box().downcast::<VirtualPrecisionClockSystemClockBackingOption>()?),
39992            StructType::VirtualSerialPortThinPrintBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortThinPrintBackingOption>()?),
39993            StructType::VirtualSriovEthernetCardSriovBackingOption => Ok(from.as_any_box().downcast::<VirtualSriovEthernetCardSriovBackingOption>()?),
39994            _ => Err(from.as_any_box()),
39995        }
39996    }
39997}
39998/// The DeviceBackingOption data class contains device-specific backing options.
39999pub trait VirtualDeviceDeviceBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40000    /// Flag to indicate whether the specific instance of this device can
40001    /// be auto-detected on the host instead of having to specify a
40002    /// particular physical device.
40003    fn get_auto_detect_available(&self) -> &super::structs::BoolOption;
40004}
40005impl<'s> serde::Serialize for dyn VirtualDeviceDeviceBackingOptionTrait + 's {
40006            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40007            where
40008                S: serde::Serializer,
40009            {
40010                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40011            }
40012        }
40013impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceDeviceBackingOptionTrait> {
40014            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40015                deserializer.deserialize_map(VirtualDeviceDeviceBackingOptionVisitor)
40016            }
40017        }
40018
40019struct VirtualDeviceDeviceBackingOptionVisitor;
40020
40021impl<'de> de::Visitor<'de> for VirtualDeviceDeviceBackingOptionVisitor {
40022    type Value = Box<dyn VirtualDeviceDeviceBackingOptionTrait>;
40023
40024    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40025        formatter.write_str("a valid VirtualDeviceDeviceBackingOptionTrait JSON object with a _typeName field")
40026    }
40027
40028    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40029    where
40030        A: de::MapAccess<'de>,
40031    {
40032        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40033        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40034        match any {
40035            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40036                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40037            VimAny::Value(value) => Err(de::Error::custom(format!(
40038                "expected object not wrapped value: {:?}",
40039                value))),
40040        }
40041    }
40042}
40043
40044impl VirtualDeviceDeviceBackingOptionTrait for VirtualDeviceDeviceBackingOption {
40045    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40046}
40047impl VirtualDeviceDeviceBackingOptionTrait for VirtualCdromAtapiBackingOption {
40048    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40049}
40050impl VirtualDeviceDeviceBackingOptionTrait for VirtualCdromPassthroughBackingOption {
40051    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40052}
40053impl VirtualDeviceDeviceBackingOptionTrait for VirtualCdromRemoteAtapiBackingOption {
40054    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40055}
40056impl VirtualDeviceDeviceBackingOptionTrait for VirtualDiskRawDiskMappingVer1BackingOption {
40057    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40058}
40059impl VirtualDeviceDeviceBackingOptionTrait for VirtualDiskRawDiskVer2BackingOption {
40060    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40061}
40062impl VirtualDeviceDeviceBackingOptionTrait for VirtualDiskPartitionedRawDiskVer2BackingOption {
40063    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40064}
40065impl VirtualDeviceDeviceBackingOptionTrait for VirtualEthernetCardLegacyNetworkBackingOption {
40066    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40067}
40068impl VirtualDeviceDeviceBackingOptionTrait for VirtualEthernetCardNetworkBackingOption {
40069    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40070}
40071impl VirtualDeviceDeviceBackingOptionTrait for VirtualFloppyDeviceBackingOption {
40072    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40073}
40074impl VirtualDeviceDeviceBackingOptionTrait for VirtualPciPassthroughDeviceBackingOption {
40075    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40076}
40077impl VirtualDeviceDeviceBackingOptionTrait for VirtualPciPassthroughDynamicBackingOption {
40078    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40079}
40080impl VirtualDeviceDeviceBackingOptionTrait for VirtualParallelPortDeviceBackingOption {
40081    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40082}
40083impl VirtualDeviceDeviceBackingOptionTrait for VirtualPointingDeviceBackingOption {
40084    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40085}
40086impl VirtualDeviceDeviceBackingOptionTrait for VirtualScsiPassthroughDeviceBackingOption {
40087    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40088}
40089impl VirtualDeviceDeviceBackingOptionTrait for VirtualSerialPortDeviceBackingOption {
40090    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40091}
40092impl VirtualDeviceDeviceBackingOptionTrait for VirtualSoundCardDeviceBackingOption {
40093    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40094}
40095impl VirtualDeviceDeviceBackingOptionTrait for VirtualUsbRemoteHostBackingOption {
40096    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40097}
40098impl VirtualDeviceDeviceBackingOptionTrait for VirtualUsbusbBackingOption {
40099    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40100}
40101impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceDeviceBackingOptionTrait {
40102    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40103        let data_type = from.data_type();
40104        match data_type {
40105            StructType::VirtualDeviceDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceDeviceBackingOption>()?),
40106            StructType::VirtualCdromAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromAtapiBackingOption>()?),
40107            StructType::VirtualCdromPassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromPassthroughBackingOption>()?),
40108            StructType::VirtualCdromRemoteAtapiBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemoteAtapiBackingOption>()?),
40109            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
40110            StructType::VirtualDiskRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingOption>()?),
40111            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
40112            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
40113            StructType::VirtualEthernetCardNetworkBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualEthernetCardNetworkBackingOption>()?),
40114            StructType::VirtualFloppyDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyDeviceBackingOption>()?),
40115            StructType::VirtualPciPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDeviceBackingOption>()?),
40116            StructType::VirtualPciPassthroughDynamicBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughDynamicBackingOption>()?),
40117            StructType::VirtualParallelPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortDeviceBackingOption>()?),
40118            StructType::VirtualPointingDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPointingDeviceBackingOption>()?),
40119            StructType::VirtualScsiPassthroughDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualScsiPassthroughDeviceBackingOption>()?),
40120            StructType::VirtualSerialPortDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortDeviceBackingOption>()?),
40121            StructType::VirtualSoundCardDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSoundCardDeviceBackingOption>()?),
40122            StructType::VirtualUsbRemoteHostBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteHostBackingOption>()?),
40123            StructType::VirtualUsbusbBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbusbBackingOption>()?),
40124            _ => None,
40125        }
40126    }
40127    
40128    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40129        let data_type = from.data_type();
40130        match data_type {
40131            StructType::VirtualDeviceDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceDeviceBackingOption>()?),
40132            StructType::VirtualCdromAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromAtapiBackingOption>()?),
40133            StructType::VirtualCdromPassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromPassthroughBackingOption>()?),
40134            StructType::VirtualCdromRemoteAtapiBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemoteAtapiBackingOption>()?),
40135            StructType::VirtualDiskRawDiskMappingVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskMappingVer1BackingOption>()?),
40136            StructType::VirtualDiskRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingOption>()?),
40137            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
40138            StructType::VirtualEthernetCardLegacyNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardLegacyNetworkBackingOption>()?),
40139            StructType::VirtualEthernetCardNetworkBackingOption => Ok(from.as_any_box().downcast::<VirtualEthernetCardNetworkBackingOption>()?),
40140            StructType::VirtualFloppyDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyDeviceBackingOption>()?),
40141            StructType::VirtualPciPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDeviceBackingOption>()?),
40142            StructType::VirtualPciPassthroughDynamicBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughDynamicBackingOption>()?),
40143            StructType::VirtualParallelPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortDeviceBackingOption>()?),
40144            StructType::VirtualPointingDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualPointingDeviceBackingOption>()?),
40145            StructType::VirtualScsiPassthroughDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualScsiPassthroughDeviceBackingOption>()?),
40146            StructType::VirtualSerialPortDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortDeviceBackingOption>()?),
40147            StructType::VirtualSoundCardDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualSoundCardDeviceBackingOption>()?),
40148            StructType::VirtualUsbRemoteHostBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteHostBackingOption>()?),
40149            StructType::VirtualUsbusbBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbusbBackingOption>()?),
40150            _ => Err(from.as_any_box()),
40151        }
40152    }
40153}
40154/// The VirtualDiskOption.RawDiskVer2BackingOption object type
40155/// contains the available options when backing a virtual disk
40156/// using a host device on VMware Server.
40157pub trait VirtualDiskRawDiskVer2BackingOptionTrait : super::traits::VirtualDeviceDeviceBackingOptionTrait {
40158    /// Valid extensions for the filename of the raw disk descriptor
40159    /// file.
40160    fn get_descriptor_file_name_extensions(&self) -> &super::structs::ChoiceOption;
40161    /// Flag to indicate whether this backing supports disk UUID property.
40162    fn get_uuid(&self) -> bool;
40163}
40164impl<'s> serde::Serialize for dyn VirtualDiskRawDiskVer2BackingOptionTrait + 's {
40165            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40166            where
40167                S: serde::Serializer,
40168            {
40169                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40170            }
40171        }
40172impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDiskRawDiskVer2BackingOptionTrait> {
40173            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40174                deserializer.deserialize_map(VirtualDiskRawDiskVer2BackingOptionVisitor)
40175            }
40176        }
40177
40178struct VirtualDiskRawDiskVer2BackingOptionVisitor;
40179
40180impl<'de> de::Visitor<'de> for VirtualDiskRawDiskVer2BackingOptionVisitor {
40181    type Value = Box<dyn VirtualDiskRawDiskVer2BackingOptionTrait>;
40182
40183    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40184        formatter.write_str("a valid VirtualDiskRawDiskVer2BackingOptionTrait JSON object with a _typeName field")
40185    }
40186
40187    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40188    where
40189        A: de::MapAccess<'de>,
40190    {
40191        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40192        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40193        match any {
40194            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40195                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40196            VimAny::Value(value) => Err(de::Error::custom(format!(
40197                "expected object not wrapped value: {:?}",
40198                value))),
40199        }
40200    }
40201}
40202
40203impl VirtualDiskRawDiskVer2BackingOptionTrait for VirtualDiskRawDiskVer2BackingOption {
40204    fn get_descriptor_file_name_extensions(&self) -> &super::structs::ChoiceOption { &self.descriptor_file_name_extensions }
40205    fn get_uuid(&self) -> bool { self.uuid }
40206}
40207impl VirtualDiskRawDiskVer2BackingOptionTrait for VirtualDiskPartitionedRawDiskVer2BackingOption {
40208    fn get_descriptor_file_name_extensions(&self) -> &super::structs::ChoiceOption { &self.descriptor_file_name_extensions }
40209    fn get_uuid(&self) -> bool { self.uuid }
40210}
40211impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDiskRawDiskVer2BackingOptionTrait {
40212    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40213        let data_type = from.data_type();
40214        match data_type {
40215            StructType::VirtualDiskRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskRawDiskVer2BackingOption>()?),
40216            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
40217            _ => None,
40218        }
40219    }
40220    
40221    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40222        let data_type = from.data_type();
40223        match data_type {
40224            StructType::VirtualDiskRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskRawDiskVer2BackingOption>()?),
40225            StructType::VirtualDiskPartitionedRawDiskVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskPartitionedRawDiskVer2BackingOption>()?),
40226            _ => Err(from.as_any_box()),
40227        }
40228    }
40229}
40230/// The FileBackingOption data class contains file-specific backing options.
40231pub trait VirtualDeviceFileBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40232    /// Valid filename extension for the filename.
40233    /// 
40234    /// If no extensions are present, any file extension is acceptable.
40235    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption>;
40236}
40237impl<'s> serde::Serialize for dyn VirtualDeviceFileBackingOptionTrait + 's {
40238            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40239            where
40240                S: serde::Serializer,
40241            {
40242                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40243            }
40244        }
40245impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceFileBackingOptionTrait> {
40246            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40247                deserializer.deserialize_map(VirtualDeviceFileBackingOptionVisitor)
40248            }
40249        }
40250
40251struct VirtualDeviceFileBackingOptionVisitor;
40252
40253impl<'de> de::Visitor<'de> for VirtualDeviceFileBackingOptionVisitor {
40254    type Value = Box<dyn VirtualDeviceFileBackingOptionTrait>;
40255
40256    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40257        formatter.write_str("a valid VirtualDeviceFileBackingOptionTrait JSON object with a _typeName field")
40258    }
40259
40260    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40261    where
40262        A: de::MapAccess<'de>,
40263    {
40264        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40265        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40266        match any {
40267            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40268                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40269            VimAny::Value(value) => Err(de::Error::custom(format!(
40270                "expected object not wrapped value: {:?}",
40271                value))),
40272        }
40273    }
40274}
40275
40276impl VirtualDeviceFileBackingOptionTrait for VirtualDeviceFileBackingOption {
40277    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40278}
40279impl VirtualDeviceFileBackingOptionTrait for VirtualCdromIsoBackingOption {
40280    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40281}
40282impl VirtualDeviceFileBackingOptionTrait for VirtualDiskFlatVer1BackingOption {
40283    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40284}
40285impl VirtualDeviceFileBackingOptionTrait for VirtualDiskFlatVer2BackingOption {
40286    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40287}
40288impl VirtualDeviceFileBackingOptionTrait for VirtualDiskLocalPMemBackingOption {
40289    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40290}
40291impl VirtualDeviceFileBackingOptionTrait for VirtualDiskSeSparseBackingOption {
40292    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40293}
40294impl VirtualDeviceFileBackingOptionTrait for VirtualDiskSparseVer1BackingOption {
40295    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40296}
40297impl VirtualDeviceFileBackingOptionTrait for VirtualDiskSparseVer2BackingOption {
40298    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40299}
40300impl VirtualDeviceFileBackingOptionTrait for VirtualFloppyImageBackingOption {
40301    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40302}
40303impl VirtualDeviceFileBackingOptionTrait for VirtualParallelPortFileBackingOption {
40304    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40305}
40306impl VirtualDeviceFileBackingOptionTrait for VirtualSerialPortFileBackingOption {
40307    fn get_file_name_extensions(&self) -> &Option<super::structs::ChoiceOption> { &self.file_name_extensions }
40308}
40309impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceFileBackingOptionTrait {
40310    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40311        let data_type = from.data_type();
40312        match data_type {
40313            StructType::VirtualDeviceFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceFileBackingOption>()?),
40314            StructType::VirtualCdromIsoBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromIsoBackingOption>()?),
40315            StructType::VirtualDiskFlatVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer1BackingOption>()?),
40316            StructType::VirtualDiskFlatVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskFlatVer2BackingOption>()?),
40317            StructType::VirtualDiskLocalPMemBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskLocalPMemBackingOption>()?),
40318            StructType::VirtualDiskSeSparseBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSeSparseBackingOption>()?),
40319            StructType::VirtualDiskSparseVer1BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer1BackingOption>()?),
40320            StructType::VirtualDiskSparseVer2BackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDiskSparseVer2BackingOption>()?),
40321            StructType::VirtualFloppyImageBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyImageBackingOption>()?),
40322            StructType::VirtualParallelPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualParallelPortFileBackingOption>()?),
40323            StructType::VirtualSerialPortFileBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortFileBackingOption>()?),
40324            _ => None,
40325        }
40326    }
40327    
40328    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40329        let data_type = from.data_type();
40330        match data_type {
40331            StructType::VirtualDeviceFileBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceFileBackingOption>()?),
40332            StructType::VirtualCdromIsoBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromIsoBackingOption>()?),
40333            StructType::VirtualDiskFlatVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer1BackingOption>()?),
40334            StructType::VirtualDiskFlatVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskFlatVer2BackingOption>()?),
40335            StructType::VirtualDiskLocalPMemBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskLocalPMemBackingOption>()?),
40336            StructType::VirtualDiskSeSparseBackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSeSparseBackingOption>()?),
40337            StructType::VirtualDiskSparseVer1BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer1BackingOption>()?),
40338            StructType::VirtualDiskSparseVer2BackingOption => Ok(from.as_any_box().downcast::<VirtualDiskSparseVer2BackingOption>()?),
40339            StructType::VirtualFloppyImageBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyImageBackingOption>()?),
40340            StructType::VirtualParallelPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualParallelPortFileBackingOption>()?),
40341            StructType::VirtualSerialPortFileBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortFileBackingOption>()?),
40342            _ => Err(from.as_any_box()),
40343        }
40344    }
40345}
40346/// The <code>*VirtualDevicePipeBackingOption*</code> data object type contains options
40347/// specific to pipe backings.
40348pub trait VirtualDevicePipeBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40349}
40350impl<'s> serde::Serialize for dyn VirtualDevicePipeBackingOptionTrait + 's {
40351            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40352            where
40353                S: serde::Serializer,
40354            {
40355                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40356            }
40357        }
40358impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDevicePipeBackingOptionTrait> {
40359            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40360                deserializer.deserialize_map(VirtualDevicePipeBackingOptionVisitor)
40361            }
40362        }
40363
40364struct VirtualDevicePipeBackingOptionVisitor;
40365
40366impl<'de> de::Visitor<'de> for VirtualDevicePipeBackingOptionVisitor {
40367    type Value = Box<dyn VirtualDevicePipeBackingOptionTrait>;
40368
40369    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40370        formatter.write_str("a valid VirtualDevicePipeBackingOptionTrait JSON object with a _typeName field")
40371    }
40372
40373    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40374    where
40375        A: de::MapAccess<'de>,
40376    {
40377        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40378        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40379        match any {
40380            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40381                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40382            VimAny::Value(value) => Err(de::Error::custom(format!(
40383                "expected object not wrapped value: {:?}",
40384                value))),
40385        }
40386    }
40387}
40388
40389impl VirtualDevicePipeBackingOptionTrait for VirtualDevicePipeBackingOption {
40390}
40391impl VirtualDevicePipeBackingOptionTrait for VirtualSerialPortPipeBackingOption {
40392}
40393impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDevicePipeBackingOptionTrait {
40394    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40395        let data_type = from.data_type();
40396        match data_type {
40397            StructType::VirtualDevicePipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDevicePipeBackingOption>()?),
40398            StructType::VirtualSerialPortPipeBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortPipeBackingOption>()?),
40399            _ => None,
40400        }
40401    }
40402    
40403    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40404        let data_type = from.data_type();
40405        match data_type {
40406            StructType::VirtualDevicePipeBackingOption => Ok(from.as_any_box().downcast::<VirtualDevicePipeBackingOption>()?),
40407            StructType::VirtualSerialPortPipeBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortPipeBackingOption>()?),
40408            _ => Err(from.as_any_box()),
40409        }
40410    }
40411}
40412/// VirtualDeviceOption.RemoteDeviceBackingOption describes the options
40413/// for a remote device backing.
40414/// 
40415/// The primary difference
40416/// between a remote device backing and a local device backing is that
40417/// the VirtualCenter server cannot provide a list of remote host devices
40418/// available for this virtual device backing.
40419pub trait VirtualDeviceRemoteDeviceBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40420    /// Flag to indicate whether the specific instance of this device can
40421    /// be auto-detected on the host instead of having to specify a
40422    /// particular physical device.
40423    fn get_auto_detect_available(&self) -> &super::structs::BoolOption;
40424}
40425impl<'s> serde::Serialize for dyn VirtualDeviceRemoteDeviceBackingOptionTrait + 's {
40426            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40427            where
40428                S: serde::Serializer,
40429            {
40430                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40431            }
40432        }
40433impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceRemoteDeviceBackingOptionTrait> {
40434            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40435                deserializer.deserialize_map(VirtualDeviceRemoteDeviceBackingOptionVisitor)
40436            }
40437        }
40438
40439struct VirtualDeviceRemoteDeviceBackingOptionVisitor;
40440
40441impl<'de> de::Visitor<'de> for VirtualDeviceRemoteDeviceBackingOptionVisitor {
40442    type Value = Box<dyn VirtualDeviceRemoteDeviceBackingOptionTrait>;
40443
40444    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40445        formatter.write_str("a valid VirtualDeviceRemoteDeviceBackingOptionTrait JSON object with a _typeName field")
40446    }
40447
40448    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40449    where
40450        A: de::MapAccess<'de>,
40451    {
40452        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40453        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40454        match any {
40455            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40456                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40457            VimAny::Value(value) => Err(de::Error::custom(format!(
40458                "expected object not wrapped value: {:?}",
40459                value))),
40460        }
40461    }
40462}
40463
40464impl VirtualDeviceRemoteDeviceBackingOptionTrait for VirtualDeviceRemoteDeviceBackingOption {
40465    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40466}
40467impl VirtualDeviceRemoteDeviceBackingOptionTrait for VirtualCdromRemotePassthroughBackingOption {
40468    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40469}
40470impl VirtualDeviceRemoteDeviceBackingOptionTrait for VirtualFloppyRemoteDeviceBackingOption {
40471    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40472}
40473impl VirtualDeviceRemoteDeviceBackingOptionTrait for VirtualUsbRemoteClientBackingOption {
40474    fn get_auto_detect_available(&self) -> &super::structs::BoolOption { &self.auto_detect_available }
40475}
40476impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceRemoteDeviceBackingOptionTrait {
40477    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40478        let data_type = from.data_type();
40479        match data_type {
40480            StructType::VirtualDeviceRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceRemoteDeviceBackingOption>()?),
40481            StructType::VirtualCdromRemotePassthroughBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualCdromRemotePassthroughBackingOption>()?),
40482            StructType::VirtualFloppyRemoteDeviceBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualFloppyRemoteDeviceBackingOption>()?),
40483            StructType::VirtualUsbRemoteClientBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualUsbRemoteClientBackingOption>()?),
40484            _ => None,
40485        }
40486    }
40487    
40488    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40489        let data_type = from.data_type();
40490        match data_type {
40491            StructType::VirtualDeviceRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceRemoteDeviceBackingOption>()?),
40492            StructType::VirtualCdromRemotePassthroughBackingOption => Ok(from.as_any_box().downcast::<VirtualCdromRemotePassthroughBackingOption>()?),
40493            StructType::VirtualFloppyRemoteDeviceBackingOption => Ok(from.as_any_box().downcast::<VirtualFloppyRemoteDeviceBackingOption>()?),
40494            StructType::VirtualUsbRemoteClientBackingOption => Ok(from.as_any_box().downcast::<VirtualUsbRemoteClientBackingOption>()?),
40495            _ => Err(from.as_any_box()),
40496        }
40497    }
40498}
40499/// The *VirtualDeviceURIBackingOption* data object type describes network communication
40500/// options for virtual devices.
40501/// 
40502/// When establishing a connection with a remote system on the network,
40503/// the virtual machine can act as a server or a client.
40504/// When the virtual machine acts as a server, it accepts a connection.
40505/// When the virtual machine acts as a client, it initiates the connection.
40506pub trait VirtualDeviceUriBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40507    /// List of possible directions.
40508    /// 
40509    /// Valid directions are:
40510    /// - *server*
40511    /// - *client*
40512    fn get_directions(&self) -> &super::structs::ChoiceOption;
40513}
40514impl<'s> serde::Serialize for dyn VirtualDeviceUriBackingOptionTrait + 's {
40515            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40516            where
40517                S: serde::Serializer,
40518            {
40519                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40520            }
40521        }
40522impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceUriBackingOptionTrait> {
40523            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40524                deserializer.deserialize_map(VirtualDeviceUriBackingOptionVisitor)
40525            }
40526        }
40527
40528struct VirtualDeviceUriBackingOptionVisitor;
40529
40530impl<'de> de::Visitor<'de> for VirtualDeviceUriBackingOptionVisitor {
40531    type Value = Box<dyn VirtualDeviceUriBackingOptionTrait>;
40532
40533    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40534        formatter.write_str("a valid VirtualDeviceUriBackingOptionTrait JSON object with a _typeName field")
40535    }
40536
40537    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40538    where
40539        A: de::MapAccess<'de>,
40540    {
40541        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40542        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40543        match any {
40544            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40545                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40546            VimAny::Value(value) => Err(de::Error::custom(format!(
40547                "expected object not wrapped value: {:?}",
40548                value))),
40549        }
40550    }
40551}
40552
40553impl VirtualDeviceUriBackingOptionTrait for VirtualDeviceUriBackingOption {
40554    fn get_directions(&self) -> &super::structs::ChoiceOption { &self.directions }
40555}
40556impl VirtualDeviceUriBackingOptionTrait for VirtualSerialPortUriBackingOption {
40557    fn get_directions(&self) -> &super::structs::ChoiceOption { &self.directions }
40558}
40559impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceUriBackingOptionTrait {
40560    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40561        let data_type = from.data_type();
40562        match data_type {
40563            StructType::VirtualDeviceUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualDeviceUriBackingOption>()?),
40564            StructType::VirtualSerialPortUriBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualSerialPortUriBackingOption>()?),
40565            _ => None,
40566        }
40567    }
40568    
40569    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40570        let data_type = from.data_type();
40571        match data_type {
40572            StructType::VirtualDeviceUriBackingOption => Ok(from.as_any_box().downcast::<VirtualDeviceUriBackingOption>()?),
40573            StructType::VirtualSerialPortUriBackingOption => Ok(from.as_any_box().downcast::<VirtualSerialPortUriBackingOption>()?),
40574            _ => Err(from.as_any_box()),
40575        }
40576    }
40577}
40578/// This data object type describes the options for the
40579/// *VirtualPCIPassthroughPluginBackingInfo* data object type.
40580pub trait VirtualPciPassthroughPluginBackingOptionTrait : super::traits::VirtualDeviceBackingOptionTrait {
40581}
40582impl<'s> serde::Serialize for dyn VirtualPciPassthroughPluginBackingOptionTrait + 's {
40583            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40584            where
40585                S: serde::Serializer,
40586            {
40587                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40588            }
40589        }
40590impl<'de> serde::Deserialize<'de> for Box<dyn VirtualPciPassthroughPluginBackingOptionTrait> {
40591            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40592                deserializer.deserialize_map(VirtualPciPassthroughPluginBackingOptionVisitor)
40593            }
40594        }
40595
40596struct VirtualPciPassthroughPluginBackingOptionVisitor;
40597
40598impl<'de> de::Visitor<'de> for VirtualPciPassthroughPluginBackingOptionVisitor {
40599    type Value = Box<dyn VirtualPciPassthroughPluginBackingOptionTrait>;
40600
40601    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40602        formatter.write_str("a valid VirtualPciPassthroughPluginBackingOptionTrait JSON object with a _typeName field")
40603    }
40604
40605    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40606    where
40607        A: de::MapAccess<'de>,
40608    {
40609        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40610        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40611        match any {
40612            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40613                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40614            VimAny::Value(value) => Err(de::Error::custom(format!(
40615                "expected object not wrapped value: {:?}",
40616                value))),
40617        }
40618    }
40619}
40620
40621impl VirtualPciPassthroughPluginBackingOptionTrait for VirtualPciPassthroughPluginBackingOption {
40622}
40623impl VirtualPciPassthroughPluginBackingOptionTrait for VirtualPciPassthroughVmiopBackingOption {
40624}
40625impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualPciPassthroughPluginBackingOptionTrait {
40626    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40627        let data_type = from.data_type();
40628        match data_type {
40629            StructType::VirtualPciPassthroughPluginBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughPluginBackingOption>()?),
40630            StructType::VirtualPciPassthroughVmiopBackingOption => Some(from.as_any_ref().downcast_ref::<VirtualPciPassthroughVmiopBackingOption>()?),
40631            _ => None,
40632        }
40633    }
40634    
40635    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40636        let data_type = from.data_type();
40637        match data_type {
40638            StructType::VirtualPciPassthroughPluginBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughPluginBackingOption>()?),
40639            StructType::VirtualPciPassthroughVmiopBackingOption => Ok(from.as_any_box().downcast::<VirtualPciPassthroughVmiopBackingOption>()?),
40640            _ => Err(from.as_any_box()),
40641        }
40642    }
40643}
40644/// The VirtualDeviceSpec data object type encapsulates change
40645/// specifications for an individual virtual device.
40646/// 
40647/// The virtual
40648/// device being added or modified must be fully specified.
40649pub trait VirtualDeviceConfigSpecTrait : super::traits::DataObjectTrait {
40650    /// Type of operation being performed on the specified virtual device.
40651    /// 
40652    /// If no operation is specified, the spec. is ignored.
40653    fn get_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecOperationEnum>;
40654    /// Type of operation being performed on the backing
40655    /// of the specified virtual device.
40656    /// 
40657    /// If no file operation is specified in the VirtualDeviceSpec,
40658    /// then any backing filenames in the
40659    /// *VirtualDevice*
40660    /// must refer to files that already exist.
40661    /// The "replace" and "delete" values for this property are only
40662    /// applicable to virtual disk backing files.
40663    fn get_file_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecFileOperationEnum>;
40664    /// Device specification, with all necessary properties set.
40665    fn get_device(&self) -> &Box<dyn super::traits::VirtualDeviceTrait>;
40666    /// Virtual Device Profile requirement.
40667    /// 
40668    /// Profiles are solution specifics.
40669    /// Storage Profile Based Management(SPBM) is a vSphere server extension.
40670    /// The API users who want to provision VMs using Storage Profiles, need to
40671    /// interact with SPBM service.
40672    /// This is an optional parameter and if user doesn't specify profile,
40673    /// the default behavior will apply.
40674    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>>;
40675    /// BackingInfo configuration options.
40676    /// 
40677    /// Each BackingSpec corresponds to a BackingInfo object. The member
40678    /// *VirtualDeviceConfigSpec.backing* refers to the
40679    /// *VirtualDeviceConfigSpec.device*.*VirtualDevice.backing*.
40680    fn get_backing(&self) -> &Option<super::structs::VirtualDeviceConfigSpecBackingSpec>;
40681    /// List of independent filters *VirtualMachineIndependentFilterSpec*
40682    /// to configure on the virtual device.
40683    /// 
40684    /// ***Since:*** vSphere API Release 7.0.2.1
40685    fn get_filter_spec(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineBaseIndependentFilterSpecTrait>>>;
40686    /// The change mode of the device.
40687    /// 
40688    /// The values of the mode will be one of *VirtualDeviceConfigSpecChangeMode_enum* enumerations.
40689    /// On unset, default to 'fail'.
40690    /// 
40691    /// ***Since:*** vSphere API Release 8.0.0.1
40692    fn get_change_mode(&self) -> &Option<String>;
40693}
40694impl<'s> serde::Serialize for dyn VirtualDeviceConfigSpecTrait + 's {
40695            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40696            where
40697                S: serde::Serializer,
40698            {
40699                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40700            }
40701        }
40702impl<'de> serde::Deserialize<'de> for Box<dyn VirtualDeviceConfigSpecTrait> {
40703            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40704                deserializer.deserialize_map(VirtualDeviceConfigSpecVisitor)
40705            }
40706        }
40707
40708struct VirtualDeviceConfigSpecVisitor;
40709
40710impl<'de> de::Visitor<'de> for VirtualDeviceConfigSpecVisitor {
40711    type Value = Box<dyn VirtualDeviceConfigSpecTrait>;
40712
40713    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40714        formatter.write_str("a valid VirtualDeviceConfigSpecTrait JSON object with a _typeName field")
40715    }
40716
40717    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40718    where
40719        A: de::MapAccess<'de>,
40720    {
40721        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40722        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40723        match any {
40724            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40725                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40726            VimAny::Value(value) => Err(de::Error::custom(format!(
40727                "expected object not wrapped value: {:?}",
40728                value))),
40729        }
40730    }
40731}
40732
40733impl VirtualDeviceConfigSpecTrait for VirtualDeviceConfigSpec {
40734    fn get_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecOperationEnum> { &self.operation }
40735    fn get_file_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecFileOperationEnum> { &self.file_operation }
40736    fn get_device(&self) -> &Box<dyn super::traits::VirtualDeviceTrait> { &self.device }
40737    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
40738    fn get_backing(&self) -> &Option<super::structs::VirtualDeviceConfigSpecBackingSpec> { &self.backing }
40739    fn get_filter_spec(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineBaseIndependentFilterSpecTrait>>> { &self.filter_spec }
40740    fn get_change_mode(&self) -> &Option<String> { &self.change_mode }
40741}
40742impl VirtualDeviceConfigSpecTrait for VirtualDiskConfigSpec {
40743    fn get_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecOperationEnum> { &self.operation }
40744    fn get_file_operation(&self) -> &Option<super::enums::VirtualDeviceConfigSpecFileOperationEnum> { &self.file_operation }
40745    fn get_device(&self) -> &Box<dyn super::traits::VirtualDeviceTrait> { &self.device }
40746    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
40747    fn get_backing(&self) -> &Option<super::structs::VirtualDeviceConfigSpecBackingSpec> { &self.backing }
40748    fn get_filter_spec(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineBaseIndependentFilterSpecTrait>>> { &self.filter_spec }
40749    fn get_change_mode(&self) -> &Option<String> { &self.change_mode }
40750}
40751impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VirtualDeviceConfigSpecTrait {
40752    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40753        let data_type = from.data_type();
40754        match data_type {
40755            StructType::VirtualDeviceConfigSpec => Some(from.as_any_ref().downcast_ref::<VirtualDeviceConfigSpec>()?),
40756            StructType::VirtualDiskConfigSpec => Some(from.as_any_ref().downcast_ref::<VirtualDiskConfigSpec>()?),
40757            _ => None,
40758        }
40759    }
40760    
40761    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40762        let data_type = from.data_type();
40763        match data_type {
40764            StructType::VirtualDeviceConfigSpec => Ok(from.as_any_box().downcast::<VirtualDeviceConfigSpec>()?),
40765            StructType::VirtualDiskConfigSpec => Ok(from.as_any_box().downcast::<VirtualDiskConfigSpec>()?),
40766            _ => Err(from.as_any_box()),
40767        }
40768    }
40769}
40770/// A Subject.
40771pub trait GuestAuthSubjectTrait : super::traits::DataObjectTrait {
40772}
40773impl<'s> serde::Serialize for dyn GuestAuthSubjectTrait + 's {
40774            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40775            where
40776                S: serde::Serializer,
40777            {
40778                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40779            }
40780        }
40781impl<'de> serde::Deserialize<'de> for Box<dyn GuestAuthSubjectTrait> {
40782            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40783                deserializer.deserialize_map(GuestAuthSubjectVisitor)
40784            }
40785        }
40786
40787struct GuestAuthSubjectVisitor;
40788
40789impl<'de> de::Visitor<'de> for GuestAuthSubjectVisitor {
40790    type Value = Box<dyn GuestAuthSubjectTrait>;
40791
40792    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40793        formatter.write_str("a valid GuestAuthSubjectTrait JSON object with a _typeName field")
40794    }
40795
40796    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40797    where
40798        A: de::MapAccess<'de>,
40799    {
40800        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40801        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40802        match any {
40803            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40804                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40805            VimAny::Value(value) => Err(de::Error::custom(format!(
40806                "expected object not wrapped value: {:?}",
40807                value))),
40808        }
40809    }
40810}
40811
40812impl GuestAuthSubjectTrait for GuestAuthSubject {
40813}
40814impl GuestAuthSubjectTrait for GuestAuthAnySubject {
40815}
40816impl GuestAuthSubjectTrait for GuestAuthNamedSubject {
40817}
40818impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GuestAuthSubjectTrait {
40819    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40820        let data_type = from.data_type();
40821        match data_type {
40822            StructType::GuestAuthSubject => Some(from.as_any_ref().downcast_ref::<GuestAuthSubject>()?),
40823            StructType::GuestAuthAnySubject => Some(from.as_any_ref().downcast_ref::<GuestAuthAnySubject>()?),
40824            StructType::GuestAuthNamedSubject => Some(from.as_any_ref().downcast_ref::<GuestAuthNamedSubject>()?),
40825            _ => None,
40826        }
40827    }
40828    
40829    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40830        let data_type = from.data_type();
40831        match data_type {
40832            StructType::GuestAuthSubject => Ok(from.as_any_box().downcast::<GuestAuthSubject>()?),
40833            StructType::GuestAuthAnySubject => Ok(from.as_any_box().downcast::<GuestAuthAnySubject>()?),
40834            StructType::GuestAuthNamedSubject => Ok(from.as_any_box().downcast::<GuestAuthNamedSubject>()?),
40835            _ => Err(from.as_any_box()),
40836        }
40837    }
40838}
40839/// Different attributes for a guest file.
40840/// - Check *GuestPosixFileAttributes*
40841///   for Posix guest files.
40842/// - Check *GuestWindowsFileAttributes*
40843///   for Windows guest files.
40844pub trait GuestFileAttributesTrait : super::traits::DataObjectTrait {
40845    /// The date and time the file was last modified.
40846    /// 
40847    /// If this property is not specified when passing a
40848    /// *GuestFileAttributes* object to
40849    /// *GuestFileManager.InitiateFileTransferToGuest*,
40850    /// the default value will be the time when the file is created inside the
40851    /// guest.
40852    fn get_modification_time(&self) -> &Option<String>;
40853    /// The date and time the file was last accessed.
40854    /// 
40855    /// If this property is not specified when passing a
40856    /// *GuestFileAttributes* object to
40857    /// *GuestFileManager.InitiateFileTransferToGuest*,
40858    /// the default value will be the time when the file is created inside the
40859    /// guest.
40860    fn get_access_time(&self) -> &Option<String>;
40861    /// The target for the file if it's a symbolic link.
40862    /// 
40863    /// This is currently only set for Linux guest operating systems,
40864    /// but may be supported in the
40865    /// future on Windows guest operating systems that support symbolic links.
40866    /// This property gives information about files when returned from
40867    /// *GuestFileManager.ListFilesInGuest* or
40868    /// *GuestFileManager.InitiateFileTransferFromGuest*
40869    /// as part of a *GuestFileAttributes* object.
40870    /// This property will be ignored when passing a
40871    /// *GuestFileAttributes* object to
40872    /// *GuestFileManager.InitiateFileTransferToGuest* or
40873    /// *GuestFileManager.ChangeFileAttributesInGuest*.
40874    /// If the file is a symbolic link, then the attributes of the target
40875    /// are returned, not those of the symbolic link.
40876    fn get_symlink_target(&self) -> &Option<String>;
40877}
40878impl<'s> serde::Serialize for dyn GuestFileAttributesTrait + 's {
40879            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40880            where
40881                S: serde::Serializer,
40882            {
40883                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40884            }
40885        }
40886impl<'de> serde::Deserialize<'de> for Box<dyn GuestFileAttributesTrait> {
40887            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40888                deserializer.deserialize_map(GuestFileAttributesVisitor)
40889            }
40890        }
40891
40892struct GuestFileAttributesVisitor;
40893
40894impl<'de> de::Visitor<'de> for GuestFileAttributesVisitor {
40895    type Value = Box<dyn GuestFileAttributesTrait>;
40896
40897    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40898        formatter.write_str("a valid GuestFileAttributesTrait JSON object with a _typeName field")
40899    }
40900
40901    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40902    where
40903        A: de::MapAccess<'de>,
40904    {
40905        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40906        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40907        match any {
40908            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40909                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40910            VimAny::Value(value) => Err(de::Error::custom(format!(
40911                "expected object not wrapped value: {:?}",
40912                value))),
40913        }
40914    }
40915}
40916
40917impl GuestFileAttributesTrait for GuestFileAttributes {
40918    fn get_modification_time(&self) -> &Option<String> { &self.modification_time }
40919    fn get_access_time(&self) -> &Option<String> { &self.access_time }
40920    fn get_symlink_target(&self) -> &Option<String> { &self.symlink_target }
40921}
40922impl GuestFileAttributesTrait for GuestPosixFileAttributes {
40923    fn get_modification_time(&self) -> &Option<String> { &self.modification_time }
40924    fn get_access_time(&self) -> &Option<String> { &self.access_time }
40925    fn get_symlink_target(&self) -> &Option<String> { &self.symlink_target }
40926}
40927impl GuestFileAttributesTrait for GuestWindowsFileAttributes {
40928    fn get_modification_time(&self) -> &Option<String> { &self.modification_time }
40929    fn get_access_time(&self) -> &Option<String> { &self.access_time }
40930    fn get_symlink_target(&self) -> &Option<String> { &self.symlink_target }
40931}
40932impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GuestFileAttributesTrait {
40933    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
40934        let data_type = from.data_type();
40935        match data_type {
40936            StructType::GuestFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestFileAttributes>()?),
40937            StructType::GuestPosixFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestPosixFileAttributes>()?),
40938            StructType::GuestWindowsFileAttributes => Some(from.as_any_ref().downcast_ref::<GuestWindowsFileAttributes>()?),
40939            _ => None,
40940        }
40941    }
40942    
40943    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
40944        let data_type = from.data_type();
40945        match data_type {
40946            StructType::GuestFileAttributes => Ok(from.as_any_box().downcast::<GuestFileAttributes>()?),
40947            StructType::GuestPosixFileAttributes => Ok(from.as_any_box().downcast::<GuestPosixFileAttributes>()?),
40948            StructType::GuestWindowsFileAttributes => Ok(from.as_any_box().downcast::<GuestWindowsFileAttributes>()?),
40949            _ => Err(from.as_any_box()),
40950        }
40951    }
40952}
40953/// GuestAuthentication is an abstract base class for authentication
40954/// in the guest.
40955pub trait GuestAuthenticationTrait : super::traits::DataObjectTrait {
40956    /// This is set to true if the client wants an interactive session
40957    /// in the guest.
40958    /// 
40959    /// Setting this is supported only for *NamePasswordAuthentication*.
40960    fn get_interactive_session(&self) -> bool;
40961}
40962impl<'s> serde::Serialize for dyn GuestAuthenticationTrait + 's {
40963            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
40964            where
40965                S: serde::Serializer,
40966            {
40967                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
40968            }
40969        }
40970impl<'de> serde::Deserialize<'de> for Box<dyn GuestAuthenticationTrait> {
40971            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
40972                deserializer.deserialize_map(GuestAuthenticationVisitor)
40973            }
40974        }
40975
40976struct GuestAuthenticationVisitor;
40977
40978impl<'de> de::Visitor<'de> for GuestAuthenticationVisitor {
40979    type Value = Box<dyn GuestAuthenticationTrait>;
40980
40981    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
40982        formatter.write_str("a valid GuestAuthenticationTrait JSON object with a _typeName field")
40983    }
40984
40985    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
40986    where
40987        A: de::MapAccess<'de>,
40988    {
40989        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
40990        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
40991        match any {
40992            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
40993                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
40994            VimAny::Value(value) => Err(de::Error::custom(format!(
40995                "expected object not wrapped value: {:?}",
40996                value))),
40997        }
40998    }
40999}
41000
41001impl GuestAuthenticationTrait for GuestAuthentication {
41002    fn get_interactive_session(&self) -> bool { self.interactive_session }
41003}
41004impl GuestAuthenticationTrait for NamePasswordAuthentication {
41005    fn get_interactive_session(&self) -> bool { self.interactive_session }
41006}
41007impl GuestAuthenticationTrait for SamlTokenAuthentication {
41008    fn get_interactive_session(&self) -> bool { self.interactive_session }
41009}
41010impl GuestAuthenticationTrait for SspiAuthentication {
41011    fn get_interactive_session(&self) -> bool { self.interactive_session }
41012}
41013impl GuestAuthenticationTrait for TicketedSessionAuthentication {
41014    fn get_interactive_session(&self) -> bool { self.interactive_session }
41015}
41016impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GuestAuthenticationTrait {
41017    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41018        let data_type = from.data_type();
41019        match data_type {
41020            StructType::GuestAuthentication => Some(from.as_any_ref().downcast_ref::<GuestAuthentication>()?),
41021            StructType::NamePasswordAuthentication => Some(from.as_any_ref().downcast_ref::<NamePasswordAuthentication>()?),
41022            StructType::SamlTokenAuthentication => Some(from.as_any_ref().downcast_ref::<SamlTokenAuthentication>()?),
41023            StructType::SspiAuthentication => Some(from.as_any_ref().downcast_ref::<SspiAuthentication>()?),
41024            StructType::TicketedSessionAuthentication => Some(from.as_any_ref().downcast_ref::<TicketedSessionAuthentication>()?),
41025            _ => None,
41026        }
41027    }
41028    
41029    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41030        let data_type = from.data_type();
41031        match data_type {
41032            StructType::GuestAuthentication => Ok(from.as_any_box().downcast::<GuestAuthentication>()?),
41033            StructType::NamePasswordAuthentication => Ok(from.as_any_box().downcast::<NamePasswordAuthentication>()?),
41034            StructType::SamlTokenAuthentication => Ok(from.as_any_box().downcast::<SamlTokenAuthentication>()?),
41035            StructType::SspiAuthentication => Ok(from.as_any_box().downcast::<SspiAuthentication>()?),
41036            StructType::TicketedSessionAuthentication => Ok(from.as_any_box().downcast::<TicketedSessionAuthentication>()?),
41037            _ => Err(from.as_any_box()),
41038        }
41039    }
41040}
41041/// This describes the arguments to *GuestProcessManager.StartProgramInGuest*.
41042pub trait GuestProgramSpecTrait : super::traits::DataObjectTrait {
41043    /// The absolute path to the program to start.
41044    /// 
41045    /// For Linux guest operating systems, /bin/bash is used to start the
41046    /// program.
41047    /// 
41048    /// For Solaris guest operating systems, /bin/bash is used to start
41049    /// the program if it exists.
41050    /// Otherwise /bin/sh is used. If /bin/sh is used, then the process ID
41051    /// returned by *GuestProcessManager.StartProgramInGuest* will be that of the shell used
41052    /// to start the program, rather than the program itself, due to the
41053    /// differences in how /bin/sh and /bin/bash work. This PID will
41054    /// still be usable for watching the process with
41055    /// *GuestProcessManager.ListProcessesInGuest* to
41056    /// find its exit code and elapsed time.
41057    fn get_program_path(&self) -> &str;
41058    /// The arguments to the program.
41059    /// 
41060    /// In Linux and Solaris guest operating
41061    /// systems, the program will be executed by a guest shell.
41062    /// This allows stdio redirection, but may also
41063    /// require that characters which must be escaped to the shell also
41064    /// be escaped on the command line provided.
41065    /// 
41066    /// For Windows guest operating systems, prefixing the command with
41067    /// "cmd /c" can provide stdio redirection.
41068    fn get_arguments(&self) -> &str;
41069    /// The absolute path of the working directory for the program to be
41070    /// run.
41071    /// 
41072    /// VMware recommends explicitly setting the working directory
41073    /// for the program to be run. If this value is unset or is an empty
41074    /// string, the behavior depends on the guest operating system.
41075    /// For Linux guest operating systems, if this value is unset or is
41076    /// an empty string, the working directory will be the home directory
41077    /// of the user associated with the guest authentication.
41078    /// For other guest operating systems, if this value is unset, the
41079    /// behavior is unspecified.
41080    fn get_working_directory(&self) -> &Option<String>;
41081    /// An array of environment variables, specified
41082    /// in the guest OS notation (eg PATH=c:\\bin;c:\\windows\\system32
41083    /// or LD\_LIBRARY\_PATH=/usr/lib:/lib), to be set for the program
41084    /// being run.
41085    /// 
41086    /// Note that these are not additions to the default
41087    /// environment variables; they define the complete set available to
41088    /// the program. If none are specified the values are guest dependent.
41089    fn get_env_variables(&self) -> &Option<Vec<String>>;
41090}
41091impl<'s> serde::Serialize for dyn GuestProgramSpecTrait + 's {
41092            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41093            where
41094                S: serde::Serializer,
41095            {
41096                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41097            }
41098        }
41099impl<'de> serde::Deserialize<'de> for Box<dyn GuestProgramSpecTrait> {
41100            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41101                deserializer.deserialize_map(GuestProgramSpecVisitor)
41102            }
41103        }
41104
41105struct GuestProgramSpecVisitor;
41106
41107impl<'de> de::Visitor<'de> for GuestProgramSpecVisitor {
41108    type Value = Box<dyn GuestProgramSpecTrait>;
41109
41110    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41111        formatter.write_str("a valid GuestProgramSpecTrait JSON object with a _typeName field")
41112    }
41113
41114    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41115    where
41116        A: de::MapAccess<'de>,
41117    {
41118        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41119        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41120        match any {
41121            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41122                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41123            VimAny::Value(value) => Err(de::Error::custom(format!(
41124                "expected object not wrapped value: {:?}",
41125                value))),
41126        }
41127    }
41128}
41129
41130impl GuestProgramSpecTrait for GuestProgramSpec {
41131    fn get_program_path(&self) -> &str { &self.program_path }
41132    fn get_arguments(&self) -> &str { &self.arguments }
41133    fn get_working_directory(&self) -> &Option<String> { &self.working_directory }
41134    fn get_env_variables(&self) -> &Option<Vec<String>> { &self.env_variables }
41135}
41136impl GuestProgramSpecTrait for GuestWindowsProgramSpec {
41137    fn get_program_path(&self) -> &str { &self.program_path }
41138    fn get_arguments(&self) -> &str { &self.arguments }
41139    fn get_working_directory(&self) -> &Option<String> { &self.working_directory }
41140    fn get_env_variables(&self) -> &Option<Vec<String>> { &self.env_variables }
41141}
41142impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GuestProgramSpecTrait {
41143    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41144        let data_type = from.data_type();
41145        match data_type {
41146            StructType::GuestProgramSpec => Some(from.as_any_ref().downcast_ref::<GuestProgramSpec>()?),
41147            StructType::GuestWindowsProgramSpec => Some(from.as_any_ref().downcast_ref::<GuestWindowsProgramSpec>()?),
41148            _ => None,
41149        }
41150    }
41151    
41152    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41153        let data_type = from.data_type();
41154        match data_type {
41155            StructType::GuestProgramSpec => Ok(from.as_any_box().downcast::<GuestProgramSpec>()?),
41156            StructType::GuestWindowsProgramSpec => Ok(from.as_any_box().downcast::<GuestWindowsProgramSpec>()?),
41157            _ => Err(from.as_any_box()),
41158        }
41159    }
41160}
41161/// This describes the registry value data.
41162pub trait GuestRegValueDataSpecTrait : super::traits::DataObjectTrait {
41163}
41164impl<'s> serde::Serialize for dyn GuestRegValueDataSpecTrait + 's {
41165            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41166            where
41167                S: serde::Serializer,
41168            {
41169                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41170            }
41171        }
41172impl<'de> serde::Deserialize<'de> for Box<dyn GuestRegValueDataSpecTrait> {
41173            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41174                deserializer.deserialize_map(GuestRegValueDataSpecVisitor)
41175            }
41176        }
41177
41178struct GuestRegValueDataSpecVisitor;
41179
41180impl<'de> de::Visitor<'de> for GuestRegValueDataSpecVisitor {
41181    type Value = Box<dyn GuestRegValueDataSpecTrait>;
41182
41183    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41184        formatter.write_str("a valid GuestRegValueDataSpecTrait JSON object with a _typeName field")
41185    }
41186
41187    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41188    where
41189        A: de::MapAccess<'de>,
41190    {
41191        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41192        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41193        match any {
41194            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41195                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41196            VimAny::Value(value) => Err(de::Error::custom(format!(
41197                "expected object not wrapped value: {:?}",
41198                value))),
41199        }
41200    }
41201}
41202
41203impl GuestRegValueDataSpecTrait for GuestRegValueDataSpec {
41204}
41205impl GuestRegValueDataSpecTrait for GuestRegValueBinarySpec {
41206}
41207impl GuestRegValueDataSpecTrait for GuestRegValueDwordSpec {
41208}
41209impl GuestRegValueDataSpecTrait for GuestRegValueExpandStringSpec {
41210}
41211impl GuestRegValueDataSpecTrait for GuestRegValueMultiStringSpec {
41212}
41213impl GuestRegValueDataSpecTrait for GuestRegValueQwordSpec {
41214}
41215impl GuestRegValueDataSpecTrait for GuestRegValueStringSpec {
41216}
41217impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn GuestRegValueDataSpecTrait {
41218    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41219        let data_type = from.data_type();
41220        match data_type {
41221            StructType::GuestRegValueDataSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueDataSpec>()?),
41222            StructType::GuestRegValueBinarySpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueBinarySpec>()?),
41223            StructType::GuestRegValueDwordSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueDwordSpec>()?),
41224            StructType::GuestRegValueExpandStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueExpandStringSpec>()?),
41225            StructType::GuestRegValueMultiStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueMultiStringSpec>()?),
41226            StructType::GuestRegValueQwordSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueQwordSpec>()?),
41227            StructType::GuestRegValueStringSpec => Some(from.as_any_ref().downcast_ref::<GuestRegValueStringSpec>()?),
41228            _ => None,
41229        }
41230    }
41231    
41232    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41233        let data_type = from.data_type();
41234        match data_type {
41235            StructType::GuestRegValueDataSpec => Ok(from.as_any_box().downcast::<GuestRegValueDataSpec>()?),
41236            StructType::GuestRegValueBinarySpec => Ok(from.as_any_box().downcast::<GuestRegValueBinarySpec>()?),
41237            StructType::GuestRegValueDwordSpec => Ok(from.as_any_box().downcast::<GuestRegValueDwordSpec>()?),
41238            StructType::GuestRegValueExpandStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueExpandStringSpec>()?),
41239            StructType::GuestRegValueMultiStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueMultiStringSpec>()?),
41240            StructType::GuestRegValueQwordSpec => Ok(from.as_any_box().downcast::<GuestRegValueQwordSpec>()?),
41241            StructType::GuestRegValueStringSpec => Ok(from.as_any_box().downcast::<GuestRegValueStringSpec>()?),
41242            _ => Err(from.as_any_box()),
41243        }
41244    }
41245}
41246/// Represents the identity of a replication fault domain.
41247/// 
41248/// Fault domains IDs are globally
41249/// unique.
41250pub trait FaultDomainIdTrait : super::traits::DataObjectTrait {
41251    /// ID of the fault domain.
41252    fn get_id(&self) -> &str;
41253}
41254impl<'s> serde::Serialize for dyn FaultDomainIdTrait + 's {
41255            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41256            where
41257                S: serde::Serializer,
41258            {
41259                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41260            }
41261        }
41262impl<'de> serde::Deserialize<'de> for Box<dyn FaultDomainIdTrait> {
41263            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41264                deserializer.deserialize_map(FaultDomainIdVisitor)
41265            }
41266        }
41267
41268struct FaultDomainIdVisitor;
41269
41270impl<'de> de::Visitor<'de> for FaultDomainIdVisitor {
41271    type Value = Box<dyn FaultDomainIdTrait>;
41272
41273    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41274        formatter.write_str("a valid FaultDomainIdTrait JSON object with a _typeName field")
41275    }
41276
41277    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41278    where
41279        A: de::MapAccess<'de>,
41280    {
41281        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41282        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41283        match any {
41284            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41285                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41286            VimAny::Value(value) => Err(de::Error::custom(format!(
41287                "expected object not wrapped value: {:?}",
41288                value))),
41289        }
41290    }
41291}
41292
41293impl FaultDomainIdTrait for FaultDomainId {
41294    fn get_id(&self) -> &str { &self.id }
41295}
41296impl FaultDomainIdTrait for FaultDomainInfo {
41297    fn get_id(&self) -> &str { &self.id }
41298}
41299impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn FaultDomainIdTrait {
41300    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41301        let data_type = from.data_type();
41302        match data_type {
41303            StructType::FaultDomainId => Some(from.as_any_ref().downcast_ref::<FaultDomainId>()?),
41304            StructType::FaultDomainInfo => Some(from.as_any_ref().downcast_ref::<FaultDomainInfo>()?),
41305            _ => None,
41306        }
41307    }
41308    
41309    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41310        let data_type = from.data_type();
41311        match data_type {
41312            StructType::FaultDomainId => Ok(from.as_any_box().downcast::<FaultDomainId>()?),
41313            StructType::FaultDomainInfo => Ok(from.as_any_box().downcast::<FaultDomainInfo>()?),
41314            _ => Err(from.as_any_box()),
41315        }
41316    }
41317}
41318/// The data efficiency configuration of a vSAN cluster.
41319/// 
41320/// Data efficiency configurations work together as below.
41321/// <table cellspacing="0">
41322/// <tr>
41323/// <th>dedupEnabled</th>
41324/// <th>compressionEnabled</th>
41325/// <th>Details</th>
41326/// <th>State Transition</th>
41327/// </tr>
41328/// <tr>
41329/// <td>False</td>
41330/// <td>False</td>
41331/// <td>
41332/// - Disable deduplication and compression. Or
41333/// - Disable compression only
41334///   
41335/// </td>
41336/// <td>
41337/// - Deduplication and compression -&gt; No data efficiency
41338/// - Compression only -&gt; No data efficiency
41339///   
41340/// </td>
41341/// </tr>
41342/// <tr>
41343/// <td>None</td>
41344/// <td>0</td>
41345/// <td>
41346/// - Disable compression only if enabled
41347/// - Throw exception if deduplication and compression is enabled
41348///   
41349/// </td>
41350/// <td>
41351/// - Compression only -&gt; No data efficiency
41352/// 
41353/// </td>
41354/// </tr>
41355/// <tr>
41356/// <td>None</td>
41357/// <td>1</td>
41358/// <td>
41359/// - Enable compression only
41360/// - Throw exception if deduplication and compression is enabled.
41361///   
41362/// </td>
41363/// <td>
41364/// - No data efficiency -&gt; Compression only
41365/// 
41366/// </td>
41367/// </tr>
41368/// <tr>
41369/// <td>0</td>
41370/// <td>None</td>
41371/// <td>
41372/// - Disable deduplication and compression
41373/// - Throw exception if compression only is enabled
41374///   
41375/// </td>
41376/// <td>
41377/// - Deduplication and compression -&gt; No data efficiency
41378/// 
41379/// </td>
41380/// </tr>
41381/// <tr>
41382/// <td>1</td>
41383/// <td>1</td>
41384/// <td>
41385/// - Enable deduplcation and compression
41386/// - Disable compression only if already enabled
41387/// - Get *VsanClusterConfigInfo* will return compressionEnabled flag as true
41388///   
41389/// </td>
41390/// <td>
41391/// - No data efficiency -&gt; Deduplication and compression
41392/// - Compression only -&gt; Deduplication and compression
41393///   
41394/// </td>
41395/// </tr>
41396/// <tr>
41397/// <td>1</td>
41398/// <td>0</td>
41399/// <td>
41400/// - Enable deduplication and compression
41401/// - Disable compression only if already enabled
41402/// - Get *VsanClusterConfigInfo* will return compressionEnabled flag as True
41403///   
41404/// </td>
41405/// <td>
41406/// - No data efficiency -&gt; Deduplication and compression
41407/// - Compression only -&gt; Deduplication and compression
41408///   
41409/// </td>
41410/// </tr>
41411/// <tr>
41412/// <td>0</td>
41413/// <td>1</td>
41414/// <td>
41415/// - Enable compression only
41416/// - Disable deduplication and compression
41417///   
41418/// </td>
41419/// <td>
41420/// - Deduplication and compression -&gt; Compression only
41421/// - No data efficiency -&gt; Compression only
41422///   
41423/// </td>
41424/// </tr>
41425/// <tr>
41426/// <td>1</td>
41427/// <td>None</td>
41428/// <td>
41429/// - Enable deduplication and compression
41430/// - Disable compression only if already enabled
41431/// - Get *VsanClusterConfigInfo* will return compression only flag as True
41432///   
41433/// </td>
41434/// <td>
41435/// - No data efficiency -&gt; deduplication and compression
41436/// - Compression only -&gt; deduplication and compression
41437///   
41438/// </td>
41439/// </tr>
41440/// </table>
41441pub trait VsanDataEfficiencyConfigTrait : super::traits::DataObjectTrait {
41442    /// Enables data deduplication and compression on the vSAN cluster.
41443    /// 
41444    /// The
41445    /// behaviour of this flag is described in the table above.
41446    fn get_dedup_enabled(&self) -> bool;
41447    /// Enables compression on the vSAN cluster.
41448    /// 
41449    /// The behaviour of this
41450    /// flag is described in the table above.
41451    fn get_compression_enabled(&self) -> Option<bool>;
41452}
41453impl<'s> serde::Serialize for dyn VsanDataEfficiencyConfigTrait + 's {
41454            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41455            where
41456                S: serde::Serializer,
41457            {
41458                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41459            }
41460        }
41461impl<'de> serde::Deserialize<'de> for Box<dyn VsanDataEfficiencyConfigTrait> {
41462            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41463                deserializer.deserialize_map(VsanDataEfficiencyConfigVisitor)
41464            }
41465        }
41466
41467struct VsanDataEfficiencyConfigVisitor;
41468
41469impl<'de> de::Visitor<'de> for VsanDataEfficiencyConfigVisitor {
41470    type Value = Box<dyn VsanDataEfficiencyConfigTrait>;
41471
41472    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41473        formatter.write_str("a valid VsanDataEfficiencyConfigTrait JSON object with a _typeName field")
41474    }
41475
41476    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41477    where
41478        A: de::MapAccess<'de>,
41479    {
41480        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41481        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41482        match any {
41483            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41484                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41485            VimAny::Value(value) => Err(de::Error::custom(format!(
41486                "expected object not wrapped value: {:?}",
41487                value))),
41488        }
41489    }
41490}
41491
41492impl VsanDataEfficiencyConfigTrait for VsanDataEfficiencyConfig {
41493    fn get_dedup_enabled(&self) -> bool { self.dedup_enabled }
41494    fn get_compression_enabled(&self) -> Option<bool> { self.compression_enabled }
41495}
41496impl VsanDataEfficiencyConfigTrait for VsanDataEfficiencyConfigEx {
41497    fn get_dedup_enabled(&self) -> bool { self.dedup_enabled }
41498    fn get_compression_enabled(&self) -> Option<bool> { self.compression_enabled }
41499}
41500impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanDataEfficiencyConfigTrait {
41501    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41502        let data_type = from.data_type();
41503        match data_type {
41504            StructType::VsanDataEfficiencyConfig => Some(from.as_any_ref().downcast_ref::<VsanDataEfficiencyConfig>()?),
41505            StructType::VsanDataEfficiencyConfigEx => Some(from.as_any_ref().downcast_ref::<VsanDataEfficiencyConfigEx>()?),
41506            _ => None,
41507        }
41508    }
41509    
41510    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41511        let data_type = from.data_type();
41512        match data_type {
41513            StructType::VsanDataEfficiencyConfig => Ok(from.as_any_box().downcast::<VsanDataEfficiencyConfig>()?),
41514            StructType::VsanDataEfficiencyConfigEx => Ok(from.as_any_box().downcast::<VsanDataEfficiencyConfigEx>()?),
41515            _ => Err(from.as_any_box()),
41516        }
41517    }
41518}
41519/// The datastore configuration of a vSAN cluster.
41520/// 
41521/// This structure may be used only with operations rendered under `/vsan`.
41522pub trait VsanDatastoreConfigTrait : super::traits::DataObjectTrait {
41523    /// The list of non-default vSAN datastores.
41524    fn get_datastores(&self) -> &Option<Vec<Box<dyn super::traits::VsanDatastoreSpecTrait>>>;
41525}
41526impl<'s> serde::Serialize for dyn VsanDatastoreConfigTrait + 's {
41527            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41528            where
41529                S: serde::Serializer,
41530            {
41531                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41532            }
41533        }
41534impl<'de> serde::Deserialize<'de> for Box<dyn VsanDatastoreConfigTrait> {
41535            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41536                deserializer.deserialize_map(VsanDatastoreConfigVisitor)
41537            }
41538        }
41539
41540struct VsanDatastoreConfigVisitor;
41541
41542impl<'de> de::Visitor<'de> for VsanDatastoreConfigVisitor {
41543    type Value = Box<dyn VsanDatastoreConfigTrait>;
41544
41545    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41546        formatter.write_str("a valid VsanDatastoreConfigTrait JSON object with a _typeName field")
41547    }
41548
41549    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41550    where
41551        A: de::MapAccess<'de>,
41552    {
41553        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41554        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41555        match any {
41556            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41557                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41558            VimAny::Value(value) => Err(de::Error::custom(format!(
41559                "expected object not wrapped value: {:?}",
41560                value))),
41561        }
41562    }
41563}
41564
41565impl VsanDatastoreConfigTrait for VsanDatastoreConfig {
41566    fn get_datastores(&self) -> &Option<Vec<Box<dyn super::traits::VsanDatastoreSpecTrait>>> { &self.datastores }
41567}
41568impl VsanDatastoreConfigTrait for VsanAdvancedDatastoreConfig {
41569    fn get_datastores(&self) -> &Option<Vec<Box<dyn super::traits::VsanDatastoreSpecTrait>>> { &self.datastores }
41570}
41571impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanDatastoreConfigTrait {
41572    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41573        let data_type = from.data_type();
41574        match data_type {
41575            StructType::VsanDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanDatastoreConfig>()?),
41576            StructType::VsanAdvancedDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanAdvancedDatastoreConfig>()?),
41577            _ => None,
41578        }
41579    }
41580    
41581    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41582        let data_type = from.data_type();
41583        match data_type {
41584            StructType::VsanDatastoreConfig => Ok(from.as_any_box().downcast::<VsanDatastoreConfig>()?),
41585            StructType::VsanAdvancedDatastoreConfig => Ok(from.as_any_box().downcast::<VsanAdvancedDatastoreConfig>()?),
41586            _ => Err(from.as_any_box()),
41587        }
41588    }
41589}
41590/// The configuration information of a vSAN datastore.
41591/// 
41592/// This structure may be used only with operations rendered under `/vsan`.
41593pub trait VsanDatastoreSpecTrait : super::traits::DataObjectTrait {
41594    /// The UUID of the datastore.
41595    fn get_uuid(&self) -> &str;
41596    /// The user friendly name of the datastore.
41597    fn get_name(&self) -> &str;
41598}
41599impl<'s> serde::Serialize for dyn VsanDatastoreSpecTrait + 's {
41600            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41601            where
41602                S: serde::Serializer,
41603            {
41604                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41605            }
41606        }
41607impl<'de> serde::Deserialize<'de> for Box<dyn VsanDatastoreSpecTrait> {
41608            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41609                deserializer.deserialize_map(VsanDatastoreSpecVisitor)
41610            }
41611        }
41612
41613struct VsanDatastoreSpecVisitor;
41614
41615impl<'de> de::Visitor<'de> for VsanDatastoreSpecVisitor {
41616    type Value = Box<dyn VsanDatastoreSpecTrait>;
41617
41618    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41619        formatter.write_str("a valid VsanDatastoreSpecTrait JSON object with a _typeName field")
41620    }
41621
41622    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41623    where
41624        A: de::MapAccess<'de>,
41625    {
41626        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41627        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41628        match any {
41629            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41630                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41631            VimAny::Value(value) => Err(de::Error::custom(format!(
41632                "expected object not wrapped value: {:?}",
41633                value))),
41634        }
41635    }
41636}
41637
41638impl VsanDatastoreSpecTrait for VsanDatastoreSpec {
41639    fn get_uuid(&self) -> &str { &self.uuid }
41640    fn get_name(&self) -> &str { &self.name }
41641}
41642impl VsanDatastoreSpecTrait for VsanClientDatastoreConfig {
41643    fn get_uuid(&self) -> &str { &self.uuid }
41644    fn get_name(&self) -> &str { &self.name }
41645}
41646impl VsanDatastoreSpecTrait for VsanXvcClientConfig {
41647    fn get_uuid(&self) -> &str { &self.uuid }
41648    fn get_name(&self) -> &str { &self.name }
41649}
41650impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanDatastoreSpecTrait {
41651    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41652        let data_type = from.data_type();
41653        match data_type {
41654            StructType::VsanDatastoreSpec => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSpec>()?),
41655            StructType::VsanClientDatastoreConfig => Some(from.as_any_ref().downcast_ref::<VsanClientDatastoreConfig>()?),
41656            StructType::VsanXvcClientConfig => Some(from.as_any_ref().downcast_ref::<VsanXvcClientConfig>()?),
41657            _ => None,
41658        }
41659    }
41660    
41661    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41662        let data_type = from.data_type();
41663        match data_type {
41664            StructType::VsanDatastoreSpec => Ok(from.as_any_box().downcast::<VsanDatastoreSpec>()?),
41665            StructType::VsanClientDatastoreConfig => Ok(from.as_any_box().downcast::<VsanClientDatastoreConfig>()?),
41666            StructType::VsanXvcClientConfig => Ok(from.as_any_box().downcast::<VsanXvcClientConfig>()?),
41667            _ => Err(from.as_any_box()),
41668        }
41669    }
41670}
41671/// The directory server configuration which can be used to communicate and
41672/// authenticate with a directory server.
41673/// 
41674/// This structure may be used only with operations rendered under `/vsan`.
41675pub trait VsanDirectoryServerConfigTrait : super::traits::DataObjectTrait {
41676}
41677impl<'s> serde::Serialize for dyn VsanDirectoryServerConfigTrait + 's {
41678            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41679            where
41680                S: serde::Serializer,
41681            {
41682                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41683            }
41684        }
41685impl<'de> serde::Deserialize<'de> for Box<dyn VsanDirectoryServerConfigTrait> {
41686            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41687                deserializer.deserialize_map(VsanDirectoryServerConfigVisitor)
41688            }
41689        }
41690
41691struct VsanDirectoryServerConfigVisitor;
41692
41693impl<'de> de::Visitor<'de> for VsanDirectoryServerConfigVisitor {
41694    type Value = Box<dyn VsanDirectoryServerConfigTrait>;
41695
41696    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41697        formatter.write_str("a valid VsanDirectoryServerConfigTrait JSON object with a _typeName field")
41698    }
41699
41700    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41701    where
41702        A: de::MapAccess<'de>,
41703    {
41704        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41705        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41706        match any {
41707            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41708                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41709            VimAny::Value(value) => Err(de::Error::custom(format!(
41710                "expected object not wrapped value: {:?}",
41711                value))),
41712        }
41713    }
41714}
41715
41716impl VsanDirectoryServerConfigTrait for VsanDirectoryServerConfig {
41717}
41718impl VsanDirectoryServerConfigTrait for ActiveVsanDirectoryServerConfig {
41719}
41720impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanDirectoryServerConfigTrait {
41721    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41722        let data_type = from.data_type();
41723        match data_type {
41724            StructType::VsanDirectoryServerConfig => Some(from.as_any_ref().downcast_ref::<VsanDirectoryServerConfig>()?),
41725            StructType::ActiveVsanDirectoryServerConfig => Some(from.as_any_ref().downcast_ref::<ActiveVsanDirectoryServerConfig>()?),
41726            _ => None,
41727        }
41728    }
41729    
41730    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
41731        let data_type = from.data_type();
41732        match data_type {
41733            StructType::VsanDirectoryServerConfig => Ok(from.as_any_box().downcast::<VsanDirectoryServerConfig>()?),
41734            StructType::ActiveVsanDirectoryServerConfig => Ok(from.as_any_box().downcast::<ActiveVsanDirectoryServerConfig>()?),
41735            _ => Err(from.as_any_box()),
41736        }
41737    }
41738}
41739/// Details about the resource check result for a given entity.
41740/// 
41741/// The result
41742/// contains information of current and predicted usage the various
41743/// resources, like capacity, for the entity. For example, for a host result
41744/// contains current and predicted capacity usage and component counts.
41745/// 
41746/// This structure may be used only with operations rendered under `/vsan`.
41747pub trait EntityResourceCheckDetailsTrait : super::traits::DataObjectTrait {
41748    /// The friendly name for this entity.
41749    /// 
41750    /// This is the name specified by user when the entity is created or updated.
41751    fn get_name(&self) -> &Option<String>;
41752    /// The vSAN UUID of the entity.
41753    fn get_uuid(&self) -> &Option<String>;
41754    /// The flag indicates whether this is a new resource entity that is recommended
41755    /// to be added for more resources in order to make the operation succeed.
41756    /// 
41757    /// For
41758    /// example, for a disk group entity the flag indicates whether this is a new
41759    /// disk group that is recommended to be added for more resources in order to
41760    /// make the operation succeed.
41761    fn get_is_new(&self) -> Option<bool>;
41762    /// The total physical capacity of the entity in bytes.
41763    /// 
41764    /// For example, host
41765    /// capacity will be sum of all disk-group's capacity on the host.
41766    /// If *EntityResourceCheckDetails.isNew* is true,
41767    /// the currentUsage is set to 0 since this a recommendation for adding
41768    /// new resource.
41769    fn get_capacity(&self) -> Option<i64>;
41770    /// The predicted total physical capacity of the resource entity in bytes after
41771    /// the operation is done.
41772    /// 
41773    /// For example, if the resource check is for host enter
41774    /// maintenance mode operation the capacity which host was contributing will be
41775    /// removed from the fault domain's total physical capacity.
41776    fn get_post_operation_capacity(&self) -> Option<i64>;
41777    /// The current physical usage of the entity in bytes.
41778    /// 
41779    /// If *EntityResourceCheckDetails.isNew* is true,
41780    /// the currentUsage is set to 0.
41781    fn get_used_capacity(&self) -> Option<i64>;
41782    /// The predicted physical usage of the resource entity in bytes after the
41783    /// operation is done.
41784    /// 
41785    /// For example, if the resource check is for host enter
41786    /// maintenance mode operation, vSAN will simulate the disk usage after the
41787    /// given host enters maintenance mode.
41788    /// If vSAN deduplication and compression is enabled during the operation,
41789    /// vSAN simulation will not take this into consideration and thus will make
41790    /// a conservative estimation of the post-operation disk usage with data
41791    /// non-deduplicated and uncompressed.
41792    /// If vSAN deduplication and compression is disabled during the operation,
41793    /// vSAN simulation will use the average of current deduplication/compression
41794    /// rate of all disk-groups in the cluster to estimate the inflation of data
41795    /// for a rough calculation of the post-operation disk usage.
41796    fn get_post_operation_used_capacity(&self) -> Option<i64>;
41797    /// vSAN's recommendation for additional capacity for this entity to be added
41798    /// in order to make the operation succeed.
41799    /// 
41800    /// This will be sum of all child
41801    /// entitie's additionalRequiredCapacity required. For example, host's
41802    /// additional capacity will be sum of all disk-group's additional capacity
41803    /// on the host.
41804    fn get_additional_required_capacity(&self) -> Option<i64>;
41805    /// Number of maximum vSAN components this entity can hold.
41806    fn get_max_components(&self) -> Option<i64>;
41807    /// Predicted number of vSAN components on this entity post operation.
41808    fn get_components(&self) -> Option<i64>;
41809}
41810impl<'s> serde::Serialize for dyn EntityResourceCheckDetailsTrait + 's {
41811            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
41812            where
41813                S: serde::Serializer,
41814            {
41815                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
41816            }
41817        }
41818impl<'de> serde::Deserialize<'de> for Box<dyn EntityResourceCheckDetailsTrait> {
41819            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
41820                deserializer.deserialize_map(EntityResourceCheckDetailsVisitor)
41821            }
41822        }
41823
41824struct EntityResourceCheckDetailsVisitor;
41825
41826impl<'de> de::Visitor<'de> for EntityResourceCheckDetailsVisitor {
41827    type Value = Box<dyn EntityResourceCheckDetailsTrait>;
41828
41829    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
41830        formatter.write_str("a valid EntityResourceCheckDetailsTrait JSON object with a _typeName field")
41831    }
41832
41833    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
41834    where
41835        A: de::MapAccess<'de>,
41836    {
41837        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
41838        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
41839        match any {
41840            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
41841                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
41842            VimAny::Value(value) => Err(de::Error::custom(format!(
41843                "expected object not wrapped value: {:?}",
41844                value))),
41845        }
41846    }
41847}
41848
41849impl EntityResourceCheckDetailsTrait for EntityResourceCheckDetails {
41850    fn get_name(&self) -> &Option<String> { &self.name }
41851    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41852    fn get_is_new(&self) -> Option<bool> { self.is_new }
41853    fn get_capacity(&self) -> Option<i64> { self.capacity }
41854    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41855    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41856    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41857    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41858    fn get_max_components(&self) -> Option<i64> { self.max_components }
41859    fn get_components(&self) -> Option<i64> { self.components }
41860}
41861impl EntityResourceCheckDetailsTrait for VsanDiskGroupResourceCheckResult {
41862    fn get_name(&self) -> &Option<String> { &self.name }
41863    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41864    fn get_is_new(&self) -> Option<bool> { self.is_new }
41865    fn get_capacity(&self) -> Option<i64> { self.capacity }
41866    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41867    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41868    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41869    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41870    fn get_max_components(&self) -> Option<i64> { self.max_components }
41871    fn get_components(&self) -> Option<i64> { self.components }
41872}
41873impl EntityResourceCheckDetailsTrait for VsanDiskResourceCheckResult {
41874    fn get_name(&self) -> &Option<String> { &self.name }
41875    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41876    fn get_is_new(&self) -> Option<bool> { self.is_new }
41877    fn get_capacity(&self) -> Option<i64> { self.capacity }
41878    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41879    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41880    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41881    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41882    fn get_max_components(&self) -> Option<i64> { self.max_components }
41883    fn get_components(&self) -> Option<i64> { self.components }
41884}
41885impl EntityResourceCheckDetailsTrait for VsanStoragePoolDiskResourceCheckResult {
41886    fn get_name(&self) -> &Option<String> { &self.name }
41887    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41888    fn get_is_new(&self) -> Option<bool> { self.is_new }
41889    fn get_capacity(&self) -> Option<i64> { self.capacity }
41890    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41891    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41892    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41893    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41894    fn get_max_components(&self) -> Option<i64> { self.max_components }
41895    fn get_components(&self) -> Option<i64> { self.components }
41896}
41897impl EntityResourceCheckDetailsTrait for VsanFaultDomainResourceCheckResult {
41898    fn get_name(&self) -> &Option<String> { &self.name }
41899    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41900    fn get_is_new(&self) -> Option<bool> { self.is_new }
41901    fn get_capacity(&self) -> Option<i64> { self.capacity }
41902    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41903    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41904    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41905    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41906    fn get_max_components(&self) -> Option<i64> { self.max_components }
41907    fn get_components(&self) -> Option<i64> { self.components }
41908}
41909impl EntityResourceCheckDetailsTrait for VsanHostResourceCheckResult {
41910    fn get_name(&self) -> &Option<String> { &self.name }
41911    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41912    fn get_is_new(&self) -> Option<bool> { self.is_new }
41913    fn get_capacity(&self) -> Option<i64> { self.capacity }
41914    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41915    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41916    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41917    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41918    fn get_max_components(&self) -> Option<i64> { self.max_components }
41919    fn get_components(&self) -> Option<i64> { self.components }
41920}
41921impl EntityResourceCheckDetailsTrait for VsanResourceCheckResult {
41922    fn get_name(&self) -> &Option<String> { &self.name }
41923    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41924    fn get_is_new(&self) -> Option<bool> { self.is_new }
41925    fn get_capacity(&self) -> Option<i64> { self.capacity }
41926    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41927    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41928    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41929    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41930    fn get_max_components(&self) -> Option<i64> { self.max_components }
41931    fn get_components(&self) -> Option<i64> { self.components }
41932}
41933impl EntityResourceCheckDetailsTrait for VsanResourceCheckComponentResult {
41934    fn get_name(&self) -> &Option<String> { &self.name }
41935    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41936    fn get_is_new(&self) -> Option<bool> { self.is_new }
41937    fn get_capacity(&self) -> Option<i64> { self.capacity }
41938    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41939    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41940    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41941    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41942    fn get_max_components(&self) -> Option<i64> { self.max_components }
41943    fn get_components(&self) -> Option<i64> { self.components }
41944}
41945impl EntityResourceCheckDetailsTrait for VsanResourceCheckDataPersistenceResult {
41946    fn get_name(&self) -> &Option<String> { &self.name }
41947    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41948    fn get_is_new(&self) -> Option<bool> { self.is_new }
41949    fn get_capacity(&self) -> Option<i64> { self.capacity }
41950    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41951    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41952    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41953    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41954    fn get_max_components(&self) -> Option<i64> { self.max_components }
41955    fn get_components(&self) -> Option<i64> { self.components }
41956}
41957impl EntityResourceCheckDetailsTrait for VsanResourceCheckVsanResult {
41958    fn get_name(&self) -> &Option<String> { &self.name }
41959    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41960    fn get_is_new(&self) -> Option<bool> { self.is_new }
41961    fn get_capacity(&self) -> Option<i64> { self.capacity }
41962    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41963    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41964    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41965    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41966    fn get_max_components(&self) -> Option<i64> { self.max_components }
41967    fn get_components(&self) -> Option<i64> { self.components }
41968}
41969impl EntityResourceCheckDetailsTrait for VsanStoragePoolResourceCheckResult {
41970    fn get_name(&self) -> &Option<String> { &self.name }
41971    fn get_uuid(&self) -> &Option<String> { &self.uuid }
41972    fn get_is_new(&self) -> Option<bool> { self.is_new }
41973    fn get_capacity(&self) -> Option<i64> { self.capacity }
41974    fn get_post_operation_capacity(&self) -> Option<i64> { self.post_operation_capacity }
41975    fn get_used_capacity(&self) -> Option<i64> { self.used_capacity }
41976    fn get_post_operation_used_capacity(&self) -> Option<i64> { self.post_operation_used_capacity }
41977    fn get_additional_required_capacity(&self) -> Option<i64> { self.additional_required_capacity }
41978    fn get_max_components(&self) -> Option<i64> { self.max_components }
41979    fn get_components(&self) -> Option<i64> { self.components }
41980}
41981impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn EntityResourceCheckDetailsTrait {
41982    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
41983        let data_type = from.data_type();
41984        match data_type {
41985            StructType::EntityResourceCheckDetails => Some(from.as_any_ref().downcast_ref::<EntityResourceCheckDetails>()?),
41986            StructType::VsanDiskGroupResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskGroupResourceCheckResult>()?),
41987            StructType::VsanDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskResourceCheckResult>()?),
41988            StructType::VsanStoragePoolDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolDiskResourceCheckResult>()?),
41989            StructType::VsanFaultDomainResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanFaultDomainResourceCheckResult>()?),
41990            StructType::VsanHostResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanHostResourceCheckResult>()?),
41991            StructType::VsanResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckResult>()?),
41992            StructType::VsanResourceCheckComponentResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckComponentResult>()?),
41993            StructType::VsanResourceCheckDataPersistenceResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckDataPersistenceResult>()?),
41994            StructType::VsanResourceCheckVsanResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckVsanResult>()?),
41995            StructType::VsanStoragePoolResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolResourceCheckResult>()?),
41996            _ => None,
41997        }
41998    }
41999    
42000    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42001        let data_type = from.data_type();
42002        match data_type {
42003            StructType::EntityResourceCheckDetails => Ok(from.as_any_box().downcast::<EntityResourceCheckDetails>()?),
42004            StructType::VsanDiskGroupResourceCheckResult => Ok(from.as_any_box().downcast::<VsanDiskGroupResourceCheckResult>()?),
42005            StructType::VsanDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanDiskResourceCheckResult>()?),
42006            StructType::VsanStoragePoolDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanStoragePoolDiskResourceCheckResult>()?),
42007            StructType::VsanFaultDomainResourceCheckResult => Ok(from.as_any_box().downcast::<VsanFaultDomainResourceCheckResult>()?),
42008            StructType::VsanHostResourceCheckResult => Ok(from.as_any_box().downcast::<VsanHostResourceCheckResult>()?),
42009            StructType::VsanResourceCheckResult => Ok(from.as_any_box().downcast::<VsanResourceCheckResult>()?),
42010            StructType::VsanResourceCheckComponentResult => Ok(from.as_any_box().downcast::<VsanResourceCheckComponentResult>()?),
42011            StructType::VsanResourceCheckDataPersistenceResult => Ok(from.as_any_box().downcast::<VsanResourceCheckDataPersistenceResult>()?),
42012            StructType::VsanResourceCheckVsanResult => Ok(from.as_any_box().downcast::<VsanResourceCheckVsanResult>()?),
42013            StructType::VsanStoragePoolResourceCheckResult => Ok(from.as_any_box().downcast::<VsanStoragePoolResourceCheckResult>()?),
42014            _ => Err(from.as_any_box()),
42015        }
42016    }
42017}
42018/// The vSAN disk level resource check report.
42019/// 
42020/// It includes basic disk info,
42021/// current disk usage and the predicted disk usage after the queried
42022/// operation is performed *EntityResourceCheckDetails*.
42023/// For example, if the queried resource check is for host enter maintenance
42024/// mode operation, vSAN will simulate the disk usage after the queried host
42025/// enters maintenance mode. This will provide user a sense of what the disk
42026/// usage will look like if the queried operation is carried out.
42027/// If *EntityResourceCheckDetails.isNew* is true, this is a new
42028/// disk suggested to be added by vSAN simulation for more resources to make the
42029/// operation succeed. In this case, currentUsage will be 0 and
42030/// postOperationUsage will show how the new disk will be used assuming the
42031/// queried operation is done from vSAN simulation.
42032/// If *EntityResourceCheckDetails.isNew* is false, this is an
42033/// existing disk in the current cluster. postOperationUsage will give the
42034/// usage of the disk assuming the queried operation is done from vSAN
42035/// simulation.
42036/// 
42037/// This structure may be used only with operations rendered under `/vsan`.
42038pub trait VsanDiskResourceCheckResultTrait : super::traits::EntityResourceCheckDetailsTrait {
42039}
42040impl<'s> serde::Serialize for dyn VsanDiskResourceCheckResultTrait + 's {
42041            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42042            where
42043                S: serde::Serializer,
42044            {
42045                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42046            }
42047        }
42048impl<'de> serde::Deserialize<'de> for Box<dyn VsanDiskResourceCheckResultTrait> {
42049            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42050                deserializer.deserialize_map(VsanDiskResourceCheckResultVisitor)
42051            }
42052        }
42053
42054struct VsanDiskResourceCheckResultVisitor;
42055
42056impl<'de> de::Visitor<'de> for VsanDiskResourceCheckResultVisitor {
42057    type Value = Box<dyn VsanDiskResourceCheckResultTrait>;
42058
42059    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42060        formatter.write_str("a valid VsanDiskResourceCheckResultTrait JSON object with a _typeName field")
42061    }
42062
42063    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42064    where
42065        A: de::MapAccess<'de>,
42066    {
42067        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42068        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42069        match any {
42070            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42071                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42072            VimAny::Value(value) => Err(de::Error::custom(format!(
42073                "expected object not wrapped value: {:?}",
42074                value))),
42075        }
42076    }
42077}
42078
42079impl VsanDiskResourceCheckResultTrait for VsanDiskResourceCheckResult {
42080}
42081impl VsanDiskResourceCheckResultTrait for VsanStoragePoolDiskResourceCheckResult {
42082}
42083impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanDiskResourceCheckResultTrait {
42084    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42085        let data_type = from.data_type();
42086        match data_type {
42087            StructType::VsanDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanDiskResourceCheckResult>()?),
42088            StructType::VsanStoragePoolDiskResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanStoragePoolDiskResourceCheckResult>()?),
42089            _ => None,
42090        }
42091    }
42092    
42093    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42094        let data_type = from.data_type();
42095        match data_type {
42096            StructType::VsanDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanDiskResourceCheckResult>()?),
42097            StructType::VsanStoragePoolDiskResourceCheckResult => Ok(from.as_any_box().downcast::<VsanStoragePoolDiskResourceCheckResult>()?),
42098            _ => Err(from.as_any_box()),
42099        }
42100    }
42101}
42102/// The resource check result for the queried spec
42103/// *VsanResourceCheckSpec*.
42104/// 
42105/// This structure may be used only with operations rendered under `/vsan`.
42106pub trait VsanResourceCheckResultTrait : super::traits::EntityResourceCheckDetailsTrait {
42107    /// The timestamp when the resource check result is generated.
42108    /// 
42109    /// The timestamp
42110    /// will remain unchanged if the resource check result is cached and fetched
42111    /// in the future indicating when the resource check was performed.
42112    fn get_timestamp(&self) -> &str;
42113    /// The overall status of resource check result if resource check has completed.
42114    /// 
42115    /// The possible statuses are:
42116    /// - "green": Resource check passed for the queried operation.
42117    ///   There is sufficient resource in vSAN cluster to perform
42118    ///   the queried operation.
42119    /// - "yellow": Resource check passed for the queried operation, but there is
42120    ///   some existing issue in the cluster, e.g., network partition.
42121    /// - "red": Resource check failed for the queried operation.
42122    ///   If any entity is suggested to be added by resource check report
42123    ///   (i.e. "isNew" flag is set to true), then there is not enough
42124    ///   resource in current vSAN cluster for the given operation. Extra
42125    ///   resource is required to make the given operation succeed.
42126    fn get_status(&self) -> &str;
42127    /// Informative and localizable messages for the resource check.
42128    fn get_messages(&self) -> &Option<Vec<super::structs::LocalizableMessage>>;
42129    /// Detailed hierarchical resource check report.
42130    /// 
42131    /// At the top of the hierarchy it
42132    /// is fault domain level resource check report. Please see
42133    /// *VsanFaultDomainResourceCheckResult*.
42134    /// For data persistence component result, this field will be unset
42135    /// at the moment.
42136    fn get_fault_domains(&self) -> &Option<Vec<super::structs::VsanFaultDomainResourceCheckResult>>;
42137    /// The predicted data migration in bytes assuming the queried operation
42138    /// gets performed.
42139    /// 
42140    /// For example, if the queried resource check type is
42141    /// for host enter maintenance mode operation, vSAN will simulate how many
42142    /// bytes of data will need to move during the host enter maintenance mode
42143    /// process.
42144    /// For data persistence component result, this field will always be zero
42145    /// since no data will be moved during EMM operation.
42146    fn get_data_to_move(&self) -> Option<i64>;
42147    /// The vSAN UUID of objects which are predicted to become non-compliant after
42148    /// the operation is done.
42149    /// 
42150    /// For example, the object may become non-compliant if
42151    /// "ensureObjectAccessibility" is chosen as the data evacuation mode
42152    /// after the host enters maintenance mode.
42153    /// This field is only applicable to regular vSAN component result
42154    /// *VsanResourceCheckVsanResult* and will be unset
42155    /// in the data persistence component result
42156    /// *VsanResourceCheckDataPersistenceResult*.
42157    /// If this is in the aggregated result *VsanResourceCheckStatus.result*,
42158    /// this field has the same value as in the regular vSAN component result
42159    /// *VsanResourceCheckVsanResult*.
42160    fn get_non_compliant_objects(&self) -> &Option<Vec<String>>;
42161    /// The vSAN UUID of objects which are predicted to become inaccessible after
42162    /// the operation is done.
42163    /// 
42164    /// For example, for a FTT=0 object which has only one component on the host,
42165    /// the object will become inaccessible if "noAction" is chosen as the data
42166    /// evacuation mode after the host enters maintenance mode.
42167    /// This field is only applicable to regular vSAN component result
42168    /// *VsanResourceCheckVsanResult* and will be unset
42169    /// in the data persistence component result
42170    /// *VsanResourceCheckDataPersistenceResult*.
42171    /// If this is in the aggregated result *VsanResourceCheckStatus.result*,
42172    /// this field has the same value as in the regular vSAN component result
42173    /// *VsanResourceCheckVsanResult*.
42174    fn get_inaccessible_objects(&self) -> &Option<Vec<String>>;
42175    /// Capacity threshold in percentage of total capacity.
42176    /// 
42177    /// For example, if total
42178    /// used capacity is more than {VsanHealthThreshold.yellowValue}% than status
42179    /// or the entity capcity should be marked as 'yellow'.
42180    /// For data persistence component result, this field will reflect the capacity
42181    /// threshold in percentage of total capacity for vsan direct datastore.
42182    fn get_capacity_threshold(&self) -> &Option<super::structs::VsanHealthThreshold>;
42183    /// What-if vSAN cluster health summary which indicates how the related vSAN
42184    /// health check will look after queried operation is performed.
42185    fn get_health(&self) -> &Option<super::structs::VsanClusterHealthSummary>;
42186    /// The resync related to objects on the host which is currently ongoing
42187    /// (in bytes) and needs to be completed before the host can enter
42188    /// maintenance mode.
42189    fn get_data_to_resync(&self) -> Option<i64>;
42190    /// The what-if dedup store health which is the worst health state of
42191    /// the affected dedup store sub objects.
42192    /// 
42193    /// See also *ResourceCheckDedupStoreHealthState_enum*.
42194    fn get_dedup_store_health(&self) -> &Option<String>;
42195}
42196impl<'s> serde::Serialize for dyn VsanResourceCheckResultTrait + 's {
42197            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42198            where
42199                S: serde::Serializer,
42200            {
42201                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42202            }
42203        }
42204impl<'de> serde::Deserialize<'de> for Box<dyn VsanResourceCheckResultTrait> {
42205            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42206                deserializer.deserialize_map(VsanResourceCheckResultVisitor)
42207            }
42208        }
42209
42210struct VsanResourceCheckResultVisitor;
42211
42212impl<'de> de::Visitor<'de> for VsanResourceCheckResultVisitor {
42213    type Value = Box<dyn VsanResourceCheckResultTrait>;
42214
42215    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42216        formatter.write_str("a valid VsanResourceCheckResultTrait JSON object with a _typeName field")
42217    }
42218
42219    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42220    where
42221        A: de::MapAccess<'de>,
42222    {
42223        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42224        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42225        match any {
42226            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42227                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42228            VimAny::Value(value) => Err(de::Error::custom(format!(
42229                "expected object not wrapped value: {:?}",
42230                value))),
42231        }
42232    }
42233}
42234
42235impl VsanResourceCheckResultTrait for VsanResourceCheckResult {
42236    fn get_timestamp(&self) -> &str { &self.timestamp }
42237    fn get_status(&self) -> &str { &self.status }
42238    fn get_messages(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.messages }
42239    fn get_fault_domains(&self) -> &Option<Vec<super::structs::VsanFaultDomainResourceCheckResult>> { &self.fault_domains }
42240    fn get_data_to_move(&self) -> Option<i64> { self.data_to_move }
42241    fn get_non_compliant_objects(&self) -> &Option<Vec<String>> { &self.non_compliant_objects }
42242    fn get_inaccessible_objects(&self) -> &Option<Vec<String>> { &self.inaccessible_objects }
42243    fn get_capacity_threshold(&self) -> &Option<super::structs::VsanHealthThreshold> { &self.capacity_threshold }
42244    fn get_health(&self) -> &Option<super::structs::VsanClusterHealthSummary> { &self.health }
42245    fn get_data_to_resync(&self) -> Option<i64> { self.data_to_resync }
42246    fn get_dedup_store_health(&self) -> &Option<String> { &self.dedup_store_health }
42247}
42248impl VsanResourceCheckResultTrait for VsanResourceCheckComponentResult {
42249    fn get_timestamp(&self) -> &str { &self.timestamp }
42250    fn get_status(&self) -> &str { &self.status }
42251    fn get_messages(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.messages }
42252    fn get_fault_domains(&self) -> &Option<Vec<super::structs::VsanFaultDomainResourceCheckResult>> { &self.fault_domains }
42253    fn get_data_to_move(&self) -> Option<i64> { self.data_to_move }
42254    fn get_non_compliant_objects(&self) -> &Option<Vec<String>> { &self.non_compliant_objects }
42255    fn get_inaccessible_objects(&self) -> &Option<Vec<String>> { &self.inaccessible_objects }
42256    fn get_capacity_threshold(&self) -> &Option<super::structs::VsanHealthThreshold> { &self.capacity_threshold }
42257    fn get_health(&self) -> &Option<super::structs::VsanClusterHealthSummary> { &self.health }
42258    fn get_data_to_resync(&self) -> Option<i64> { self.data_to_resync }
42259    fn get_dedup_store_health(&self) -> &Option<String> { &self.dedup_store_health }
42260}
42261impl VsanResourceCheckResultTrait for VsanResourceCheckDataPersistenceResult {
42262    fn get_timestamp(&self) -> &str { &self.timestamp }
42263    fn get_status(&self) -> &str { &self.status }
42264    fn get_messages(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.messages }
42265    fn get_fault_domains(&self) -> &Option<Vec<super::structs::VsanFaultDomainResourceCheckResult>> { &self.fault_domains }
42266    fn get_data_to_move(&self) -> Option<i64> { self.data_to_move }
42267    fn get_non_compliant_objects(&self) -> &Option<Vec<String>> { &self.non_compliant_objects }
42268    fn get_inaccessible_objects(&self) -> &Option<Vec<String>> { &self.inaccessible_objects }
42269    fn get_capacity_threshold(&self) -> &Option<super::structs::VsanHealthThreshold> { &self.capacity_threshold }
42270    fn get_health(&self) -> &Option<super::structs::VsanClusterHealthSummary> { &self.health }
42271    fn get_data_to_resync(&self) -> Option<i64> { self.data_to_resync }
42272    fn get_dedup_store_health(&self) -> &Option<String> { &self.dedup_store_health }
42273}
42274impl VsanResourceCheckResultTrait for VsanResourceCheckVsanResult {
42275    fn get_timestamp(&self) -> &str { &self.timestamp }
42276    fn get_status(&self) -> &str { &self.status }
42277    fn get_messages(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.messages }
42278    fn get_fault_domains(&self) -> &Option<Vec<super::structs::VsanFaultDomainResourceCheckResult>> { &self.fault_domains }
42279    fn get_data_to_move(&self) -> Option<i64> { self.data_to_move }
42280    fn get_non_compliant_objects(&self) -> &Option<Vec<String>> { &self.non_compliant_objects }
42281    fn get_inaccessible_objects(&self) -> &Option<Vec<String>> { &self.inaccessible_objects }
42282    fn get_capacity_threshold(&self) -> &Option<super::structs::VsanHealthThreshold> { &self.capacity_threshold }
42283    fn get_health(&self) -> &Option<super::structs::VsanClusterHealthSummary> { &self.health }
42284    fn get_data_to_resync(&self) -> Option<i64> { self.data_to_resync }
42285    fn get_dedup_store_health(&self) -> &Option<String> { &self.dedup_store_health }
42286}
42287impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanResourceCheckResultTrait {
42288    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42289        let data_type = from.data_type();
42290        match data_type {
42291            StructType::VsanResourceCheckResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckResult>()?),
42292            StructType::VsanResourceCheckComponentResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckComponentResult>()?),
42293            StructType::VsanResourceCheckDataPersistenceResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckDataPersistenceResult>()?),
42294            StructType::VsanResourceCheckVsanResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckVsanResult>()?),
42295            _ => None,
42296        }
42297    }
42298    
42299    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42300        let data_type = from.data_type();
42301        match data_type {
42302            StructType::VsanResourceCheckResult => Ok(from.as_any_box().downcast::<VsanResourceCheckResult>()?),
42303            StructType::VsanResourceCheckComponentResult => Ok(from.as_any_box().downcast::<VsanResourceCheckComponentResult>()?),
42304            StructType::VsanResourceCheckDataPersistenceResult => Ok(from.as_any_box().downcast::<VsanResourceCheckDataPersistenceResult>()?),
42305            StructType::VsanResourceCheckVsanResult => Ok(from.as_any_box().downcast::<VsanResourceCheckVsanResult>()?),
42306            _ => Err(from.as_any_box()),
42307        }
42308    }
42309}
42310/// The resource check result for different components,
42311/// e.g., regular vSAN or vSphere data persistence platform.
42312/// 
42313/// This structure may be used only with operations rendered under `/vsan`.
42314pub trait VsanResourceCheckComponentResultTrait : super::traits::VsanResourceCheckResultTrait {
42315    /// The type of the component resource check result that is queried.
42316    /// 
42317    /// Please see *VsanResourceCheckComponentType_enum* for possible types.
42318    /// 
42319    /// See also *VsanResourceCheckComponentType_enum*.
42320    fn get_type(&self) -> &str;
42321}
42322impl<'s> serde::Serialize for dyn VsanResourceCheckComponentResultTrait + 's {
42323            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42324            where
42325                S: serde::Serializer,
42326            {
42327                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42328            }
42329        }
42330impl<'de> serde::Deserialize<'de> for Box<dyn VsanResourceCheckComponentResultTrait> {
42331            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42332                deserializer.deserialize_map(VsanResourceCheckComponentResultVisitor)
42333            }
42334        }
42335
42336struct VsanResourceCheckComponentResultVisitor;
42337
42338impl<'de> de::Visitor<'de> for VsanResourceCheckComponentResultVisitor {
42339    type Value = Box<dyn VsanResourceCheckComponentResultTrait>;
42340
42341    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42342        formatter.write_str("a valid VsanResourceCheckComponentResultTrait JSON object with a _typeName field")
42343    }
42344
42345    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42346    where
42347        A: de::MapAccess<'de>,
42348    {
42349        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42350        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42351        match any {
42352            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42353                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42354            VimAny::Value(value) => Err(de::Error::custom(format!(
42355                "expected object not wrapped value: {:?}",
42356                value))),
42357        }
42358    }
42359}
42360
42361impl VsanResourceCheckComponentResultTrait for VsanResourceCheckComponentResult {
42362    fn get_type(&self) -> &str { &self.r#type }
42363}
42364impl VsanResourceCheckComponentResultTrait for VsanResourceCheckDataPersistenceResult {
42365    fn get_type(&self) -> &str { &self.r#type }
42366}
42367impl VsanResourceCheckComponentResultTrait for VsanResourceCheckVsanResult {
42368    fn get_type(&self) -> &str { &self.r#type }
42369}
42370impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanResourceCheckComponentResultTrait {
42371    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42372        let data_type = from.data_type();
42373        match data_type {
42374            StructType::VsanResourceCheckComponentResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckComponentResult>()?),
42375            StructType::VsanResourceCheckDataPersistenceResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckDataPersistenceResult>()?),
42376            StructType::VsanResourceCheckVsanResult => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckVsanResult>()?),
42377            _ => None,
42378        }
42379    }
42380    
42381    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42382        let data_type = from.data_type();
42383        match data_type {
42384            StructType::VsanResourceCheckComponentResult => Ok(from.as_any_box().downcast::<VsanResourceCheckComponentResult>()?),
42385            StructType::VsanResourceCheckDataPersistenceResult => Ok(from.as_any_box().downcast::<VsanResourceCheckDataPersistenceResult>()?),
42386            StructType::VsanResourceCheckVsanResult => Ok(from.as_any_box().downcast::<VsanResourceCheckVsanResult>()?),
42387            _ => Err(from.as_any_box()),
42388        }
42389    }
42390}
42391/// Precheck result for mounting a remote vSAN datastore.
42392/// 
42393/// It represents the
42394/// precheck status and reason for a specific type of precheck.
42395/// 
42396/// This structure may be used only with operations rendered under `/vsan`.
42397pub trait VsanMountPrecheckItemTrait : super::traits::DataObjectTrait {
42398    /// The type of precheck for mounting remote vSAN datastore.
42399    /// 
42400    /// All supported types are defined in below enumerations:
42401    /// *VimVsanMountPrecheckType_enum*,
42402    /// *VimVsanMountPrecheckTypeDIT_enum*.
42403    /// 
42404    /// See also *VimVsanMountPrecheckType_enum*, *VimVsanMountPrecheckTypeDIT_enum*.
42405    fn get_type(&self) -> &str;
42406    /// The description of precheck for mounting remote vSAN datastore.
42407    fn get_description(&self) -> &super::structs::LocalizableMessage;
42408    /// The status of precheck for mounting remote vSAN datastore.
42409    /// 
42410    /// Check *VsanHealthStatusType_enum* for all possible statuses.
42411    /// 
42412    /// See also *VsanHealthStatusType_enum*.
42413    fn get_status(&self) -> &str;
42414    /// The reason why the precheck returns unsuccessful result.
42415    /// 
42416    /// It contains the
42417    /// error/warning message of the precheck.
42418    fn get_reason(&self) -> &Option<Vec<super::structs::LocalizableMessage>>;
42419    /// The warning information when the item is in "yellow" status but user wants
42420    /// to ignore it and proceed forcefully.
42421    fn get_ignore_message(&self) -> &Option<Vec<super::structs::LocalizableMessage>>;
42422}
42423impl<'s> serde::Serialize for dyn VsanMountPrecheckItemTrait + 's {
42424            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42425            where
42426                S: serde::Serializer,
42427            {
42428                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42429            }
42430        }
42431impl<'de> serde::Deserialize<'de> for Box<dyn VsanMountPrecheckItemTrait> {
42432            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42433                deserializer.deserialize_map(VsanMountPrecheckItemVisitor)
42434            }
42435        }
42436
42437struct VsanMountPrecheckItemVisitor;
42438
42439impl<'de> de::Visitor<'de> for VsanMountPrecheckItemVisitor {
42440    type Value = Box<dyn VsanMountPrecheckItemTrait>;
42441
42442    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42443        formatter.write_str("a valid VsanMountPrecheckItemTrait JSON object with a _typeName field")
42444    }
42445
42446    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42447    where
42448        A: de::MapAccess<'de>,
42449    {
42450        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42451        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42452        match any {
42453            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42454                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42455            VimAny::Value(value) => Err(de::Error::custom(format!(
42456                "expected object not wrapped value: {:?}",
42457                value))),
42458        }
42459    }
42460}
42461
42462impl VsanMountPrecheckItemTrait for VsanMountPrecheckItem {
42463    fn get_type(&self) -> &str { &self.r#type }
42464    fn get_description(&self) -> &super::structs::LocalizableMessage { &self.description }
42465    fn get_status(&self) -> &str { &self.status }
42466    fn get_reason(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.reason }
42467    fn get_ignore_message(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.ignore_message }
42468}
42469impl VsanMountPrecheckItemTrait for VsanDatastoreSourcePrecheckItem {
42470    fn get_type(&self) -> &str { &self.r#type }
42471    fn get_description(&self) -> &super::structs::LocalizableMessage { &self.description }
42472    fn get_status(&self) -> &str { &self.status }
42473    fn get_reason(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.reason }
42474    fn get_ignore_message(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.ignore_message }
42475}
42476impl VsanMountPrecheckItemTrait for VsanMountPrecheckNetworkConnectivityResult {
42477    fn get_type(&self) -> &str { &self.r#type }
42478    fn get_description(&self) -> &super::structs::LocalizableMessage { &self.description }
42479    fn get_status(&self) -> &str { &self.status }
42480    fn get_reason(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.reason }
42481    fn get_ignore_message(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.ignore_message }
42482}
42483impl VsanMountPrecheckItemTrait for VsanMountPrecheckNetworkLatencyResult {
42484    fn get_type(&self) -> &str { &self.r#type }
42485    fn get_description(&self) -> &super::structs::LocalizableMessage { &self.description }
42486    fn get_status(&self) -> &str { &self.status }
42487    fn get_reason(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.reason }
42488    fn get_ignore_message(&self) -> &Option<Vec<super::structs::LocalizableMessage>> { &self.ignore_message }
42489}
42490impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanMountPrecheckItemTrait {
42491    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42492        let data_type = from.data_type();
42493        match data_type {
42494            StructType::VsanMountPrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckItem>()?),
42495            StructType::VsanDatastoreSourcePrecheckItem => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSourcePrecheckItem>()?),
42496            StructType::VsanMountPrecheckNetworkConnectivityResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkConnectivityResult>()?),
42497            StructType::VsanMountPrecheckNetworkLatencyResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckNetworkLatencyResult>()?),
42498            _ => None,
42499        }
42500    }
42501    
42502    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42503        let data_type = from.data_type();
42504        match data_type {
42505            StructType::VsanMountPrecheckItem => Ok(from.as_any_box().downcast::<VsanMountPrecheckItem>()?),
42506            StructType::VsanDatastoreSourcePrecheckItem => Ok(from.as_any_box().downcast::<VsanDatastoreSourcePrecheckItem>()?),
42507            StructType::VsanMountPrecheckNetworkConnectivityResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkConnectivityResult>()?),
42508            StructType::VsanMountPrecheckNetworkLatencyResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckNetworkLatencyResult>()?),
42509            _ => Err(from.as_any_box()),
42510        }
42511    }
42512}
42513/// Result for all types of remote vSAN mounting prechecks.
42514/// 
42515/// This structure may be used only with operations rendered under `/vsan`.
42516pub trait VsanMountPrecheckResultTrait : super::traits::DataObjectTrait {
42517    /// A list of precheck results of supported check items.
42518    /// 
42519    /// See also *VsanMountPrecheckItem*.
42520    fn get_result(&self) -> &Option<Vec<Box<dyn super::traits::VsanMountPrecheckItemTrait>>>;
42521}
42522impl<'s> serde::Serialize for dyn VsanMountPrecheckResultTrait + 's {
42523            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42524            where
42525                S: serde::Serializer,
42526            {
42527                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42528            }
42529        }
42530impl<'de> serde::Deserialize<'de> for Box<dyn VsanMountPrecheckResultTrait> {
42531            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42532                deserializer.deserialize_map(VsanMountPrecheckResultVisitor)
42533            }
42534        }
42535
42536struct VsanMountPrecheckResultVisitor;
42537
42538impl<'de> de::Visitor<'de> for VsanMountPrecheckResultVisitor {
42539    type Value = Box<dyn VsanMountPrecheckResultTrait>;
42540
42541    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42542        formatter.write_str("a valid VsanMountPrecheckResultTrait JSON object with a _typeName field")
42543    }
42544
42545    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42546    where
42547        A: de::MapAccess<'de>,
42548    {
42549        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42550        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42551        match any {
42552            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42553                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42554            VimAny::Value(value) => Err(de::Error::custom(format!(
42555                "expected object not wrapped value: {:?}",
42556                value))),
42557        }
42558    }
42559}
42560
42561impl VsanMountPrecheckResultTrait for VsanMountPrecheckResult {
42562    fn get_result(&self) -> &Option<Vec<Box<dyn super::traits::VsanMountPrecheckItemTrait>>> { &self.result }
42563}
42564impl VsanMountPrecheckResultTrait for VsanDatastoreSourcePrecheckResult {
42565    fn get_result(&self) -> &Option<Vec<Box<dyn super::traits::VsanMountPrecheckItemTrait>>> { &self.result }
42566}
42567impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanMountPrecheckResultTrait {
42568    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42569        let data_type = from.data_type();
42570        match data_type {
42571            StructType::VsanMountPrecheckResult => Some(from.as_any_ref().downcast_ref::<VsanMountPrecheckResult>()?),
42572            StructType::VsanDatastoreSourcePrecheckResult => Some(from.as_any_ref().downcast_ref::<VsanDatastoreSourcePrecheckResult>()?),
42573            _ => None,
42574        }
42575    }
42576    
42577    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42578        let data_type = from.data_type();
42579        match data_type {
42580            StructType::VsanMountPrecheckResult => Ok(from.as_any_box().downcast::<VsanMountPrecheckResult>()?),
42581            StructType::VsanDatastoreSourcePrecheckResult => Ok(from.as_any_box().downcast::<VsanDatastoreSourcePrecheckResult>()?),
42582            _ => Err(from.as_any_box()),
42583        }
42584    }
42585}
42586/// The basic information for communicating with a remote vCenter.
42587/// 
42588/// It is used to connect to the remote vCenter from the local.
42589/// 
42590/// This structure may be used only with operations rendered under `/vsan`.
42591pub trait VsanRemoteVcInfoTrait : super::traits::DataObjectTrait {
42592    /// The link type about how the remote vCenter is linked.
42593    /// 
42594    /// It can be optional for
42595    /// *VsanRemoteDatastoreSystem.VsanUpdateDatastoreSource* and
42596    /// *VsanRemoteDatastoreSystem.VsanDestroyDatastoreSource*
42597    /// APIs.
42598    /// 
42599    /// See also *VsanRemoteVcLinkType_enum*.
42600    fn get_link_type(&self) -> &Option<String>;
42601    /// The remote vCenter name (e.g.
42602    /// 
42603    /// FQDN) to identify the remote vCenter.
42604    fn get_vc_host(&self) -> &str;
42605}
42606impl<'s> serde::Serialize for dyn VsanRemoteVcInfoTrait + 's {
42607            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42608            where
42609                S: serde::Serializer,
42610            {
42611                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42612            }
42613        }
42614impl<'de> serde::Deserialize<'de> for Box<dyn VsanRemoteVcInfoTrait> {
42615            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42616                deserializer.deserialize_map(VsanRemoteVcInfoVisitor)
42617            }
42618        }
42619
42620struct VsanRemoteVcInfoVisitor;
42621
42622impl<'de> de::Visitor<'de> for VsanRemoteVcInfoVisitor {
42623    type Value = Box<dyn VsanRemoteVcInfoTrait>;
42624
42625    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42626        formatter.write_str("a valid VsanRemoteVcInfoTrait JSON object with a _typeName field")
42627    }
42628
42629    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42630    where
42631        A: de::MapAccess<'de>,
42632    {
42633        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42634        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42635        match any {
42636            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42637                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42638            VimAny::Value(value) => Err(de::Error::custom(format!(
42639                "expected object not wrapped value: {:?}",
42640                value))),
42641        }
42642    }
42643}
42644
42645impl VsanRemoteVcInfoTrait for VsanRemoteVcInfo {
42646    fn get_link_type(&self) -> &Option<String> { &self.link_type }
42647    fn get_vc_host(&self) -> &str { &self.vc_host }
42648}
42649impl VsanRemoteVcInfoTrait for VsanRemoteVcInfoStandalone {
42650    fn get_link_type(&self) -> &Option<String> { &self.link_type }
42651    fn get_vc_host(&self) -> &str { &self.vc_host }
42652}
42653impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanRemoteVcInfoTrait {
42654    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42655        let data_type = from.data_type();
42656        match data_type {
42657            StructType::VsanRemoteVcInfo => Some(from.as_any_ref().downcast_ref::<VsanRemoteVcInfo>()?),
42658            StructType::VsanRemoteVcInfoStandalone => Some(from.as_any_ref().downcast_ref::<VsanRemoteVcInfoStandalone>()?),
42659            _ => None,
42660        }
42661    }
42662    
42663    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42664        let data_type = from.data_type();
42665        match data_type {
42666            StructType::VsanRemoteVcInfo => Ok(from.as_any_box().downcast::<VsanRemoteVcInfo>()?),
42667            StructType::VsanRemoteVcInfoStandalone => Ok(from.as_any_box().downcast::<VsanRemoteVcInfoStandalone>()?),
42668            _ => Err(from.as_any_box()),
42669        }
42670    }
42671}
42672/// The detailed information of a running task that is related to resource check.
42673/// 
42674/// The task could be the resource check task itself, or the parent task if
42675/// the resource check is launched by a parent task.
42676/// 
42677/// This structure may be used only with operations rendered under `/vsan`.
42678pub trait VsanResourceCheckTaskDetailsTrait : super::traits::DataObjectTrait {
42679    /// The managed object of the task.
42680    /// 
42681    /// Refers instance of *Task*.
42682    fn get_task(&self) -> &super::structs::ManagedObjectReference;
42683    /// The managed object of the host on which the task is running.
42684    /// 
42685    /// Refers instance of *HostSystem*.
42686    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference>;
42687    /// The vSAN UUID of the host on which the task is running.
42688    fn get_host_uuid(&self) -> &Option<String>;
42689    /// The host maintenance spec specifying the data evacuation mode that
42690    /// the task is running with.
42691    fn get_maintenance_spec(&self) -> &Option<super::structs::HostMaintenanceSpec>;
42692}
42693impl<'s> serde::Serialize for dyn VsanResourceCheckTaskDetailsTrait + 's {
42694            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42695            where
42696                S: serde::Serializer,
42697            {
42698                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42699            }
42700        }
42701impl<'de> serde::Deserialize<'de> for Box<dyn VsanResourceCheckTaskDetailsTrait> {
42702            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42703                deserializer.deserialize_map(VsanResourceCheckTaskDetailsVisitor)
42704            }
42705        }
42706
42707struct VsanResourceCheckTaskDetailsVisitor;
42708
42709impl<'de> de::Visitor<'de> for VsanResourceCheckTaskDetailsVisitor {
42710    type Value = Box<dyn VsanResourceCheckTaskDetailsTrait>;
42711
42712    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42713        formatter.write_str("a valid VsanResourceCheckTaskDetailsTrait JSON object with a _typeName field")
42714    }
42715
42716    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42717    where
42718        A: de::MapAccess<'de>,
42719    {
42720        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42721        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42722        match any {
42723            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42724                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42725            VimAny::Value(value) => Err(de::Error::custom(format!(
42726                "expected object not wrapped value: {:?}",
42727                value))),
42728        }
42729    }
42730}
42731
42732impl VsanResourceCheckTaskDetailsTrait for VsanResourceCheckTaskDetails {
42733    fn get_task(&self) -> &super::structs::ManagedObjectReference { &self.task }
42734    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
42735    fn get_host_uuid(&self) -> &Option<String> { &self.host_uuid }
42736    fn get_maintenance_spec(&self) -> &Option<super::structs::HostMaintenanceSpec> { &self.maintenance_spec }
42737}
42738impl VsanResourceCheckTaskDetailsTrait for VsanDiskDataEvacuationResourceCheckTaskDetails {
42739    fn get_task(&self) -> &super::structs::ManagedObjectReference { &self.task }
42740    fn get_host(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host }
42741    fn get_host_uuid(&self) -> &Option<String> { &self.host_uuid }
42742    fn get_maintenance_spec(&self) -> &Option<super::structs::HostMaintenanceSpec> { &self.maintenance_spec }
42743}
42744impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanResourceCheckTaskDetailsTrait {
42745    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42746        let data_type = from.data_type();
42747        match data_type {
42748            StructType::VsanResourceCheckTaskDetails => Some(from.as_any_ref().downcast_ref::<VsanResourceCheckTaskDetails>()?),
42749            StructType::VsanDiskDataEvacuationResourceCheckTaskDetails => Some(from.as_any_ref().downcast_ref::<VsanDiskDataEvacuationResourceCheckTaskDetails>()?),
42750            _ => None,
42751        }
42752    }
42753    
42754    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42755        let data_type = from.data_type();
42756        match data_type {
42757            StructType::VsanResourceCheckTaskDetails => Ok(from.as_any_box().downcast::<VsanResourceCheckTaskDetails>()?),
42758            StructType::VsanDiskDataEvacuationResourceCheckTaskDetails => Ok(from.as_any_box().downcast::<VsanDiskDataEvacuationResourceCheckTaskDetails>()?),
42759            _ => Err(from.as_any_box()),
42760        }
42761    }
42762}
42763/// Define virtual IP (VIP) specification.
42764/// 
42765/// This structure may be used only with operations rendered under `/vsan`.
42766pub trait VsanIscsiVipConfigSpecTrait : super::traits::DataObjectTrait {
42767    /// Whether virtual IP (VIP) is enabled or not, disabled if it is not specified.
42768    fn get_enabled(&self) -> Option<bool>;
42769    /// IPv4 network configurations for Virtual IP.
42770    /// 
42771    /// If provided, Virtual IP will use
42772    /// IPv4 network. At least one of v4NetworkConfig and v6NetworkConfig
42773    /// should be provided for Virtual IP enablement.
42774    fn get_v_4_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig>;
42775    /// IPv6 network configurations for Virtual IP.
42776    /// 
42777    /// If provided, Virtual IP will use
42778    /// IPv6 network. At least one of v4NetworkConfig and v6NetworkConfig
42779    /// should be provided for Virtual IP enablement.
42780    fn get_v_6_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig>;
42781    /// The standard vSwitch configuration for Virtual IP vmkernal adapter.
42782    /// 
42783    /// You can
42784    /// specify this property only if you do no specify
42785    /// *VsanIscsiVipConfigSpec.distributedSwitchConfig*.
42786    fn get_vswitch_config(&self) -> &Option<super::structs::VsanIscsiVipVswitchConfig>;
42787    /// The distributed vSwitch configuration for Virtual IP vmkernal adapter.
42788    /// 
42789    /// You can specify this property only if you do no specify
42790    /// *VsanIscsiVipConfigSpec.vswitchConfig*.
42791    fn get_distributed_switch_config(&self) -> &Option<super::structs::VsanIscsiVipDVswitchConfig>;
42792}
42793impl<'s> serde::Serialize for dyn VsanIscsiVipConfigSpecTrait + 's {
42794            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42795            where
42796                S: serde::Serializer,
42797            {
42798                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42799            }
42800        }
42801impl<'de> serde::Deserialize<'de> for Box<dyn VsanIscsiVipConfigSpecTrait> {
42802            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42803                deserializer.deserialize_map(VsanIscsiVipConfigSpecVisitor)
42804            }
42805        }
42806
42807struct VsanIscsiVipConfigSpecVisitor;
42808
42809impl<'de> de::Visitor<'de> for VsanIscsiVipConfigSpecVisitor {
42810    type Value = Box<dyn VsanIscsiVipConfigSpecTrait>;
42811
42812    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42813        formatter.write_str("a valid VsanIscsiVipConfigSpecTrait JSON object with a _typeName field")
42814    }
42815
42816    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42817    where
42818        A: de::MapAccess<'de>,
42819    {
42820        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42821        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42822        match any {
42823            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42824                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42825            VimAny::Value(value) => Err(de::Error::custom(format!(
42826                "expected object not wrapped value: {:?}",
42827                value))),
42828        }
42829    }
42830}
42831
42832impl VsanIscsiVipConfigSpecTrait for VsanIscsiVipConfigSpec {
42833    fn get_enabled(&self) -> Option<bool> { self.enabled }
42834    fn get_v_4_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig> { &self.v_4_network_config }
42835    fn get_v_6_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig> { &self.v_6_network_config }
42836    fn get_vswitch_config(&self) -> &Option<super::structs::VsanIscsiVipVswitchConfig> { &self.vswitch_config }
42837    fn get_distributed_switch_config(&self) -> &Option<super::structs::VsanIscsiVipDVswitchConfig> { &self.distributed_switch_config }
42838}
42839impl VsanIscsiVipConfigSpecTrait for VsanIscsiVipConfig {
42840    fn get_enabled(&self) -> Option<bool> { self.enabled }
42841    fn get_v_4_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig> { &self.v_4_network_config }
42842    fn get_v_6_network_config(&self) -> &Option<super::structs::VsanVipNetworkConfig> { &self.v_6_network_config }
42843    fn get_vswitch_config(&self) -> &Option<super::structs::VsanIscsiVipVswitchConfig> { &self.vswitch_config }
42844    fn get_distributed_switch_config(&self) -> &Option<super::structs::VsanIscsiVipDVswitchConfig> { &self.distributed_switch_config }
42845}
42846impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanIscsiVipConfigSpecTrait {
42847    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42848        let data_type = from.data_type();
42849        match data_type {
42850            StructType::VsanIscsiVipConfigSpec => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipConfigSpec>()?),
42851            StructType::VsanIscsiVipConfig => Some(from.as_any_ref().downcast_ref::<VsanIscsiVipConfig>()?),
42852            _ => None,
42853        }
42854    }
42855    
42856    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42857        let data_type = from.data_type();
42858        match data_type {
42859            StructType::VsanIscsiVipConfigSpec => Ok(from.as_any_box().downcast::<VsanIscsiVipConfigSpec>()?),
42860            StructType::VsanIscsiVipConfig => Ok(from.as_any_box().downcast::<VsanIscsiVipConfig>()?),
42861            _ => Err(from.as_any_box()),
42862        }
42863    }
42864}
42865/// Base class for all vSAN configuration issues.
42866/// 
42867/// This structure may be used only with operations rendered under `/vsan`.
42868pub trait VsanConfigBaseIssueTrait : super::traits::DataObjectTrait {
42869}
42870impl<'s> serde::Serialize for dyn VsanConfigBaseIssueTrait + 's {
42871            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42872            where
42873                S: serde::Serializer,
42874            {
42875                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42876            }
42877        }
42878impl<'de> serde::Deserialize<'de> for Box<dyn VsanConfigBaseIssueTrait> {
42879            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42880                deserializer.deserialize_map(VsanConfigBaseIssueVisitor)
42881            }
42882        }
42883
42884struct VsanConfigBaseIssueVisitor;
42885
42886impl<'de> de::Visitor<'de> for VsanConfigBaseIssueVisitor {
42887    type Value = Box<dyn VsanConfigBaseIssueTrait>;
42888
42889    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42890        formatter.write_str("a valid VsanConfigBaseIssueTrait JSON object with a _typeName field")
42891    }
42892
42893    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42894    where
42895        A: de::MapAccess<'de>,
42896    {
42897        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42898        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42899        match any {
42900            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42901                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42902            VimAny::Value(value) => Err(de::Error::custom(format!(
42903                "expected object not wrapped value: {:?}",
42904                value))),
42905        }
42906    }
42907}
42908
42909impl VsanConfigBaseIssueTrait for VsanConfigBaseIssue {
42910}
42911impl VsanConfigBaseIssueTrait for VsanConfigNotAllDisksClaimedIssue {
42912}
42913impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanConfigBaseIssueTrait {
42914    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42915        let data_type = from.data_type();
42916        match data_type {
42917            StructType::VsanConfigBaseIssue => Some(from.as_any_ref().downcast_ref::<VsanConfigBaseIssue>()?),
42918            StructType::VsanConfigNotAllDisksClaimedIssue => Some(from.as_any_ref().downcast_ref::<VsanConfigNotAllDisksClaimedIssue>()?),
42919            _ => None,
42920        }
42921    }
42922    
42923    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
42924        let data_type = from.data_type();
42925        match data_type {
42926            StructType::VsanConfigBaseIssue => Ok(from.as_any_box().downcast::<VsanConfigBaseIssue>()?),
42927            StructType::VsanConfigNotAllDisksClaimedIssue => Ok(from.as_any_box().downcast::<VsanConfigNotAllDisksClaimedIssue>()?),
42928            _ => Err(from.as_any_box()),
42929        }
42930    }
42931}
42932/// Base class for all vSAN network configuration issues.
42933/// 
42934/// This structure may be used only with operations rendered under `/vsan`.
42935pub trait VsanNetworkConfigBaseIssueTrait : super::traits::DataObjectTrait {
42936}
42937impl<'s> serde::Serialize for dyn VsanNetworkConfigBaseIssueTrait + 's {
42938            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
42939            where
42940                S: serde::Serializer,
42941            {
42942                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
42943            }
42944        }
42945impl<'de> serde::Deserialize<'de> for Box<dyn VsanNetworkConfigBaseIssueTrait> {
42946            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
42947                deserializer.deserialize_map(VsanNetworkConfigBaseIssueVisitor)
42948            }
42949        }
42950
42951struct VsanNetworkConfigBaseIssueVisitor;
42952
42953impl<'de> de::Visitor<'de> for VsanNetworkConfigBaseIssueVisitor {
42954    type Value = Box<dyn VsanNetworkConfigBaseIssueTrait>;
42955
42956    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
42957        formatter.write_str("a valid VsanNetworkConfigBaseIssueTrait JSON object with a _typeName field")
42958    }
42959
42960    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
42961    where
42962        A: de::MapAccess<'de>,
42963    {
42964        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
42965        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
42966        match any {
42967            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
42968                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
42969            VimAny::Value(value) => Err(de::Error::custom(format!(
42970                "expected object not wrapped value: {:?}",
42971                value))),
42972        }
42973    }
42974}
42975
42976impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigBaseIssue {
42977}
42978impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigPnicSpeedInconsistencyIssue {
42979}
42980impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigPortgroupWithNoRedundancyIssue {
42981}
42982impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigVdsScopeIssue {
42983}
42984impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigVsanNotOnVdsIssue {
42985}
42986impl VsanNetworkConfigBaseIssueTrait for VsanNetworkConfigVswitchWithNoRedundancyIssue {
42987}
42988impl VsanNetworkConfigBaseIssueTrait for VsanNetworkVMotionVmknicNotFountIssue {
42989}
42990impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanNetworkConfigBaseIssueTrait {
42991    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
42992        let data_type = from.data_type();
42993        match data_type {
42994            StructType::VsanNetworkConfigBaseIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigBaseIssue>()?),
42995            StructType::VsanNetworkConfigPnicSpeedInconsistencyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigPnicSpeedInconsistencyIssue>()?),
42996            StructType::VsanNetworkConfigPortgroupWithNoRedundancyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigPortgroupWithNoRedundancyIssue>()?),
42997            StructType::VsanNetworkConfigVdsScopeIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVdsScopeIssue>()?),
42998            StructType::VsanNetworkConfigVsanNotOnVdsIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVsanNotOnVdsIssue>()?),
42999            StructType::VsanNetworkConfigVswitchWithNoRedundancyIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkConfigVswitchWithNoRedundancyIssue>()?),
43000            StructType::VsanNetworkVMotionVmknicNotFountIssue => Some(from.as_any_ref().downcast_ref::<VsanNetworkVMotionVmknicNotFountIssue>()?),
43001            _ => None,
43002        }
43003    }
43004    
43005    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43006        let data_type = from.data_type();
43007        match data_type {
43008            StructType::VsanNetworkConfigBaseIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigBaseIssue>()?),
43009            StructType::VsanNetworkConfigPnicSpeedInconsistencyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigPnicSpeedInconsistencyIssue>()?),
43010            StructType::VsanNetworkConfigPortgroupWithNoRedundancyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigPortgroupWithNoRedundancyIssue>()?),
43011            StructType::VsanNetworkConfigVdsScopeIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVdsScopeIssue>()?),
43012            StructType::VsanNetworkConfigVsanNotOnVdsIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVsanNotOnVdsIssue>()?),
43013            StructType::VsanNetworkConfigVswitchWithNoRedundancyIssue => Ok(from.as_any_box().downcast::<VsanNetworkConfigVswitchWithNoRedundancyIssue>()?),
43014            StructType::VsanNetworkVMotionVmknicNotFountIssue => Ok(from.as_any_box().downcast::<VsanNetworkVMotionVmknicNotFountIssue>()?),
43015            _ => Err(from.as_any_box()),
43016        }
43017    }
43018}
43019/// The *VsanClusterConfigInfo* data object contains configuration
43020/// data for the VSAN service in a cluster.
43021/// 
43022/// This data object is used both for
43023/// specifying cluster-wide settings when updating the VSAN service, and as an
43024/// output datatype when retrieving current cluster-wide VSAN service settings.
43025/// 
43026/// See also *ComputeResource.ReconfigureComputeResource_Task*.
43027pub trait VsanClusterConfigInfoTrait : super::traits::DataObjectTrait {
43028    /// Whether the VSAN service is enabled for the cluster.
43029    fn get_enabled(&self) -> Option<bool>;
43030    /// Default VSAN settings to use for hosts admitted to the cluster when the
43031    /// VSAN service is enabled.
43032    /// 
43033    /// If omitted, values will default as though the
43034    /// fields in the *VsanClusterConfigInfoHostDefaultInfo* have been omitted.
43035    /// 
43036    /// See also *VsanClusterConfigInfo.enabled*, *VsanClusterConfigInfoHostDefaultInfo*.
43037    fn get_default_config(&self) -> &Option<super::structs::VsanClusterConfigInfoHostDefaultInfo>;
43038    /// Whether the vSAN ESA is enabled for vSAN cluster.
43039    /// 
43040    /// This can only be
43041    /// enabled when vSAN is enabled on the cluster.
43042    /// 
43043    /// ***Since:*** vSphere API Release 8.0.0.1
43044    fn get_vsan_esa_enabled(&self) -> Option<bool>;
43045}
43046impl<'s> serde::Serialize for dyn VsanClusterConfigInfoTrait + 's {
43047            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43048            where
43049                S: serde::Serializer,
43050            {
43051                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43052            }
43053        }
43054impl<'de> serde::Deserialize<'de> for Box<dyn VsanClusterConfigInfoTrait> {
43055            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43056                deserializer.deserialize_map(VsanClusterConfigInfoVisitor)
43057            }
43058        }
43059
43060struct VsanClusterConfigInfoVisitor;
43061
43062impl<'de> de::Visitor<'de> for VsanClusterConfigInfoVisitor {
43063    type Value = Box<dyn VsanClusterConfigInfoTrait>;
43064
43065    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43066        formatter.write_str("a valid VsanClusterConfigInfoTrait JSON object with a _typeName field")
43067    }
43068
43069    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43070    where
43071        A: de::MapAccess<'de>,
43072    {
43073        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43074        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43075        match any {
43076            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43077                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43078            VimAny::Value(value) => Err(de::Error::custom(format!(
43079                "expected object not wrapped value: {:?}",
43080                value))),
43081        }
43082    }
43083}
43084
43085impl VsanClusterConfigInfoTrait for VsanClusterConfigInfo {
43086    fn get_enabled(&self) -> Option<bool> { self.enabled }
43087    fn get_default_config(&self) -> &Option<super::structs::VsanClusterConfigInfoHostDefaultInfo> { &self.default_config }
43088    fn get_vsan_esa_enabled(&self) -> Option<bool> { self.vsan_esa_enabled }
43089}
43090impl VsanClusterConfigInfoTrait for VsanConfigInfoEx {
43091    fn get_enabled(&self) -> Option<bool> { self.enabled }
43092    fn get_default_config(&self) -> &Option<super::structs::VsanClusterConfigInfoHostDefaultInfo> { &self.default_config }
43093    fn get_vsan_esa_enabled(&self) -> Option<bool> { self.vsan_esa_enabled }
43094}
43095impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanClusterConfigInfoTrait {
43096    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43097        let data_type = from.data_type();
43098        match data_type {
43099            StructType::VsanClusterConfigInfo => Some(from.as_any_ref().downcast_ref::<VsanClusterConfigInfo>()?),
43100            StructType::VsanConfigInfoEx => Some(from.as_any_ref().downcast_ref::<VsanConfigInfoEx>()?),
43101            _ => None,
43102        }
43103    }
43104    
43105    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43106        let data_type = from.data_type();
43107        match data_type {
43108            StructType::VsanClusterConfigInfo => Ok(from.as_any_box().downcast::<VsanClusterConfigInfo>()?),
43109            StructType::VsanConfigInfoEx => Ok(from.as_any_box().downcast::<VsanConfigInfoEx>()?),
43110            _ => Err(from.as_any_box()),
43111        }
43112    }
43113}
43114/// The *VsanHostConfigInfo* data object contains host-specific settings
43115/// for the VSAN service.
43116/// 
43117/// This data object is used both for specifying
43118/// settings for updating the VSAN service, and as an output datatype
43119/// when retrieving current VSAN service settings.
43120pub trait VsanHostConfigInfoTrait : super::traits::DataObjectTrait {
43121    /// Whether the VSAN service is currently enabled on this host.
43122    fn get_enabled(&self) -> Option<bool>;
43123    /// The *HostSystem* for this host.
43124    /// 
43125    /// This argument is required when this configuration is specified as
43126    /// an input to VC-level APIs. When this configuration is specified
43127    /// to a host-level direct API, this argument may be omitted.
43128    /// 
43129    /// See also *ComputeResource.ReconfigureComputeResource_Task*, *HostVsanSystem.UpdateVsan_Task*.
43130    /// 
43131    /// Refers instance of *HostSystem*.
43132    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference>;
43133    /// The VSAN service cluster configuration for this host.
43134    fn get_cluster_info(&self) -> &Option<super::structs::VsanHostConfigInfoClusterInfo>;
43135    /// The VSAN storage configuration for this host.
43136    /// 
43137    /// VSAN storage configuration settings are independent of the
43138    /// current value of *VsanHostConfigInfo.enabled*.
43139    fn get_storage_info(&self) -> &Option<super::structs::VsanHostConfigInfoStorageInfo>;
43140    /// The VSAN network configuration for this host.
43141    /// 
43142    /// VSAN network configuration settings are independent of the
43143    /// current value of *VsanHostConfigInfo.enabled*.
43144    fn get_network_info(&self) -> &Option<super::structs::VsanHostConfigInfoNetworkInfo>;
43145    /// The VSAN fault domain configuration for this host.
43146    /// 
43147    /// VSAN host fault domain settings are independent of the
43148    /// current value of *VsanHostConfigInfo.enabled*.
43149    fn get_fault_domain_info(&self) -> &Option<super::structs::VsanHostFaultDomainInfo>;
43150    /// Whether the vSAN ESA is enabled on this host.
43151    /// 
43152    /// This can only be
43153    /// enabled when vSAN is enabled on this host.
43154    /// 
43155    /// ***Since:*** vSphere API Release 8.0.0.1
43156    fn get_vsan_esa_enabled(&self) -> Option<bool>;
43157}
43158impl<'s> serde::Serialize for dyn VsanHostConfigInfoTrait + 's {
43159            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43160            where
43161                S: serde::Serializer,
43162            {
43163                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43164            }
43165        }
43166impl<'de> serde::Deserialize<'de> for Box<dyn VsanHostConfigInfoTrait> {
43167            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43168                deserializer.deserialize_map(VsanHostConfigInfoVisitor)
43169            }
43170        }
43171
43172struct VsanHostConfigInfoVisitor;
43173
43174impl<'de> de::Visitor<'de> for VsanHostConfigInfoVisitor {
43175    type Value = Box<dyn VsanHostConfigInfoTrait>;
43176
43177    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43178        formatter.write_str("a valid VsanHostConfigInfoTrait JSON object with a _typeName field")
43179    }
43180
43181    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43182    where
43183        A: de::MapAccess<'de>,
43184    {
43185        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43186        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43187        match any {
43188            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43189                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43190            VimAny::Value(value) => Err(de::Error::custom(format!(
43191                "expected object not wrapped value: {:?}",
43192                value))),
43193        }
43194    }
43195}
43196
43197impl VsanHostConfigInfoTrait for VsanHostConfigInfo {
43198    fn get_enabled(&self) -> Option<bool> { self.enabled }
43199    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host_system }
43200    fn get_cluster_info(&self) -> &Option<super::structs::VsanHostConfigInfoClusterInfo> { &self.cluster_info }
43201    fn get_storage_info(&self) -> &Option<super::structs::VsanHostConfigInfoStorageInfo> { &self.storage_info }
43202    fn get_network_info(&self) -> &Option<super::structs::VsanHostConfigInfoNetworkInfo> { &self.network_info }
43203    fn get_fault_domain_info(&self) -> &Option<super::structs::VsanHostFaultDomainInfo> { &self.fault_domain_info }
43204    fn get_vsan_esa_enabled(&self) -> Option<bool> { self.vsan_esa_enabled }
43205}
43206impl VsanHostConfigInfoTrait for VsanHostConfigInfoEx {
43207    fn get_enabled(&self) -> Option<bool> { self.enabled }
43208    fn get_host_system(&self) -> &Option<super::structs::ManagedObjectReference> { &self.host_system }
43209    fn get_cluster_info(&self) -> &Option<super::structs::VsanHostConfigInfoClusterInfo> { &self.cluster_info }
43210    fn get_storage_info(&self) -> &Option<super::structs::VsanHostConfigInfoStorageInfo> { &self.storage_info }
43211    fn get_network_info(&self) -> &Option<super::structs::VsanHostConfigInfoNetworkInfo> { &self.network_info }
43212    fn get_fault_domain_info(&self) -> &Option<super::structs::VsanHostFaultDomainInfo> { &self.fault_domain_info }
43213    fn get_vsan_esa_enabled(&self) -> Option<bool> { self.vsan_esa_enabled }
43214}
43215impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHostConfigInfoTrait {
43216    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43217        let data_type = from.data_type();
43218        match data_type {
43219            StructType::VsanHostConfigInfo => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfo>()?),
43220            StructType::VsanHostConfigInfoEx => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoEx>()?),
43221            _ => None,
43222        }
43223    }
43224    
43225    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43226        let data_type = from.data_type();
43227        match data_type {
43228            StructType::VsanHostConfigInfo => Ok(from.as_any_box().downcast::<VsanHostConfigInfo>()?),
43229            StructType::VsanHostConfigInfoEx => Ok(from.as_any_box().downcast::<VsanHostConfigInfoEx>()?),
43230            _ => Err(from.as_any_box()),
43231        }
43232    }
43233}
43234/// A PortConfig represents a virtual network adapter and its
43235/// configuration for use by the VSAN service.
43236/// 
43237/// See also *HostVirtualNic*.
43238pub trait VsanHostConfigInfoNetworkInfoPortConfigTrait : super::traits::DataObjectTrait {
43239    /// *VsanHostIpConfig* for this PortConfig.
43240    fn get_ip_config(&self) -> &Option<Box<dyn super::traits::VsanHostIpConfigTrait>>;
43241    /// Device name which identifies the network adapter for this
43242    /// PortConfig.
43243    /// 
43244    /// See also *HostVirtualNic.device*.
43245    fn get_device(&self) -> &str;
43246}
43247impl<'s> serde::Serialize for dyn VsanHostConfigInfoNetworkInfoPortConfigTrait + 's {
43248            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43249            where
43250                S: serde::Serializer,
43251            {
43252                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43253            }
43254        }
43255impl<'de> serde::Deserialize<'de> for Box<dyn VsanHostConfigInfoNetworkInfoPortConfigTrait> {
43256            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43257                deserializer.deserialize_map(VsanHostConfigInfoNetworkInfoPortConfigVisitor)
43258            }
43259        }
43260
43261struct VsanHostConfigInfoNetworkInfoPortConfigVisitor;
43262
43263impl<'de> de::Visitor<'de> for VsanHostConfigInfoNetworkInfoPortConfigVisitor {
43264    type Value = Box<dyn VsanHostConfigInfoNetworkInfoPortConfigTrait>;
43265
43266    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43267        formatter.write_str("a valid VsanHostConfigInfoNetworkInfoPortConfigTrait JSON object with a _typeName field")
43268    }
43269
43270    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43271    where
43272        A: de::MapAccess<'de>,
43273    {
43274        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43275        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43276        match any {
43277            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43278                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43279            VimAny::Value(value) => Err(de::Error::custom(format!(
43280                "expected object not wrapped value: {:?}",
43281                value))),
43282        }
43283    }
43284}
43285
43286impl VsanHostConfigInfoNetworkInfoPortConfigTrait for VsanHostConfigInfoNetworkInfoPortConfig {
43287    fn get_ip_config(&self) -> &Option<Box<dyn super::traits::VsanHostIpConfigTrait>> { &self.ip_config }
43288    fn get_device(&self) -> &str { &self.device }
43289}
43290impl VsanHostConfigInfoNetworkInfoPortConfigTrait for VsanHostPortConfigEx {
43291    fn get_ip_config(&self) -> &Option<Box<dyn super::traits::VsanHostIpConfigTrait>> { &self.ip_config }
43292    fn get_device(&self) -> &str { &self.device }
43293}
43294impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHostConfigInfoNetworkInfoPortConfigTrait {
43295    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43296        let data_type = from.data_type();
43297        match data_type {
43298            StructType::VsanHostConfigInfoNetworkInfoPortConfig => Some(from.as_any_ref().downcast_ref::<VsanHostConfigInfoNetworkInfoPortConfig>()?),
43299            StructType::VsanHostPortConfigEx => Some(from.as_any_ref().downcast_ref::<VsanHostPortConfigEx>()?),
43300            _ => None,
43301        }
43302    }
43303    
43304    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43305        let data_type = from.data_type();
43306        match data_type {
43307            StructType::VsanHostConfigInfoNetworkInfoPortConfig => Ok(from.as_any_box().downcast::<VsanHostConfigInfoNetworkInfoPortConfig>()?),
43308            StructType::VsanHostPortConfigEx => Ok(from.as_any_box().downcast::<VsanHostPortConfigEx>()?),
43309            _ => Err(from.as_any_box()),
43310        }
43311    }
43312}
43313/// A DiskResult represents the result of VSAN configuration operation
43314/// on a *HostScsiDisk*, and its current eligibility state for use by
43315/// the VSAN service.
43316/// 
43317/// See also *HostVsanSystem.QueryDisksForVsan*, *HostVsanSystem.UpdateVsan_Task*, *VsanHostDiskResultState_enum*.
43318pub trait VsanHostDiskResultTrait : super::traits::DataObjectTrait {
43319    /// Disk for this result.
43320    fn get_disk(&self) -> &super::structs::HostScsiDisk;
43321    /// State of the disk for this result.
43322    /// 
43323    /// See also *VsanHostDiskResultState_enum*.
43324    fn get_state(&self) -> &str;
43325    /// VSAN disk UUID in case this disk is a VSAN disk.
43326    fn get_vsan_uuid(&self) -> &Option<String>;
43327    /// Error information for this result: may be populated with additional
43328    /// information about the disk at hand, regardless of the disk's state.
43329    /// 
43330    /// See also *VsanDiskFault*, *VsanHostDiskResult.state*.
43331    fn get_error(&self) -> &Option<super::structs::MethodFault>;
43332    /// Indicates whether the disk is degraded in VSAN performance.
43333    /// 
43334    /// If set, indicates the disk performance is degraded in VSAN
43335    /// If unset, it is unknown whether the disk performance is degraded in VSAN.
43336    fn get_degraded(&self) -> Option<bool>;
43337}
43338impl<'s> serde::Serialize for dyn VsanHostDiskResultTrait + 's {
43339            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43340            where
43341                S: serde::Serializer,
43342            {
43343                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43344            }
43345        }
43346impl<'de> serde::Deserialize<'de> for Box<dyn VsanHostDiskResultTrait> {
43347            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43348                deserializer.deserialize_map(VsanHostDiskResultVisitor)
43349            }
43350        }
43351
43352struct VsanHostDiskResultVisitor;
43353
43354impl<'de> de::Visitor<'de> for VsanHostDiskResultVisitor {
43355    type Value = Box<dyn VsanHostDiskResultTrait>;
43356
43357    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43358        formatter.write_str("a valid VsanHostDiskResultTrait JSON object with a _typeName field")
43359    }
43360
43361    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43362    where
43363        A: de::MapAccess<'de>,
43364    {
43365        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43366        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43367        match any {
43368            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43369                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43370            VimAny::Value(value) => Err(de::Error::custom(format!(
43371                "expected object not wrapped value: {:?}",
43372                value))),
43373        }
43374    }
43375}
43376
43377impl VsanHostDiskResultTrait for VsanHostDiskResult {
43378    fn get_disk(&self) -> &super::structs::HostScsiDisk { &self.disk }
43379    fn get_state(&self) -> &str { &self.state }
43380    fn get_vsan_uuid(&self) -> &Option<String> { &self.vsan_uuid }
43381    fn get_error(&self) -> &Option<super::structs::MethodFault> { &self.error }
43382    fn get_degraded(&self) -> Option<bool> { self.degraded }
43383}
43384impl VsanHostDiskResultTrait for VimVsanHostDiskResultEx {
43385    fn get_disk(&self) -> &super::structs::HostScsiDisk { &self.disk }
43386    fn get_state(&self) -> &str { &self.state }
43387    fn get_vsan_uuid(&self) -> &Option<String> { &self.vsan_uuid }
43388    fn get_error(&self) -> &Option<super::structs::MethodFault> { &self.error }
43389    fn get_degraded(&self) -> Option<bool> { self.degraded }
43390}
43391impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHostDiskResultTrait {
43392    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43393        let data_type = from.data_type();
43394        match data_type {
43395            StructType::VsanHostDiskResult => Some(from.as_any_ref().downcast_ref::<VsanHostDiskResult>()?),
43396            StructType::VimVsanHostDiskResultEx => Some(from.as_any_ref().downcast_ref::<VimVsanHostDiskResultEx>()?),
43397            _ => None,
43398        }
43399    }
43400    
43401    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43402        let data_type = from.data_type();
43403        match data_type {
43404            StructType::VsanHostDiskResult => Ok(from.as_any_box().downcast::<VsanHostDiskResult>()?),
43405            StructType::VimVsanHostDiskResultEx => Ok(from.as_any_box().downcast::<VimVsanHostDiskResultEx>()?),
43406            _ => Err(from.as_any_box()),
43407        }
43408    }
43409}
43410/// An *VsanHostIpConfig* is a pair of multicast IP addresses for use by the VSAN
43411/// service.
43412/// 
43413/// For VSAN there is one such IpConfig pair per "virtual network" as
43414/// represented by *VsanHostConfigInfoNetworkInfoPortConfig*.
43415/// 
43416/// See also *VsanHostConfigInfoNetworkInfo*, *VsanHostConfigInfoNetworkInfo.port*, *VsanHostConfigInfoNetworkInfoPortConfig*, *HostVsanSystem.UpdateVsan_Task*.
43417pub trait VsanHostIpConfigTrait : super::traits::DataObjectTrait {
43418    /// Agent-to-master multicast IP address.
43419    fn get_upstream_ip_address(&self) -> &str;
43420    /// Master-to-agent multicast IP address.
43421    fn get_downstream_ip_address(&self) -> &str;
43422}
43423impl<'s> serde::Serialize for dyn VsanHostIpConfigTrait + 's {
43424            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43425            where
43426                S: serde::Serializer,
43427            {
43428                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43429            }
43430        }
43431impl<'de> serde::Deserialize<'de> for Box<dyn VsanHostIpConfigTrait> {
43432            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43433                deserializer.deserialize_map(VsanHostIpConfigVisitor)
43434            }
43435        }
43436
43437struct VsanHostIpConfigVisitor;
43438
43439impl<'de> de::Visitor<'de> for VsanHostIpConfigVisitor {
43440    type Value = Box<dyn VsanHostIpConfigTrait>;
43441
43442    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43443        formatter.write_str("a valid VsanHostIpConfigTrait JSON object with a _typeName field")
43444    }
43445
43446    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43447    where
43448        A: de::MapAccess<'de>,
43449    {
43450        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43451        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43452        match any {
43453            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43454                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43455            VimAny::Value(value) => Err(de::Error::custom(format!(
43456                "expected object not wrapped value: {:?}",
43457                value))),
43458        }
43459    }
43460}
43461
43462impl VsanHostIpConfigTrait for VsanHostIpConfig {
43463    fn get_upstream_ip_address(&self) -> &str { &self.upstream_ip_address }
43464    fn get_downstream_ip_address(&self) -> &str { &self.downstream_ip_address }
43465}
43466impl VsanHostIpConfigTrait for VsanHostIpConfigEx {
43467    fn get_upstream_ip_address(&self) -> &str { &self.upstream_ip_address }
43468    fn get_downstream_ip_address(&self) -> &str { &self.downstream_ip_address }
43469}
43470impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VsanHostIpConfigTrait {
43471    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43472        let data_type = from.data_type();
43473        match data_type {
43474            StructType::VsanHostIpConfig => Some(from.as_any_ref().downcast_ref::<VsanHostIpConfig>()?),
43475            StructType::VsanHostIpConfigEx => Some(from.as_any_ref().downcast_ref::<VsanHostIpConfigEx>()?),
43476            _ => None,
43477        }
43478    }
43479    
43480    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43481        let data_type = from.data_type();
43482        match data_type {
43483            StructType::VsanHostIpConfig => Ok(from.as_any_box().downcast::<VsanHostIpConfig>()?),
43484            StructType::VsanHostIpConfigEx => Ok(from.as_any_box().downcast::<VsanHostIpConfigEx>()?),
43485            _ => Err(from.as_any_box()),
43486        }
43487    }
43488}
43489/// This data object type contains the basic configuration for
43490/// a virtual storage object or a virtual storage object snapshot.
43491pub trait BaseConfigInfoTrait : super::traits::DataObjectTrait {
43492    /// ID of this object.
43493    fn get_id(&self) -> &super::structs::Id;
43494    /// Descriptive name of this object.
43495    fn get_name(&self) -> &str;
43496    /// The date and time this object was created.
43497    fn get_create_time(&self) -> &str;
43498    /// Choice of the deletion behavior of this virtual storage object.
43499    /// 
43500    /// If not set, the default value is false.
43501    fn get_keep_after_delete_vm(&self) -> Option<bool>;
43502    /// Is virtual storage object relocation disabled.
43503    /// 
43504    /// If not set, the default value is false.
43505    fn get_relocation_disabled(&self) -> Option<bool>;
43506    /// Is virtual storage object supports native snapshot.
43507    /// 
43508    /// If not set, the default value is false.
43509    fn get_native_snapshot_supported(&self) -> Option<bool>;
43510    /// If Virtua storage object has changed block tracking enabled.
43511    /// 
43512    /// If not set, the default value is false.
43513    fn get_changed_block_tracking_enabled(&self) -> Option<bool>;
43514    /// Backing of this object.
43515    fn get_backing(&self) -> &Box<dyn super::traits::BaseConfigInfoBackingInfoTrait>;
43516    /// Metadata associated with the FCD if available.
43517    /// 
43518    /// ***Since:*** vSphere API Release 7.0.2.0
43519    fn get_metadata(&self) -> &Option<Vec<super::structs::KeyValue>>;
43520    /// VClock associated with the fcd when the operation completed.
43521    /// 
43522    /// The files is unset if the operation is a retrieve.
43523    /// 
43524    /// ***Since:*** vSphere API Release 7.0.2.0
43525    fn get_vclock(&self) -> &Option<super::structs::VslmVClockInfo>;
43526    /// IDs of the IO Filters associated with the virtual disk.
43527    /// 
43528    /// See *IoFilterInfo.id*.
43529    /// The client cannot modify this information on a virtual machine.
43530    fn get_iofilter(&self) -> &Option<Vec<String>>;
43531}
43532impl<'s> serde::Serialize for dyn BaseConfigInfoTrait + 's {
43533            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43534            where
43535                S: serde::Serializer,
43536            {
43537                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43538            }
43539        }
43540impl<'de> serde::Deserialize<'de> for Box<dyn BaseConfigInfoTrait> {
43541            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43542                deserializer.deserialize_map(BaseConfigInfoVisitor)
43543            }
43544        }
43545
43546struct BaseConfigInfoVisitor;
43547
43548impl<'de> de::Visitor<'de> for BaseConfigInfoVisitor {
43549    type Value = Box<dyn BaseConfigInfoTrait>;
43550
43551    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43552        formatter.write_str("a valid BaseConfigInfoTrait JSON object with a _typeName field")
43553    }
43554
43555    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43556    where
43557        A: de::MapAccess<'de>,
43558    {
43559        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43560        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43561        match any {
43562            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43563                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43564            VimAny::Value(value) => Err(de::Error::custom(format!(
43565                "expected object not wrapped value: {:?}",
43566                value))),
43567        }
43568    }
43569}
43570
43571impl BaseConfigInfoTrait for BaseConfigInfo {
43572    fn get_id(&self) -> &super::structs::Id { &self.id }
43573    fn get_name(&self) -> &str { &self.name }
43574    fn get_create_time(&self) -> &str { &self.create_time }
43575    fn get_keep_after_delete_vm(&self) -> Option<bool> { self.keep_after_delete_vm }
43576    fn get_relocation_disabled(&self) -> Option<bool> { self.relocation_disabled }
43577    fn get_native_snapshot_supported(&self) -> Option<bool> { self.native_snapshot_supported }
43578    fn get_changed_block_tracking_enabled(&self) -> Option<bool> { self.changed_block_tracking_enabled }
43579    fn get_backing(&self) -> &Box<dyn super::traits::BaseConfigInfoBackingInfoTrait> { &self.backing }
43580    fn get_metadata(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.metadata }
43581    fn get_vclock(&self) -> &Option<super::structs::VslmVClockInfo> { &self.vclock }
43582    fn get_iofilter(&self) -> &Option<Vec<String>> { &self.iofilter }
43583}
43584impl BaseConfigInfoTrait for VStorageObjectConfigInfo {
43585    fn get_id(&self) -> &super::structs::Id { &self.id }
43586    fn get_name(&self) -> &str { &self.name }
43587    fn get_create_time(&self) -> &str { &self.create_time }
43588    fn get_keep_after_delete_vm(&self) -> Option<bool> { self.keep_after_delete_vm }
43589    fn get_relocation_disabled(&self) -> Option<bool> { self.relocation_disabled }
43590    fn get_native_snapshot_supported(&self) -> Option<bool> { self.native_snapshot_supported }
43591    fn get_changed_block_tracking_enabled(&self) -> Option<bool> { self.changed_block_tracking_enabled }
43592    fn get_backing(&self) -> &Box<dyn super::traits::BaseConfigInfoBackingInfoTrait> { &self.backing }
43593    fn get_metadata(&self) -> &Option<Vec<super::structs::KeyValue>> { &self.metadata }
43594    fn get_vclock(&self) -> &Option<super::structs::VslmVClockInfo> { &self.vclock }
43595    fn get_iofilter(&self) -> &Option<Vec<String>> { &self.iofilter }
43596}
43597impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn BaseConfigInfoTrait {
43598    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43599        let data_type = from.data_type();
43600        match data_type {
43601            StructType::BaseConfigInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfo>()?),
43602            StructType::VStorageObjectConfigInfo => Some(from.as_any_ref().downcast_ref::<VStorageObjectConfigInfo>()?),
43603            _ => None,
43604        }
43605    }
43606    
43607    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43608        let data_type = from.data_type();
43609        match data_type {
43610            StructType::BaseConfigInfo => Ok(from.as_any_box().downcast::<BaseConfigInfo>()?),
43611            StructType::VStorageObjectConfigInfo => Ok(from.as_any_box().downcast::<VStorageObjectConfigInfo>()?),
43612            _ => Err(from.as_any_box()),
43613        }
43614    }
43615}
43616/// The data object type is a base type of backing of a virtual
43617/// storage object.
43618pub trait BaseConfigInfoBackingInfoTrait : super::traits::DataObjectTrait {
43619    /// The datastore managed object where this backing is located.
43620    /// 
43621    /// Refers instance of *Datastore*.
43622    fn get_datastore(&self) -> &super::structs::ManagedObjectReference;
43623}
43624impl<'s> serde::Serialize for dyn BaseConfigInfoBackingInfoTrait + 's {
43625            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43626            where
43627                S: serde::Serializer,
43628            {
43629                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43630            }
43631        }
43632impl<'de> serde::Deserialize<'de> for Box<dyn BaseConfigInfoBackingInfoTrait> {
43633            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43634                deserializer.deserialize_map(BaseConfigInfoBackingInfoVisitor)
43635            }
43636        }
43637
43638struct BaseConfigInfoBackingInfoVisitor;
43639
43640impl<'de> de::Visitor<'de> for BaseConfigInfoBackingInfoVisitor {
43641    type Value = Box<dyn BaseConfigInfoBackingInfoTrait>;
43642
43643    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43644        formatter.write_str("a valid BaseConfigInfoBackingInfoTrait JSON object with a _typeName field")
43645    }
43646
43647    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43648    where
43649        A: de::MapAccess<'de>,
43650    {
43651        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43652        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43653        match any {
43654            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43655                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43656            VimAny::Value(value) => Err(de::Error::custom(format!(
43657                "expected object not wrapped value: {:?}",
43658                value))),
43659        }
43660    }
43661}
43662
43663impl BaseConfigInfoBackingInfoTrait for BaseConfigInfoBackingInfo {
43664    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43665}
43666impl BaseConfigInfoBackingInfoTrait for BaseConfigInfoFileBackingInfo {
43667    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43668}
43669impl BaseConfigInfoBackingInfoTrait for BaseConfigInfoDiskFileBackingInfo {
43670    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43671}
43672impl BaseConfigInfoBackingInfoTrait for BaseConfigInfoRawDiskMappingBackingInfo {
43673    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43674}
43675impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn BaseConfigInfoBackingInfoTrait {
43676    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43677        let data_type = from.data_type();
43678        match data_type {
43679            StructType::BaseConfigInfoBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoBackingInfo>()?),
43680            StructType::BaseConfigInfoFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoFileBackingInfo>()?),
43681            StructType::BaseConfigInfoDiskFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoDiskFileBackingInfo>()?),
43682            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
43683            _ => None,
43684        }
43685    }
43686    
43687    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43688        let data_type = from.data_type();
43689        match data_type {
43690            StructType::BaseConfigInfoBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoBackingInfo>()?),
43691            StructType::BaseConfigInfoFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoFileBackingInfo>()?),
43692            StructType::BaseConfigInfoDiskFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoDiskFileBackingInfo>()?),
43693            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
43694            _ => Err(from.as_any_box()),
43695        }
43696    }
43697}
43698/// Information for file backing of a virtual storage
43699/// object.
43700/// 
43701/// File backing is mainly used for virtual disks.
43702pub trait BaseConfigInfoFileBackingInfoTrait : super::traits::BaseConfigInfoBackingInfoTrait {
43703    /// Full file path for the host file used in this backing.
43704    fn get_file_path(&self) -> &str;
43705    /// Id refers to the backed storage object where the virtual storage object
43706    /// is backed on.
43707    fn get_backing_object_id(&self) -> &Option<String>;
43708    /// The parent of this virtual disk file, if this is a delta disk backing.
43709    /// 
43710    /// This will be unset if this is the root disk backing.
43711    /// 
43712    /// Note that the type of the backing is consistent throughout the chain;
43713    /// any new delta disk backing which is added is of the same type as the
43714    /// original disk. Also note that since the parent backing is not being
43715    /// written to, it is possible that the parent backing may be shared among
43716    /// multiple disks.
43717    /// 
43718    /// Only raw disk mappings in
43719    /// *virtual compatibility mode* can have parents.
43720    fn get_parent(&self) -> &Option<Box<dyn super::traits::BaseConfigInfoFileBackingInfoTrait>>;
43721    /// Size allocated by the FS for this file/chain/link/extent only.
43722    /// 
43723    /// This property is used only for a delta disk whose
43724    /// *BaseConfigInfoFileBackingInfo.parent* is set.
43725    fn get_delta_size_in_mb(&self) -> Option<i64>;
43726    /// key id used to encrypt the backing disk.
43727    fn get_key_id(&self) -> &Option<super::structs::CryptoKeyId>;
43728}
43729impl<'s> serde::Serialize for dyn BaseConfigInfoFileBackingInfoTrait + 's {
43730            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43731            where
43732                S: serde::Serializer,
43733            {
43734                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43735            }
43736        }
43737impl<'de> serde::Deserialize<'de> for Box<dyn BaseConfigInfoFileBackingInfoTrait> {
43738            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43739                deserializer.deserialize_map(BaseConfigInfoFileBackingInfoVisitor)
43740            }
43741        }
43742
43743struct BaseConfigInfoFileBackingInfoVisitor;
43744
43745impl<'de> de::Visitor<'de> for BaseConfigInfoFileBackingInfoVisitor {
43746    type Value = Box<dyn BaseConfigInfoFileBackingInfoTrait>;
43747
43748    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43749        formatter.write_str("a valid BaseConfigInfoFileBackingInfoTrait JSON object with a _typeName field")
43750    }
43751
43752    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43753    where
43754        A: de::MapAccess<'de>,
43755    {
43756        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43757        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43758        match any {
43759            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43760                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43761            VimAny::Value(value) => Err(de::Error::custom(format!(
43762                "expected object not wrapped value: {:?}",
43763                value))),
43764        }
43765    }
43766}
43767
43768impl BaseConfigInfoFileBackingInfoTrait for BaseConfigInfoFileBackingInfo {
43769    fn get_file_path(&self) -> &str { &self.file_path }
43770    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
43771    fn get_parent(&self) -> &Option<Box<dyn super::traits::BaseConfigInfoFileBackingInfoTrait>> { &self.parent }
43772    fn get_delta_size_in_mb(&self) -> Option<i64> { self.delta_size_in_mb }
43773    fn get_key_id(&self) -> &Option<super::structs::CryptoKeyId> { &self.key_id }
43774}
43775impl BaseConfigInfoFileBackingInfoTrait for BaseConfigInfoDiskFileBackingInfo {
43776    fn get_file_path(&self) -> &str { &self.file_path }
43777    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
43778    fn get_parent(&self) -> &Option<Box<dyn super::traits::BaseConfigInfoFileBackingInfoTrait>> { &self.parent }
43779    fn get_delta_size_in_mb(&self) -> Option<i64> { self.delta_size_in_mb }
43780    fn get_key_id(&self) -> &Option<super::structs::CryptoKeyId> { &self.key_id }
43781}
43782impl BaseConfigInfoFileBackingInfoTrait for BaseConfigInfoRawDiskMappingBackingInfo {
43783    fn get_file_path(&self) -> &str { &self.file_path }
43784    fn get_backing_object_id(&self) -> &Option<String> { &self.backing_object_id }
43785    fn get_parent(&self) -> &Option<Box<dyn super::traits::BaseConfigInfoFileBackingInfoTrait>> { &self.parent }
43786    fn get_delta_size_in_mb(&self) -> Option<i64> { self.delta_size_in_mb }
43787    fn get_key_id(&self) -> &Option<super::structs::CryptoKeyId> { &self.key_id }
43788}
43789impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn BaseConfigInfoFileBackingInfoTrait {
43790    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43791        let data_type = from.data_type();
43792        match data_type {
43793            StructType::BaseConfigInfoFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoFileBackingInfo>()?),
43794            StructType::BaseConfigInfoDiskFileBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoDiskFileBackingInfo>()?),
43795            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Some(from.as_any_ref().downcast_ref::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
43796            _ => None,
43797        }
43798    }
43799    
43800    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43801        let data_type = from.data_type();
43802        match data_type {
43803            StructType::BaseConfigInfoFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoFileBackingInfo>()?),
43804            StructType::BaseConfigInfoDiskFileBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoDiskFileBackingInfo>()?),
43805            StructType::BaseConfigInfoRawDiskMappingBackingInfo => Ok(from.as_any_box().downcast::<BaseConfigInfoRawDiskMappingBackingInfo>()?),
43806            _ => Err(from.as_any_box()),
43807        }
43808    }
43809}
43810/// Specification of the backing of a virtual
43811/// storage object.
43812pub trait VslmCreateSpecBackingSpecTrait : super::traits::DataObjectTrait {
43813    /// The datastore managed object where this backing is located.
43814    /// 
43815    /// Refers instance of *Datastore*.
43816    fn get_datastore(&self) -> &super::structs::ManagedObjectReference;
43817    /// Relative location in the specified datastore where disk needs to be
43818    /// created.
43819    /// 
43820    /// If not specified disk gets created at the defualt
43821    /// VStorageObject location on the specified datastore.
43822    fn get_path(&self) -> &Option<String>;
43823}
43824impl<'s> serde::Serialize for dyn VslmCreateSpecBackingSpecTrait + 's {
43825            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43826            where
43827                S: serde::Serializer,
43828            {
43829                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43830            }
43831        }
43832impl<'de> serde::Deserialize<'de> for Box<dyn VslmCreateSpecBackingSpecTrait> {
43833            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43834                deserializer.deserialize_map(VslmCreateSpecBackingSpecVisitor)
43835            }
43836        }
43837
43838struct VslmCreateSpecBackingSpecVisitor;
43839
43840impl<'de> de::Visitor<'de> for VslmCreateSpecBackingSpecVisitor {
43841    type Value = Box<dyn VslmCreateSpecBackingSpecTrait>;
43842
43843    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43844        formatter.write_str("a valid VslmCreateSpecBackingSpecTrait JSON object with a _typeName field")
43845    }
43846
43847    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43848    where
43849        A: de::MapAccess<'de>,
43850    {
43851        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43852        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43853        match any {
43854            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43855                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43856            VimAny::Value(value) => Err(de::Error::custom(format!(
43857                "expected object not wrapped value: {:?}",
43858                value))),
43859        }
43860    }
43861}
43862
43863impl VslmCreateSpecBackingSpecTrait for VslmCreateSpecBackingSpec {
43864    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43865    fn get_path(&self) -> &Option<String> { &self.path }
43866}
43867impl VslmCreateSpecBackingSpecTrait for VslmCreateSpecDiskFileBackingSpec {
43868    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43869    fn get_path(&self) -> &Option<String> { &self.path }
43870}
43871impl VslmCreateSpecBackingSpecTrait for VslmCreateSpecRawDiskMappingBackingSpec {
43872    fn get_datastore(&self) -> &super::structs::ManagedObjectReference { &self.datastore }
43873    fn get_path(&self) -> &Option<String> { &self.path }
43874}
43875impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VslmCreateSpecBackingSpecTrait {
43876    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43877        let data_type = from.data_type();
43878        match data_type {
43879            StructType::VslmCreateSpecBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecBackingSpec>()?),
43880            StructType::VslmCreateSpecDiskFileBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecDiskFileBackingSpec>()?),
43881            StructType::VslmCreateSpecRawDiskMappingBackingSpec => Some(from.as_any_ref().downcast_ref::<VslmCreateSpecRawDiskMappingBackingSpec>()?),
43882            _ => None,
43883        }
43884    }
43885    
43886    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
43887        let data_type = from.data_type();
43888        match data_type {
43889            StructType::VslmCreateSpecBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecBackingSpec>()?),
43890            StructType::VslmCreateSpecDiskFileBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecDiskFileBackingSpec>()?),
43891            StructType::VslmCreateSpecRawDiskMappingBackingSpec => Ok(from.as_any_box().downcast::<VslmCreateSpecRawDiskMappingBackingSpec>()?),
43892            _ => Err(from.as_any_box()),
43893        }
43894    }
43895}
43896/// Base specification of moving or copying a virtual storage object.
43897pub trait VslmMigrateSpecTrait : super::traits::DataObjectTrait {
43898    /// Specification of the backings of the target virtual storage object.
43899    fn get_backing_spec(&self) -> &Box<dyn super::traits::VslmCreateSpecBackingSpecTrait>;
43900    /// Virtual storage object Profile requirement.
43901    /// 
43902    /// If unset,
43903    /// the default behavior will apply.
43904    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>>;
43905    /// Flag indicates any delta disk backings will be consolidated
43906    /// during migration.
43907    /// 
43908    /// If unset, delta disk backings will not be
43909    /// consolidated.
43910    fn get_consolidate(&self) -> Option<bool>;
43911    /// Disk chain crypto information.
43912    /// 
43913    /// If unset and if *VslmMigrateSpec.profile* contains an encryption iofilter and if
43914    /// source VStorageObject is unencrypted, then disksCyrpto will be of type
43915    /// CryptoSpecEncrypt, and filled with keyId that is automatically generated
43916    /// and keyProviderId that is the default kms cluster. During the migration,
43917    /// the object will be encrypted.
43918    /// If unset and if *VslmMigrateSpec.profile* is a default policy and if source
43919    /// VStorageObject is unenrypted, then disksCrypto is treated as
43920    /// CryptoSpecNoOp. During migration, no cryptographic change.
43921    /// If unset and if *VslmMigrateSpec.profile* contains an encryption iofilter and if
43922    /// source VStorageObject is encrypted, then disksCyrpto is treated as
43923    /// CryptoSpecNoOp. During migration, no cryptographic change.
43924    /// If unset and if *VslmMigrateSpec.profile* is a default policy and if
43925    /// source VStorageObject is encrypted, then disksCyrpto is treated as
43926    /// CryptoSpecDecrypt, during migration, the object will be decrypted.
43927    /// To recrypt the disk during migration, disksCrypto has to be present.
43928    fn get_disks_crypto(&self) -> &Option<super::structs::DiskCryptoSpec>;
43929    /// The service endpoint of vCenter where the FCD should be located.
43930    /// 
43931    /// If
43932    /// not specified the current vCenter service is used.
43933    /// 
43934    /// ***Since:*** vSphere API Release 8.0.3.0
43935    fn get_service(&self) -> &Option<super::structs::ServiceLocator>;
43936}
43937impl<'s> serde::Serialize for dyn VslmMigrateSpecTrait + 's {
43938            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
43939            where
43940                S: serde::Serializer,
43941            {
43942                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
43943            }
43944        }
43945impl<'de> serde::Deserialize<'de> for Box<dyn VslmMigrateSpecTrait> {
43946            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
43947                deserializer.deserialize_map(VslmMigrateSpecVisitor)
43948            }
43949        }
43950
43951struct VslmMigrateSpecVisitor;
43952
43953impl<'de> de::Visitor<'de> for VslmMigrateSpecVisitor {
43954    type Value = Box<dyn VslmMigrateSpecTrait>;
43955
43956    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
43957        formatter.write_str("a valid VslmMigrateSpecTrait JSON object with a _typeName field")
43958    }
43959
43960    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
43961    where
43962        A: de::MapAccess<'de>,
43963    {
43964        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
43965        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
43966        match any {
43967            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
43968                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
43969            VimAny::Value(value) => Err(de::Error::custom(format!(
43970                "expected object not wrapped value: {:?}",
43971                value))),
43972        }
43973    }
43974}
43975
43976impl VslmMigrateSpecTrait for VslmMigrateSpec {
43977    fn get_backing_spec(&self) -> &Box<dyn super::traits::VslmCreateSpecBackingSpecTrait> { &self.backing_spec }
43978    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
43979    fn get_consolidate(&self) -> Option<bool> { self.consolidate }
43980    fn get_disks_crypto(&self) -> &Option<super::structs::DiskCryptoSpec> { &self.disks_crypto }
43981    fn get_service(&self) -> &Option<super::structs::ServiceLocator> { &self.service }
43982}
43983impl VslmMigrateSpecTrait for VslmCloneSpec {
43984    fn get_backing_spec(&self) -> &Box<dyn super::traits::VslmCreateSpecBackingSpecTrait> { &self.backing_spec }
43985    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
43986    fn get_consolidate(&self) -> Option<bool> { self.consolidate }
43987    fn get_disks_crypto(&self) -> &Option<super::structs::DiskCryptoSpec> { &self.disks_crypto }
43988    fn get_service(&self) -> &Option<super::structs::ServiceLocator> { &self.service }
43989}
43990impl VslmMigrateSpecTrait for VslmRelocateSpec {
43991    fn get_backing_spec(&self) -> &Box<dyn super::traits::VslmCreateSpecBackingSpecTrait> { &self.backing_spec }
43992    fn get_profile(&self) -> &Option<Vec<Box<dyn super::traits::VirtualMachineProfileSpecTrait>>> { &self.profile }
43993    fn get_consolidate(&self) -> Option<bool> { self.consolidate }
43994    fn get_disks_crypto(&self) -> &Option<super::structs::DiskCryptoSpec> { &self.disks_crypto }
43995    fn get_service(&self) -> &Option<super::structs::ServiceLocator> { &self.service }
43996}
43997impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VslmMigrateSpecTrait {
43998    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
43999        let data_type = from.data_type();
44000        match data_type {
44001            StructType::VslmMigrateSpec => Some(from.as_any_ref().downcast_ref::<VslmMigrateSpec>()?),
44002            StructType::VslmCloneSpec => Some(from.as_any_ref().downcast_ref::<VslmCloneSpec>()?),
44003            StructType::VslmRelocateSpec => Some(from.as_any_ref().downcast_ref::<VslmRelocateSpec>()?),
44004            _ => None,
44005        }
44006    }
44007    
44008    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
44009        let data_type = from.data_type();
44010        match data_type {
44011            StructType::VslmMigrateSpec => Ok(from.as_any_box().downcast::<VslmMigrateSpec>()?),
44012            StructType::VslmCloneSpec => Ok(from.as_any_box().downcast::<VslmCloneSpec>()?),
44013            StructType::VslmRelocateSpec => Ok(from.as_any_box().downcast::<VslmRelocateSpec>()?),
44014            _ => Err(from.as_any_box()),
44015        }
44016    }
44017}
44018/// The *SelectionSpec* is the base type for data
44019/// object types that specify what additional objects to filter.
44020/// 
44021/// The base
44022/// type contains only an optional "name" field, which allows a selection to
44023/// be named for future reference. More information is available in the
44024/// subtype.
44025/// 
44026/// Named selections support recursive specifications on an object
44027/// hierarchy. When used by a derived object, the "name" field allows other
44028/// *SelectionSpec* objects to refer to the object by
44029/// name. When used as the base type only, the "name" field indicates
44030/// recursion to the derived object by name.
44031/// 
44032/// Names are meaningful only within the same FilterSpec.
44033pub trait SelectionSpecTrait : super::traits::DataObjectTrait {
44034    /// Name of the selection specification.
44035    fn get_name(&self) -> &Option<String>;
44036}
44037impl<'s> serde::Serialize for dyn SelectionSpecTrait + 's {
44038            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
44039            where
44040                S: serde::Serializer,
44041            {
44042                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
44043            }
44044        }
44045impl<'de> serde::Deserialize<'de> for Box<dyn SelectionSpecTrait> {
44046            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
44047                deserializer.deserialize_map(SelectionSpecVisitor)
44048            }
44049        }
44050
44051struct SelectionSpecVisitor;
44052
44053impl<'de> de::Visitor<'de> for SelectionSpecVisitor {
44054    type Value = Box<dyn SelectionSpecTrait>;
44055
44056    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
44057        formatter.write_str("a valid SelectionSpecTrait JSON object with a _typeName field")
44058    }
44059
44060    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
44061    where
44062        A: de::MapAccess<'de>,
44063    {
44064        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
44065        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
44066        match any {
44067            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
44068                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
44069            VimAny::Value(value) => Err(de::Error::custom(format!(
44070                "expected object not wrapped value: {:?}",
44071                value))),
44072        }
44073    }
44074}
44075
44076impl SelectionSpecTrait for SelectionSpec {
44077    fn get_name(&self) -> &Option<String> { &self.name }
44078}
44079impl SelectionSpecTrait for TraversalSpec {
44080    fn get_name(&self) -> &Option<String> { &self.name }
44081}
44082impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn SelectionSpecTrait {
44083    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
44084        let data_type = from.data_type();
44085        match data_type {
44086            StructType::SelectionSpec => Some(from.as_any_ref().downcast_ref::<SelectionSpec>()?),
44087            StructType::TraversalSpec => Some(from.as_any_ref().downcast_ref::<TraversalSpec>()?),
44088            _ => None,
44089        }
44090    }
44091    
44092    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
44093        let data_type = from.data_type();
44094        match data_type {
44095            StructType::SelectionSpec => Ok(from.as_any_box().downcast::<SelectionSpec>()?),
44096            StructType::TraversalSpec => Ok(from.as_any_box().downcast::<TraversalSpec>()?),
44097            _ => Err(from.as_any_box()),
44098        }
44099    }
44100}
44101/// Base type for all task reasons.
44102/// 
44103/// Task reasons represent the kind of entity responsible for a task's creation.
44104/// 
44105/// This structure may be used only with operations rendered under `/vslm`.
44106pub trait VslmTaskReasonTrait : super::traits::DataObjectTrait {
44107}
44108impl<'s> serde::Serialize for dyn VslmTaskReasonTrait + 's {
44109            fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
44110            where
44111                S: serde::Serializer,
44112            {
44113                dyn_serialize::serialize_polymorphic(self.as_vim_object_ref(), serializer)
44114            }
44115        }
44116impl<'de> serde::Deserialize<'de> for Box<dyn VslmTaskReasonTrait> {
44117            fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
44118                deserializer.deserialize_map(VslmTaskReasonVisitor)
44119            }
44120        }
44121
44122struct VslmTaskReasonVisitor;
44123
44124impl<'de> de::Visitor<'de> for VslmTaskReasonVisitor {
44125    type Value = Box<dyn VslmTaskReasonTrait>;
44126
44127    fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
44128        formatter.write_str("a valid VslmTaskReasonTrait JSON object with a _typeName field")
44129    }
44130
44131    fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
44132    where
44133        A: de::MapAccess<'de>,
44134    {
44135        let deserializer = de::value::MapAccessDeserializer::new(&mut map);
44136        let any: VimAny = de::Deserialize::deserialize(deserializer)?;
44137        match any {
44138            VimAny::Object(obj) => Ok(CastFrom::from_box(obj)
44139                .map_err(|_| de::Error::custom("Internal error converting to trait type"))?),
44140            VimAny::Value(value) => Err(de::Error::custom(format!(
44141                "expected object not wrapped value: {:?}",
44142                value))),
44143        }
44144    }
44145}
44146
44147impl VslmTaskReasonTrait for VslmTaskReason {
44148}
44149impl VslmTaskReasonTrait for VslmTaskReasonAlarm {
44150}
44151impl VslmTaskReasonTrait for VslmTaskReasonSchedule {
44152}
44153impl VslmTaskReasonTrait for VslmTaskReasonSystem {
44154}
44155impl VslmTaskReasonTrait for VslmTaskReasonUser {
44156}
44157impl<From: VimObjectTrait + ?Sized + 'static> CastFrom<From> for dyn VslmTaskReasonTrait {
44158    fn from_ref<'a>(from: &'a From) -> Option<&'a Self> {
44159        let data_type = from.data_type();
44160        match data_type {
44161            StructType::VslmTaskReason => Some(from.as_any_ref().downcast_ref::<VslmTaskReason>()?),
44162            StructType::VslmTaskReasonAlarm => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonAlarm>()?),
44163            StructType::VslmTaskReasonSchedule => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonSchedule>()?),
44164            StructType::VslmTaskReasonSystem => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonSystem>()?),
44165            StructType::VslmTaskReasonUser => Some(from.as_any_ref().downcast_ref::<VslmTaskReasonUser>()?),
44166            _ => None,
44167        }
44168    }
44169    
44170    fn from_box(from: Box<From>) -> Result<Box<Self>, Box<dyn std::any::Any + 'static>> {
44171        let data_type = from.data_type();
44172        match data_type {
44173            StructType::VslmTaskReason => Ok(from.as_any_box().downcast::<VslmTaskReason>()?),
44174            StructType::VslmTaskReasonAlarm => Ok(from.as_any_box().downcast::<VslmTaskReasonAlarm>()?),
44175            StructType::VslmTaskReasonSchedule => Ok(from.as_any_box().downcast::<VslmTaskReasonSchedule>()?),
44176            StructType::VslmTaskReasonSystem => Ok(from.as_any_box().downcast::<VslmTaskReasonSystem>()?),
44177            StructType::VslmTaskReasonUser => Ok(from.as_any_box().downcast::<VslmTaskReasonUser>()?),
44178            _ => Err(from.as_any_box()),
44179        }
44180    }
44181}