// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Evals
{
    internal readonly partial struct InternalGetEvalRunsRequestStatus : IEquatable<InternalGetEvalRunsRequestStatus>
    {
        private readonly string _value;
        private const string QueuedValue = "queued";
        private const string InProgressValue = "in_progress";
        private const string CompletedValue = "completed";
        private const string CanceledValue = "canceled";
        private const string FailedValue = "failed";

        public InternalGetEvalRunsRequestStatus(string value)
        {
            Argument.AssertNotNull(value, nameof(value));

            _value = value;
        }

        internal static InternalGetEvalRunsRequestStatus Queued { get; } = new InternalGetEvalRunsRequestStatus(QueuedValue);

        internal static InternalGetEvalRunsRequestStatus InProgress { get; } = new InternalGetEvalRunsRequestStatus(InProgressValue);

        internal static InternalGetEvalRunsRequestStatus Completed { get; } = new InternalGetEvalRunsRequestStatus(CompletedValue);

        internal static InternalGetEvalRunsRequestStatus Canceled { get; } = new InternalGetEvalRunsRequestStatus(CanceledValue);

        internal static InternalGetEvalRunsRequestStatus Failed { get; } = new InternalGetEvalRunsRequestStatus(FailedValue);

        public static bool operator ==(InternalGetEvalRunsRequestStatus left, InternalGetEvalRunsRequestStatus right) => left.Equals(right);

        public static bool operator !=(InternalGetEvalRunsRequestStatus left, InternalGetEvalRunsRequestStatus right) => !left.Equals(right);

        public static implicit operator InternalGetEvalRunsRequestStatus(string value) => new InternalGetEvalRunsRequestStatus(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalGetEvalRunsRequestStatus other && Equals(other);

        public bool Equals(InternalGetEvalRunsRequestStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;

        public override string ToString() => _value;
    }
}
