You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
2 years ago
|
using System.Collections.Generic;
|
||
|
using NzbDrone.Core.AutoTagging.Specifications;
|
||
|
using Radarr.Http.ClientSchema;
|
||
|
using Radarr.Http.REST;
|
||
|
|
||
|
namespace Radarr.Api.V3.AutoTagging
|
||
|
{
|
||
|
public class AutoTaggingSpecificationSchema : RestResource
|
||
|
{
|
||
|
public string Name { get; set; }
|
||
|
public string Implementation { get; set; }
|
||
|
public string ImplementationName { get; set; }
|
||
|
public bool Negate { get; set; }
|
||
|
public bool Required { get; set; }
|
||
|
public List<Field> Fields { get; set; }
|
||
|
}
|
||
|
|
||
|
public static class AutoTaggingSpecificationSchemaMapper
|
||
|
{
|
||
|
public static AutoTaggingSpecificationSchema ToSchema(this IAutoTaggingSpecification model)
|
||
|
{
|
||
|
return new AutoTaggingSpecificationSchema
|
||
|
{
|
||
|
Name = model.Name,
|
||
|
Implementation = model.GetType().Name,
|
||
|
ImplementationName = model.ImplementationName,
|
||
|
Negate = model.Negate,
|
||
|
Required = model.Required,
|
||
|
Fields = SchemaBuilder.ToSchema(model)
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|