func expandClusterDasVMSettings(d *schema.ResourceData, version viapi.VSphereVersion) *types.ClusterDasVmSettings {
	obj := &types.ClusterDasVmSettings{
		IsolationResponse:         d.Get("ha_host_isolation_response").(string),
		RestartPriority:           d.Get("ha_vm_restart_priority").(string),
		VmToolsMonitoringSettings: expandClusterVMToolsMonitoringSettings(d),
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		obj.VmComponentProtectionSettings = expandClusterVMComponentProtectionSettings(d)
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		obj.RestartPriorityTimeout = int32(d.Get("ha_vm_restart_timeout").(int))
	}

	return obj
}
func expandClusterDasVMSettings(d *schema.ResourceData, version viapi.VSphereVersion) *types.ClusterDasVmSettings {
	obj := &types.ClusterDasVmSettings{
		IsolationResponse:         d.Get("ha_host_isolation_response").(string),
		RestartPriority:           d.Get("ha_vm_restart_priority").(string),
		VmToolsMonitoringSettings: expandClusterVMToolsMonitoringSettings(d),
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		obj.VmComponentProtectionSettings = expandClusterVMComponentProtectionSettings(d)
	}
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		obj.RestartPriorityTimeout = int32(d.Get("ha_vm_restart_timeout").(int))
	}

	return obj
}
func expandClusterDasVMSettings ( d * schema . ResourceData , version viapi . VSphereVersion ) * types . ClusterDasVmSettings { obj := & types . ClusterDasVmSettings { IsolationResponse : d . Get ( " " ) . ( string ) , RestartPriority : d . Get ( " " ) . ( string ) , VmToolsMonitoringSettings : expandClusterVMToolsMonitoringSettings ( d ) , } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 } ) { obj . VmComponentProtectionSettings = expandClusterVMComponentProtectionSettings ( d ) } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 , Minor : 5 } ) { obj . RestartPriorityTimeout = int32 ( d . Get ( " " ) . ( int ) ) } return obj }
// expandClusterDasVMSettings reads certain ResourceData keys and returns a
// ClusterDasVmSettings.
expandClusterDasVMSettings reads certain ResourceData keys and returns a ClusterDasVmSettings .