text:
namespace Microsoft.Azure.Management.Compute.Models
{
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    using System.Runtime;
    using System.Runtime.Serialization;

    /// <summary>
    /// Defines values for UpgradeState.
    /// </summary>
    [JsonConverter(typeof(StringEnumConverter))]
    public enum UpgradeState
    {
        [EnumMember(Value = "RollingForward")]
        RollingForward,
        [EnumMember(Value = "Cancelled")]
        Cancelled,
        [EnumMember(Value = "Completed")]
        Completed,
        [EnumMember(Value = "Faulted")]
        Faulted
    }
    internal static class UpgradeStateEnumExtension
    {
        internal static string ToSerializedValue(this UpgradeState? value)
        {
            return value == null ? null : ((UpgradeState)value).ToSerializedValue();
        }

        internal static string ToSerializedValue(this UpgradeState value)
        {
            switch( value )
            {
                case UpgradeState.RollingForward:
                    return "RollingForward";
                case UpgradeState.Cancelled:
                    return "Cancelled";
                case UpgradeState.Completed:
                    return "Completed";
                case UpgradeState.Faulted:
                    return "Faulted";
            }
            return null;
        }

        internal static UpgradeState? ParseUpgradeState(this string value)
        {
            switch( value )
            {
                case "RollingForward":
                    return UpgradeState.RollingForward;
                case "Cancelled":
                    return UpgradeState.Cancelled;
                case "Completed":
                    return UpgradeState.Completed;
                case "Faulted":
                    return UpgradeState.Faulted;
            }
            return null;
        }
    }
}

redpajama_set_name: RedPajamaGithub