< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_CipherSuites()-0%100%
get_MinProtocolVersion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewaySslPredefinedPolicy(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPredefinedPolicy.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> An Ssl predefined policy. </summary>
 13    public partial class ApplicationGatewaySslPredefinedPolicy : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewaySslPredefinedPolicy. </summary>
 016        public ApplicationGatewaySslPredefinedPolicy()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewaySslPredefinedPolicy. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the Ssl predefined policy. </param>
 23        /// <param name="cipherSuites"> Ssl cipher suites to be enabled in the specified order for application gateway. 
 24        /// <param name="minProtocolVersion"> Minimum version of Ssl protocol to be supported on application gateway. </
 025        internal ApplicationGatewaySslPredefinedPolicy(string id, string name, IList<ApplicationGatewaySslCipherSuite> c
 26        {
 027            Name = name;
 028            CipherSuites = cipherSuites;
 029            MinProtocolVersion = minProtocolVersion;
 030        }
 31
 32        /// <summary> Name of the Ssl predefined policy. </summary>
 033        public string Name { get; set; }
 34        /// <summary> Ssl cipher suites to be enabled in the specified order for application gateway. </summary>
 035        public IList<ApplicationGatewaySslCipherSuite> CipherSuites { get; set; }
 36        /// <summary> Minimum version of Ssl protocol to be supported on application gateway. </summary>
 037        public ApplicationGatewaySslProtocol? MinProtocolVersion { get; set; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslPredefinedPolicy.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 ApplicationGatewaySslPredefinedPolicy : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            writer.WritePropertyName("properties");
 030            writer.WriteStartObject();
 031            if (CipherSuites != null)
 32            {
 033                writer.WritePropertyName("cipherSuites");
 034                writer.WriteStartArray();
 035                foreach (var item in CipherSuites)
 36                {
 037                    writer.WriteStringValue(item.ToString());
 38                }
 039                writer.WriteEndArray();
 40            }
 041            if (MinProtocolVersion != null)
 42            {
 043                writer.WritePropertyName("minProtocolVersion");
 044                writer.WriteStringValue(MinProtocolVersion.Value.ToString());
 45            }
 046            writer.WriteEndObject();
 047            writer.WriteEndObject();
 048        }
 49
 50        internal static ApplicationGatewaySslPredefinedPolicy DeserializeApplicationGatewaySslPredefinedPolicy(JsonEleme
 51        {
 052            string name = default;
 053            string id = default;
 054            IList<ApplicationGatewaySslCipherSuite> cipherSuites = default;
 055            ApplicationGatewaySslProtocol? minProtocolVersion = default;
 056            foreach (var property in element.EnumerateObject())
 57            {
 058                if (property.NameEquals("name"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    name = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("id"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    id = property.Value.GetString();
 074                    continue;
 75                }
 076                if (property.NameEquals("properties"))
 77                {
 078                    foreach (var property0 in property.Value.EnumerateObject())
 79                    {
 080                        if (property0.NameEquals("cipherSuites"))
 81                        {
 082                            if (property0.Value.ValueKind == JsonValueKind.Null)
 83                            {
 84                                continue;
 85                            }
 086                            List<ApplicationGatewaySslCipherSuite> array = new List<ApplicationGatewaySslCipherSuite>();
 087                            foreach (var item in property0.Value.EnumerateArray())
 88                            {
 089                                array.Add(new ApplicationGatewaySslCipherSuite(item.GetString()));
 90                            }
 091                            cipherSuites = array;
 092                            continue;
 93                        }
 094                        if (property0.NameEquals("minProtocolVersion"))
 95                        {
 096                            if (property0.Value.ValueKind == JsonValueKind.Null)
 97                            {
 98                                continue;
 99                            }
 0100                            minProtocolVersion = new ApplicationGatewaySslProtocol(property0.Value.GetString());
 101                            continue;
 102                        }
 103                    }
 104                    continue;
 105                }
 106            }
 0107            return new ApplicationGatewaySslPredefinedPolicy(id, name, cipherSuites, minProtocolVersion);
 108        }
 109    }
 110}