< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Sku()-0%100%
get_Etag()-0%100%
get_AllowClassicOperations()-0%100%
get_CircuitProvisioningState()-0%100%
get_ServiceProviderProvisioningState()-0%100%
get_Authorizations()-0%100%
get_Peerings()-0%100%
get_ServiceKey()-0%100%
get_ServiceProviderNotes()-0%100%
get_ServiceProviderProperties()-0%100%
get_ExpressRoutePort()-0%100%
get_BandwidthInGbps()-0%100%
get_Stag()-0%100%
get_ProvisioningState()-0%100%
get_GatewayManagerEtag()-0%100%
get_GlobalReachEnabled()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteCircuit(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuit.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> ExpressRouteCircuit resource. </summary>
 13    public partial class ExpressRouteCircuit : Resource
 14    {
 15        /// <summary> Initializes a new instance of ExpressRouteCircuit. </summary>
 016        public ExpressRouteCircuit()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ExpressRouteCircuit. </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="sku"> The SKU. </param>
 27        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 28        /// <param name="allowClassicOperations"> Allow classic operations. </param>
 29        /// <param name="circuitProvisioningState"> The CircuitProvisioningState state of the resource. </param>
 30        /// <param name="serviceProviderProvisioningState"> The ServiceProviderProvisioningState state of the resource. 
 31        /// <param name="authorizations"> The list of authorizations. </param>
 32        /// <param name="peerings"> The list of peerings. </param>
 33        /// <param name="serviceKey"> The ServiceKey. </param>
 34        /// <param name="serviceProviderNotes"> The ServiceProviderNotes. </param>
 35        /// <param name="serviceProviderProperties"> The ServiceProviderProperties. </param>
 36        /// <param name="expressRoutePort"> The reference to the ExpressRoutePort resource when the circuit is provision
 37        /// <param name="bandwidthInGbps"> The bandwidth of the circuit when the circuit is provisioned on an ExpressRou
 38        /// <param name="stag"> The identifier of the circuit traffic. Outer tag for QinQ encapsulation. </param>
 39        /// <param name="provisioningState"> The provisioning state of the express route circuit resource. </param>
 40        /// <param name="gatewayManagerEtag"> The GatewayManager Etag. </param>
 41        /// <param name="globalReachEnabled"> Flag denoting global reach status. </param>
 042        internal ExpressRouteCircuit(string id, string name, string type, string location, IDictionary<string, string> t
 43        {
 044            Sku = sku;
 045            Etag = etag;
 046            AllowClassicOperations = allowClassicOperations;
 047            CircuitProvisioningState = circuitProvisioningState;
 048            ServiceProviderProvisioningState = serviceProviderProvisioningState;
 049            Authorizations = authorizations;
 050            Peerings = peerings;
 051            ServiceKey = serviceKey;
 052            ServiceProviderNotes = serviceProviderNotes;
 053            ServiceProviderProperties = serviceProviderProperties;
 054            ExpressRoutePort = expressRoutePort;
 055            BandwidthInGbps = bandwidthInGbps;
 056            Stag = stag;
 057            ProvisioningState = provisioningState;
 058            GatewayManagerEtag = gatewayManagerEtag;
 059            GlobalReachEnabled = globalReachEnabled;
 060        }
 61
 62        /// <summary> The SKU. </summary>
 063        public ExpressRouteCircuitSku Sku { get; set; }
 64        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 065        public string Etag { get; }
 66        /// <summary> Allow classic operations. </summary>
 067        public bool? AllowClassicOperations { get; set; }
 68        /// <summary> The CircuitProvisioningState state of the resource. </summary>
 069        public string CircuitProvisioningState { get; set; }
 70        /// <summary> The ServiceProviderProvisioningState state of the resource. </summary>
 071        public ServiceProviderProvisioningState? ServiceProviderProvisioningState { get; set; }
 72        /// <summary> The list of authorizations. </summary>
 073        public IList<ExpressRouteCircuitAuthorization> Authorizations { get; set; }
 74        /// <summary> The list of peerings. </summary>
 075        public IList<ExpressRouteCircuitPeering> Peerings { get; set; }
 76        /// <summary> The ServiceKey. </summary>
 077        public string ServiceKey { get; set; }
 78        /// <summary> The ServiceProviderNotes. </summary>
 079        public string ServiceProviderNotes { get; set; }
 80        /// <summary> The ServiceProviderProperties. </summary>
 081        public ExpressRouteCircuitServiceProviderProperties ServiceProviderProperties { get; set; }
 82        /// <summary> The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRouteP
 083        public SubResource ExpressRoutePort { get; set; }
 84        /// <summary> The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. </su
 085        public float? BandwidthInGbps { get; set; }
 86        /// <summary> The identifier of the circuit traffic. Outer tag for QinQ encapsulation. </summary>
 087        public int? Stag { get; }
 88        /// <summary> The provisioning state of the express route circuit resource. </summary>
 089        public ProvisioningState? ProvisioningState { get; }
 90        /// <summary> The GatewayManager Etag. </summary>
 091        public string GatewayManagerEtag { get; set; }
 92        /// <summary> Flag denoting global reach status. </summary>
 093        public bool? GlobalReachEnabled { get; set; }
 94    }
 95}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuit.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 ExpressRouteCircuit : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Sku != null)
 20            {
 021                writer.WritePropertyName("sku");
 022                writer.WriteObjectValue(Sku);
 23            }
 024            if (Etag != null)
 25            {
 026                writer.WritePropertyName("etag");
 027                writer.WriteStringValue(Etag);
 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 (AllowClassicOperations != null)
 63            {
 064                writer.WritePropertyName("allowClassicOperations");
 065                writer.WriteBooleanValue(AllowClassicOperations.Value);
 66            }
 067            if (CircuitProvisioningState != null)
 68            {
 069                writer.WritePropertyName("circuitProvisioningState");
 070                writer.WriteStringValue(CircuitProvisioningState);
 71            }
 072            if (ServiceProviderProvisioningState != null)
 73            {
 074                writer.WritePropertyName("serviceProviderProvisioningState");
 075                writer.WriteStringValue(ServiceProviderProvisioningState.Value.ToString());
 76            }
 077            if (Authorizations != null)
 78            {
 079                writer.WritePropertyName("authorizations");
 080                writer.WriteStartArray();
 081                foreach (var item in Authorizations)
 82                {
 083                    writer.WriteObjectValue(item);
 84                }
 085                writer.WriteEndArray();
 86            }
 087            if (Peerings != null)
 88            {
 089                writer.WritePropertyName("peerings");
 090                writer.WriteStartArray();
 091                foreach (var item in Peerings)
 92                {
 093                    writer.WriteObjectValue(item);
 94                }
 095                writer.WriteEndArray();
 96            }
 097            if (ServiceKey != null)
 98            {
 099                writer.WritePropertyName("serviceKey");
 0100                writer.WriteStringValue(ServiceKey);
 101            }
 0102            if (ServiceProviderNotes != null)
 103            {
 0104                writer.WritePropertyName("serviceProviderNotes");
 0105                writer.WriteStringValue(ServiceProviderNotes);
 106            }
 0107            if (ServiceProviderProperties != null)
 108            {
 0109                writer.WritePropertyName("serviceProviderProperties");
 0110                writer.WriteObjectValue(ServiceProviderProperties);
 111            }
 0112            if (ExpressRoutePort != null)
 113            {
 0114                writer.WritePropertyName("expressRoutePort");
 0115                writer.WriteObjectValue(ExpressRoutePort);
 116            }
 0117            if (BandwidthInGbps != null)
 118            {
 0119                writer.WritePropertyName("bandwidthInGbps");
 0120                writer.WriteNumberValue(BandwidthInGbps.Value);
 121            }
 0122            if (Stag != null)
 123            {
 0124                writer.WritePropertyName("stag");
 0125                writer.WriteNumberValue(Stag.Value);
 126            }
 0127            if (ProvisioningState != null)
 128            {
 0129                writer.WritePropertyName("provisioningState");
 0130                writer.WriteStringValue(ProvisioningState.Value.ToString());
 131            }
 0132            if (GatewayManagerEtag != null)
 133            {
 0134                writer.WritePropertyName("gatewayManagerEtag");
 0135                writer.WriteStringValue(GatewayManagerEtag);
 136            }
 0137            if (GlobalReachEnabled != null)
 138            {
 0139                writer.WritePropertyName("globalReachEnabled");
 0140                writer.WriteBooleanValue(GlobalReachEnabled.Value);
 141            }
 0142            writer.WriteEndObject();
 0143            writer.WriteEndObject();
 0144        }
 145
 146        internal static ExpressRouteCircuit DeserializeExpressRouteCircuit(JsonElement element)
 147        {
 0148            ExpressRouteCircuitSku sku = default;
 0149            string etag = default;
 0150            string id = default;
 0151            string name = default;
 0152            string type = default;
 0153            string location = default;
 0154            IDictionary<string, string> tags = default;
 0155            bool? allowClassicOperations = default;
 0156            string circuitProvisioningState = default;
 0157            ServiceProviderProvisioningState? serviceProviderProvisioningState = default;
 0158            IList<ExpressRouteCircuitAuthorization> authorizations = default;
 0159            IList<ExpressRouteCircuitPeering> peerings = default;
 0160            string serviceKey = default;
 0161            string serviceProviderNotes = default;
 0162            ExpressRouteCircuitServiceProviderProperties serviceProviderProperties = default;
 0163            SubResource expressRoutePort = default;
 0164            float? bandwidthInGbps = default;
 0165            int? stag = default;
 0166            ProvisioningState? provisioningState = default;
 0167            string gatewayManagerEtag = default;
 0168            bool? globalReachEnabled = default;
 0169            foreach (var property in element.EnumerateObject())
 170            {
 0171                if (property.NameEquals("sku"))
 172                {
 0173                    if (property.Value.ValueKind == JsonValueKind.Null)
 174                    {
 175                        continue;
 176                    }
 0177                    sku = ExpressRouteCircuitSku.DeserializeExpressRouteCircuitSku(property.Value);
 0178                    continue;
 179                }
 0180                if (property.NameEquals("etag"))
 181                {
 0182                    if (property.Value.ValueKind == JsonValueKind.Null)
 183                    {
 184                        continue;
 185                    }
 0186                    etag = property.Value.GetString();
 0187                    continue;
 188                }
 0189                if (property.NameEquals("id"))
 190                {
 0191                    if (property.Value.ValueKind == JsonValueKind.Null)
 192                    {
 193                        continue;
 194                    }
 0195                    id = property.Value.GetString();
 0196                    continue;
 197                }
 0198                if (property.NameEquals("name"))
 199                {
 0200                    if (property.Value.ValueKind == JsonValueKind.Null)
 201                    {
 202                        continue;
 203                    }
 0204                    name = property.Value.GetString();
 0205                    continue;
 206                }
 0207                if (property.NameEquals("type"))
 208                {
 0209                    if (property.Value.ValueKind == JsonValueKind.Null)
 210                    {
 211                        continue;
 212                    }
 0213                    type = property.Value.GetString();
 0214                    continue;
 215                }
 0216                if (property.NameEquals("location"))
 217                {
 0218                    if (property.Value.ValueKind == JsonValueKind.Null)
 219                    {
 220                        continue;
 221                    }
 0222                    location = property.Value.GetString();
 0223                    continue;
 224                }
 0225                if (property.NameEquals("tags"))
 226                {
 0227                    if (property.Value.ValueKind == JsonValueKind.Null)
 228                    {
 229                        continue;
 230                    }
 0231                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0232                    foreach (var property0 in property.Value.EnumerateObject())
 233                    {
 0234                        if (property0.Value.ValueKind == JsonValueKind.Null)
 235                        {
 0236                            dictionary.Add(property0.Name, null);
 237                        }
 238                        else
 239                        {
 0240                            dictionary.Add(property0.Name, property0.Value.GetString());
 241                        }
 242                    }
 0243                    tags = dictionary;
 0244                    continue;
 245                }
 0246                if (property.NameEquals("properties"))
 247                {
 0248                    foreach (var property0 in property.Value.EnumerateObject())
 249                    {
 0250                        if (property0.NameEquals("allowClassicOperations"))
 251                        {
 0252                            if (property0.Value.ValueKind == JsonValueKind.Null)
 253                            {
 254                                continue;
 255                            }
 0256                            allowClassicOperations = property0.Value.GetBoolean();
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("circuitProvisioningState"))
 260                        {
 0261                            if (property0.Value.ValueKind == JsonValueKind.Null)
 262                            {
 263                                continue;
 264                            }
 0265                            circuitProvisioningState = property0.Value.GetString();
 0266                            continue;
 267                        }
 0268                        if (property0.NameEquals("serviceProviderProvisioningState"))
 269                        {
 0270                            if (property0.Value.ValueKind == JsonValueKind.Null)
 271                            {
 272                                continue;
 273                            }
 0274                            serviceProviderProvisioningState = new ServiceProviderProvisioningState(property0.Value.GetS
 0275                            continue;
 276                        }
 0277                        if (property0.NameEquals("authorizations"))
 278                        {
 0279                            if (property0.Value.ValueKind == JsonValueKind.Null)
 280                            {
 281                                continue;
 282                            }
 0283                            List<ExpressRouteCircuitAuthorization> array = new List<ExpressRouteCircuitAuthorization>();
 0284                            foreach (var item in property0.Value.EnumerateArray())
 285                            {
 0286                                if (item.ValueKind == JsonValueKind.Null)
 287                                {
 0288                                    array.Add(null);
 289                                }
 290                                else
 291                                {
 0292                                    array.Add(ExpressRouteCircuitAuthorization.DeserializeExpressRouteCircuitAuthorizati
 293                                }
 294                            }
 0295                            authorizations = array;
 0296                            continue;
 297                        }
 0298                        if (property0.NameEquals("peerings"))
 299                        {
 0300                            if (property0.Value.ValueKind == JsonValueKind.Null)
 301                            {
 302                                continue;
 303                            }
 0304                            List<ExpressRouteCircuitPeering> array = new List<ExpressRouteCircuitPeering>();
 0305                            foreach (var item in property0.Value.EnumerateArray())
 306                            {
 0307                                if (item.ValueKind == JsonValueKind.Null)
 308                                {
 0309                                    array.Add(null);
 310                                }
 311                                else
 312                                {
 0313                                    array.Add(ExpressRouteCircuitPeering.DeserializeExpressRouteCircuitPeering(item));
 314                                }
 315                            }
 0316                            peerings = array;
 0317                            continue;
 318                        }
 0319                        if (property0.NameEquals("serviceKey"))
 320                        {
 0321                            if (property0.Value.ValueKind == JsonValueKind.Null)
 322                            {
 323                                continue;
 324                            }
 0325                            serviceKey = property0.Value.GetString();
 0326                            continue;
 327                        }
 0328                        if (property0.NameEquals("serviceProviderNotes"))
 329                        {
 0330                            if (property0.Value.ValueKind == JsonValueKind.Null)
 331                            {
 332                                continue;
 333                            }
 0334                            serviceProviderNotes = property0.Value.GetString();
 0335                            continue;
 336                        }
 0337                        if (property0.NameEquals("serviceProviderProperties"))
 338                        {
 0339                            if (property0.Value.ValueKind == JsonValueKind.Null)
 340                            {
 341                                continue;
 342                            }
 0343                            serviceProviderProperties = ExpressRouteCircuitServiceProviderProperties.DeserializeExpressR
 0344                            continue;
 345                        }
 0346                        if (property0.NameEquals("expressRoutePort"))
 347                        {
 0348                            if (property0.Value.ValueKind == JsonValueKind.Null)
 349                            {
 350                                continue;
 351                            }
 0352                            expressRoutePort = SubResource.DeserializeSubResource(property0.Value);
 0353                            continue;
 354                        }
 0355                        if (property0.NameEquals("bandwidthInGbps"))
 356                        {
 0357                            if (property0.Value.ValueKind == JsonValueKind.Null)
 358                            {
 359                                continue;
 360                            }
 0361                            bandwidthInGbps = property0.Value.GetSingle();
 0362                            continue;
 363                        }
 0364                        if (property0.NameEquals("stag"))
 365                        {
 0366                            if (property0.Value.ValueKind == JsonValueKind.Null)
 367                            {
 368                                continue;
 369                            }
 0370                            stag = property0.Value.GetInt32();
 0371                            continue;
 372                        }
 0373                        if (property0.NameEquals("provisioningState"))
 374                        {
 0375                            if (property0.Value.ValueKind == JsonValueKind.Null)
 376                            {
 377                                continue;
 378                            }
 0379                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0380                            continue;
 381                        }
 0382                        if (property0.NameEquals("gatewayManagerEtag"))
 383                        {
 0384                            if (property0.Value.ValueKind == JsonValueKind.Null)
 385                            {
 386                                continue;
 387                            }
 0388                            gatewayManagerEtag = property0.Value.GetString();
 0389                            continue;
 390                        }
 0391                        if (property0.NameEquals("globalReachEnabled"))
 392                        {
 0393                            if (property0.Value.ValueKind == JsonValueKind.Null)
 394                            {
 395                                continue;
 396                            }
 0397                            globalReachEnabled = property0.Value.GetBoolean();
 398                            continue;
 399                        }
 400                    }
 401                    continue;
 402                }
 403            }
 0404            return new ExpressRouteCircuit(id, name, type, location, tags, sku, etag, allowClassicOperations, circuitPro
 405        }
 406    }
 407}