< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_PeeringType()-0%100%
get_State()-0%100%
get_AzureASN()-0%100%
get_PeerASN()-0%100%
get_PrimaryPeerAddressPrefix()-0%100%
get_SecondaryPeerAddressPrefix()-0%100%
get_PrimaryAzurePort()-0%100%
get_SecondaryAzurePort()-0%100%
get_SharedKey()-0%100%
get_VlanId()-0%100%
get_MicrosoftPeeringConfig()-0%100%
get_Stats()-0%100%
get_ProvisioningState()-0%100%
get_GatewayManagerEtag()-0%100%
get_LastModifiedBy()-0%100%
get_RouteFilter()-0%100%
get_Ipv6PeeringConfig()-0%100%
get_ExpressRouteConnection()-0%100%
get_Connections()-0%100%
get_PeeredConnections()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteCircuitPeering(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitPeering.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> Peering in an ExpressRouteCircuit resource. </summary>
 13    public partial class ExpressRouteCircuitPeering : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ExpressRouteCircuitPeering. </summary>
 016        public ExpressRouteCircuitPeering()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ExpressRouteCircuitPeering. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 23        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 24        /// <param name="type"> Type of the resource. </param>
 25        /// <param name="peeringType"> The peering type. </param>
 26        /// <param name="state"> The peering state. </param>
 27        /// <param name="azureASN"> The Azure ASN. </param>
 28        /// <param name="peerASN"> The peer ASN. </param>
 29        /// <param name="primaryPeerAddressPrefix"> The primary address prefix. </param>
 30        /// <param name="secondaryPeerAddressPrefix"> The secondary address prefix. </param>
 31        /// <param name="primaryAzurePort"> The primary port. </param>
 32        /// <param name="secondaryAzurePort"> The secondary port. </param>
 33        /// <param name="sharedKey"> The shared key. </param>
 34        /// <param name="vlanId"> The VLAN ID. </param>
 35        /// <param name="microsoftPeeringConfig"> The Microsoft peering configuration. </param>
 36        /// <param name="stats"> The peering stats of express route circuit. </param>
 37        /// <param name="provisioningState"> The provisioning state of the express route circuit peering resource. </par
 38        /// <param name="gatewayManagerEtag"> The GatewayManager Etag. </param>
 39        /// <param name="lastModifiedBy"> Who was the last to modify the peering. </param>
 40        /// <param name="routeFilter"> The reference to the RouteFilter resource. </param>
 41        /// <param name="ipv6PeeringConfig"> The IPv6 peering configuration. </param>
 42        /// <param name="expressRouteConnection"> The ExpressRoute connection. </param>
 43        /// <param name="connections"> The list of circuit connections associated with Azure Private Peering for this ci
 44        /// <param name="peeredConnections"> The list of peered circuit connections associated with Azure Private Peerin
 045        internal ExpressRouteCircuitPeering(string id, string name, string etag, string type, ExpressRoutePeeringType? p
 46        {
 047            Name = name;
 048            Etag = etag;
 049            Type = type;
 050            PeeringType = peeringType;
 051            State = state;
 052            AzureASN = azureASN;
 053            PeerASN = peerASN;
 054            PrimaryPeerAddressPrefix = primaryPeerAddressPrefix;
 055            SecondaryPeerAddressPrefix = secondaryPeerAddressPrefix;
 056            PrimaryAzurePort = primaryAzurePort;
 057            SecondaryAzurePort = secondaryAzurePort;
 058            SharedKey = sharedKey;
 059            VlanId = vlanId;
 060            MicrosoftPeeringConfig = microsoftPeeringConfig;
 061            Stats = stats;
 062            ProvisioningState = provisioningState;
 063            GatewayManagerEtag = gatewayManagerEtag;
 064            LastModifiedBy = lastModifiedBy;
 065            RouteFilter = routeFilter;
 066            Ipv6PeeringConfig = ipv6PeeringConfig;
 067            ExpressRouteConnection = expressRouteConnection;
 068            Connections = connections;
 069            PeeredConnections = peeredConnections;
 070        }
 71
 72        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 073        public string Name { get; set; }
 74        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 075        public string Etag { get; }
 76        /// <summary> Type of the resource. </summary>
 077        public string Type { get; }
 78        /// <summary> The peering type. </summary>
 079        public ExpressRoutePeeringType? PeeringType { get; set; }
 80        /// <summary> The peering state. </summary>
 081        public ExpressRoutePeeringState? State { get; set; }
 82        /// <summary> The Azure ASN. </summary>
 083        public int? AzureASN { get; set; }
 84        /// <summary> The peer ASN. </summary>
 085        public long? PeerASN { get; set; }
 86        /// <summary> The primary address prefix. </summary>
 087        public string PrimaryPeerAddressPrefix { get; set; }
 88        /// <summary> The secondary address prefix. </summary>
 089        public string SecondaryPeerAddressPrefix { get; set; }
 90        /// <summary> The primary port. </summary>
 091        public string PrimaryAzurePort { get; set; }
 92        /// <summary> The secondary port. </summary>
 093        public string SecondaryAzurePort { get; set; }
 94        /// <summary> The shared key. </summary>
 095        public string SharedKey { get; set; }
 96        /// <summary> The VLAN ID. </summary>
 097        public int? VlanId { get; set; }
 98        /// <summary> The Microsoft peering configuration. </summary>
 099        public ExpressRouteCircuitPeeringConfig MicrosoftPeeringConfig { get; set; }
 100        /// <summary> The peering stats of express route circuit. </summary>
 0101        public ExpressRouteCircuitStats Stats { get; set; }
 102        /// <summary> The provisioning state of the express route circuit peering resource. </summary>
 0103        public ProvisioningState? ProvisioningState { get; }
 104        /// <summary> The GatewayManager Etag. </summary>
 0105        public string GatewayManagerEtag { get; set; }
 106        /// <summary> Who was the last to modify the peering. </summary>
 0107        public string LastModifiedBy { get; }
 108        /// <summary> The reference to the RouteFilter resource. </summary>
 0109        public SubResource RouteFilter { get; set; }
 110        /// <summary> The IPv6 peering configuration. </summary>
 0111        public Ipv6ExpressRouteCircuitPeeringConfig Ipv6PeeringConfig { get; set; }
 112        /// <summary> The ExpressRoute connection. </summary>
 0113        public ExpressRouteConnectionId ExpressRouteConnection { get; set; }
 114        /// <summary> The list of circuit connections associated with Azure Private Peering for this circuit. </summary>
 0115        public IList<ExpressRouteCircuitConnection> Connections { get; set; }
 116        /// <summary> The list of peered circuit connections associated with Azure Private Peering for this circuit. </s
 0117        public IList<PeerExpressRouteCircuitConnection> PeeredConnections { get; }
 118    }
 119}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCircuitPeering.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 ExpressRouteCircuitPeering : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Etag != null)
 25            {
 026                writer.WritePropertyName("etag");
 027                writer.WriteStringValue(Etag);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            if (Id != null)
 35            {
 036                writer.WritePropertyName("id");
 037                writer.WriteStringValue(Id);
 38            }
 039            writer.WritePropertyName("properties");
 040            writer.WriteStartObject();
 041            if (PeeringType != null)
 42            {
 043                writer.WritePropertyName("peeringType");
 044                writer.WriteStringValue(PeeringType.Value.ToString());
 45            }
 046            if (State != null)
 47            {
 048                writer.WritePropertyName("state");
 049                writer.WriteStringValue(State.Value.ToString());
 50            }
 051            if (AzureASN != null)
 52            {
 053                writer.WritePropertyName("azureASN");
 054                writer.WriteNumberValue(AzureASN.Value);
 55            }
 056            if (PeerASN != null)
 57            {
 058                writer.WritePropertyName("peerASN");
 059                writer.WriteNumberValue(PeerASN.Value);
 60            }
 061            if (PrimaryPeerAddressPrefix != null)
 62            {
 063                writer.WritePropertyName("primaryPeerAddressPrefix");
 064                writer.WriteStringValue(PrimaryPeerAddressPrefix);
 65            }
 066            if (SecondaryPeerAddressPrefix != null)
 67            {
 068                writer.WritePropertyName("secondaryPeerAddressPrefix");
 069                writer.WriteStringValue(SecondaryPeerAddressPrefix);
 70            }
 071            if (PrimaryAzurePort != null)
 72            {
 073                writer.WritePropertyName("primaryAzurePort");
 074                writer.WriteStringValue(PrimaryAzurePort);
 75            }
 076            if (SecondaryAzurePort != null)
 77            {
 078                writer.WritePropertyName("secondaryAzurePort");
 079                writer.WriteStringValue(SecondaryAzurePort);
 80            }
 081            if (SharedKey != null)
 82            {
 083                writer.WritePropertyName("sharedKey");
 084                writer.WriteStringValue(SharedKey);
 85            }
 086            if (VlanId != null)
 87            {
 088                writer.WritePropertyName("vlanId");
 089                writer.WriteNumberValue(VlanId.Value);
 90            }
 091            if (MicrosoftPeeringConfig != null)
 92            {
 093                writer.WritePropertyName("microsoftPeeringConfig");
 094                writer.WriteObjectValue(MicrosoftPeeringConfig);
 95            }
 096            if (Stats != null)
 97            {
 098                writer.WritePropertyName("stats");
 099                writer.WriteObjectValue(Stats);
 100            }
 0101            if (ProvisioningState != null)
 102            {
 0103                writer.WritePropertyName("provisioningState");
 0104                writer.WriteStringValue(ProvisioningState.Value.ToString());
 105            }
 0106            if (GatewayManagerEtag != null)
 107            {
 0108                writer.WritePropertyName("gatewayManagerEtag");
 0109                writer.WriteStringValue(GatewayManagerEtag);
 110            }
 0111            if (LastModifiedBy != null)
 112            {
 0113                writer.WritePropertyName("lastModifiedBy");
 0114                writer.WriteStringValue(LastModifiedBy);
 115            }
 0116            if (RouteFilter != null)
 117            {
 0118                writer.WritePropertyName("routeFilter");
 0119                writer.WriteObjectValue(RouteFilter);
 120            }
 0121            if (Ipv6PeeringConfig != null)
 122            {
 0123                writer.WritePropertyName("ipv6PeeringConfig");
 0124                writer.WriteObjectValue(Ipv6PeeringConfig);
 125            }
 0126            if (ExpressRouteConnection != null)
 127            {
 0128                writer.WritePropertyName("expressRouteConnection");
 0129                writer.WriteObjectValue(ExpressRouteConnection);
 130            }
 0131            if (Connections != null)
 132            {
 0133                writer.WritePropertyName("connections");
 0134                writer.WriteStartArray();
 0135                foreach (var item in Connections)
 136                {
 0137                    writer.WriteObjectValue(item);
 138                }
 0139                writer.WriteEndArray();
 140            }
 0141            if (PeeredConnections != null)
 142            {
 0143                writer.WritePropertyName("peeredConnections");
 0144                writer.WriteStartArray();
 0145                foreach (var item in PeeredConnections)
 146                {
 0147                    writer.WriteObjectValue(item);
 148                }
 0149                writer.WriteEndArray();
 150            }
 0151            writer.WriteEndObject();
 0152            writer.WriteEndObject();
 0153        }
 154
 155        internal static ExpressRouteCircuitPeering DeserializeExpressRouteCircuitPeering(JsonElement element)
 156        {
 0157            string name = default;
 0158            string etag = default;
 0159            string type = default;
 0160            string id = default;
 0161            ExpressRoutePeeringType? peeringType = default;
 0162            ExpressRoutePeeringState? state = default;
 0163            int? azureASN = default;
 0164            long? peerASN = default;
 0165            string primaryPeerAddressPrefix = default;
 0166            string secondaryPeerAddressPrefix = default;
 0167            string primaryAzurePort = default;
 0168            string secondaryAzurePort = default;
 0169            string sharedKey = default;
 0170            int? vlanId = default;
 0171            ExpressRouteCircuitPeeringConfig microsoftPeeringConfig = default;
 0172            ExpressRouteCircuitStats stats = default;
 0173            ProvisioningState? provisioningState = default;
 0174            string gatewayManagerEtag = default;
 0175            string lastModifiedBy = default;
 0176            SubResource routeFilter = default;
 0177            Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig = default;
 0178            ExpressRouteConnectionId expressRouteConnection = default;
 0179            IList<ExpressRouteCircuitConnection> connections = default;
 0180            IList<PeerExpressRouteCircuitConnection> peeredConnections = default;
 0181            foreach (var property in element.EnumerateObject())
 182            {
 0183                if (property.NameEquals("name"))
 184                {
 0185                    if (property.Value.ValueKind == JsonValueKind.Null)
 186                    {
 187                        continue;
 188                    }
 0189                    name = property.Value.GetString();
 0190                    continue;
 191                }
 0192                if (property.NameEquals("etag"))
 193                {
 0194                    if (property.Value.ValueKind == JsonValueKind.Null)
 195                    {
 196                        continue;
 197                    }
 0198                    etag = property.Value.GetString();
 0199                    continue;
 200                }
 0201                if (property.NameEquals("type"))
 202                {
 0203                    if (property.Value.ValueKind == JsonValueKind.Null)
 204                    {
 205                        continue;
 206                    }
 0207                    type = property.Value.GetString();
 0208                    continue;
 209                }
 0210                if (property.NameEquals("id"))
 211                {
 0212                    if (property.Value.ValueKind == JsonValueKind.Null)
 213                    {
 214                        continue;
 215                    }
 0216                    id = property.Value.GetString();
 0217                    continue;
 218                }
 0219                if (property.NameEquals("properties"))
 220                {
 0221                    foreach (var property0 in property.Value.EnumerateObject())
 222                    {
 0223                        if (property0.NameEquals("peeringType"))
 224                        {
 0225                            if (property0.Value.ValueKind == JsonValueKind.Null)
 226                            {
 227                                continue;
 228                            }
 0229                            peeringType = new ExpressRoutePeeringType(property0.Value.GetString());
 0230                            continue;
 231                        }
 0232                        if (property0.NameEquals("state"))
 233                        {
 0234                            if (property0.Value.ValueKind == JsonValueKind.Null)
 235                            {
 236                                continue;
 237                            }
 0238                            state = new ExpressRoutePeeringState(property0.Value.GetString());
 0239                            continue;
 240                        }
 0241                        if (property0.NameEquals("azureASN"))
 242                        {
 0243                            if (property0.Value.ValueKind == JsonValueKind.Null)
 244                            {
 245                                continue;
 246                            }
 0247                            azureASN = property0.Value.GetInt32();
 0248                            continue;
 249                        }
 0250                        if (property0.NameEquals("peerASN"))
 251                        {
 0252                            if (property0.Value.ValueKind == JsonValueKind.Null)
 253                            {
 254                                continue;
 255                            }
 0256                            peerASN = property0.Value.GetInt64();
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("primaryPeerAddressPrefix"))
 260                        {
 0261                            if (property0.Value.ValueKind == JsonValueKind.Null)
 262                            {
 263                                continue;
 264                            }
 0265                            primaryPeerAddressPrefix = property0.Value.GetString();
 0266                            continue;
 267                        }
 0268                        if (property0.NameEquals("secondaryPeerAddressPrefix"))
 269                        {
 0270                            if (property0.Value.ValueKind == JsonValueKind.Null)
 271                            {
 272                                continue;
 273                            }
 0274                            secondaryPeerAddressPrefix = property0.Value.GetString();
 0275                            continue;
 276                        }
 0277                        if (property0.NameEquals("primaryAzurePort"))
 278                        {
 0279                            if (property0.Value.ValueKind == JsonValueKind.Null)
 280                            {
 281                                continue;
 282                            }
 0283                            primaryAzurePort = property0.Value.GetString();
 0284                            continue;
 285                        }
 0286                        if (property0.NameEquals("secondaryAzurePort"))
 287                        {
 0288                            if (property0.Value.ValueKind == JsonValueKind.Null)
 289                            {
 290                                continue;
 291                            }
 0292                            secondaryAzurePort = property0.Value.GetString();
 0293                            continue;
 294                        }
 0295                        if (property0.NameEquals("sharedKey"))
 296                        {
 0297                            if (property0.Value.ValueKind == JsonValueKind.Null)
 298                            {
 299                                continue;
 300                            }
 0301                            sharedKey = property0.Value.GetString();
 0302                            continue;
 303                        }
 0304                        if (property0.NameEquals("vlanId"))
 305                        {
 0306                            if (property0.Value.ValueKind == JsonValueKind.Null)
 307                            {
 308                                continue;
 309                            }
 0310                            vlanId = property0.Value.GetInt32();
 0311                            continue;
 312                        }
 0313                        if (property0.NameEquals("microsoftPeeringConfig"))
 314                        {
 0315                            if (property0.Value.ValueKind == JsonValueKind.Null)
 316                            {
 317                                continue;
 318                            }
 0319                            microsoftPeeringConfig = ExpressRouteCircuitPeeringConfig.DeserializeExpressRouteCircuitPeer
 0320                            continue;
 321                        }
 0322                        if (property0.NameEquals("stats"))
 323                        {
 0324                            if (property0.Value.ValueKind == JsonValueKind.Null)
 325                            {
 326                                continue;
 327                            }
 0328                            stats = ExpressRouteCircuitStats.DeserializeExpressRouteCircuitStats(property0.Value);
 0329                            continue;
 330                        }
 0331                        if (property0.NameEquals("provisioningState"))
 332                        {
 0333                            if (property0.Value.ValueKind == JsonValueKind.Null)
 334                            {
 335                                continue;
 336                            }
 0337                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0338                            continue;
 339                        }
 0340                        if (property0.NameEquals("gatewayManagerEtag"))
 341                        {
 0342                            if (property0.Value.ValueKind == JsonValueKind.Null)
 343                            {
 344                                continue;
 345                            }
 0346                            gatewayManagerEtag = property0.Value.GetString();
 0347                            continue;
 348                        }
 0349                        if (property0.NameEquals("lastModifiedBy"))
 350                        {
 0351                            if (property0.Value.ValueKind == JsonValueKind.Null)
 352                            {
 353                                continue;
 354                            }
 0355                            lastModifiedBy = property0.Value.GetString();
 0356                            continue;
 357                        }
 0358                        if (property0.NameEquals("routeFilter"))
 359                        {
 0360                            if (property0.Value.ValueKind == JsonValueKind.Null)
 361                            {
 362                                continue;
 363                            }
 0364                            routeFilter = DeserializeSubResource(property0.Value);
 0365                            continue;
 366                        }
 0367                        if (property0.NameEquals("ipv6PeeringConfig"))
 368                        {
 0369                            if (property0.Value.ValueKind == JsonValueKind.Null)
 370                            {
 371                                continue;
 372                            }
 0373                            ipv6PeeringConfig = Ipv6ExpressRouteCircuitPeeringConfig.DeserializeIpv6ExpressRouteCircuitP
 0374                            continue;
 375                        }
 0376                        if (property0.NameEquals("expressRouteConnection"))
 377                        {
 0378                            if (property0.Value.ValueKind == JsonValueKind.Null)
 379                            {
 380                                continue;
 381                            }
 0382                            expressRouteConnection = ExpressRouteConnectionId.DeserializeExpressRouteConnectionId(proper
 0383                            continue;
 384                        }
 0385                        if (property0.NameEquals("connections"))
 386                        {
 0387                            if (property0.Value.ValueKind == JsonValueKind.Null)
 388                            {
 389                                continue;
 390                            }
 0391                            List<ExpressRouteCircuitConnection> array = new List<ExpressRouteCircuitConnection>();
 0392                            foreach (var item in property0.Value.EnumerateArray())
 393                            {
 0394                                if (item.ValueKind == JsonValueKind.Null)
 395                                {
 0396                                    array.Add(null);
 397                                }
 398                                else
 399                                {
 0400                                    array.Add(ExpressRouteCircuitConnection.DeserializeExpressRouteCircuitConnection(ite
 401                                }
 402                            }
 0403                            connections = array;
 0404                            continue;
 405                        }
 0406                        if (property0.NameEquals("peeredConnections"))
 407                        {
 0408                            if (property0.Value.ValueKind == JsonValueKind.Null)
 409                            {
 410                                continue;
 411                            }
 0412                            List<PeerExpressRouteCircuitConnection> array = new List<PeerExpressRouteCircuitConnection>(
 0413                            foreach (var item in property0.Value.EnumerateArray())
 414                            {
 0415                                if (item.ValueKind == JsonValueKind.Null)
 416                                {
 0417                                    array.Add(null);
 418                                }
 419                                else
 420                                {
 0421                                    array.Add(PeerExpressRouteCircuitConnection.DeserializePeerExpressRouteCircuitConnec
 422                                }
 423                            }
 0424                            peeredConnections = array;
 425                            continue;
 426                        }
 427                    }
 428                    continue;
 429                }
 430            }
 0431            return new ExpressRouteCircuitPeering(id, name, etag, type, peeringType, state, azureASN, peerASN, primaryPe
 432        }
 433    }
 434}