// <auto-generated/>

#nullable disable

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

namespace OpenAI.Images
{
    [Experimental("OPENAI001")]
    public readonly partial struct GeneratedImageModerationLevel : IEquatable<GeneratedImageModerationLevel>
    {
        private readonly string _value;
        private const string LowValue = "low";
        private const string AutoValue = "auto";

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

            _value = value;
        }

        public static GeneratedImageModerationLevel Low { get; } = new GeneratedImageModerationLevel(LowValue);

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

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

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

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

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

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