// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalComparisonFilterType : IEquatable<InternalComparisonFilterType>
    {
        private readonly string _value;
        private const string EqValue = "eq";
        private const string NeValue = "ne";
        private const string GtValue = "gt";
        private const string GteValue = "gte";
        private const string LtValue = "lt";
        private const string LteValue = "lte";

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

            _value = value;
        }

        internal static InternalComparisonFilterType Eq { get; } = new InternalComparisonFilterType(EqValue);

        internal static InternalComparisonFilterType Ne { get; } = new InternalComparisonFilterType(NeValue);

        internal static InternalComparisonFilterType Gt { get; } = new InternalComparisonFilterType(GtValue);

        internal static InternalComparisonFilterType Gte { get; } = new InternalComparisonFilterType(GteValue);

        internal static InternalComparisonFilterType Lt { get; } = new InternalComparisonFilterType(LtValue);

        internal static InternalComparisonFilterType Lte { get; } = new InternalComparisonFilterType(LteValue);

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

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

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

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

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