// <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;
        }

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

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

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

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

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

        public 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;
    }
}
