// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

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

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

            _value = value;
        }

        internal static InternalCreateImageEditRequestBackground Transparent { get; } = new InternalCreateImageEditRequestBackground(TransparentValue);

        internal static InternalCreateImageEditRequestBackground Opaque { get; } = new InternalCreateImageEditRequestBackground(OpaqueValue);

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

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

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

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

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

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