< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_PrimaryAzurePort()-0%100%
get_SecondaryAzurePort()-0%100%
get_STag()-0%100%
get_PeeringLocation()-0%100%
get_BandwidthInMbps()-0%100%
get_ExpressRouteCircuit()-0%100%
get_ServiceProviderProvisioningState()-0%100%
get_ServiceProviderNotes()-0%100%
get_ProvisioningState()-0%100%
get_Peerings()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteCrossConnection(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnection.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> ExpressRouteCrossConnection resource. </summary>
 13    public partial class ExpressRouteCrossConnection : Resource
 14    {
 15        /// <summary> Initializes a new instance of ExpressRouteCrossConnection. </summary>
 016        public ExpressRouteCrossConnection()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ExpressRouteCrossConnection. </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="primaryAzurePort"> The name of the primary port. </param>
 28        /// <param name="secondaryAzurePort"> The name of the secondary port. </param>
 29        /// <param name="sTag"> The identifier of the circuit traffic. </param>
 30        /// <param name="peeringLocation"> The peering location of the ExpressRoute circuit. </param>
 31        /// <param name="bandwidthInMbps"> The circuit bandwidth In Mbps. </param>
 32        /// <param name="expressRouteCircuit"> The ExpressRouteCircuit. </param>
 33        /// <param name="serviceProviderProvisioningState"> The provisioning state of the circuit in the connectivity pr
 34        /// <param name="serviceProviderNotes"> Additional read only notes set by the connectivity provider. </param>
 35        /// <param name="provisioningState"> The provisioning state of the express route cross connection resource. </pa
 36        /// <param name="peerings"> The list of peerings. </param>
 037        internal ExpressRouteCrossConnection(string id, string name, string type, string location, IDictionary<string, s
 38        {
 039            Etag = etag;
 040            PrimaryAzurePort = primaryAzurePort;
 041            SecondaryAzurePort = secondaryAzurePort;
 042            STag = sTag;
 043            PeeringLocation = peeringLocation;
 044            BandwidthInMbps = bandwidthInMbps;
 045            ExpressRouteCircuit = expressRouteCircuit;
 046            ServiceProviderProvisioningState = serviceProviderProvisioningState;
 047            ServiceProviderNotes = serviceProviderNotes;
 048            ProvisioningState = provisioningState;
 049            Peerings = peerings;
 050        }
 51
 52        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 053        public string Etag { get; }
 54        /// <summary> The name of the primary port. </summary>
 055        public string PrimaryAzurePort { get; }
 56        /// <summary> The name of the secondary port. </summary>
 057        public string SecondaryAzurePort { get; }
 58        /// <summary> The identifier of the circuit traffic. </summary>
 059        public int? STag { get; }
 60        /// <summary> The peering location of the ExpressRoute circuit. </summary>
 061        public string PeeringLocation { get; set; }
 62        /// <summary> The circuit bandwidth In Mbps. </summary>
 063        public int? BandwidthInMbps { get; set; }
 64        /// <summary> The ExpressRouteCircuit. </summary>
 065        public ExpressRouteCircuitReference ExpressRouteCircuit { get; set; }
 66        /// <summary> The provisioning state of the circuit in the connectivity provider system. </summary>
 067        public ServiceProviderProvisioningState? ServiceProviderProvisioningState { get; set; }
 68        /// <summary> Additional read only notes set by the connectivity provider. </summary>
 069        public string ServiceProviderNotes { get; set; }
 70        /// <summary> The provisioning state of the express route cross connection resource. </summary>
 071        public ProvisioningState? ProvisioningState { get; }
 72        /// <summary> The list of peerings. </summary>
 073        public IList<ExpressRouteCrossConnectionPeering> Peerings { get; set; }
 74    }
 75}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnection.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 ExpressRouteCrossConnection : 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 (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            if (Name != null)
 30            {
 031                writer.WritePropertyName("name");
 032                writer.WriteStringValue(Name);
 33            }
 034            if (Type != null)
 35            {
 036                writer.WritePropertyName("type");
 037                writer.WriteStringValue(Type);
 38            }
 039            if (Location != null)
 40            {
 041                writer.WritePropertyName("location");
 042                writer.WriteStringValue(Location);
 43            }
 044            if (Tags != null)
 45            {
 046                writer.WritePropertyName("tags");
 047                writer.WriteStartObject();
 048                foreach (var item in Tags)
 49                {
 050                    writer.WritePropertyName(item.Key);
 051                    writer.WriteStringValue(item.Value);
 52                }
 053                writer.WriteEndObject();
 54            }
 055            writer.WritePropertyName("properties");
 056            writer.WriteStartObject();
 057            if (PrimaryAzurePort != null)
 58            {
 059                writer.WritePropertyName("primaryAzurePort");
 060                writer.WriteStringValue(PrimaryAzurePort);
 61            }
 062            if (SecondaryAzurePort != null)
 63            {
 064                writer.WritePropertyName("secondaryAzurePort");
 065                writer.WriteStringValue(SecondaryAzurePort);
 66            }
 067            if (STag != null)
 68            {
 069                writer.WritePropertyName("sTag");
 070                writer.WriteNumberValue(STag.Value);
 71            }
 072            if (PeeringLocation != null)
 73            {
 074                writer.WritePropertyName("peeringLocation");
 075                writer.WriteStringValue(PeeringLocation);
 76            }
 077            if (BandwidthInMbps != null)
 78            {
 079                writer.WritePropertyName("bandwidthInMbps");
 080                writer.WriteNumberValue(BandwidthInMbps.Value);
 81            }
 082            if (ExpressRouteCircuit != null)
 83            {
 084                writer.WritePropertyName("expressRouteCircuit");
 085                writer.WriteObjectValue(ExpressRouteCircuit);
 86            }
 087            if (ServiceProviderProvisioningState != null)
 88            {
 089                writer.WritePropertyName("serviceProviderProvisioningState");
 090                writer.WriteStringValue(ServiceProviderProvisioningState.Value.ToString());
 91            }
 092            if (ServiceProviderNotes != null)
 93            {
 094                writer.WritePropertyName("serviceProviderNotes");
 095                writer.WriteStringValue(ServiceProviderNotes);
 96            }
 097            if (ProvisioningState != null)
 98            {
 099                writer.WritePropertyName("provisioningState");
 0100                writer.WriteStringValue(ProvisioningState.Value.ToString());
 101            }
 0102            if (Peerings != null)
 103            {
 0104                writer.WritePropertyName("peerings");
 0105                writer.WriteStartArray();
 0106                foreach (var item in Peerings)
 107                {
 0108                    writer.WriteObjectValue(item);
 109                }
 0110                writer.WriteEndArray();
 111            }
 0112            writer.WriteEndObject();
 0113            writer.WriteEndObject();
 0114        }
 115
 116        internal static ExpressRouteCrossConnection DeserializeExpressRouteCrossConnection(JsonElement element)
 117        {
 0118            string etag = default;
 0119            string id = default;
 0120            string name = default;
 0121            string type = default;
 0122            string location = default;
 0123            IDictionary<string, string> tags = default;
 0124            string primaryAzurePort = default;
 0125            string secondaryAzurePort = default;
 0126            int? sTag = default;
 0127            string peeringLocation = default;
 0128            int? bandwidthInMbps = default;
 0129            ExpressRouteCircuitReference expressRouteCircuit = default;
 0130            ServiceProviderProvisioningState? serviceProviderProvisioningState = default;
 0131            string serviceProviderNotes = default;
 0132            ProvisioningState? provisioningState = default;
 0133            IList<ExpressRouteCrossConnectionPeering> peerings = default;
 0134            foreach (var property in element.EnumerateObject())
 135            {
 0136                if (property.NameEquals("etag"))
 137                {
 0138                    if (property.Value.ValueKind == JsonValueKind.Null)
 139                    {
 140                        continue;
 141                    }
 0142                    etag = property.Value.GetString();
 0143                    continue;
 144                }
 0145                if (property.NameEquals("id"))
 146                {
 0147                    if (property.Value.ValueKind == JsonValueKind.Null)
 148                    {
 149                        continue;
 150                    }
 0151                    id = property.Value.GetString();
 0152                    continue;
 153                }
 0154                if (property.NameEquals("name"))
 155                {
 0156                    if (property.Value.ValueKind == JsonValueKind.Null)
 157                    {
 158                        continue;
 159                    }
 0160                    name = property.Value.GetString();
 0161                    continue;
 162                }
 0163                if (property.NameEquals("type"))
 164                {
 0165                    if (property.Value.ValueKind == JsonValueKind.Null)
 166                    {
 167                        continue;
 168                    }
 0169                    type = property.Value.GetString();
 0170                    continue;
 171                }
 0172                if (property.NameEquals("location"))
 173                {
 0174                    if (property.Value.ValueKind == JsonValueKind.Null)
 175                    {
 176                        continue;
 177                    }
 0178                    location = property.Value.GetString();
 0179                    continue;
 180                }
 0181                if (property.NameEquals("tags"))
 182                {
 0183                    if (property.Value.ValueKind == JsonValueKind.Null)
 184                    {
 185                        continue;
 186                    }
 0187                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0188                    foreach (var property0 in property.Value.EnumerateObject())
 189                    {
 0190                        if (property0.Value.ValueKind == JsonValueKind.Null)
 191                        {
 0192                            dictionary.Add(property0.Name, null);
 193                        }
 194                        else
 195                        {
 0196                            dictionary.Add(property0.Name, property0.Value.GetString());
 197                        }
 198                    }
 0199                    tags = dictionary;
 0200                    continue;
 201                }
 0202                if (property.NameEquals("properties"))
 203                {
 0204                    foreach (var property0 in property.Value.EnumerateObject())
 205                    {
 0206                        if (property0.NameEquals("primaryAzurePort"))
 207                        {
 0208                            if (property0.Value.ValueKind == JsonValueKind.Null)
 209                            {
 210                                continue;
 211                            }
 0212                            primaryAzurePort = property0.Value.GetString();
 0213                            continue;
 214                        }
 0215                        if (property0.NameEquals("secondaryAzurePort"))
 216                        {
 0217                            if (property0.Value.ValueKind == JsonValueKind.Null)
 218                            {
 219                                continue;
 220                            }
 0221                            secondaryAzurePort = property0.Value.GetString();
 0222                            continue;
 223                        }
 0224                        if (property0.NameEquals("sTag"))
 225                        {
 0226                            if (property0.Value.ValueKind == JsonValueKind.Null)
 227                            {
 228                                continue;
 229                            }
 0230                            sTag = property0.Value.GetInt32();
 0231                            continue;
 232                        }
 0233                        if (property0.NameEquals("peeringLocation"))
 234                        {
 0235                            if (property0.Value.ValueKind == JsonValueKind.Null)
 236                            {
 237                                continue;
 238                            }
 0239                            peeringLocation = property0.Value.GetString();
 0240                            continue;
 241                        }
 0242                        if (property0.NameEquals("bandwidthInMbps"))
 243                        {
 0244                            if (property0.Value.ValueKind == JsonValueKind.Null)
 245                            {
 246                                continue;
 247                            }
 0248                            bandwidthInMbps = property0.Value.GetInt32();
 0249                            continue;
 250                        }
 0251                        if (property0.NameEquals("expressRouteCircuit"))
 252                        {
 0253                            if (property0.Value.ValueKind == JsonValueKind.Null)
 254                            {
 255                                continue;
 256                            }
 0257                            expressRouteCircuit = ExpressRouteCircuitReference.DeserializeExpressRouteCircuitReference(p
 0258                            continue;
 259                        }
 0260                        if (property0.NameEquals("serviceProviderProvisioningState"))
 261                        {
 0262                            if (property0.Value.ValueKind == JsonValueKind.Null)
 263                            {
 264                                continue;
 265                            }
 0266                            serviceProviderProvisioningState = new ServiceProviderProvisioningState(property0.Value.GetS
 0267                            continue;
 268                        }
 0269                        if (property0.NameEquals("serviceProviderNotes"))
 270                        {
 0271                            if (property0.Value.ValueKind == JsonValueKind.Null)
 272                            {
 273                                continue;
 274                            }
 0275                            serviceProviderNotes = property0.Value.GetString();
 0276                            continue;
 277                        }
 0278                        if (property0.NameEquals("provisioningState"))
 279                        {
 0280                            if (property0.Value.ValueKind == JsonValueKind.Null)
 281                            {
 282                                continue;
 283                            }
 0284                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0285                            continue;
 286                        }
 0287                        if (property0.NameEquals("peerings"))
 288                        {
 0289                            if (property0.Value.ValueKind == JsonValueKind.Null)
 290                            {
 291                                continue;
 292                            }
 0293                            List<ExpressRouteCrossConnectionPeering> array = new List<ExpressRouteCrossConnectionPeering
 0294                            foreach (var item in property0.Value.EnumerateArray())
 295                            {
 0296                                if (item.ValueKind == JsonValueKind.Null)
 297                                {
 0298                                    array.Add(null);
 299                                }
 300                                else
 301                                {
 0302                                    array.Add(ExpressRouteCrossConnectionPeering.DeserializeExpressRouteCrossConnectionP
 303                                }
 304                            }
 0305                            peerings = array;
 306                            continue;
 307                        }
 308                    }
 309                    continue;
 310                }
 311            }
 0312            return new ExpressRouteCrossConnection(id, name, type, location, tags, etag, primaryAzurePort, secondaryAzur
 313        }
 314    }
 315}