< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_CknSecretIdentifier()-0%100%
get_CakSecretIdentifier()-0%100%
get_Cipher()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteLinkMacSecConfig(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteLinkMacSecConfig.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> ExpressRouteLink Mac Security Configuration. </summary>
 11    public partial class ExpressRouteLinkMacSecConfig
 12    {
 13        /// <summary> Initializes a new instance of ExpressRouteLinkMacSecConfig. </summary>
 014        public ExpressRouteLinkMacSecConfig()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRouteLinkMacSecConfig. </summary>
 19        /// <param name="cknSecretIdentifier"> Keyvault Secret Identifier URL containing Mac security CKN key. </param>
 20        /// <param name="cakSecretIdentifier"> Keyvault Secret Identifier URL containing Mac security CAK key. </param>
 21        /// <param name="cipher"> Mac security cipher. </param>
 022        internal ExpressRouteLinkMacSecConfig(string cknSecretIdentifier, string cakSecretIdentifier, ExpressRouteLinkMa
 23        {
 024            CknSecretIdentifier = cknSecretIdentifier;
 025            CakSecretIdentifier = cakSecretIdentifier;
 026            Cipher = cipher;
 027        }
 28
 29        /// <summary> Keyvault Secret Identifier URL containing Mac security CKN key. </summary>
 030        public string CknSecretIdentifier { get; set; }
 31        /// <summary> Keyvault Secret Identifier URL containing Mac security CAK key. </summary>
 032        public string CakSecretIdentifier { get; set; }
 33        /// <summary> Mac security cipher. </summary>
 034        public ExpressRouteLinkMacSecCipher? Cipher { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteLinkMacSecConfig.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 ExpressRouteLinkMacSecConfig : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (CknSecretIdentifier != null)
 19            {
 020                writer.WritePropertyName("cknSecretIdentifier");
 021                writer.WriteStringValue(CknSecretIdentifier);
 22            }
 023            if (CakSecretIdentifier != null)
 24            {
 025                writer.WritePropertyName("cakSecretIdentifier");
 026                writer.WriteStringValue(CakSecretIdentifier);
 27            }
 028            if (Cipher != null)
 29            {
 030                writer.WritePropertyName("cipher");
 031                writer.WriteStringValue(Cipher.Value.ToString());
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static ExpressRouteLinkMacSecConfig DeserializeExpressRouteLinkMacSecConfig(JsonElement element)
 37        {
 038            string cknSecretIdentifier = default;
 039            string cakSecretIdentifier = default;
 040            ExpressRouteLinkMacSecCipher? cipher = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("cknSecretIdentifier"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    cknSecretIdentifier = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("cakSecretIdentifier"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    cakSecretIdentifier = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("cipher"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    cipher = new ExpressRouteLinkMacSecCipher(property.Value.GetString());
 68                    continue;
 69                }
 70            }
 071            return new ExpressRouteLinkMacSecConfig(cknSecretIdentifier, cakSecretIdentifier, cipher);
 72        }
 73    }
 74}