< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_PredefinedPolicies()-0%100%
get_DefaultPolicy()-0%100%
get_AvailableCipherSuites()-0%100%
get_AvailableProtocols()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayAvailableSslOptions(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayAvailableSslOptions.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> Response for ApplicationGatewayAvailableSslOptions API service call. </summary>
 13    public partial class ApplicationGatewayAvailableSslOptions : Resource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayAvailableSslOptions. </summary>
 016        public ApplicationGatewayAvailableSslOptions()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayAvailableSslOptions. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="predefinedPolicies"> List of available Ssl predefined policy. </param>
 27        /// <param name="defaultPolicy"> Name of the Ssl predefined policy applied by default to application gateway. </
 28        /// <param name="availableCipherSuites"> List of available Ssl cipher suites. </param>
 29        /// <param name="availableProtocols"> List of available Ssl protocols. </param>
 030        internal ApplicationGatewayAvailableSslOptions(string id, string name, string type, string location, IDictionary
 31        {
 032            PredefinedPolicies = predefinedPolicies;
 033            DefaultPolicy = defaultPolicy;
 034            AvailableCipherSuites = availableCipherSuites;
 035            AvailableProtocols = availableProtocols;
 036        }
 37
 38        /// <summary> List of available Ssl predefined policy. </summary>
 039        public IList<SubResource> PredefinedPolicies { get; set; }
 40        /// <summary> Name of the Ssl predefined policy applied by default to application gateway. </summary>
 041        public ApplicationGatewaySslPolicyName? DefaultPolicy { get; set; }
 42        /// <summary> List of available Ssl cipher suites. </summary>
 043        public IList<ApplicationGatewaySslCipherSuite> AvailableCipherSuites { get; set; }
 44        /// <summary> List of available Ssl protocols. </summary>
 045        public IList<ApplicationGatewaySslProtocol> AvailableProtocols { get; set; }
 46    }
 47}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayAvailableSslOptions.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 ApplicationGatewayAvailableSslOptions : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Id != null)
 20            {
 021                writer.WritePropertyName("id");
 022                writer.WriteStringValue(Id);
 23            }
 024            if (Name != null)
 25            {
 026                writer.WritePropertyName("name");
 027                writer.WriteStringValue(Name);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            if (Location != null)
 35            {
 036                writer.WritePropertyName("location");
 037                writer.WriteStringValue(Location);
 38            }
 039            if (Tags != null)
 40            {
 041                writer.WritePropertyName("tags");
 042                writer.WriteStartObject();
 043                foreach (var item in Tags)
 44                {
 045                    writer.WritePropertyName(item.Key);
 046                    writer.WriteStringValue(item.Value);
 47                }
 048                writer.WriteEndObject();
 49            }
 050            writer.WritePropertyName("properties");
 051            writer.WriteStartObject();
 052            if (PredefinedPolicies != null)
 53            {
 054                writer.WritePropertyName("predefinedPolicies");
 055                writer.WriteStartArray();
 056                foreach (var item in PredefinedPolicies)
 57                {
 058                    writer.WriteObjectValue(item);
 59                }
 060                writer.WriteEndArray();
 61            }
 062            if (DefaultPolicy != null)
 63            {
 064                writer.WritePropertyName("defaultPolicy");
 065                writer.WriteStringValue(DefaultPolicy.Value.ToString());
 66            }
 067            if (AvailableCipherSuites != null)
 68            {
 069                writer.WritePropertyName("availableCipherSuites");
 070                writer.WriteStartArray();
 071                foreach (var item in AvailableCipherSuites)
 72                {
 073                    writer.WriteStringValue(item.ToString());
 74                }
 075                writer.WriteEndArray();
 76            }
 077            if (AvailableProtocols != null)
 78            {
 079                writer.WritePropertyName("availableProtocols");
 080                writer.WriteStartArray();
 081                foreach (var item in AvailableProtocols)
 82                {
 083                    writer.WriteStringValue(item.ToString());
 84                }
 085                writer.WriteEndArray();
 86            }
 087            writer.WriteEndObject();
 088            writer.WriteEndObject();
 089        }
 90
 91        internal static ApplicationGatewayAvailableSslOptions DeserializeApplicationGatewayAvailableSslOptions(JsonEleme
 92        {
 093            string id = default;
 094            string name = default;
 095            string type = default;
 096            string location = default;
 097            IDictionary<string, string> tags = default;
 098            IList<SubResource> predefinedPolicies = default;
 099            ApplicationGatewaySslPolicyName? defaultPolicy = default;
 0100            IList<ApplicationGatewaySslCipherSuite> availableCipherSuites = default;
 0101            IList<ApplicationGatewaySslProtocol> availableProtocols = default;
 0102            foreach (var property in element.EnumerateObject())
 103            {
 0104                if (property.NameEquals("id"))
 105                {
 0106                    if (property.Value.ValueKind == JsonValueKind.Null)
 107                    {
 108                        continue;
 109                    }
 0110                    id = property.Value.GetString();
 0111                    continue;
 112                }
 0113                if (property.NameEquals("name"))
 114                {
 0115                    if (property.Value.ValueKind == JsonValueKind.Null)
 116                    {
 117                        continue;
 118                    }
 0119                    name = property.Value.GetString();
 0120                    continue;
 121                }
 0122                if (property.NameEquals("type"))
 123                {
 0124                    if (property.Value.ValueKind == JsonValueKind.Null)
 125                    {
 126                        continue;
 127                    }
 0128                    type = property.Value.GetString();
 0129                    continue;
 130                }
 0131                if (property.NameEquals("location"))
 132                {
 0133                    if (property.Value.ValueKind == JsonValueKind.Null)
 134                    {
 135                        continue;
 136                    }
 0137                    location = property.Value.GetString();
 0138                    continue;
 139                }
 0140                if (property.NameEquals("tags"))
 141                {
 0142                    if (property.Value.ValueKind == JsonValueKind.Null)
 143                    {
 144                        continue;
 145                    }
 0146                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0147                    foreach (var property0 in property.Value.EnumerateObject())
 148                    {
 0149                        if (property0.Value.ValueKind == JsonValueKind.Null)
 150                        {
 0151                            dictionary.Add(property0.Name, null);
 152                        }
 153                        else
 154                        {
 0155                            dictionary.Add(property0.Name, property0.Value.GetString());
 156                        }
 157                    }
 0158                    tags = dictionary;
 0159                    continue;
 160                }
 0161                if (property.NameEquals("properties"))
 162                {
 0163                    foreach (var property0 in property.Value.EnumerateObject())
 164                    {
 0165                        if (property0.NameEquals("predefinedPolicies"))
 166                        {
 0167                            if (property0.Value.ValueKind == JsonValueKind.Null)
 168                            {
 169                                continue;
 170                            }
 0171                            List<SubResource> array = new List<SubResource>();
 0172                            foreach (var item in property0.Value.EnumerateArray())
 173                            {
 0174                                if (item.ValueKind == JsonValueKind.Null)
 175                                {
 0176                                    array.Add(null);
 177                                }
 178                                else
 179                                {
 0180                                    array.Add(SubResource.DeserializeSubResource(item));
 181                                }
 182                            }
 0183                            predefinedPolicies = array;
 0184                            continue;
 185                        }
 0186                        if (property0.NameEquals("defaultPolicy"))
 187                        {
 0188                            if (property0.Value.ValueKind == JsonValueKind.Null)
 189                            {
 190                                continue;
 191                            }
 0192                            defaultPolicy = new ApplicationGatewaySslPolicyName(property0.Value.GetString());
 0193                            continue;
 194                        }
 0195                        if (property0.NameEquals("availableCipherSuites"))
 196                        {
 0197                            if (property0.Value.ValueKind == JsonValueKind.Null)
 198                            {
 199                                continue;
 200                            }
 0201                            List<ApplicationGatewaySslCipherSuite> array = new List<ApplicationGatewaySslCipherSuite>();
 0202                            foreach (var item in property0.Value.EnumerateArray())
 203                            {
 0204                                array.Add(new ApplicationGatewaySslCipherSuite(item.GetString()));
 205                            }
 0206                            availableCipherSuites = array;
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("availableProtocols"))
 210                        {
 0211                            if (property0.Value.ValueKind == JsonValueKind.Null)
 212                            {
 213                                continue;
 214                            }
 0215                            List<ApplicationGatewaySslProtocol> array = new List<ApplicationGatewaySslProtocol>();
 0216                            foreach (var item in property0.Value.EnumerateArray())
 217                            {
 0218                                array.Add(new ApplicationGatewaySslProtocol(item.GetString()));
 219                            }
 0220                            availableProtocols = array;
 221                            continue;
 222                        }
 223                    }
 224                    continue;
 225                }
 226            }
 0227            return new ApplicationGatewayAvailableSslOptions(id, name, type, location, tags, predefinedPolicies, default
 228        }
 229    }
 230}