// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.FineTuning
{
    public readonly partial struct FineTuningStatus : IEquatable<FineTuningStatus>
    {
        private readonly string _value;
        private const string ValidatingFilesValue = "validating_files";
        private const string QueuedValue = "queued";
        private const string RunningValue = "running";
        private const string SucceededValue = "succeeded";
        private const string FailedValue = "failed";
        private const string CancelledValue = "cancelled";

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

            _value = value;
        }

        public static FineTuningStatus ValidatingFiles { get; } = new FineTuningStatus(ValidatingFilesValue);

        public static FineTuningStatus Queued { get; } = new FineTuningStatus(QueuedValue);

        public static FineTuningStatus Running { get; } = new FineTuningStatus(RunningValue);

        public static FineTuningStatus Succeeded { get; } = new FineTuningStatus(SucceededValue);

        public static FineTuningStatus Failed { get; } = new FineTuningStatus(FailedValue);

        public static FineTuningStatus Cancelled { get; } = new FineTuningStatus(CancelledValue);

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

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

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

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

        public bool Equals(FineTuningStatus 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;
    }
}
