// 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.

namespace Microsoft.Azure.Management.WebSites.Models
{
    using Microsoft.Azure;
    using Microsoft.Azure.Management;
    using Microsoft.Azure.Management.WebSites;
    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)  =>
            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;
        }
    }
}
