< Summary

Class:Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPolicy.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPolicy.Serialization.cs
Covered lines:0
Uncovered lines:70
Coverable lines:70
Total lines:171
Line coverage:0% (0 of 70)
Covered branches:0
Total branches:40
Branch coverage:0% (0 of 40)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_DisabledSslProtocols()-0%100%
get_PolicyType()-0%100%
get_PolicyName()-0%100%
get_CipherSuites()-0%100%
get_MinProtocolVersion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewaySslPolicy(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPolicy.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Application Gateway Ssl policy. </summary>
 13    public partial class ApplicationGatewaySslPolicy
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewaySslPolicy. </summary>
 016        public ApplicationGatewaySslPolicy()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewaySslPolicy. </summary>
 21        /// <param name="disabledSslProtocols"> Ssl protocols to be disabled on application gateway. </param>
 22        /// <param name="policyType"> Type of Ssl Policy. </param>
 23        /// <param name="policyName"> Name of Ssl predefined policy. </param>
 24        /// <param name="cipherSuites"> Ssl cipher suites to be enabled in the specified order to application gateway. <
 25        /// <param name="minProtocolVersion"> Minimum version of Ssl protocol to be supported on application gateway. </
 026        internal ApplicationGatewaySslPolicy(IList<ApplicationGatewaySslProtocol> disabledSslProtocols, ApplicationGatew
 27        {
 028            DisabledSslProtocols = disabledSslProtocols;
 029            PolicyType = policyType;
 030            PolicyName = policyName;
 031            CipherSuites = cipherSuites;
 032            MinProtocolVersion = minProtocolVersion;
 033        }
 34
 35        /// <summary> Ssl protocols to be disabled on application gateway. </summary>
 036        public IList<ApplicationGatewaySslProtocol> DisabledSslProtocols { get; set; }
 37        /// <summary> Type of Ssl Policy. </summary>
 038        public ApplicationGatewaySslPolicyType? PolicyType { get; set; }
 39        /// <summary> Name of Ssl predefined policy. </summary>
 040        public ApplicationGatewaySslPolicyName? PolicyName { get; set; }
 41        /// <summary> Ssl cipher suites to be enabled in the specified order to application gateway. </summary>
 042        public IList<ApplicationGatewaySslCipherSuite> CipherSuites { get; set; }
 43        /// <summary> Minimum version of Ssl protocol to be supported on application gateway. </summary>
 044        public ApplicationGatewaySslProtocol? MinProtocolVersion { get; set; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPolicy.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class ApplicationGatewaySslPolicy : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (DisabledSslProtocols != null)
 20            {
 021                writer.WritePropertyName("disabledSslProtocols");
 022                writer.WriteStartArray();
 023                foreach (var item in DisabledSslProtocols)
 24                {
 025                    writer.WriteStringValue(item.ToString());
 26                }
 027                writer.WriteEndArray();
 28            }
 029            if (PolicyType != null)
 30            {
 031                writer.WritePropertyName("policyType");
 032                writer.WriteStringValue(PolicyType.Value.ToString());
 33            }
 034            if (PolicyName != null)
 35            {
 036                writer.WritePropertyName("policyName");
 037                writer.WriteStringValue(PolicyName.Value.ToString());
 38            }
 039            if (CipherSuites != null)
 40            {
 041                writer.WritePropertyName("cipherSuites");
 042                writer.WriteStartArray();
 043                foreach (var item in CipherSuites)
 44                {
 045                    writer.WriteStringValue(item.ToString());
 46                }
 047                writer.WriteEndArray();
 48            }
 049            if (MinProtocolVersion != null)
 50            {
 051                writer.WritePropertyName("minProtocolVersion");
 052                writer.WriteStringValue(MinProtocolVersion.Value.ToString());
 53            }
 054            writer.WriteEndObject();
 055        }
 56
 57        internal static ApplicationGatewaySslPolicy DeserializeApplicationGatewaySslPolicy(JsonElement element)
 58        {
 059            IList<ApplicationGatewaySslProtocol> disabledSslProtocols = default;
 060            ApplicationGatewaySslPolicyType? policyType = default;
 061            ApplicationGatewaySslPolicyName? policyName = default;
 062            IList<ApplicationGatewaySslCipherSuite> cipherSuites = default;
 063            ApplicationGatewaySslProtocol? minProtocolVersion = default;
 064            foreach (var property in element.EnumerateObject())
 65            {
 066                if (property.NameEquals("disabledSslProtocols"))
 67                {
 068                    if (property.Value.ValueKind == JsonValueKind.Null)
 69                    {
 70                        continue;
 71                    }
 072                    List<ApplicationGatewaySslProtocol> array = new List<ApplicationGatewaySslProtocol>();
 073                    foreach (var item in property.Value.EnumerateArray())
 74                    {
 075                        array.Add(new ApplicationGatewaySslProtocol(item.GetString()));
 76                    }
 077                    disabledSslProtocols = array;
 078                    continue;
 79                }
 080                if (property.NameEquals("policyType"))
 81                {
 082                    if (property.Value.ValueKind == JsonValueKind.Null)
 83                    {
 84                        continue;
 85                    }
 086                    policyType = new ApplicationGatewaySslPolicyType(property.Value.GetString());
 087                    continue;
 88                }
 089                if (property.NameEquals("policyName"))
 90                {
 091                    if (property.Value.ValueKind == JsonValueKind.Null)
 92                    {
 93                        continue;
 94                    }
 095                    policyName = new ApplicationGatewaySslPolicyName(property.Value.GetString());
 096                    continue;
 97                }
 098                if (property.NameEquals("cipherSuites"))
 99                {
 0100                    if (property.Value.ValueKind == JsonValueKind.Null)
 101                    {
 102                        continue;
 103                    }
 0104                    List<ApplicationGatewaySslCipherSuite> array = new List<ApplicationGatewaySslCipherSuite>();
 0105                    foreach (var item in property.Value.EnumerateArray())
 106                    {
 0107                        array.Add(new ApplicationGatewaySslCipherSuite(item.GetString()));
 108                    }
 0109                    cipherSuites = array;
 0110                    continue;
 111                }
 0112                if (property.NameEquals("minProtocolVersion"))
 113                {
 0114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 0118                    minProtocolVersion = new ApplicationGatewaySslProtocol(property.Value.GetString());
 119                    continue;
 120                }
 121            }
 0122            return new ApplicationGatewaySslPolicy(disabledSslProtocols, policyType, policyName, cipherSuites, minProtoc
 123        }
 124    }
 125}