mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
84 lines
3.2 KiB
C#
84 lines
3.2 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 if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).<br/>
|
|
///
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// </summary>
|
|
[JsonConverter(typeof(OpenEnumConverter))]
|
|
public class GetSearchAllLibrariesFlattenSeasons : IEquatable<GetSearchAllLibrariesFlattenSeasons>
|
|
{
|
|
public static readonly GetSearchAllLibrariesFlattenSeasons LibraryDefault = new GetSearchAllLibrariesFlattenSeasons("-1");
|
|
public static readonly GetSearchAllLibrariesFlattenSeasons Hide = new GetSearchAllLibrariesFlattenSeasons("0");
|
|
public static readonly GetSearchAllLibrariesFlattenSeasons Show = new GetSearchAllLibrariesFlattenSeasons("1");
|
|
|
|
private static readonly Dictionary <string, GetSearchAllLibrariesFlattenSeasons> _knownValues =
|
|
new Dictionary <string, GetSearchAllLibrariesFlattenSeasons> ()
|
|
{
|
|
["-1"] = LibraryDefault,
|
|
["0"] = Hide,
|
|
["1"] = Show
|
|
};
|
|
|
|
private static readonly ConcurrentDictionary<string, GetSearchAllLibrariesFlattenSeasons> _values =
|
|
new ConcurrentDictionary<string, GetSearchAllLibrariesFlattenSeasons>(_knownValues);
|
|
|
|
private GetSearchAllLibrariesFlattenSeasons(string value)
|
|
{
|
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
|
Value = value;
|
|
}
|
|
|
|
public string Value { get; }
|
|
|
|
public static GetSearchAllLibrariesFlattenSeasons Of(string value)
|
|
{
|
|
return _values.GetOrAdd(value, _ => new GetSearchAllLibrariesFlattenSeasons(value));
|
|
}
|
|
|
|
public static implicit operator GetSearchAllLibrariesFlattenSeasons(string value) => Of(value);
|
|
public static implicit operator string(GetSearchAllLibrariesFlattenSeasons getsearchalllibrariesflattenseasons) => getsearchalllibrariesflattenseasons.Value;
|
|
|
|
public static GetSearchAllLibrariesFlattenSeasons[] 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 GetSearchAllLibrariesFlattenSeasons);
|
|
|
|
public bool Equals(GetSearchAllLibrariesFlattenSeasons? 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();
|
|
}
|
|
|
|
} |