// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace OpenAI.Files
{
    public readonly partial struct OpenAIFileStatus : IEquatable<OpenAIFileStatus>
    {
        private readonly string _value;

        public OpenAIFileStatus(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string UploadedValue = "uploaded";
        private const string ProcessedValue = "processed";
        private const string ErrorValue = "error";

        public static OpenAIFileStatus Uploaded { get; } = new OpenAIFileStatus(UploadedValue);
        public static OpenAIFileStatus Processed { get; } = new OpenAIFileStatus(ProcessedValue);
        public static OpenAIFileStatus Error { get; } = new OpenAIFileStatus(ErrorValue);
        public static bool operator ==(OpenAIFileStatus left, OpenAIFileStatus right) => left.Equals(right);
        public static bool operator !=(OpenAIFileStatus left, OpenAIFileStatus right) => !left.Equals(right);
        public static implicit operator OpenAIFileStatus(string value) => new OpenAIFileStatus(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is OpenAIFileStatus other && Equals(other);
        public bool Equals(OpenAIFileStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        public override string ToString() => _value;
    }
}
