ItemsToRetain's value for automatic.
public static const int Automatic = -1;
Public Shared Const Automatic As Integer = -1
Setting PivotTableSettings.ItemsToRetain to ItemsToRetain.Automatic is the same as going to PivotTable Options > Data > Retain items deleted from the data source and setting Number of items to retain per field to Automatic.
PivotTableSettings.ItemsToRetain
ItemsToRetain.Automatic