// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

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

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

        private const string InternalErrorValue = "internal_error";
        private const string FileNotFoundValue = "file_not_found";
        private const string ParsingErrorValue = "parsing_error";
        private const string UnhandledMimeTypeValue = "unhandled_mime_type";

        public static VectorStoreFileAssociationErrorCode InternalError { get; } = new VectorStoreFileAssociationErrorCode(InternalErrorValue);
        public static VectorStoreFileAssociationErrorCode FileNotFound { get; } = new VectorStoreFileAssociationErrorCode(FileNotFoundValue);
        public static VectorStoreFileAssociationErrorCode ParsingError { get; } = new VectorStoreFileAssociationErrorCode(ParsingErrorValue);
        public static VectorStoreFileAssociationErrorCode UnhandledMimeType { get; } = new VectorStoreFileAssociationErrorCode(UnhandledMimeTypeValue);
        public static bool operator ==(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right) => left.Equals(right);
        public static bool operator !=(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right) => !left.Equals(right);
        public static implicit operator VectorStoreFileAssociationErrorCode(string value) => new VectorStoreFileAssociationErrorCode(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is VectorStoreFileAssociationErrorCode other && Equals(other);
        public bool Equals(VectorStoreFileAssociationErrorCode 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;
    }
}
