// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.FineTuning
{
    internal readonly partial struct InternalFineTuneMethodType : IEquatable<InternalFineTuneMethodType>
    {
        private readonly string _value;
        private const string SupervisedValue = "supervised";
        private const string DpoValue = "dpo";
        private const string ReinforcementValue = "reinforcement";

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

            _value = value;
        }

        internal static InternalFineTuneMethodType Supervised { get; } = new InternalFineTuneMethodType(SupervisedValue);

        internal static InternalFineTuneMethodType Dpo { get; } = new InternalFineTuneMethodType(DpoValue);

        internal static InternalFineTuneMethodType Reinforcement { get; } = new InternalFineTuneMethodType(ReinforcementValue);

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

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

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

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

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