// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.VectorStores
{
    internal static partial class VectorStoreStatusExtensions
    {
        public static string ToSerialString(this VectorStores.VectorStoreStatus value) => value switch
        {
            VectorStores.VectorStoreStatus.Expired => "expired",
            VectorStores.VectorStoreStatus.InProgress => "in_progress",
            VectorStores.VectorStoreStatus.Completed => "completed",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreStatus value.")
        };

        public static VectorStores.VectorStoreStatus ToVectorStoreStatus(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "expired"))
            {
                return VectorStores.VectorStoreStatus.Expired;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "in_progress"))
            {
                return VectorStores.VectorStoreStatus.InProgress;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "completed"))
            {
                return VectorStores.VectorStoreStatus.Completed;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VectorStoreStatus value.");
        }
    }
}
