// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalImageGenToolCallItemResourceStatus : IEquatable<InternalImageGenToolCallItemResourceStatus>
    {
        private readonly string _value;
        private const string InProgressValue = "in_progress";
        private const string CompletedValue = "completed";
        private const string GeneratingValue = "generating";
        private const string FailedValue = "failed";

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

            _value = value;
        }

        internal static InternalImageGenToolCallItemResourceStatus InProgress { get; } = new InternalImageGenToolCallItemResourceStatus(InProgressValue);

        internal static InternalImageGenToolCallItemResourceStatus Completed { get; } = new InternalImageGenToolCallItemResourceStatus(CompletedValue);

        internal static InternalImageGenToolCallItemResourceStatus Generating { get; } = new InternalImageGenToolCallItemResourceStatus(GeneratingValue);

        internal static InternalImageGenToolCallItemResourceStatus Failed { get; } = new InternalImageGenToolCallItemResourceStatus(FailedValue);

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

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

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

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

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