// <auto-generated/>

#nullable disable

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

namespace OpenAI.Images
{
    public readonly partial struct GeneratedImageQuality : IEquatable<GeneratedImageQuality>
    {
        private readonly string _value;
        private const string StandardValue = "standard";
        private const string HdValue = "hd";
        private const string LowValue = "low";
        private const string MediumValue = "medium";
        private const string HighValue = "high";
        private const string AutoValue = "auto";

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

            _value = value;
        }

        public static GeneratedImageQuality Standard { get; } = new GeneratedImageQuality(StandardValue);

        [Experimental("OPENAI001")]
        public static GeneratedImageQuality Low { get; } = new GeneratedImageQuality(LowValue);

        [Experimental("OPENAI001")]
        public static GeneratedImageQuality Medium { get; } = new GeneratedImageQuality(MediumValue);

        [Experimental("OPENAI001")]
        public static GeneratedImageQuality Auto { get; } = new GeneratedImageQuality(AutoValue);

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

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

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

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

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