// <auto-generated/>

#nullable disable

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

namespace OpenAI.Graders
{
    [Experimental("OPENAI001")]
    public readonly partial struct GraderStringCheckOperation : IEquatable<GraderStringCheckOperation>
    {
        private readonly string _value;
        private const string EqValue = "eq";
        private const string NeValue = "ne";
        private const string LikeValue = "like";
        private const string IlikeValue = "ilike";

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

            _value = value;
        }

        public static GraderStringCheckOperation Eq { get; } = new GraderStringCheckOperation(EqValue);

        public static GraderStringCheckOperation Ne { get; } = new GraderStringCheckOperation(NeValue);

        public static GraderStringCheckOperation Like { get; } = new GraderStringCheckOperation(LikeValue);

        public static GraderStringCheckOperation Ilike { get; } = new GraderStringCheckOperation(IlikeValue);

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

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

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

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

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