// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Graders
{
    internal readonly partial struct InternalGraderType : IEquatable<InternalGraderType>
    {
        private readonly string _value;
        private const string StringCheckValue = "string_check";
        private const string TextSimilarityValue = "text_similarity";
        private const string ScoreModelValue = "score_model";
        private const string LabelModelValue = "label_model";
        private const string PythonValue = "python";
        private const string MultiValue = "multi";

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

            _value = value;
        }

        internal static InternalGraderType StringCheck { get; } = new InternalGraderType(StringCheckValue);

        internal static InternalGraderType TextSimilarity { get; } = new InternalGraderType(TextSimilarityValue);

        internal static InternalGraderType ScoreModel { get; } = new InternalGraderType(ScoreModelValue);

        internal static InternalGraderType LabelModel { get; } = new InternalGraderType(LabelModelValue);

        internal static InternalGraderType Python { get; } = new InternalGraderType(PythonValue);

        internal static InternalGraderType Multi { get; } = new InternalGraderType(MultiValue);

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

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

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

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

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