func flattenClusterConfigSpecEx(d *schema.ResourceData, obj *types.ClusterConfigInfoEx, version viapi.VSphereVersion) error {
	if err := flattenClusterDasConfigInfo(d, obj.DasConfig, version); err != nil {
		return err
	}
	if err := flattenClusterDpmConfigInfo(d, obj.DpmConfigInfo); err != nil {
		return err
	}
	if err := flattenClusterDrsConfigInfo(d, obj.DrsConfig); err != nil {
		return err
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		if err := flattenClusterInfraUpdateHaConfigInfo(d, obj.InfraUpdateHaConfig); err != nil {
			return err
		}
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		if err := flattenClusterOrchestrationInfo(d, obj.Orchestration); err != nil {
			return err
		}
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		return flattenClusterProactiveDrsConfigInfo(d, obj.ProactiveDrsConfig)
	}

	return nil
}
func flattenClusterConfigSpecEx(d *schema.ResourceData, obj *types.ClusterConfigInfoEx, version viapi.VSphereVersion) error {
	if err := flattenClusterDasConfigInfo(d, obj.DasConfig, version); err != nil {
		return err
	}
	if err := flattenClusterDpmConfigInfo(d, obj.DpmConfigInfo); err != nil {
		return err
	}
	if err := flattenClusterDrsConfigInfo(d, obj.DrsConfig); err != nil {
		return err
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		if err := flattenClusterInfraUpdateHaConfigInfo(d, obj.InfraUpdateHaConfig); err != nil {
			return err
		}
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		if err := flattenClusterOrchestrationInfo(d, obj.Orchestration); err != nil {
			return err
		}
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		return flattenClusterProactiveDrsConfigInfo(d, obj.ProactiveDrsConfig)
	}

	return nil
}
func flattenClusterConfigSpecEx ( d * schema . ResourceData , obj * types . ClusterConfigInfoEx , version viapi . VSphereVersion ) error { if err := flattenClusterDasConfigInfo ( d , obj . DasConfig , version ) ; err != nil { return err } if err := flattenClusterDpmConfigInfo ( d , obj . DpmConfigInfo ) ; err != nil { return err } if err := flattenClusterDrsConfigInfo ( d , obj . DrsConfig ) ; err != nil { return err } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 , Minor : 5 } ) { if err := flattenClusterInfraUpdateHaConfigInfo ( d , obj . InfraUpdateHaConfig ) ; err != nil { return err } } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 , Minor : 5 } ) { if err := flattenClusterOrchestrationInfo ( d , obj . Orchestration ) ; err != nil { return err } } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 , Minor : 5 } ) { return flattenClusterProactiveDrsConfigInfo ( d , obj . ProactiveDrsConfig ) } return nil }
// flattenClusterConfigSpecEx saves a ClusterConfigSpecEx into the supplied
// ResourceData.
flattenClusterConfigSpecEx saves a ClusterConfigSpecEx into the supplied ResourceData .