< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Thumbprint()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVpnClientRevokedCertificate(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientRevokedCertificate.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> VPN client revoked certificate of virtual network gateway. </summary>
 11    public partial class VpnClientRevokedCertificate : SubResource
 12    {
 13        /// <summary> Initializes a new instance of VpnClientRevokedCertificate. </summary>
 014        public VpnClientRevokedCertificate()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VpnClientRevokedCertificate. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="thumbprint"> The revoked VPN client certificate thumbprint. </param>
 23        /// <param name="provisioningState"> The provisioning state of the VPN client revoked certificate resource. </pa
 024        internal VpnClientRevokedCertificate(string id, string name, string etag, string thumbprint, ProvisioningState? 
 25        {
 026            Name = name;
 027            Etag = etag;
 028            Thumbprint = thumbprint;
 029            ProvisioningState = provisioningState;
 030        }
 31
 32        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 033        public string Name { get; set; }
 34        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 035        public string Etag { get; }
 36        /// <summary> The revoked VPN client certificate thumbprint. </summary>
 037        public string Thumbprint { get; set; }
 38        /// <summary> The provisioning state of the VPN client revoked certificate resource. </summary>
 039        public ProvisioningState? ProvisioningState { get; }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnClientRevokedCertificate.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 VpnClientRevokedCertificate : 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 (Id != null)
 29            {
 030                writer.WritePropertyName("id");
 031                writer.WriteStringValue(Id);
 32            }
 033            writer.WritePropertyName("properties");
 034            writer.WriteStartObject();
 035            if (Thumbprint != null)
 36            {
 037                writer.WritePropertyName("thumbprint");
 038                writer.WriteStringValue(Thumbprint);
 39            }
 040            if (ProvisioningState != null)
 41            {
 042                writer.WritePropertyName("provisioningState");
 043                writer.WriteStringValue(ProvisioningState.Value.ToString());
 44            }
 045            writer.WriteEndObject();
 046            writer.WriteEndObject();
 047        }
 48
 49        internal static VpnClientRevokedCertificate DeserializeVpnClientRevokedCertificate(JsonElement element)
 50        {
 051            string name = default;
 052            string etag = default;
 053            string id = default;
 054            string thumbprint = default;
 055            ProvisioningState? provisioningState = default;
 056            foreach (var property in element.EnumerateObject())
 57            {
 058                if (property.NameEquals("name"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    name = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("etag"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    etag = property.Value.GetString();
 074                    continue;
 75                }
 076                if (property.NameEquals("id"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    id = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("properties"))
 86                {
 087                    foreach (var property0 in property.Value.EnumerateObject())
 88                    {
 089                        if (property0.NameEquals("thumbprint"))
 90                        {
 091                            if (property0.Value.ValueKind == JsonValueKind.Null)
 92                            {
 93                                continue;
 94                            }
 095                            thumbprint = property0.Value.GetString();
 096                            continue;
 97                        }
 098                        if (property0.NameEquals("provisioningState"))
 99                        {
 0100                            if (property0.Value.ValueKind == JsonValueKind.Null)
 101                            {
 102                                continue;
 103                            }
 0104                            provisioningState = new ProvisioningState(property0.Value.GetString());
 105                            continue;
 106                        }
 107                    }
 108                    continue;
 109                }
 110            }
 0111            return new VpnClientRevokedCertificate(id, name, etag, thumbprint, provisioningState);
 112        }
 113    }
 114}