// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Internal
{
    internal readonly partial struct InternalWebSearchContextSize : IEquatable<InternalWebSearchContextSize>
    {
        private readonly string _value;
        private const string LowValue = "low";
        private const string MediumValue = "medium";
        private const string HighValue = "high";

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

            _value = value;
        }

        internal static InternalWebSearchContextSize Low { get; } = new InternalWebSearchContextSize(LowValue);

        internal static InternalWebSearchContextSize Medium { get; } = new InternalWebSearchContextSize(MediumValue);

        internal static InternalWebSearchContextSize High { get; } = new InternalWebSearchContextSize(HighValue);

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

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

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

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

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