code: func expandStorageDrsSpaceLoadBalanceConfig(
  	d *schema.ResourceData,
  	version viapi.VSphereVersion,
  ) *types.StorageDrsSpaceLoadBalanceConfig {
  	obj := &types.StorageDrsSpaceLoadBalanceConfig{
  		MinSpaceUtilizationDifference: int32(d.Get("sdrs_free_space_utilization_difference").(int)),
  		SpaceUtilizationThreshold:     int32(d.Get("sdrs_space_utilization_threshold").(int)),
  	}
  
  	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
  		obj.FreeSpaceThresholdGB = int32(d.Get("sdrs_free_space_threshold").(int))
  		obj.SpaceThresholdMode = d.Get("sdrs_free_space_threshold_mode").(string)
  	}
  
  	return obj
  }
docs: // expandStorageDrsSpaceLoadBalanceConfig reads certain ResourceData keys and returns
  // a StorageDrsSpaceLoadBalanceConfig.