< Summary

Class:Microsoft.Azure.Management.Search.Models.SharedPrivateLinkResourceStatusEnumExtension
Assembly:Microsoft.Azure.Management.Search
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\src\Generated\Models\SharedPrivateLinkResourceStatus.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:78
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\src\Generated\Models\SharedPrivateLinkResourceStatus.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 SharedPrivateLinkResourceStatus.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum SharedPrivateLinkResourceStatus
 23    {
 24        [EnumMember(Value = "Pending")]
 25        Pending,
 26        [EnumMember(Value = "Approved")]
 27        Approved,
 28        [EnumMember(Value = "Rejected")]
 29        Rejected,
 30        [EnumMember(Value = "Disconnected")]
 31        Disconnected,
 32        [EnumMember(Value = "Timeout")]
 33        Timeout
 34    }
 35    internal static class SharedPrivateLinkResourceStatusEnumExtension
 36    {
 37        internal static string ToSerializedValue(this SharedPrivateLinkResourceStatus? value)
 38        {
 039            return value == null ? null : ((SharedPrivateLinkResourceStatus)value).ToSerializedValue();
 40        }
 41
 42        internal static string ToSerializedValue(this SharedPrivateLinkResourceStatus value)
 43        {
 44            switch( value )
 45            {
 46                case SharedPrivateLinkResourceStatus.Pending:
 047                    return "Pending";
 48                case SharedPrivateLinkResourceStatus.Approved:
 049                    return "Approved";
 50                case SharedPrivateLinkResourceStatus.Rejected:
 051                    return "Rejected";
 52                case SharedPrivateLinkResourceStatus.Disconnected:
 053                    return "Disconnected";
 54                case SharedPrivateLinkResourceStatus.Timeout:
 055                    return "Timeout";
 56            }
 057            return null;
 58        }
 59
 60        internal static SharedPrivateLinkResourceStatus? ParseSharedPrivateLinkResourceStatus(this string value)
 61        {
 62            switch( value )
 63            {
 64                case "Pending":
 065                    return SharedPrivateLinkResourceStatus.Pending;
 66                case "Approved":
 067                    return SharedPrivateLinkResourceStatus.Approved;
 68                case "Rejected":
 069                    return SharedPrivateLinkResourceStatus.Rejected;
 70                case "Disconnected":
 071                    return SharedPrivateLinkResourceStatus.Disconnected;
 72                case "Timeout":
 073                    return SharedPrivateLinkResourceStatus.Timeout;
 74            }
 075            return null;
 76        }
 77    }
 78}