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

78 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>
/// String representation of subscriptionActive
/// </summary>
[JsonConverter(typeof(OpenEnumConverter))]
public class GetTokenDetailsAuthenticationResponseStatus : IEquatable<GetTokenDetailsAuthenticationResponseStatus>
{
public static readonly GetTokenDetailsAuthenticationResponseStatus Inactive = new GetTokenDetailsAuthenticationResponseStatus("Inactive");
public static readonly GetTokenDetailsAuthenticationResponseStatus Active = new GetTokenDetailsAuthenticationResponseStatus("Active");
private static readonly Dictionary <string, GetTokenDetailsAuthenticationResponseStatus> _knownValues =
new Dictionary <string, GetTokenDetailsAuthenticationResponseStatus> ()
{
["Inactive"] = Inactive,
["Active"] = Active
};
private static readonly ConcurrentDictionary<string, GetTokenDetailsAuthenticationResponseStatus> _values =
new ConcurrentDictionary<string, GetTokenDetailsAuthenticationResponseStatus>(_knownValues);
private GetTokenDetailsAuthenticationResponseStatus(string value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
Value = value;
}
public string Value { get; }
public static GetTokenDetailsAuthenticationResponseStatus Of(string value)
{
return _values.GetOrAdd(value, _ => new GetTokenDetailsAuthenticationResponseStatus(value));
}
public static implicit operator GetTokenDetailsAuthenticationResponseStatus(string value) => Of(value);
public static implicit operator string(GetTokenDetailsAuthenticationResponseStatus gettokendetailsauthenticationresponsestatus) => gettokendetailsauthenticationresponsestatus.Value;
public static GetTokenDetailsAuthenticationResponseStatus[] 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 GetTokenDetailsAuthenticationResponseStatus);
public bool Equals(GetTokenDetailsAuthenticationResponseStatus? 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();
}
}