// <auto-generated/>

#nullable disable

using System;

namespace OpenAI.Realtime
{
    internal static partial class InputNoiseReductionKindExtensions
    {
        public static string ToSerialString(this InputNoiseReductionKind value) => value switch
        {
            InputNoiseReductionKind.NearField => "near_field",
            InputNoiseReductionKind.FarField => "far_field",
            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown InputNoiseReductionKind value.")
        };

        public static InputNoiseReductionKind ToInputNoiseReductionKind(this string value)
        {
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "near_field"))
            {
                return InputNoiseReductionKind.NearField;
            }
            if (StringComparer.OrdinalIgnoreCase.Equals(value, "far_field"))
            {
                return InputNoiseReductionKind.FarField;
            }
            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown InputNoiseReductionKind value.");
        }
    }
}
