< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_Identity()-0%100%
get_PeeringLocation()-0%100%
get_BandwidthInGbps()-0%100%
get_ProvisionedBandwidthInGbps()-0%100%
get_Mtu()-0%100%
get_Encapsulation()-0%100%
get_EtherType()-0%100%
get_AllocationDate()-0%100%
get_Links()-0%100%
get_Circuits()-0%100%
get_ProvisioningState()-0%100%
get_ResourceGuid()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRoutePort(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRoutePort.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> ExpressRoutePort resource definition. </summary>
 13    public partial class ExpressRoutePort : Resource
 14    {
 15        /// <summary> Initializes a new instance of ExpressRoutePort. </summary>
 016        public ExpressRoutePort()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ExpressRoutePort. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 27        /// <param name="identity"> The identity of ExpressRoutePort, if configured. </param>
 28        /// <param name="peeringLocation"> The name of the peering location that the ExpressRoutePort is mapped to physi
 29        /// <param name="bandwidthInGbps"> Bandwidth of procured ports in Gbps. </param>
 30        /// <param name="provisionedBandwidthInGbps"> Aggregate Gbps of associated circuit bandwidths. </param>
 31        /// <param name="mtu"> Maximum transmission unit of the physical port pair(s). </param>
 32        /// <param name="encapsulation"> Encapsulation method on physical ports. </param>
 33        /// <param name="etherType"> Ether type of the physical port. </param>
 34        /// <param name="allocationDate"> Date of the physical port allocation to be used in Letter of Authorization. </
 35        /// <param name="links"> The set of physical links of the ExpressRoutePort resource. </param>
 36        /// <param name="circuits"> Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort 
 37        /// <param name="provisioningState"> The provisioning state of the express route port resource. </param>
 38        /// <param name="resourceGuid"> The resource GUID property of the express route port resource. </param>
 039        internal ExpressRoutePort(string id, string name, string type, string location, IDictionary<string, string> tags
 40        {
 041            Etag = etag;
 042            Identity = identity;
 043            PeeringLocation = peeringLocation;
 044            BandwidthInGbps = bandwidthInGbps;
 045            ProvisionedBandwidthInGbps = provisionedBandwidthInGbps;
 046            Mtu = mtu;
 047            Encapsulation = encapsulation;
 048            EtherType = etherType;
 049            AllocationDate = allocationDate;
 050            Links = links;
 051            Circuits = circuits;
 052            ProvisioningState = provisioningState;
 053            ResourceGuid = resourceGuid;
 054        }
 55
 56        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 057        public string Etag { get; }
 58        /// <summary> The identity of ExpressRoutePort, if configured. </summary>
 059        public ManagedServiceIdentity Identity { get; set; }
 60        /// <summary> The name of the peering location that the ExpressRoutePort is mapped to physically. </summary>
 061        public string PeeringLocation { get; set; }
 62        /// <summary> Bandwidth of procured ports in Gbps. </summary>
 063        public int? BandwidthInGbps { get; set; }
 64        /// <summary> Aggregate Gbps of associated circuit bandwidths. </summary>
 065        public float? ProvisionedBandwidthInGbps { get; }
 66        /// <summary> Maximum transmission unit of the physical port pair(s). </summary>
 067        public string Mtu { get; }
 68        /// <summary> Encapsulation method on physical ports. </summary>
 069        public ExpressRoutePortsEncapsulation? Encapsulation { get; set; }
 70        /// <summary> Ether type of the physical port. </summary>
 071        public string EtherType { get; }
 72        /// <summary> Date of the physical port allocation to be used in Letter of Authorization. </summary>
 073        public string AllocationDate { get; }
 74        /// <summary> The set of physical links of the ExpressRoutePort resource. </summary>
 075        public IList<ExpressRouteLink> Links { get; set; }
 76        /// <summary> Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. </su
 077        public IList<SubResource> Circuits { get; }
 78        /// <summary> The provisioning state of the express route port resource. </summary>
 079        public ProvisioningState? ProvisioningState { get; }
 80        /// <summary> The resource GUID property of the express route port resource. </summary>
 081        public string ResourceGuid { get; }
 82    }
 83}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRoutePort.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class ExpressRoutePort : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Etag != null)
 20            {
 021                writer.WritePropertyName("etag");
 022                writer.WriteStringValue(Etag);
 23            }
 024            if (Identity != null)
 25            {
 026                writer.WritePropertyName("identity");
 027                writer.WriteObjectValue(Identity);
 28            }
 029            if (Id != null)
 30            {
 031                writer.WritePropertyName("id");
 032                writer.WriteStringValue(Id);
 33            }
 034            if (Name != null)
 35            {
 036                writer.WritePropertyName("name");
 037                writer.WriteStringValue(Name);
 38            }
 039            if (Type != null)
 40            {
 041                writer.WritePropertyName("type");
 042                writer.WriteStringValue(Type);
 43            }
 044            if (Location != null)
 45            {
 046                writer.WritePropertyName("location");
 047                writer.WriteStringValue(Location);
 48            }
 049            if (Tags != null)
 50            {
 051                writer.WritePropertyName("tags");
 052                writer.WriteStartObject();
 053                foreach (var item in Tags)
 54                {
 055                    writer.WritePropertyName(item.Key);
 056                    writer.WriteStringValue(item.Value);
 57                }
 058                writer.WriteEndObject();
 59            }
 060            writer.WritePropertyName("properties");
 061            writer.WriteStartObject();
 062            if (PeeringLocation != null)
 63            {
 064                writer.WritePropertyName("peeringLocation");
 065                writer.WriteStringValue(PeeringLocation);
 66            }
 067            if (BandwidthInGbps != null)
 68            {
 069                writer.WritePropertyName("bandwidthInGbps");
 070                writer.WriteNumberValue(BandwidthInGbps.Value);
 71            }
 072            if (ProvisionedBandwidthInGbps != null)
 73            {
 074                writer.WritePropertyName("provisionedBandwidthInGbps");
 075                writer.WriteNumberValue(ProvisionedBandwidthInGbps.Value);
 76            }
 077            if (Mtu != null)
 78            {
 079                writer.WritePropertyName("mtu");
 080                writer.WriteStringValue(Mtu);
 81            }
 082            if (Encapsulation != null)
 83            {
 084                writer.WritePropertyName("encapsulation");
 085                writer.WriteStringValue(Encapsulation.Value.ToString());
 86            }
 087            if (EtherType != null)
 88            {
 089                writer.WritePropertyName("etherType");
 090                writer.WriteStringValue(EtherType);
 91            }
 092            if (AllocationDate != null)
 93            {
 094                writer.WritePropertyName("allocationDate");
 095                writer.WriteStringValue(AllocationDate);
 96            }
 097            if (Links != null)
 98            {
 099                writer.WritePropertyName("links");
 0100                writer.WriteStartArray();
 0101                foreach (var item in Links)
 102                {
 0103                    writer.WriteObjectValue(item);
 104                }
 0105                writer.WriteEndArray();
 106            }
 0107            if (Circuits != null)
 108            {
 0109                writer.WritePropertyName("circuits");
 0110                writer.WriteStartArray();
 0111                foreach (var item in Circuits)
 112                {
 0113                    writer.WriteObjectValue(item);
 114                }
 0115                writer.WriteEndArray();
 116            }
 0117            if (ProvisioningState != null)
 118            {
 0119                writer.WritePropertyName("provisioningState");
 0120                writer.WriteStringValue(ProvisioningState.Value.ToString());
 121            }
 0122            if (ResourceGuid != null)
 123            {
 0124                writer.WritePropertyName("resourceGuid");
 0125                writer.WriteStringValue(ResourceGuid);
 126            }
 0127            writer.WriteEndObject();
 0128            writer.WriteEndObject();
 0129        }
 130
 131        internal static ExpressRoutePort DeserializeExpressRoutePort(JsonElement element)
 132        {
 0133            string etag = default;
 0134            ManagedServiceIdentity identity = default;
 0135            string id = default;
 0136            string name = default;
 0137            string type = default;
 0138            string location = default;
 0139            IDictionary<string, string> tags = default;
 0140            string peeringLocation = default;
 0141            int? bandwidthInGbps = default;
 0142            float? provisionedBandwidthInGbps = default;
 0143            string mtu = default;
 0144            ExpressRoutePortsEncapsulation? encapsulation = default;
 0145            string etherType = default;
 0146            string allocationDate = default;
 0147            IList<ExpressRouteLink> links = default;
 0148            IList<SubResource> circuits = default;
 0149            ProvisioningState? provisioningState = default;
 0150            string resourceGuid = default;
 0151            foreach (var property in element.EnumerateObject())
 152            {
 0153                if (property.NameEquals("etag"))
 154                {
 0155                    if (property.Value.ValueKind == JsonValueKind.Null)
 156                    {
 157                        continue;
 158                    }
 0159                    etag = property.Value.GetString();
 0160                    continue;
 161                }
 0162                if (property.NameEquals("identity"))
 163                {
 0164                    if (property.Value.ValueKind == JsonValueKind.Null)
 165                    {
 166                        continue;
 167                    }
 0168                    identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value);
 0169                    continue;
 170                }
 0171                if (property.NameEquals("id"))
 172                {
 0173                    if (property.Value.ValueKind == JsonValueKind.Null)
 174                    {
 175                        continue;
 176                    }
 0177                    id = property.Value.GetString();
 0178                    continue;
 179                }
 0180                if (property.NameEquals("name"))
 181                {
 0182                    if (property.Value.ValueKind == JsonValueKind.Null)
 183                    {
 184                        continue;
 185                    }
 0186                    name = property.Value.GetString();
 0187                    continue;
 188                }
 0189                if (property.NameEquals("type"))
 190                {
 0191                    if (property.Value.ValueKind == JsonValueKind.Null)
 192                    {
 193                        continue;
 194                    }
 0195                    type = property.Value.GetString();
 0196                    continue;
 197                }
 0198                if (property.NameEquals("location"))
 199                {
 0200                    if (property.Value.ValueKind == JsonValueKind.Null)
 201                    {
 202                        continue;
 203                    }
 0204                    location = property.Value.GetString();
 0205                    continue;
 206                }
 0207                if (property.NameEquals("tags"))
 208                {
 0209                    if (property.Value.ValueKind == JsonValueKind.Null)
 210                    {
 211                        continue;
 212                    }
 0213                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0214                    foreach (var property0 in property.Value.EnumerateObject())
 215                    {
 0216                        if (property0.Value.ValueKind == JsonValueKind.Null)
 217                        {
 0218                            dictionary.Add(property0.Name, null);
 219                        }
 220                        else
 221                        {
 0222                            dictionary.Add(property0.Name, property0.Value.GetString());
 223                        }
 224                    }
 0225                    tags = dictionary;
 0226                    continue;
 227                }
 0228                if (property.NameEquals("properties"))
 229                {
 0230                    foreach (var property0 in property.Value.EnumerateObject())
 231                    {
 0232                        if (property0.NameEquals("peeringLocation"))
 233                        {
 0234                            if (property0.Value.ValueKind == JsonValueKind.Null)
 235                            {
 236                                continue;
 237                            }
 0238                            peeringLocation = property0.Value.GetString();
 0239                            continue;
 240                        }
 0241                        if (property0.NameEquals("bandwidthInGbps"))
 242                        {
 0243                            if (property0.Value.ValueKind == JsonValueKind.Null)
 244                            {
 245                                continue;
 246                            }
 0247                            bandwidthInGbps = property0.Value.GetInt32();
 0248                            continue;
 249                        }
 0250                        if (property0.NameEquals("provisionedBandwidthInGbps"))
 251                        {
 0252                            if (property0.Value.ValueKind == JsonValueKind.Null)
 253                            {
 254                                continue;
 255                            }
 0256                            provisionedBandwidthInGbps = property0.Value.GetSingle();
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("mtu"))
 260                        {
 0261                            if (property0.Value.ValueKind == JsonValueKind.Null)
 262                            {
 263                                continue;
 264                            }
 0265                            mtu = property0.Value.GetString();
 0266                            continue;
 267                        }
 0268                        if (property0.NameEquals("encapsulation"))
 269                        {
 0270                            if (property0.Value.ValueKind == JsonValueKind.Null)
 271                            {
 272                                continue;
 273                            }
 0274                            encapsulation = new ExpressRoutePortsEncapsulation(property0.Value.GetString());
 0275                            continue;
 276                        }
 0277                        if (property0.NameEquals("etherType"))
 278                        {
 0279                            if (property0.Value.ValueKind == JsonValueKind.Null)
 280                            {
 281                                continue;
 282                            }
 0283                            etherType = property0.Value.GetString();
 0284                            continue;
 285                        }
 0286                        if (property0.NameEquals("allocationDate"))
 287                        {
 0288                            if (property0.Value.ValueKind == JsonValueKind.Null)
 289                            {
 290                                continue;
 291                            }
 0292                            allocationDate = property0.Value.GetString();
 0293                            continue;
 294                        }
 0295                        if (property0.NameEquals("links"))
 296                        {
 0297                            if (property0.Value.ValueKind == JsonValueKind.Null)
 298                            {
 299                                continue;
 300                            }
 0301                            List<ExpressRouteLink> array = new List<ExpressRouteLink>();
 0302                            foreach (var item in property0.Value.EnumerateArray())
 303                            {
 0304                                if (item.ValueKind == JsonValueKind.Null)
 305                                {
 0306                                    array.Add(null);
 307                                }
 308                                else
 309                                {
 0310                                    array.Add(ExpressRouteLink.DeserializeExpressRouteLink(item));
 311                                }
 312                            }
 0313                            links = array;
 0314                            continue;
 315                        }
 0316                        if (property0.NameEquals("circuits"))
 317                        {
 0318                            if (property0.Value.ValueKind == JsonValueKind.Null)
 319                            {
 320                                continue;
 321                            }
 0322                            List<SubResource> array = new List<SubResource>();
 0323                            foreach (var item in property0.Value.EnumerateArray())
 324                            {
 0325                                if (item.ValueKind == JsonValueKind.Null)
 326                                {
 0327                                    array.Add(null);
 328                                }
 329                                else
 330                                {
 0331                                    array.Add(SubResource.DeserializeSubResource(item));
 332                                }
 333                            }
 0334                            circuits = array;
 0335                            continue;
 336                        }
 0337                        if (property0.NameEquals("provisioningState"))
 338                        {
 0339                            if (property0.Value.ValueKind == JsonValueKind.Null)
 340                            {
 341                                continue;
 342                            }
 0343                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0344                            continue;
 345                        }
 0346                        if (property0.NameEquals("resourceGuid"))
 347                        {
 0348                            if (property0.Value.ValueKind == JsonValueKind.Null)
 349                            {
 350                                continue;
 351                            }
 0352                            resourceGuid = property0.Value.GetString();
 353                            continue;
 354                        }
 355                    }
 356                    continue;
 357                }
 358            }
 0359            return new ExpressRoutePort(id, name, type, location, tags, etag, identity, peeringLocation, bandwidthInGbps
 360        }
 361    }
 362}