mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 04:20:46 +00:00
73 lines
2.5 KiB
C#
73 lines
2.5 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;
|
|
|
|
[JsonConverter(typeof(OpenEnumConverter))]
|
|
public class PostUsersSignInDataState : IEquatable<PostUsersSignInDataState>
|
|
{
|
|
public static readonly PostUsersSignInDataState Ended = new PostUsersSignInDataState("ended");
|
|
|
|
private static readonly Dictionary <string, PostUsersSignInDataState> _knownValues =
|
|
new Dictionary <string, PostUsersSignInDataState> ()
|
|
{
|
|
["ended"] = Ended
|
|
};
|
|
|
|
private static readonly ConcurrentDictionary<string, PostUsersSignInDataState> _values =
|
|
new ConcurrentDictionary<string, PostUsersSignInDataState>(_knownValues);
|
|
|
|
private PostUsersSignInDataState(string value)
|
|
{
|
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
|
Value = value;
|
|
}
|
|
|
|
public string Value { get; }
|
|
|
|
public static PostUsersSignInDataState Of(string value)
|
|
{
|
|
return _values.GetOrAdd(value, _ => new PostUsersSignInDataState(value));
|
|
}
|
|
|
|
public static implicit operator PostUsersSignInDataState(string value) => Of(value);
|
|
public static implicit operator string(PostUsersSignInDataState postuserssignindatastate) => postuserssignindatastate.Value;
|
|
|
|
public static PostUsersSignInDataState[] 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 PostUsersSignInDataState);
|
|
|
|
public bool Equals(PostUsersSignInDataState? 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();
|
|
}
|
|
|
|
} |