< Summary

Class:Azure.ResourceManager.Network.Models.VpnSiteLink
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnSiteLink.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnSiteLink.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_Etag()-0%100%
get_Name()-0%100%
get_Type()-0%100%
get_LinkProperties()-0%100%
get_IpAddress()-0%100%
get_Fqdn()-0%100%
get_BgpProperties()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVpnSiteLink(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnSiteLink.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> VpnSiteLink Resource. </summary>
 11    public partial class VpnSiteLink : SubResource
 12    {
 13        /// <summary> Initializes a new instance of VpnSiteLink. </summary>
 014        public VpnSiteLink()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VpnSiteLink. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 21        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 22        /// <param name="type"> Resource type. </param>
 23        /// <param name="linkProperties"> The link provider properties. </param>
 24        /// <param name="ipAddress"> The ip-address for the vpn-site-link. </param>
 25        /// <param name="fqdn"> FQDN of vpn-site-link. </param>
 26        /// <param name="bgpProperties"> The set of bgp properties. </param>
 27        /// <param name="provisioningState"> The provisioning state of the VPN site link resource. </param>
 028        internal VpnSiteLink(string id, string etag, string name, string type, VpnLinkProviderProperties linkProperties,
 29        {
 030            Etag = etag;
 031            Name = name;
 032            Type = type;
 033            LinkProperties = linkProperties;
 034            IpAddress = ipAddress;
 035            Fqdn = fqdn;
 036            BgpProperties = bgpProperties;
 037            ProvisioningState = provisioningState;
 038        }
 39
 40        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 041        public string Etag { get; }
 42        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 043        public string Name { get; set; }
 44        /// <summary> Resource type. </summary>
 045        public string Type { get; }
 46        /// <summary> The link provider properties. </summary>
 047        public VpnLinkProviderProperties LinkProperties { get; set; }
 48        /// <summary> The ip-address for the vpn-site-link. </summary>
 049        public string IpAddress { get; set; }
 50        /// <summary> FQDN of vpn-site-link. </summary>
 051        public string Fqdn { get; set; }
 52        /// <summary> The set of bgp properties. </summary>
 053        public VpnLinkBgpSettings BgpProperties { get; set; }
 54        /// <summary> The provisioning state of the VPN site link resource. </summary>
 055        public ProvisioningState? ProvisioningState { get; }
 56    }
 57}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VpnSiteLink.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 VpnSiteLink : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Etag != null)
 19            {
 020                writer.WritePropertyName("etag");
 021                writer.WriteStringValue(Etag);
 22            }
 023            if (Name != null)
 24            {
 025                writer.WritePropertyName("name");
 026                writer.WriteStringValue(Name);
 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 (LinkProperties != null)
 41            {
 042                writer.WritePropertyName("linkProperties");
 043                writer.WriteObjectValue(LinkProperties);
 44            }
 045            if (IpAddress != null)
 46            {
 047                writer.WritePropertyName("ipAddress");
 048                writer.WriteStringValue(IpAddress);
 49            }
 050            if (Fqdn != null)
 51            {
 052                writer.WritePropertyName("fqdn");
 053                writer.WriteStringValue(Fqdn);
 54            }
 055            if (BgpProperties != null)
 56            {
 057                writer.WritePropertyName("bgpProperties");
 058                writer.WriteObjectValue(BgpProperties);
 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 VpnSiteLink DeserializeVpnSiteLink(JsonElement element)
 70        {
 071            string etag = default;
 072            string name = default;
 073            string type = default;
 074            string id = default;
 075            VpnLinkProviderProperties linkProperties = default;
 076            string ipAddress = default;
 077            string fqdn = default;
 078            VpnLinkBgpSettings bgpProperties = default;
 079            ProvisioningState? provisioningState = default;
 080            foreach (var property in element.EnumerateObject())
 81            {
 082                if (property.NameEquals("etag"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    etag = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("name"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    name = 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("linkProperties"))
 123                        {
 0124                            if (property0.Value.ValueKind == JsonValueKind.Null)
 125                            {
 126                                continue;
 127                            }
 0128                            linkProperties = VpnLinkProviderProperties.DeserializeVpnLinkProviderProperties(property0.Va
 0129                            continue;
 130                        }
 0131                        if (property0.NameEquals("ipAddress"))
 132                        {
 0133                            if (property0.Value.ValueKind == JsonValueKind.Null)
 134                            {
 135                                continue;
 136                            }
 0137                            ipAddress = property0.Value.GetString();
 0138                            continue;
 139                        }
 0140                        if (property0.NameEquals("fqdn"))
 141                        {
 0142                            if (property0.Value.ValueKind == JsonValueKind.Null)
 143                            {
 144                                continue;
 145                            }
 0146                            fqdn = property0.Value.GetString();
 0147                            continue;
 148                        }
 0149                        if (property0.NameEquals("bgpProperties"))
 150                        {
 0151                            if (property0.Value.ValueKind == JsonValueKind.Null)
 152                            {
 153                                continue;
 154                            }
 0155                            bgpProperties = VpnLinkBgpSettings.DeserializeVpnLinkBgpSettings(property0.Value);
 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 VpnSiteLink(id, etag, name, type, linkProperties, ipAddress, fqdn, bgpProperties, provisioningSta
 172        }
 173    }
 174}