// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Images
{
    public readonly partial struct GeneratedImageBackground : IEquatable<GeneratedImageBackground>
    {
        private readonly string _value;
        private const string TransparentValue = "transparent";
        private const string OpaqueValue = "opaque";
        private const string AutoValue = "auto";

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

            _value = value;
        }

        public static GeneratedImageBackground Transparent { get; } = new GeneratedImageBackground(TransparentValue);

        public static GeneratedImageBackground Opaque { get; } = new GeneratedImageBackground(OpaqueValue);

        public static GeneratedImageBackground Auto { get; } = new GeneratedImageBackground(AutoValue);

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

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

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

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

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