func expandStorageDrsPodConfigSpec(d *schema.ResourceData, version viapi.VSphereVersion) *types.StorageDrsPodConfigSpec {
	obj := &types.StorageDrsPodConfigSpec{
		DefaultIntraVmAffinity: structure.GetBool(d, "sdrs_default_intra_vm_affinity"),
		DefaultVmBehavior:      d.Get("sdrs_automation_level").(string),
		Enabled:                structure.GetBool(d, "sdrs_enabled"),
		IoLoadBalanceConfig:    expandStorageDrsIoLoadBalanceConfig(d, version),
		IoLoadBalanceEnabled:   structure.GetBool(d, "sdrs_io_load_balance_enabled"),
		LoadBalanceInterval:    int32(d.Get("sdrs_load_balance_interval").(int)),
		SpaceLoadBalanceConfig: expandStorageDrsSpaceLoadBalanceConfig(d, version),
		Option:                 expandStorageDrsOptionSpec(d),
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		obj.AutomationOverrides = expandStorageDrsAutomationConfig(d)
	}

	return obj
}
func expandStorageDrsPodConfigSpec(d *schema.ResourceData, version viapi.VSphereVersion) *types.StorageDrsPodConfigSpec {
	obj := &types.StorageDrsPodConfigSpec{
		DefaultIntraVmAffinity: structure.GetBool(d, "sdrs_default_intra_vm_affinity"),
		DefaultVmBehavior:      d.Get("sdrs_automation_level").(string),
		Enabled:                structure.GetBool(d, "sdrs_enabled"),
		IoLoadBalanceConfig:    expandStorageDrsIoLoadBalanceConfig(d, version),
		IoLoadBalanceEnabled:   structure.GetBool(d, "sdrs_io_load_balance_enabled"),
		LoadBalanceInterval:    int32(d.Get("sdrs_load_balance_interval").(int)),
		SpaceLoadBalanceConfig: expandStorageDrsSpaceLoadBalanceConfig(d, version),
		Option:                 expandStorageDrsOptionSpec(d),
	}

	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		obj.AutomationOverrides = expandStorageDrsAutomationConfig(d)
	}

	return obj
}
func expandStorageDrsPodConfigSpec ( d * schema . ResourceData , version viapi . VSphereVersion ) * types . StorageDrsPodConfigSpec { obj := & types . StorageDrsPodConfigSpec { DefaultIntraVmAffinity : structure . GetBool ( d , " " ) , DefaultVmBehavior : d . Get ( " " ) . ( string ) , Enabled : structure . GetBool ( d , " " ) , IoLoadBalanceConfig : expandStorageDrsIoLoadBalanceConfig ( d , version ) , IoLoadBalanceEnabled : structure . GetBool ( d , " " ) , LoadBalanceInterval : int32 ( d . Get ( " " ) . ( int ) ) , SpaceLoadBalanceConfig : expandStorageDrsSpaceLoadBalanceConfig ( d , version ) , Option : expandStorageDrsOptionSpec ( d ) , } if version . Newer ( viapi . VSphereVersion { Product : version . Product , Major : 6 } ) { obj . AutomationOverrides = expandStorageDrsAutomationConfig ( d ) } return obj }
// expandStorageDrsPodConfigSpec reads certain ResourceData keys and returns a
// StorageDrsPodConfigSpec.
expandStorageDrsPodConfigSpec reads certain ResourceData keys and returns a StorageDrsPodConfigSpec .