< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_Data()-0%100%
get_KeyVaultSecretId()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayTrustedRootCertificate(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayTrustedRootCertificate.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 an application gateway. </summary>
 11    public partial class ApplicationGatewayTrustedRootCertificate : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayTrustedRootCertificate. </summary>
 014        public ApplicationGatewayTrustedRootCertificate()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ApplicationGatewayTrustedRootCertificate. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the trusted root certificate that is unique within an Application Gateway. </par
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="type"> Type of the resource. </param>
 23        /// <param name="data"> Certificate public data. </param>
 24        /// <param name="keyVaultSecretId"> Secret Id of (base-64 encoded unencrypted pfx) &apos;Secret&apos; or &apos;C
 25        /// <param name="provisioningState"> The provisioning state of the trusted root certificate resource. </param>
 026        internal ApplicationGatewayTrustedRootCertificate(string id, string name, string etag, string type, string data,
 27        {
 028            Name = name;
 029            Etag = etag;
 030            Type = type;
 031            Data = data;
 032            KeyVaultSecretId = keyVaultSecretId;
 033            ProvisioningState = provisioningState;
 034        }
 35
 36        /// <summary> Name of the trusted root certificate that is unique within an Application Gateway. </summary>
 037        public string Name { get; set; }
 38        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 039        public string Etag { get; }
 40        /// <summary> Type of the resource. </summary>
 041        public string Type { get; }
 42        /// <summary> Certificate public data. </summary>
 043        public string Data { get; set; }
 44        /// <summary> Secret Id of (base-64 encoded unencrypted pfx) &apos;Secret&apos; or &apos;Certificate&apos; objec
 045        public string KeyVaultSecretId { get; set; }
 46        /// <summary> The provisioning state of the trusted root certificate resource. </summary>
 047        public ProvisioningState? ProvisioningState { get; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayTrustedRootCertificate.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 ApplicationGatewayTrustedRootCertificate : 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            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (Data != null)
 41            {
 042                writer.WritePropertyName("data");
 043                writer.WriteStringValue(Data);
 44            }
 045            if (KeyVaultSecretId != null)
 46            {
 047                writer.WritePropertyName("keyVaultSecretId");
 048                writer.WriteStringValue(KeyVaultSecretId);
 49            }
 050            if (ProvisioningState != null)
 51            {
 052                writer.WritePropertyName("provisioningState");
 053                writer.WriteStringValue(ProvisioningState.Value.ToString());
 54            }
 055            writer.WriteEndObject();
 056            writer.WriteEndObject();
 057        }
 58
 59        internal static ApplicationGatewayTrustedRootCertificate DeserializeApplicationGatewayTrustedRootCertificate(Jso
 60        {
 061            string name = default;
 062            string etag = default;
 063            string type = default;
 064            string id = default;
 065            string data = default;
 066            string keyVaultSecretId = default;
 067            ProvisioningState? provisioningState = default;
 068            foreach (var property in element.EnumerateObject())
 69            {
 070                if (property.NameEquals("name"))
 71                {
 072                    if (property.Value.ValueKind == JsonValueKind.Null)
 73                    {
 74                        continue;
 75                    }
 076                    name = property.Value.GetString();
 077                    continue;
 78                }
 079                if (property.NameEquals("etag"))
 80                {
 081                    if (property.Value.ValueKind == JsonValueKind.Null)
 82                    {
 83                        continue;
 84                    }
 085                    etag = property.Value.GetString();
 086                    continue;
 87                }
 088                if (property.NameEquals("type"))
 89                {
 090                    if (property.Value.ValueKind == JsonValueKind.Null)
 91                    {
 92                        continue;
 93                    }
 094                    type = property.Value.GetString();
 095                    continue;
 96                }
 097                if (property.NameEquals("id"))
 98                {
 099                    if (property.Value.ValueKind == JsonValueKind.Null)
 100                    {
 101                        continue;
 102                    }
 0103                    id = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("properties"))
 107                {
 0108                    foreach (var property0 in property.Value.EnumerateObject())
 109                    {
 0110                        if (property0.NameEquals("data"))
 111                        {
 0112                            if (property0.Value.ValueKind == JsonValueKind.Null)
 113                            {
 114                                continue;
 115                            }
 0116                            data = property0.Value.GetString();
 0117                            continue;
 118                        }
 0119                        if (property0.NameEquals("keyVaultSecretId"))
 120                        {
 0121                            if (property0.Value.ValueKind == JsonValueKind.Null)
 122                            {
 123                                continue;
 124                            }
 0125                            keyVaultSecretId = property0.Value.GetString();
 0126                            continue;
 127                        }
 0128                        if (property0.NameEquals("provisioningState"))
 129                        {
 0130                            if (property0.Value.ValueKind == JsonValueKind.Null)
 131                            {
 132                                continue;
 133                            }
 0134                            provisioningState = new ProvisioningState(property0.Value.GetString());
 135                            continue;
 136                        }
 137                    }
 138                    continue;
 139                }
 140            }
 0141            return new ApplicationGatewayTrustedRootCertificate(id, name, etag, type, data, keyVaultSecretId, provisioni
 142        }
 143    }
 144}