// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

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

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

            _value = value;
        }

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

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

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

        internal static InternalImageGenToolQuality Auto { get; } = new InternalImageGenToolQuality(AutoValue);

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

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

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

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

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