// <auto-generated/>

#nullable disable

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

namespace OpenAI.Graders
{
    [Experimental("OPENAI001")]
    public readonly partial struct GraderTextSimilarityEvaluationMetric : IEquatable<GraderTextSimilarityEvaluationMetric>
    {
        private readonly string _value;
        private const string FuzzyMatchValue = "fuzzy_match";
        private const string BleuValue = "bleu";
        private const string GleuValue = "gleu";
        private const string MeteorValue = "meteor";
        private const string Rouge1Value = "rouge_1";
        private const string Rouge2Value = "rouge_2";
        private const string Rouge3Value = "rouge_3";
        private const string Rouge4Value = "rouge_4";
        private const string Rouge5Value = "rouge_5";
        private const string RougeLValue = "rouge_l";

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

            _value = value;
        }

        public static GraderTextSimilarityEvaluationMetric FuzzyMatch { get; } = new GraderTextSimilarityEvaluationMetric(FuzzyMatchValue);

        public static GraderTextSimilarityEvaluationMetric Bleu { get; } = new GraderTextSimilarityEvaluationMetric(BleuValue);

        public static GraderTextSimilarityEvaluationMetric Gleu { get; } = new GraderTextSimilarityEvaluationMetric(GleuValue);

        public static GraderTextSimilarityEvaluationMetric Meteor { get; } = new GraderTextSimilarityEvaluationMetric(MeteorValue);

        public static GraderTextSimilarityEvaluationMetric Rouge1 { get; } = new GraderTextSimilarityEvaluationMetric(Rouge1Value);

        public static GraderTextSimilarityEvaluationMetric Rouge2 { get; } = new GraderTextSimilarityEvaluationMetric(Rouge2Value);

        public static GraderTextSimilarityEvaluationMetric Rouge3 { get; } = new GraderTextSimilarityEvaluationMetric(Rouge3Value);

        public static GraderTextSimilarityEvaluationMetric Rouge4 { get; } = new GraderTextSimilarityEvaluationMetric(Rouge4Value);

        public static GraderTextSimilarityEvaluationMetric Rouge5 { get; } = new GraderTextSimilarityEvaluationMetric(Rouge5Value);

        public static GraderTextSimilarityEvaluationMetric RougeL { get; } = new GraderTextSimilarityEvaluationMetric(RougeLValue);

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

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

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

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

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