// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.DataLake.Analytics.Models
{
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    using System.Runtime;
    using System.Runtime.Serialization;

    /// <summary>
    /// Defines values for SeverityTypes.
    /// </summary>
    [JsonConverter(typeof(StringEnumConverter))]
    public enum SeverityTypes
    {
        [EnumMember(Value = "Warning")]
        Warning,
        [EnumMember(Value = "Error")]
        Error,
        [EnumMember(Value = "Info")]
        Info,
        [EnumMember(Value = "SevereWarning")]
        SevereWarning,
        [EnumMember(Value = "Deprecated")]
        Deprecated,
        [EnumMember(Value = "UserWarning")]
        UserWarning
    }
    internal static class SeverityTypesEnumExtension
    {
        internal static string ToSerializedValue(this SeverityTypes? value)
        {
            return value == null ? null : ((SeverityTypes)value).ToSerializedValue();
        }

        internal static string ToSerializedValue(this SeverityTypes value)
        {
            switch( value )
            {
                case SeverityTypes.Warning:
                    return "Warning";
                case SeverityTypes.Error:
                    return "Error";
                case SeverityTypes.Info:
                    return "Info";
                case SeverityTypes.SevereWarning:
                    return "SevereWarning";
                case SeverityTypes.Deprecated:
                    return "Deprecated";
                case SeverityTypes.UserWarning:
                    return "UserWarning";
            }
            return null;
        }

        internal static SeverityTypes? ParseSeverityTypes(this string value)
        {
            switch( value )
            {
                case "Warning":
                    return SeverityTypes.Warning;
                case "Error":
                    return SeverityTypes.Error;
                case "Info":
                    return SeverityTypes.Info;
                case "SevereWarning":
                    return SeverityTypes.SevereWarning;
                case "Deprecated":
                    return SeverityTypes.Deprecated;
                case "UserWarning":
                    return SeverityTypes.UserWarning;
            }
            return null;
        }
    }
}
