// <auto-generated/>

#nullable disable

using System;

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

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