// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Images
{
    internal static partial class GeneratedImageQualityExtensions
    {
        public static string ToSerialString(this GeneratedImageQuality value) => value switch
        {
            GeneratedImageQuality.Standard => "standard",
            GeneratedImageQuality.High => "hd",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageQuality value.")
        };

        public static GeneratedImageQuality ToGeneratedImageQuality(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard")) return GeneratedImageQuality.Standard;
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "hd")) return GeneratedImageQuality.High;
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GeneratedImageQuality value.");
        }
    }
}
