< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
get_SaLifeTimeSeconds()-0%100%
get_SaDataSizeKilobytes()-0%100%
get_IpsecEncryption()-0%100%
get_IpsecIntegrity()-0%100%
get_IkeEncryption()-0%100%
get_IkeIntegrity()-0%100%
get_DhGroup()-0%100%
get_PfsGroup()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeVpnClientIPsecParameters(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientIPsecParameters.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> An IPSec parameters for a virtual network gateway P2S connection. </summary>
 11    public partial class VpnClientIPsecParameters
 12    {
 13        /// <summary> Initializes a new instance of VpnClientIPsecParameters. </summary>
 14        /// <param name="saLifeTimeSeconds"> The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifet
 15        /// <param name="saDataSizeKilobytes"> The IPSec Security Association (also called Quick Mode or Phase 2 SA) pay
 16        /// <param name="ipsecEncryption"> The IPSec encryption algorithm (IKE phase 1). </param>
 17        /// <param name="ipsecIntegrity"> The IPSec integrity algorithm (IKE phase 1). </param>
 18        /// <param name="ikeEncryption"> The IKE encryption algorithm (IKE phase 2). </param>
 19        /// <param name="ikeIntegrity"> The IKE integrity algorithm (IKE phase 2). </param>
 20        /// <param name="dhGroup"> The DH Group used in IKE Phase 1 for initial SA. </param>
 21        /// <param name="pfsGroup"> The Pfs Group used in IKE Phase 2 for new child SA. </param>
 022        public VpnClientIPsecParameters(int saLifeTimeSeconds, int saDataSizeKilobytes, IpsecEncryption ipsecEncryption,
 23        {
 024            SaLifeTimeSeconds = saLifeTimeSeconds;
 025            SaDataSizeKilobytes = saDataSizeKilobytes;
 026            IpsecEncryption = ipsecEncryption;
 027            IpsecIntegrity = ipsecIntegrity;
 028            IkeEncryption = ikeEncryption;
 029            IkeIntegrity = ikeIntegrity;
 030            DhGroup = dhGroup;
 031            PfsGroup = pfsGroup;
 032        }
 33
 34        /// <summary> The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S 
 035        public int SaLifeTimeSeconds { get; set; }
 36        /// <summary> The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S c
 037        public int SaDataSizeKilobytes { get; set; }
 38        /// <summary> The IPSec encryption algorithm (IKE phase 1). </summary>
 039        public IpsecEncryption IpsecEncryption { get; set; }
 40        /// <summary> The IPSec integrity algorithm (IKE phase 1). </summary>
 041        public IpsecIntegrity IpsecIntegrity { get; set; }
 42        /// <summary> The IKE encryption algorithm (IKE phase 2). </summary>
 043        public IkeEncryption IkeEncryption { get; set; }
 44        /// <summary> The IKE integrity algorithm (IKE phase 2). </summary>
 045        public IkeIntegrity IkeIntegrity { get; set; }
 46        /// <summary> The DH Group used in IKE Phase 1 for initial SA. </summary>
 047        public DhGroup DhGroup { get; set; }
 48        /// <summary> The Pfs Group used in IKE Phase 2 for new child SA. </summary>
 049        public PfsGroup PfsGroup { get; set; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientIPsecParameters.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class VpnClientIPsecParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("saLifeTimeSeconds");
 019            writer.WriteNumberValue(SaLifeTimeSeconds);
 020            writer.WritePropertyName("saDataSizeKilobytes");
 021            writer.WriteNumberValue(SaDataSizeKilobytes);
 022            writer.WritePropertyName("ipsecEncryption");
 023            writer.WriteStringValue(IpsecEncryption.ToString());
 024            writer.WritePropertyName("ipsecIntegrity");
 025            writer.WriteStringValue(IpsecIntegrity.ToString());
 026            writer.WritePropertyName("ikeEncryption");
 027            writer.WriteStringValue(IkeEncryption.ToString());
 028            writer.WritePropertyName("ikeIntegrity");
 029            writer.WriteStringValue(IkeIntegrity.ToString());
 030            writer.WritePropertyName("dhGroup");
 031            writer.WriteStringValue(DhGroup.ToString());
 032            writer.WritePropertyName("pfsGroup");
 033            writer.WriteStringValue(PfsGroup.ToString());
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static VpnClientIPsecParameters DeserializeVpnClientIPsecParameters(JsonElement element)
 38        {
 039            int saLifeTimeSeconds = default;
 040            int saDataSizeKilobytes = default;
 041            IpsecEncryption ipsecEncryption = default;
 042            IpsecIntegrity ipsecIntegrity = default;
 043            IkeEncryption ikeEncryption = default;
 044            IkeIntegrity ikeIntegrity = default;
 045            DhGroup dhGroup = default;
 046            PfsGroup pfsGroup = default;
 047            foreach (var property in element.EnumerateObject())
 48            {
 049                if (property.NameEquals("saLifeTimeSeconds"))
 50                {
 051                    saLifeTimeSeconds = property.Value.GetInt32();
 052                    continue;
 53                }
 054                if (property.NameEquals("saDataSizeKilobytes"))
 55                {
 056                    saDataSizeKilobytes = property.Value.GetInt32();
 057                    continue;
 58                }
 059                if (property.NameEquals("ipsecEncryption"))
 60                {
 061                    ipsecEncryption = new IpsecEncryption(property.Value.GetString());
 062                    continue;
 63                }
 064                if (property.NameEquals("ipsecIntegrity"))
 65                {
 066                    ipsecIntegrity = new IpsecIntegrity(property.Value.GetString());
 067                    continue;
 68                }
 069                if (property.NameEquals("ikeEncryption"))
 70                {
 071                    ikeEncryption = new IkeEncryption(property.Value.GetString());
 072                    continue;
 73                }
 074                if (property.NameEquals("ikeIntegrity"))
 75                {
 076                    ikeIntegrity = new IkeIntegrity(property.Value.GetString());
 077                    continue;
 78                }
 079                if (property.NameEquals("dhGroup"))
 80                {
 081                    dhGroup = new DhGroup(property.Value.GetString());
 082                    continue;
 83                }
 084                if (property.NameEquals("pfsGroup"))
 85                {
 086                    pfsGroup = new PfsGroup(property.Value.GetString());
 87                    continue;
 88                }
 89            }
 090            return new VpnClientIPsecParameters(saLifeTimeSeconds, saDataSizeKilobytes, ipsecEncryption, ipsecIntegrity,
 91        }
 92    }
 93}