// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace OpenAI.Chat
{
    public readonly partial struct ImageChatMessageContentPartDetail : IEquatable<ImageChatMessageContentPartDetail>
    {
        private readonly string _value;

        public ImageChatMessageContentPartDetail(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string AutoValue = "auto";
        private const string LowValue = "low";
        private const string HighValue = "high";

        public static ImageChatMessageContentPartDetail Auto { get; } = new ImageChatMessageContentPartDetail(AutoValue);
        public static ImageChatMessageContentPartDetail Low { get; } = new ImageChatMessageContentPartDetail(LowValue);
        public static ImageChatMessageContentPartDetail High { get; } = new ImageChatMessageContentPartDetail(HighValue);
        public static bool operator ==(ImageChatMessageContentPartDetail left, ImageChatMessageContentPartDetail right) => left.Equals(right);
        public static bool operator !=(ImageChatMessageContentPartDetail left, ImageChatMessageContentPartDetail right) => !left.Equals(right);
        public static implicit operator ImageChatMessageContentPartDetail(string value) => new ImageChatMessageContentPartDetail(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is ImageChatMessageContentPartDetail other && Equals(other);
        public bool Equals(ImageChatMessageContentPartDetail 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;
    }
}
