// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Graders
{
    internal readonly partial struct InternalEvalGraderTextSimilarityResourceEvaluationMetric : IEquatable<InternalEvalGraderTextSimilarityResourceEvaluationMetric>
    {
        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 InternalEvalGraderTextSimilarityResourceEvaluationMetric(string value)
        {
            Argument.AssertNotNull(value, nameof(value));

            _value = value;
        }

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric FuzzyMatch { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(FuzzyMatchValue);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Bleu { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(BleuValue);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Gleu { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(GleuValue);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Meteor { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(MeteorValue);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Rouge1 { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(Rouge1Value);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Rouge2 { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(Rouge2Value);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Rouge3 { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(Rouge3Value);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Rouge4 { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(Rouge4Value);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric Rouge5 { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(Rouge5Value);

        internal static InternalEvalGraderTextSimilarityResourceEvaluationMetric RougeL { get; } = new InternalEvalGraderTextSimilarityResourceEvaluationMetric(RougeLValue);

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

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

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

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

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