// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using OpenAI;

namespace OpenAI.Graders
{
    [Experimental("OPENAI001")]
    public readonly partial struct GraderType : IEquatable<GraderType>
    {
        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 GraderType(string value)
        {
            Argument.AssertNotNull(value, nameof(value));

            _value = value;
        }

        public static GraderType StringCheck { get; } = new GraderType(StringCheckValue);

        public static GraderType TextSimilarity { get; } = new GraderType(TextSimilarityValue);

        public static GraderType ScoreModel { get; } = new GraderType(ScoreModelValue);

        public static GraderType LabelModel { get; } = new GraderType(LabelModelValue);

        public static GraderType Python { get; } = new GraderType(PythonValue);

        public static GraderType Multi { get; } = new GraderType(MultiValue);

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

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

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

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

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