2018-11-23 07:03:32 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using NzbDrone.Core.Tags;
|
|
|
|
using Radarr.Http.REST;
|
|
|
|
|
2019-12-03 01:36:18 +00:00
|
|
|
namespace Radarr.Api.V3.Tags
|
2018-11-23 07:03:32 +00:00
|
|
|
{
|
|
|
|
public class TagDetailsResource : RestResource
|
|
|
|
{
|
|
|
|
public string Label { get; set; }
|
|
|
|
public List<int> DelayProfileIds { get; set; }
|
2022-12-06 06:58:53 +00:00
|
|
|
public List<int> ImportListIds { get; set; }
|
2018-11-23 07:03:32 +00:00
|
|
|
public List<int> NotificationIds { get; set; }
|
2023-07-17 15:07:59 +00:00
|
|
|
public List<int> ReleaseProfileIds { get; set; }
|
2021-03-22 00:00:06 +00:00
|
|
|
public List<int> IndexerIds { get; set; }
|
2023-07-11 03:51:14 +00:00
|
|
|
public List<int> DownloadClientIds { get; set; }
|
2022-12-06 06:58:53 +00:00
|
|
|
public List<int> AutoTagIds { get; set; }
|
|
|
|
public List<int> MovieIds { get; set; }
|
2018-11-23 07:03:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static class TagDetailsResourceMapper
|
|
|
|
{
|
|
|
|
public static TagDetailsResource ToResource(this TagDetails model)
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
if (model == null)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
2018-11-23 07:03:32 +00:00
|
|
|
|
|
|
|
return new TagDetailsResource
|
|
|
|
{
|
|
|
|
Id = model.Id,
|
|
|
|
Label = model.Label,
|
|
|
|
DelayProfileIds = model.DelayProfileIds,
|
2022-12-06 06:58:53 +00:00
|
|
|
ImportListIds = model.ImportListIds,
|
2018-11-23 07:03:32 +00:00
|
|
|
NotificationIds = model.NotificationIds,
|
2023-07-17 15:07:59 +00:00
|
|
|
ReleaseProfileIds = model.ReleaseProfileIds,
|
2023-07-11 03:51:14 +00:00
|
|
|
IndexerIds = model.IndexerIds,
|
|
|
|
DownloadClientIds = model.DownloadClientIds,
|
2022-12-06 06:58:53 +00:00
|
|
|
AutoTagIds = model.AutoTagIds,
|
|
|
|
MovieIds = model.MovieIds,
|
2018-11-23 07:03:32 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public static List<TagDetailsResource> ToResource(this IEnumerable<TagDetails> models)
|
|
|
|
{
|
|
|
|
return models.Select(ToResource).ToList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|