namespace Microsoft.Azure.Management.AppService.Fluent.Models
{
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    using System.Runtime;
    using System.Runtime.Serialization;

    /// <summary>
    /// Defines values for AzureResourceType.
    /// </summary>
    [JsonConverter(typeof(StringEnumConverter))]
    public enum AzureResourceType
    {
        [EnumMember(Value = "Website")]
        Website,
        [EnumMember(Value = "TrafficManager")]
        TrafficManager
    }
    internal static class AzureResourceTypeEnumExtension
    {
        internal static string ToSerializedValue(this AzureResourceType? value)
        {
            return value == null ? null : ((AzureResourceType)value).ToSerializedValue();
        }

        internal static string ToSerializedValue(this AzureResourceType value)
        {
            switch( value )
            {
                case AzureResourceType.Website:
                    return "Website";
                case AzureResourceType.TrafficManager:
                    return "TrafficManager";
            }
            return null;
        }

        internal static AzureResourceType? ParseAzureResourceType(this string value)
        {
            switch( value )
            {
                case "Website":
                    return AzureResourceType.Website;
                case "TrafficManager":
                    return AzureResourceType.TrafficManager;
            }
            return null;
        }
    }
}
