< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_KeyVaultSecretId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeFirewallPolicyTrustedRootCertificate(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\FirewallPolicyTrustedRootCertificate.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> Trusted Root certificates of a firewall policy. </summary>
 11    public partial class FirewallPolicyTrustedRootCertificate
 12    {
 13        /// <summary> Initializes a new instance of FirewallPolicyTrustedRootCertificate. </summary>
 014        public FirewallPolicyTrustedRootCertificate()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of FirewallPolicyTrustedRootCertificate. </summary>
 19        /// <param name="name"> Name of the trusted root certificate that is unique within a firewall policy. </param>
 20        /// <param name="keyVaultSecretId"> Secret Id of (base-64 encoded unencrypted pfx) the public certificate data s
 021        internal FirewallPolicyTrustedRootCertificate(string name, string keyVaultSecretId)
 22        {
 023            Name = name;
 024            KeyVaultSecretId = keyVaultSecretId;
 025        }
 26
 27        /// <summary> Name of the trusted root certificate that is unique within a firewall policy. </summary>
 028        public string Name { get; set; }
 29        /// <summary> Secret Id of (base-64 encoded unencrypted pfx) the public certificate data stored in KeyVault. </s
 030        public string KeyVaultSecretId { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\FirewallPolicyTrustedRootCertificate.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 FirewallPolicyTrustedRootCertificate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            writer.WritePropertyName("properties");
 024            writer.WriteStartObject();
 025            if (KeyVaultSecretId != null)
 26            {
 027                writer.WritePropertyName("keyVaultSecretId");
 028                writer.WriteStringValue(KeyVaultSecretId);
 29            }
 030            writer.WriteEndObject();
 031            writer.WriteEndObject();
 032        }
 33
 34        internal static FirewallPolicyTrustedRootCertificate DeserializeFirewallPolicyTrustedRootCertificate(JsonElement
 35        {
 036            string name = default;
 037            string keyVaultSecretId = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("name"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    name = property.Value.GetString();
 047                    continue;
 48                }
 049                if (property.NameEquals("properties"))
 50                {
 051                    foreach (var property0 in property.Value.EnumerateObject())
 52                    {
 053                        if (property0.NameEquals("keyVaultSecretId"))
 54                        {
 055                            if (property0.Value.ValueKind == JsonValueKind.Null)
 56                            {
 57                                continue;
 58                            }
 059                            keyVaultSecretId = property0.Value.GetString();
 60                            continue;
 61                        }
 62                    }
 63                    continue;
 64                }
 65            }
 066            return new FirewallPolicyTrustedRootCertificate(name, keyVaultSecretId);
 67        }
 68    }
 69}