Files
plexcsharp/LukeHagar/PlexAPI/SDK/Models/Requests/GetSearchAllLibrariesShowOrdering.cs

94 lines
3.7 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Requests
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Setting that indicates the episode ordering for the show.<br/>
///
/// <remarks>
/// Options:<br/>
/// - None = Library default<br/>
/// - tmdbAiring = The Movie Database (Aired)<br/>
/// - aired = TheTVDB (Aired)<br/>
/// - dvd = TheTVDB (DVD)<br/>
/// - absolute = TheTVDB (Absolute)<br/>
///
/// </remarks>
/// </summary>
[JsonConverter(typeof(OpenEnumConverter))]
public class GetSearchAllLibrariesShowOrdering : IEquatable<GetSearchAllLibrariesShowOrdering>
{
public static readonly GetSearchAllLibrariesShowOrdering None = new GetSearchAllLibrariesShowOrdering("None");
public static readonly GetSearchAllLibrariesShowOrdering TmdbAiring = new GetSearchAllLibrariesShowOrdering("tmdbAiring");
public static readonly GetSearchAllLibrariesShowOrdering TvdbAired = new GetSearchAllLibrariesShowOrdering("aired");
public static readonly GetSearchAllLibrariesShowOrdering TvdbDvd = new GetSearchAllLibrariesShowOrdering("dvd");
public static readonly GetSearchAllLibrariesShowOrdering TvdbAbsolute = new GetSearchAllLibrariesShowOrdering("absolute");
private static readonly Dictionary <string, GetSearchAllLibrariesShowOrdering> _knownValues =
new Dictionary <string, GetSearchAllLibrariesShowOrdering> ()
{
["None"] = None,
["tmdbAiring"] = TmdbAiring,
["aired"] = TvdbAired,
["dvd"] = TvdbDvd,
["absolute"] = TvdbAbsolute
};
private static readonly ConcurrentDictionary<string, GetSearchAllLibrariesShowOrdering> _values =
new ConcurrentDictionary<string, GetSearchAllLibrariesShowOrdering>(_knownValues);
private GetSearchAllLibrariesShowOrdering(string value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
Value = value;
}
public string Value { get; }
public static GetSearchAllLibrariesShowOrdering Of(string value)
{
return _values.GetOrAdd(value, _ => new GetSearchAllLibrariesShowOrdering(value));
}
public static implicit operator GetSearchAllLibrariesShowOrdering(string value) => Of(value);
public static implicit operator string(GetSearchAllLibrariesShowOrdering getsearchalllibrariesshowordering) => getsearchalllibrariesshowordering.Value;
public static GetSearchAllLibrariesShowOrdering[] Values()
{
return _values.Values.ToArray();
}
public override string ToString() => Value.ToString();
public bool IsKnown()
{
return _knownValues.ContainsKey(Value);
}
public override bool Equals(object? obj) => Equals(obj as GetSearchAllLibrariesShowOrdering);
public bool Equals(GetSearchAllLibrariesShowOrdering? other)
{
if (ReferenceEquals(this, other)) return true;
if (other is null) return false;
return string.Equals(Value, other.Value);
}
public override int GetHashCode() => Value.GetHashCode();
}
}