< Summary

Class:Microsoft.Azure.Management.Search.Models.SkuNameEnumExtension
Assembly:Microsoft.Azure.Management.Search
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\src\Generated\Models\SkuName.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:90
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:42
Branch coverage:0% (0 of 42)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerializedValue(...)-0%0%
ToSerializedValue(...)-0%0%
ParseSkuName(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\src\Generated\Models\SkuName.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Management.Search.Models
 12{
 13    using Newtonsoft.Json;
 14    using Newtonsoft.Json.Converters;
 15    using System.Runtime;
 16    using System.Runtime.Serialization;
 17
 18    /// <summary>
 19    /// Defines values for SkuName.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum SkuName
 23    {
 24        [EnumMember(Value = "free")]
 25        Free,
 26        [EnumMember(Value = "basic")]
 27        Basic,
 28        [EnumMember(Value = "standard")]
 29        Standard,
 30        [EnumMember(Value = "standard2")]
 31        Standard2,
 32        [EnumMember(Value = "standard3")]
 33        Standard3,
 34        [EnumMember(Value = "storage_optimized_l1")]
 35        StorageOptimizedL1,
 36        [EnumMember(Value = "storage_optimized_l2")]
 37        StorageOptimizedL2
 38    }
 39    internal static class SkuNameEnumExtension
 40    {
 41        internal static string ToSerializedValue(this SkuName? value)
 42        {
 043            return value == null ? null : ((SkuName)value).ToSerializedValue();
 44        }
 45
 46        internal static string ToSerializedValue(this SkuName value)
 47        {
 48            switch( value )
 49            {
 50                case SkuName.Free:
 051                    return "free";
 52                case SkuName.Basic:
 053                    return "basic";
 54                case SkuName.Standard:
 055                    return "standard";
 56                case SkuName.Standard2:
 057                    return "standard2";
 58                case SkuName.Standard3:
 059                    return "standard3";
 60                case SkuName.StorageOptimizedL1:
 061                    return "storage_optimized_l1";
 62                case SkuName.StorageOptimizedL2:
 063                    return "storage_optimized_l2";
 64            }
 065            return null;
 66        }
 67
 68        internal static SkuName? ParseSkuName(this string value)
 69        {
 70            switch( value )
 71            {
 72                case "free":
 073                    return SkuName.Free;
 74                case "basic":
 075                    return SkuName.Basic;
 76                case "standard":
 077                    return SkuName.Standard;
 78                case "standard2":
 079                    return SkuName.Standard2;
 80                case "standard3":
 081                    return SkuName.Standard3;
 82                case "storage_optimized_l1":
 083                    return SkuName.StorageOptimizedL1;
 84                case "storage_optimized_l2":
 085                    return SkuName.StorageOptimizedL2;
 86            }
 087            return null;
 88        }
 89    }
 90}