99 lines
6.4 KiB
C#
99 lines
6.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json;
|
|
|
|
namespace View_by_Distance.Instance.Models.Binder;
|
|
|
|
public class Configuration
|
|
{
|
|
|
|
[Display(Name = "Check Json For Distance Results"), Required] public bool? CheckJsonForDistanceResults { get; set; }
|
|
[Display(Name = "CrossDirectory Max Items In Distance Collection"), Required] public int? CrossDirectoryMaxItemsInDistanceCollection { get; set; }
|
|
[Display(Name = "Distance Factor"), Required] public int? DistanceFactor { get; set; }
|
|
[Display(Name = "Force Metadata Last Write Time to Creation Time"), Required] public bool? ForceMetadataLastWriteTimeToCreationTime { get; set; }
|
|
[Display(Name = "Force Resize Last Write Time to Creation Time"), Required] public bool? ForceResizeLastWriteTimeToCreationTime { get; set; }
|
|
[Display(Name = "Ignore Extensions"), Required] public string[] IgnoreExtensions { get; set; }
|
|
[Display(Name = "Ignore Relative Paths"), Required] public string[] IgnoreRelativePaths { get; set; }
|
|
[Display(Name = "Load Or Create Then Save Directroy Distance Results"), Required] public bool? LoadOrCreateThenSaveDirectoryDistanceResults { get; set; }
|
|
[Display(Name = "Load Or Create Then Save Distance Results"), Required] public bool? LoadOrCreateThenSaveDistanceResults { get; set; }
|
|
[Display(Name = "Load Or Create Then Save Image Faces Results"), Required] public bool? LoadOrCreateThenSaveImageFacesResults { get; set; }
|
|
[Display(Name = "Load Or Create Then Save Index"), Required] public bool? LoadOrCreateThenSaveIndex { get; set; }
|
|
[Display(Name = "Location Confidence Factor"), Required] public int? LocationConfidenceFactor { get; set; }
|
|
[Display(Name = "Mapped Max Index"), Required] public int? MappedMaxIndex { get; set; }
|
|
[Display(Name = "Max Items In Distance Collection"), Required] public int? MaxItemsInDistanceCollection { get; set; }
|
|
[Display(Name = "Mixed Year Relative Paths"), Required] public string[] MixedYearRelativePaths { get; set; }
|
|
[Display(Name = "Model Directory"), Required] public string ModelDirectory { get; set; }
|
|
[Display(Name = "Model Name"), Required] public string ModelName { get; set; }
|
|
[Display(Name = "Num Jitters"), Required] public int? NumJitters { get; set; }
|
|
[Display(Name = "Output Extension"), Required] public string OutputExtension { get; set; }
|
|
[Display(Name = "Output Quality"), Required] public int? OutputQuality { get; set; }
|
|
[Display(Name = "Output Resolutions"), Required] public string[] OutputResolutions { get; set; }
|
|
[Display(Name = "Override For Face Images"), Required] public bool? OverrideForFaceImages { get; set; }
|
|
[Display(Name = "Override For Face Landmark Images"), Required] public bool? OverrideForFaceLandmarkImages { get; set; }
|
|
[Display(Name = "Override For Resize Images"), Required] public bool? OverrideForResizeImages { get; set; }
|
|
[Display(Name = "Padding Loops"), Required] public int? PaddingLoops { get; set; }
|
|
[Display(Name = "Predictor Model Name"), Required] public string PredictorModelName { get; set; }
|
|
[Display(Name = "Properties Changed For Distance"), Required] public bool? PropertiesChangedForDistance { get; set; }
|
|
[Display(Name = "Properties Changed For Faces"), Required] public bool? PropertiesChangedForFaces { get; set; }
|
|
[Display(Name = "Properties Changed For Index"), Required] public bool? PropertiesChangedForIndex { get; set; }
|
|
[Display(Name = "Properties Changed For Metadata"), Required] public bool? PropertiesChangedForMetadata { get; set; }
|
|
[Display(Name = "Properties Changed For Resize"), Required] public bool? PropertiesChangedForResize { get; set; }
|
|
[Display(Name = "Property Configuration"), Required] public Property.Models.Configuration? PropertyConfiguration { get; set; }
|
|
[Display(Name = "Reverse"), Required] public bool? Reverse { get; set; }
|
|
[Display(Name = "Save Face Landmark For Output Resolutions"), Required] public string[] SaveFaceLandmarkForOutputResolutions { get; set; }
|
|
[Display(Name = "Save Full Year Of Random Files"), Required] public bool? SaveFullYearOfRandomFiles { get; set; }
|
|
[Display(Name = "Save Resized Subfiles"), Required] public bool? SaveResizedSubfiles { get; set; }
|
|
[Display(Name = "Search for Abandoned Files"), Required] public bool? SearchForAbandonedFilesFull { get; set; }
|
|
[Display(Name = "Skip Search"), Required] public bool? SkipSearch { get; set; }
|
|
[Display(Name = "Test Distance Results"), Required] public bool? TestDistanceResults { get; set; }
|
|
[Display(Name = "Valid Resolutions"), Required] public string[] ValidResolutions { get; set; }
|
|
|
|
public Configuration()
|
|
{
|
|
CheckJsonForDistanceResults = null;
|
|
CrossDirectoryMaxItemsInDistanceCollection = null;
|
|
DistanceFactor = null;
|
|
ForceMetadataLastWriteTimeToCreationTime = null;
|
|
ForceResizeLastWriteTimeToCreationTime = null;
|
|
IgnoreExtensions = Array.Empty<string>();
|
|
IgnoreRelativePaths = Array.Empty<string>();
|
|
LoadOrCreateThenSaveDirectoryDistanceResults = null;
|
|
LoadOrCreateThenSaveDistanceResults = null;
|
|
LoadOrCreateThenSaveImageFacesResults = null;
|
|
LoadOrCreateThenSaveIndex = null;
|
|
LocationConfidenceFactor = null;
|
|
MappedMaxIndex = null;
|
|
MaxItemsInDistanceCollection = null;
|
|
MixedYearRelativePaths = Array.Empty<string>();
|
|
ModelDirectory = string.Empty;
|
|
ModelName = string.Empty;
|
|
NumJitters = null;
|
|
OutputExtension = string.Empty;
|
|
OutputQuality = null;
|
|
OutputResolutions = Array.Empty<string>();
|
|
OverrideForFaceImages = null;
|
|
OverrideForFaceLandmarkImages = null;
|
|
OverrideForResizeImages = null;
|
|
PaddingLoops = null;
|
|
PredictorModelName = string.Empty;
|
|
PropertiesChangedForDistance = null;
|
|
PropertiesChangedForFaces = null;
|
|
PropertiesChangedForIndex = null;
|
|
PropertiesChangedForMetadata = null;
|
|
PropertiesChangedForResize = null;
|
|
Reverse = null;
|
|
SaveFaceLandmarkForOutputResolutions = Array.Empty<string>();
|
|
SaveFullYearOfRandomFiles = null;
|
|
SaveResizedSubfiles = null;
|
|
SearchForAbandonedFilesFull = null;
|
|
SkipSearch = null;
|
|
TestDistanceResults = null;
|
|
ValidResolutions = Array.Empty<string>();
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |