// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Evals
{
    internal readonly partial struct InternalEvalItemRole : IEquatable<InternalEvalItemRole>
    {
        private readonly string _value;
        private const string UserValue = "user";
        private const string AssistantValue = "assistant";
        private const string SystemValue = "system";
        private const string DeveloperValue = "developer";

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

            _value = value;
        }

        internal static InternalEvalItemRole User { get; } = new InternalEvalItemRole(UserValue);

        internal static InternalEvalItemRole Assistant { get; } = new InternalEvalItemRole(AssistantValue);

        internal static InternalEvalItemRole System { get; } = new InternalEvalItemRole(SystemValue);

        internal static InternalEvalItemRole Developer { get; } = new InternalEvalItemRole(DeveloperValue);

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

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

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

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

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