< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_VpnClientAddressPool()-0%100%
get_VpnClientRootCertificates()-0%100%
get_VpnClientRevokedCertificates()-0%100%
get_VpnClientProtocols()-0%100%
get_VpnClientIpsecPolicies()-0%100%
get_RadiusServerAddress()-0%100%
get_RadiusServerSecret()-0%100%
get_RadiusServers()-0%100%
get_AadTenant()-0%100%
get_AadAudience()-0%100%
get_AadIssuer()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVpnClientConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientConfiguration.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> VpnClientConfiguration for P2S client. </summary>
 13    public partial class VpnClientConfiguration
 14    {
 15        /// <summary> Initializes a new instance of VpnClientConfiguration. </summary>
 016        public VpnClientConfiguration()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VpnClientConfiguration. </summary>
 21        /// <param name="vpnClientAddressPool"> The reference to the address space resource which represents Address spa
 22        /// <param name="vpnClientRootCertificates"> VpnClientRootCertificate for virtual network gateway. </param>
 23        /// <param name="vpnClientRevokedCertificates"> VpnClientRevokedCertificate for Virtual network gateway. </param
 24        /// <param name="vpnClientProtocols"> VpnClientProtocols for Virtual network gateway. </param>
 25        /// <param name="vpnClientIpsecPolicies"> VpnClientIpsecPolicies for virtual network gateway P2S client. </param
 26        /// <param name="radiusServerAddress"> The radius server address property of the VirtualNetworkGateway resource 
 27        /// <param name="radiusServerSecret"> The radius secret property of the VirtualNetworkGateway resource for vpn c
 28        /// <param name="radiusServers"> The radiusServers property for multiple radius server configuration. </param>
 29        /// <param name="aadTenant"> The AADTenant property of the VirtualNetworkGateway resource for vpn client connect
 30        /// <param name="aadAudience"> The AADAudience property of the VirtualNetworkGateway resource for vpn client con
 31        /// <param name="aadIssuer"> The AADIssuer property of the VirtualNetworkGateway resource for vpn client connect
 032        internal VpnClientConfiguration(AddressSpace vpnClientAddressPool, IList<VpnClientRootCertificate> vpnClientRoot
 33        {
 034            VpnClientAddressPool = vpnClientAddressPool;
 035            VpnClientRootCertificates = vpnClientRootCertificates;
 036            VpnClientRevokedCertificates = vpnClientRevokedCertificates;
 037            VpnClientProtocols = vpnClientProtocols;
 038            VpnClientIpsecPolicies = vpnClientIpsecPolicies;
 039            RadiusServerAddress = radiusServerAddress;
 040            RadiusServerSecret = radiusServerSecret;
 041            RadiusServers = radiusServers;
 042            AadTenant = aadTenant;
 043            AadAudience = aadAudience;
 044            AadIssuer = aadIssuer;
 045        }
 46
 47        /// <summary> The reference to the address space resource which represents Address space for P2S VpnClient. </su
 048        public AddressSpace VpnClientAddressPool { get; set; }
 49        /// <summary> VpnClientRootCertificate for virtual network gateway. </summary>
 050        public IList<VpnClientRootCertificate> VpnClientRootCertificates { get; set; }
 51        /// <summary> VpnClientRevokedCertificate for Virtual network gateway. </summary>
 052        public IList<VpnClientRevokedCertificate> VpnClientRevokedCertificates { get; set; }
 53        /// <summary> VpnClientProtocols for Virtual network gateway. </summary>
 054        public IList<VpnClientProtocol> VpnClientProtocols { get; set; }
 55        /// <summary> VpnClientIpsecPolicies for virtual network gateway P2S client. </summary>
 056        public IList<IpsecPolicy> VpnClientIpsecPolicies { get; set; }
 57        /// <summary> The radius server address property of the VirtualNetworkGateway resource for vpn client connection
 058        public string RadiusServerAddress { get; set; }
 59        /// <summary> The radius secret property of the VirtualNetworkGateway resource for vpn client connection. </summ
 060        public string RadiusServerSecret { get; set; }
 61        /// <summary> The radiusServers property for multiple radius server configuration. </summary>
 062        public IList<RadiusServer> RadiusServers { get; set; }
 63        /// <summary> The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AA
 064        public string AadTenant { get; set; }
 65        /// <summary> The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for 
 066        public string AadAudience { get; set; }
 67        /// <summary> The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AA
 068        public string AadIssuer { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientConfiguration.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 VpnClientConfiguration : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (VpnClientAddressPool != null)
 20            {
 021                writer.WritePropertyName("vpnClientAddressPool");
 022                writer.WriteObjectValue(VpnClientAddressPool);
 23            }
 024            if (VpnClientRootCertificates != null)
 25            {
 026                writer.WritePropertyName("vpnClientRootCertificates");
 027                writer.WriteStartArray();
 028                foreach (var item in VpnClientRootCertificates)
 29                {
 030                    writer.WriteObjectValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            if (VpnClientRevokedCertificates != null)
 35            {
 036                writer.WritePropertyName("vpnClientRevokedCertificates");
 037                writer.WriteStartArray();
 038                foreach (var item in VpnClientRevokedCertificates)
 39                {
 040                    writer.WriteObjectValue(item);
 41                }
 042                writer.WriteEndArray();
 43            }
 044            if (VpnClientProtocols != null)
 45            {
 046                writer.WritePropertyName("vpnClientProtocols");
 047                writer.WriteStartArray();
 048                foreach (var item in VpnClientProtocols)
 49                {
 050                    writer.WriteStringValue(item.ToString());
 51                }
 052                writer.WriteEndArray();
 53            }
 054            if (VpnClientIpsecPolicies != null)
 55            {
 056                writer.WritePropertyName("vpnClientIpsecPolicies");
 057                writer.WriteStartArray();
 058                foreach (var item in VpnClientIpsecPolicies)
 59                {
 060                    writer.WriteObjectValue(item);
 61                }
 062                writer.WriteEndArray();
 63            }
 064            if (RadiusServerAddress != null)
 65            {
 066                writer.WritePropertyName("radiusServerAddress");
 067                writer.WriteStringValue(RadiusServerAddress);
 68            }
 069            if (RadiusServerSecret != null)
 70            {
 071                writer.WritePropertyName("radiusServerSecret");
 072                writer.WriteStringValue(RadiusServerSecret);
 73            }
 074            if (RadiusServers != null)
 75            {
 076                writer.WritePropertyName("radiusServers");
 077                writer.WriteStartArray();
 078                foreach (var item in RadiusServers)
 79                {
 080                    writer.WriteObjectValue(item);
 81                }
 082                writer.WriteEndArray();
 83            }
 084            if (AadTenant != null)
 85            {
 086                writer.WritePropertyName("aadTenant");
 087                writer.WriteStringValue(AadTenant);
 88            }
 089            if (AadAudience != null)
 90            {
 091                writer.WritePropertyName("aadAudience");
 092                writer.WriteStringValue(AadAudience);
 93            }
 094            if (AadIssuer != null)
 95            {
 096                writer.WritePropertyName("aadIssuer");
 097                writer.WriteStringValue(AadIssuer);
 98            }
 099            writer.WriteEndObject();
 0100        }
 101
 102        internal static VpnClientConfiguration DeserializeVpnClientConfiguration(JsonElement element)
 103        {
 0104            AddressSpace vpnClientAddressPool = default;
 0105            IList<VpnClientRootCertificate> vpnClientRootCertificates = default;
 0106            IList<VpnClientRevokedCertificate> vpnClientRevokedCertificates = default;
 0107            IList<VpnClientProtocol> vpnClientProtocols = default;
 0108            IList<IpsecPolicy> vpnClientIpsecPolicies = default;
 0109            string radiusServerAddress = default;
 0110            string radiusServerSecret = default;
 0111            IList<RadiusServer> radiusServers = default;
 0112            string aadTenant = default;
 0113            string aadAudience = default;
 0114            string aadIssuer = default;
 0115            foreach (var property in element.EnumerateObject())
 116            {
 0117                if (property.NameEquals("vpnClientAddressPool"))
 118                {
 0119                    if (property.Value.ValueKind == JsonValueKind.Null)
 120                    {
 121                        continue;
 122                    }
 0123                    vpnClientAddressPool = AddressSpace.DeserializeAddressSpace(property.Value);
 0124                    continue;
 125                }
 0126                if (property.NameEquals("vpnClientRootCertificates"))
 127                {
 0128                    if (property.Value.ValueKind == JsonValueKind.Null)
 129                    {
 130                        continue;
 131                    }
 0132                    List<VpnClientRootCertificate> array = new List<VpnClientRootCertificate>();
 0133                    foreach (var item in property.Value.EnumerateArray())
 134                    {
 0135                        if (item.ValueKind == JsonValueKind.Null)
 136                        {
 0137                            array.Add(null);
 138                        }
 139                        else
 140                        {
 0141                            array.Add(VpnClientRootCertificate.DeserializeVpnClientRootCertificate(item));
 142                        }
 143                    }
 0144                    vpnClientRootCertificates = array;
 0145                    continue;
 146                }
 0147                if (property.NameEquals("vpnClientRevokedCertificates"))
 148                {
 0149                    if (property.Value.ValueKind == JsonValueKind.Null)
 150                    {
 151                        continue;
 152                    }
 0153                    List<VpnClientRevokedCertificate> array = new List<VpnClientRevokedCertificate>();
 0154                    foreach (var item in property.Value.EnumerateArray())
 155                    {
 0156                        if (item.ValueKind == JsonValueKind.Null)
 157                        {
 0158                            array.Add(null);
 159                        }
 160                        else
 161                        {
 0162                            array.Add(VpnClientRevokedCertificate.DeserializeVpnClientRevokedCertificate(item));
 163                        }
 164                    }
 0165                    vpnClientRevokedCertificates = array;
 0166                    continue;
 167                }
 0168                if (property.NameEquals("vpnClientProtocols"))
 169                {
 0170                    if (property.Value.ValueKind == JsonValueKind.Null)
 171                    {
 172                        continue;
 173                    }
 0174                    List<VpnClientProtocol> array = new List<VpnClientProtocol>();
 0175                    foreach (var item in property.Value.EnumerateArray())
 176                    {
 0177                        array.Add(new VpnClientProtocol(item.GetString()));
 178                    }
 0179                    vpnClientProtocols = array;
 0180                    continue;
 181                }
 0182                if (property.NameEquals("vpnClientIpsecPolicies"))
 183                {
 0184                    if (property.Value.ValueKind == JsonValueKind.Null)
 185                    {
 186                        continue;
 187                    }
 0188                    List<IpsecPolicy> array = new List<IpsecPolicy>();
 0189                    foreach (var item in property.Value.EnumerateArray())
 190                    {
 0191                        if (item.ValueKind == JsonValueKind.Null)
 192                        {
 0193                            array.Add(null);
 194                        }
 195                        else
 196                        {
 0197                            array.Add(IpsecPolicy.DeserializeIpsecPolicy(item));
 198                        }
 199                    }
 0200                    vpnClientIpsecPolicies = array;
 0201                    continue;
 202                }
 0203                if (property.NameEquals("radiusServerAddress"))
 204                {
 0205                    if (property.Value.ValueKind == JsonValueKind.Null)
 206                    {
 207                        continue;
 208                    }
 0209                    radiusServerAddress = property.Value.GetString();
 0210                    continue;
 211                }
 0212                if (property.NameEquals("radiusServerSecret"))
 213                {
 0214                    if (property.Value.ValueKind == JsonValueKind.Null)
 215                    {
 216                        continue;
 217                    }
 0218                    radiusServerSecret = property.Value.GetString();
 0219                    continue;
 220                }
 0221                if (property.NameEquals("radiusServers"))
 222                {
 0223                    if (property.Value.ValueKind == JsonValueKind.Null)
 224                    {
 225                        continue;
 226                    }
 0227                    List<RadiusServer> array = new List<RadiusServer>();
 0228                    foreach (var item in property.Value.EnumerateArray())
 229                    {
 0230                        if (item.ValueKind == JsonValueKind.Null)
 231                        {
 0232                            array.Add(null);
 233                        }
 234                        else
 235                        {
 0236                            array.Add(RadiusServer.DeserializeRadiusServer(item));
 237                        }
 238                    }
 0239                    radiusServers = array;
 0240                    continue;
 241                }
 0242                if (property.NameEquals("aadTenant"))
 243                {
 0244                    if (property.Value.ValueKind == JsonValueKind.Null)
 245                    {
 246                        continue;
 247                    }
 0248                    aadTenant = property.Value.GetString();
 0249                    continue;
 250                }
 0251                if (property.NameEquals("aadAudience"))
 252                {
 0253                    if (property.Value.ValueKind == JsonValueKind.Null)
 254                    {
 255                        continue;
 256                    }
 0257                    aadAudience = property.Value.GetString();
 0258                    continue;
 259                }
 0260                if (property.NameEquals("aadIssuer"))
 261                {
 0262                    if (property.Value.ValueKind == JsonValueKind.Null)
 263                    {
 264                        continue;
 265                    }
 0266                    aadIssuer = property.Value.GetString();
 267                    continue;
 268                }
 269            }
 0270            return new VpnClientConfiguration(vpnClientAddressPool, vpnClientRootCertificates, vpnClientRevokedCertifica
 271        }
 272    }
 273}