< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_RouterName()-0%100%
get_InterfaceName()-0%100%
get_PatchPanelId()-0%100%
get_RackId()-0%100%
get_ConnectorType()-0%100%
get_AdminState()-0%100%
get_ProvisioningState()-0%100%
get_MacSecConfig()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteLink(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteLink.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> ExpressRouteLink child resource definition. </summary>
 11    public partial class ExpressRouteLink : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ExpressRouteLink. </summary>
 014        public ExpressRouteLink()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRouteLink. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of child port resource that is unique among child port resources of the parent. </p
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="routerName"> Name of Azure router associated with physical port. </param>
 23        /// <param name="interfaceName"> Name of Azure router interface. </param>
 24        /// <param name="patchPanelId"> Mapping between physical port to patch panel port. </param>
 25        /// <param name="rackId"> Mapping of physical patch panel to rack. </param>
 26        /// <param name="connectorType"> Physical fiber port type. </param>
 27        /// <param name="adminState"> Administrative state of the physical port. </param>
 28        /// <param name="provisioningState"> The provisioning state of the express route link resource. </param>
 29        /// <param name="macSecConfig"> MacSec configuration. </param>
 030        internal ExpressRouteLink(string id, string name, string etag, string routerName, string interfaceName, string p
 31        {
 032            Name = name;
 033            Etag = etag;
 034            RouterName = routerName;
 035            InterfaceName = interfaceName;
 036            PatchPanelId = patchPanelId;
 037            RackId = rackId;
 038            ConnectorType = connectorType;
 039            AdminState = adminState;
 040            ProvisioningState = provisioningState;
 041            MacSecConfig = macSecConfig;
 042        }
 43
 44        /// <summary> Name of child port resource that is unique among child port resources of the parent. </summary>
 045        public string Name { get; set; }
 46        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 047        public string Etag { get; }
 48        /// <summary> Name of Azure router associated with physical port. </summary>
 049        public string RouterName { get; }
 50        /// <summary> Name of Azure router interface. </summary>
 051        public string InterfaceName { get; }
 52        /// <summary> Mapping between physical port to patch panel port. </summary>
 053        public string PatchPanelId { get; }
 54        /// <summary> Mapping of physical patch panel to rack. </summary>
 055        public string RackId { get; }
 56        /// <summary> Physical fiber port type. </summary>
 057        public ExpressRouteLinkConnectorType? ConnectorType { get; }
 58        /// <summary> Administrative state of the physical port. </summary>
 059        public ExpressRouteLinkAdminState? AdminState { get; set; }
 60        /// <summary> The provisioning state of the express route link resource. </summary>
 061        public ProvisioningState? ProvisioningState { get; }
 62        /// <summary> MacSec configuration. </summary>
 063        public ExpressRouteLinkMacSecConfig MacSecConfig { get; set; }
 64    }
 65}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteLink.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 ExpressRouteLink : 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 (RouterName != null)
 36            {
 037                writer.WritePropertyName("routerName");
 038                writer.WriteStringValue(RouterName);
 39            }
 040            if (InterfaceName != null)
 41            {
 042                writer.WritePropertyName("interfaceName");
 043                writer.WriteStringValue(InterfaceName);
 44            }
 045            if (PatchPanelId != null)
 46            {
 047                writer.WritePropertyName("patchPanelId");
 048                writer.WriteStringValue(PatchPanelId);
 49            }
 050            if (RackId != null)
 51            {
 052                writer.WritePropertyName("rackId");
 053                writer.WriteStringValue(RackId);
 54            }
 055            if (ConnectorType != null)
 56            {
 057                writer.WritePropertyName("connectorType");
 058                writer.WriteStringValue(ConnectorType.Value.ToString());
 59            }
 060            if (AdminState != null)
 61            {
 062                writer.WritePropertyName("adminState");
 063                writer.WriteStringValue(AdminState.Value.ToString());
 64            }
 065            if (ProvisioningState != null)
 66            {
 067                writer.WritePropertyName("provisioningState");
 068                writer.WriteStringValue(ProvisioningState.Value.ToString());
 69            }
 070            if (MacSecConfig != null)
 71            {
 072                writer.WritePropertyName("macSecConfig");
 073                writer.WriteObjectValue(MacSecConfig);
 74            }
 075            writer.WriteEndObject();
 076            writer.WriteEndObject();
 077        }
 78
 79        internal static ExpressRouteLink DeserializeExpressRouteLink(JsonElement element)
 80        {
 081            string name = default;
 082            string etag = default;
 083            string id = default;
 084            string routerName = default;
 085            string interfaceName = default;
 086            string patchPanelId = default;
 087            string rackId = default;
 088            ExpressRouteLinkConnectorType? connectorType = default;
 089            ExpressRouteLinkAdminState? adminState = default;
 090            ProvisioningState? provisioningState = default;
 091            ExpressRouteLinkMacSecConfig macSecConfig = default;
 092            foreach (var property in element.EnumerateObject())
 93            {
 094                if (property.NameEquals("name"))
 95                {
 096                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 0100                    name = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("etag"))
 104                {
 0105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 0109                    etag = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("id"))
 113                {
 0114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 0118                    id = property.Value.GetString();
 0119                    continue;
 120                }
 0121                if (property.NameEquals("properties"))
 122                {
 0123                    foreach (var property0 in property.Value.EnumerateObject())
 124                    {
 0125                        if (property0.NameEquals("routerName"))
 126                        {
 0127                            if (property0.Value.ValueKind == JsonValueKind.Null)
 128                            {
 129                                continue;
 130                            }
 0131                            routerName = property0.Value.GetString();
 0132                            continue;
 133                        }
 0134                        if (property0.NameEquals("interfaceName"))
 135                        {
 0136                            if (property0.Value.ValueKind == JsonValueKind.Null)
 137                            {
 138                                continue;
 139                            }
 0140                            interfaceName = property0.Value.GetString();
 0141                            continue;
 142                        }
 0143                        if (property0.NameEquals("patchPanelId"))
 144                        {
 0145                            if (property0.Value.ValueKind == JsonValueKind.Null)
 146                            {
 147                                continue;
 148                            }
 0149                            patchPanelId = property0.Value.GetString();
 0150                            continue;
 151                        }
 0152                        if (property0.NameEquals("rackId"))
 153                        {
 0154                            if (property0.Value.ValueKind == JsonValueKind.Null)
 155                            {
 156                                continue;
 157                            }
 0158                            rackId = property0.Value.GetString();
 0159                            continue;
 160                        }
 0161                        if (property0.NameEquals("connectorType"))
 162                        {
 0163                            if (property0.Value.ValueKind == JsonValueKind.Null)
 164                            {
 165                                continue;
 166                            }
 0167                            connectorType = new ExpressRouteLinkConnectorType(property0.Value.GetString());
 0168                            continue;
 169                        }
 0170                        if (property0.NameEquals("adminState"))
 171                        {
 0172                            if (property0.Value.ValueKind == JsonValueKind.Null)
 173                            {
 174                                continue;
 175                            }
 0176                            adminState = new ExpressRouteLinkAdminState(property0.Value.GetString());
 0177                            continue;
 178                        }
 0179                        if (property0.NameEquals("provisioningState"))
 180                        {
 0181                            if (property0.Value.ValueKind == JsonValueKind.Null)
 182                            {
 183                                continue;
 184                            }
 0185                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("macSecConfig"))
 189                        {
 0190                            if (property0.Value.ValueKind == JsonValueKind.Null)
 191                            {
 192                                continue;
 193                            }
 0194                            macSecConfig = ExpressRouteLinkMacSecConfig.DeserializeExpressRouteLinkMacSecConfig(property
 195                            continue;
 196                        }
 197                    }
 198                    continue;
 199                }
 200            }
 0201            return new ExpressRouteLink(id, name, etag, routerName, interfaceName, patchPanelId, rackId, connectorType, 
 202        }
 203    }
 204}