< Summary

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

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_Password()-0%100%
get_PublicCertData()-0%100%
get_KeyVaultSecretId()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewaySslCertificate(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslCertificate.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> SSL certificates of an application gateway. </summary>
 11    public partial class ApplicationGatewaySslCertificate : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewaySslCertificate. </summary>
 014        public ApplicationGatewaySslCertificate()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ApplicationGatewaySslCertificate. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the SSL certificate that is unique within an Application Gateway. </param>
 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"> Base-64 encoded pfx certificate. Only applicable in PUT Request. </param>
 24        /// <param name="password"> Password for the pfx file specified in data. Only applicable in PUT request. </param
 25        /// <param name="publicCertData"> Base-64 encoded Public cert data corresponding to pfx specified in data. Only 
 26        /// <param name="keyVaultSecretId"> Secret Id of (base-64 encoded unencrypted pfx) &apos;Secret&apos; or &apos;C
 27        /// <param name="provisioningState"> The provisioning state of the SSL certificate resource. </param>
 028        internal ApplicationGatewaySslCertificate(string id, string name, string etag, string type, string data, string 
 29        {
 030            Name = name;
 031            Etag = etag;
 032            Type = type;
 033            Data = data;
 034            Password = password;
 035            PublicCertData = publicCertData;
 036            KeyVaultSecretId = keyVaultSecretId;
 037            ProvisioningState = provisioningState;
 038        }
 39
 40        /// <summary> Name of the SSL certificate that is unique within an Application Gateway. </summary>
 041        public string Name { get; set; }
 42        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 043        public string Etag { get; }
 44        /// <summary> Type of the resource. </summary>
 045        public string Type { get; }
 46        /// <summary> Base-64 encoded pfx certificate. Only applicable in PUT Request. </summary>
 047        public string Data { get; set; }
 48        /// <summary> Password for the pfx file specified in data. Only applicable in PUT request. </summary>
 049        public string Password { get; set; }
 50        /// <summary> Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET re
 051        public string PublicCertData { get; }
 52        /// <summary> Secret Id of (base-64 encoded unencrypted pfx) &apos;Secret&apos; or &apos;Certificate&apos; objec
 053        public string KeyVaultSecretId { get; set; }
 54        /// <summary> The provisioning state of the SSL certificate resource. </summary>
 055        public ProvisioningState? ProvisioningState { get; }
 56    }
 57}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewaySslCertificate.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 ApplicationGatewaySslCertificate : 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 (Password != null)
 46            {
 047                writer.WritePropertyName("password");
 048                writer.WriteStringValue(Password);
 49            }
 050            if (PublicCertData != null)
 51            {
 052                writer.WritePropertyName("publicCertData");
 053                writer.WriteStringValue(PublicCertData);
 54            }
 055            if (KeyVaultSecretId != null)
 56            {
 057                writer.WritePropertyName("keyVaultSecretId");
 058                writer.WriteStringValue(KeyVaultSecretId);
 59            }
 060            if (ProvisioningState != null)
 61            {
 062                writer.WritePropertyName("provisioningState");
 063                writer.WriteStringValue(ProvisioningState.Value.ToString());
 64            }
 065            writer.WriteEndObject();
 066            writer.WriteEndObject();
 067        }
 68
 69        internal static ApplicationGatewaySslCertificate DeserializeApplicationGatewaySslCertificate(JsonElement element
 70        {
 071            string name = default;
 072            string etag = default;
 073            string type = default;
 074            string id = default;
 075            string data = default;
 076            string password = default;
 077            string publicCertData = default;
 078            string keyVaultSecretId = default;
 079            ProvisioningState? provisioningState = default;
 080            foreach (var property in element.EnumerateObject())
 81            {
 082                if (property.NameEquals("name"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    name = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("etag"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    etag = property.Value.GetString();
 098                    continue;
 99                }
 0100                if (property.NameEquals("type"))
 101                {
 0102                    if (property.Value.ValueKind == JsonValueKind.Null)
 103                    {
 104                        continue;
 105                    }
 0106                    type = property.Value.GetString();
 0107                    continue;
 108                }
 0109                if (property.NameEquals("id"))
 110                {
 0111                    if (property.Value.ValueKind == JsonValueKind.Null)
 112                    {
 113                        continue;
 114                    }
 0115                    id = property.Value.GetString();
 0116                    continue;
 117                }
 0118                if (property.NameEquals("properties"))
 119                {
 0120                    foreach (var property0 in property.Value.EnumerateObject())
 121                    {
 0122                        if (property0.NameEquals("data"))
 123                        {
 0124                            if (property0.Value.ValueKind == JsonValueKind.Null)
 125                            {
 126                                continue;
 127                            }
 0128                            data = property0.Value.GetString();
 0129                            continue;
 130                        }
 0131                        if (property0.NameEquals("password"))
 132                        {
 0133                            if (property0.Value.ValueKind == JsonValueKind.Null)
 134                            {
 135                                continue;
 136                            }
 0137                            password = property0.Value.GetString();
 0138                            continue;
 139                        }
 0140                        if (property0.NameEquals("publicCertData"))
 141                        {
 0142                            if (property0.Value.ValueKind == JsonValueKind.Null)
 143                            {
 144                                continue;
 145                            }
 0146                            publicCertData = property0.Value.GetString();
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("keyVaultSecretId"))
 150                        {
 0151                            if (property0.Value.ValueKind == JsonValueKind.Null)
 152                            {
 153                                continue;
 154                            }
 0155                            keyVaultSecretId = property0.Value.GetString();
 0156                            continue;
 157                        }
 0158                        if (property0.NameEquals("provisioningState"))
 159                        {
 0160                            if (property0.Value.ValueKind == JsonValueKind.Null)
 161                            {
 162                                continue;
 163                            }
 0164                            provisioningState = new ProvisioningState(property0.Value.GetString());
 165                            continue;
 166                        }
 167                    }
 168                    continue;
 169                }
 170            }
 0171            return new ApplicationGatewaySslCertificate(id, name, etag, type, data, password, publicCertData, keyVaultSe
 172        }
 173    }
 174}