< Summary

Class:Microsoft.Azure.Batch.Protocol.Models.CertificateVisibilityEnumExtension
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\CertificateVisibility.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:80
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\CertificateVisibility.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.Batch.Protocol.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 CertificateVisibility.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum CertificateVisibility
 23    {
 24        /// <summary>
 25        /// The Certificate should be visible to the user account under which
 26        /// the StartTask is run. Note that if AutoUser Scope is Pool for both
 27        /// the StartTask and a Task, this certificate will be visible to the
 28        /// Task as well.
 29        /// </summary>
 30        [EnumMember(Value = "starttask")]
 31        StartTask,
 32        /// <summary>
 33        /// The Certificate should be visible to the user accounts under which
 34        /// Job Tasks are run.
 35        /// </summary>
 36        [EnumMember(Value = "task")]
 37        Task,
 38        /// <summary>
 39        /// The Certificate should be visible to the user accounts under which
 40        /// users remotely access the Compute Node.
 41        /// </summary>
 42        [EnumMember(Value = "remoteuser")]
 43        RemoteUser
 44    }
 45    internal static class CertificateVisibilityEnumExtension
 46    {
 47        internal static string ToSerializedValue(this CertificateVisibility? value)
 48        {
 049            return value == null ? null : ((CertificateVisibility)value).ToSerializedValue();
 50        }
 51
 52        internal static string ToSerializedValue(this CertificateVisibility value)
 53        {
 54            switch( value )
 55            {
 56                case CertificateVisibility.StartTask:
 057                    return "starttask";
 58                case CertificateVisibility.Task:
 059                    return "task";
 60                case CertificateVisibility.RemoteUser:
 061                    return "remoteuser";
 62            }
 063            return null;
 64        }
 65
 66        internal static CertificateVisibility? ParseCertificateVisibility(this string value)
 67        {
 68            switch( value )
 69            {
 70                case "starttask":
 071                    return CertificateVisibility.StartTask;
 72                case "task":
 073                    return CertificateVisibility.Task;
 74                case "remoteuser":
 075                    return CertificateVisibility.RemoteUser;
 76            }
 077            return null;
 78        }
 79    }
 80}