// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalImageGenToolSize : IEquatable<InternalImageGenToolSize>
    {
        private readonly string _value;
        private const string _1024x1024Value = "1024x1024";
        private const string _1024x1536Value = "1024x1536";
        private const string _1536x1024Value = "1536x1024";
        private const string AutoValue = "auto";

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

            _value = value;
        }

        internal static InternalImageGenToolSize _1024x1024 { get; } = new InternalImageGenToolSize(_1024x1024Value);

        internal static InternalImageGenToolSize _1024x1536 { get; } = new InternalImageGenToolSize(_1024x1536Value);

        internal static InternalImageGenToolSize _1536x1024 { get; } = new InternalImageGenToolSize(_1536x1024Value);

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

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

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

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

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

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