< Summary

Class:Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionPeering
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnectionPeering.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnectionPeering.Serialization.cs
Covered lines:0
Uncovered lines:191
Coverable lines:191
Total lines:402
Line coverage:0% (0 of 191)
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_Name()-0%100%
get_Etag()-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_ProvisioningState()-0%100%
get_GatewayManagerEtag()-0%100%
get_LastModifiedBy()-0%100%
get_Ipv6PeeringConfig()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeExpressRouteCrossConnectionPeering(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnectionPeering.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> Peering in an ExpressRoute Cross Connection resource. </summary>
 11    public partial class ExpressRouteCrossConnectionPeering : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ExpressRouteCrossConnectionPeering. </summary>
 014        public ExpressRouteCrossConnectionPeering()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExpressRouteCrossConnectionPeering. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="peeringType"> The peering type. </param>
 23        /// <param name="state"> The peering state. </param>
 24        /// <param name="azureASN"> The Azure ASN. </param>
 25        /// <param name="peerASN"> The peer ASN. </param>
 26        /// <param name="primaryPeerAddressPrefix"> The primary address prefix. </param>
 27        /// <param name="secondaryPeerAddressPrefix"> The secondary address prefix. </param>
 28        /// <param name="primaryAzurePort"> The primary port. </param>
 29        /// <param name="secondaryAzurePort"> The secondary port. </param>
 30        /// <param name="sharedKey"> The shared key. </param>
 31        /// <param name="vlanId"> The VLAN ID. </param>
 32        /// <param name="microsoftPeeringConfig"> The Microsoft peering configuration. </param>
 33        /// <param name="provisioningState"> The provisioning state of the express route cross connection peering resour
 34        /// <param name="gatewayManagerEtag"> The GatewayManager Etag. </param>
 35        /// <param name="lastModifiedBy"> Who was the last to modify the peering. </param>
 36        /// <param name="ipv6PeeringConfig"> The IPv6 peering configuration. </param>
 037        internal ExpressRouteCrossConnectionPeering(string id, string name, string etag, ExpressRoutePeeringType? peerin
 38        {
 039            Name = name;
 040            Etag = etag;
 041            PeeringType = peeringType;
 042            State = state;
 043            AzureASN = azureASN;
 044            PeerASN = peerASN;
 045            PrimaryPeerAddressPrefix = primaryPeerAddressPrefix;
 046            SecondaryPeerAddressPrefix = secondaryPeerAddressPrefix;
 047            PrimaryAzurePort = primaryAzurePort;
 048            SecondaryAzurePort = secondaryAzurePort;
 049            SharedKey = sharedKey;
 050            VlanId = vlanId;
 051            MicrosoftPeeringConfig = microsoftPeeringConfig;
 052            ProvisioningState = provisioningState;
 053            GatewayManagerEtag = gatewayManagerEtag;
 054            LastModifiedBy = lastModifiedBy;
 055            Ipv6PeeringConfig = ipv6PeeringConfig;
 056        }
 57
 58        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 059        public string Name { get; set; }
 60        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 061        public string Etag { get; }
 62        /// <summary> The peering type. </summary>
 063        public ExpressRoutePeeringType? PeeringType { get; set; }
 64        /// <summary> The peering state. </summary>
 065        public ExpressRoutePeeringState? State { get; set; }
 66        /// <summary> The Azure ASN. </summary>
 067        public int? AzureASN { get; }
 68        /// <summary> The peer ASN. </summary>
 069        public long? PeerASN { get; set; }
 70        /// <summary> The primary address prefix. </summary>
 071        public string PrimaryPeerAddressPrefix { get; set; }
 72        /// <summary> The secondary address prefix. </summary>
 073        public string SecondaryPeerAddressPrefix { get; set; }
 74        /// <summary> The primary port. </summary>
 075        public string PrimaryAzurePort { get; }
 76        /// <summary> The secondary port. </summary>
 077        public string SecondaryAzurePort { get; }
 78        /// <summary> The shared key. </summary>
 079        public string SharedKey { get; set; }
 80        /// <summary> The VLAN ID. </summary>
 081        public int? VlanId { get; set; }
 82        /// <summary> The Microsoft peering configuration. </summary>
 083        public ExpressRouteCircuitPeeringConfig MicrosoftPeeringConfig { get; set; }
 84        /// <summary> The provisioning state of the express route cross connection peering resource. </summary>
 085        public ProvisioningState? ProvisioningState { get; }
 86        /// <summary> The GatewayManager Etag. </summary>
 087        public string GatewayManagerEtag { get; set; }
 88        /// <summary> Who was the last to modify the peering. </summary>
 089        public string LastModifiedBy { get; }
 90        /// <summary> The IPv6 peering configuration. </summary>
 091        public Ipv6ExpressRouteCircuitPeeringConfig Ipv6PeeringConfig { get; set; }
 92    }
 93}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ExpressRouteCrossConnectionPeering.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class ExpressRouteCrossConnectionPeering : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Id != null)
 29            {
 030                writer.WritePropertyName("id");
 031                writer.WriteStringValue(Id);
 32            }
 033            writer.WritePropertyName("properties");
 034            writer.WriteStartObject();
 035            if (PeeringType != null)
 36            {
 037                writer.WritePropertyName("peeringType");
 038                writer.WriteStringValue(PeeringType.Value.ToString());
 39            }
 040            if (State != null)
 41            {
 042                writer.WritePropertyName("state");
 043                writer.WriteStringValue(State.Value.ToString());
 44            }
 045            if (AzureASN != null)
 46            {
 047                writer.WritePropertyName("azureASN");
 048                writer.WriteNumberValue(AzureASN.Value);
 49            }
 050            if (PeerASN != null)
 51            {
 052                writer.WritePropertyName("peerASN");
 053                writer.WriteNumberValue(PeerASN.Value);
 54            }
 055            if (PrimaryPeerAddressPrefix != null)
 56            {
 057                writer.WritePropertyName("primaryPeerAddressPrefix");
 058                writer.WriteStringValue(PrimaryPeerAddressPrefix);
 59            }
 060            if (SecondaryPeerAddressPrefix != null)
 61            {
 062                writer.WritePropertyName("secondaryPeerAddressPrefix");
 063                writer.WriteStringValue(SecondaryPeerAddressPrefix);
 64            }
 065            if (PrimaryAzurePort != null)
 66            {
 067                writer.WritePropertyName("primaryAzurePort");
 068                writer.WriteStringValue(PrimaryAzurePort);
 69            }
 070            if (SecondaryAzurePort != null)
 71            {
 072                writer.WritePropertyName("secondaryAzurePort");
 073                writer.WriteStringValue(SecondaryAzurePort);
 74            }
 075            if (SharedKey != null)
 76            {
 077                writer.WritePropertyName("sharedKey");
 078                writer.WriteStringValue(SharedKey);
 79            }
 080            if (VlanId != null)
 81            {
 082                writer.WritePropertyName("vlanId");
 083                writer.WriteNumberValue(VlanId.Value);
 84            }
 085            if (MicrosoftPeeringConfig != null)
 86            {
 087                writer.WritePropertyName("microsoftPeeringConfig");
 088                writer.WriteObjectValue(MicrosoftPeeringConfig);
 89            }
 090            if (ProvisioningState != null)
 91            {
 092                writer.WritePropertyName("provisioningState");
 093                writer.WriteStringValue(ProvisioningState.Value.ToString());
 94            }
 095            if (GatewayManagerEtag != null)
 96            {
 097                writer.WritePropertyName("gatewayManagerEtag");
 098                writer.WriteStringValue(GatewayManagerEtag);
 99            }
 0100            if (LastModifiedBy != null)
 101            {
 0102                writer.WritePropertyName("lastModifiedBy");
 0103                writer.WriteStringValue(LastModifiedBy);
 104            }
 0105            if (Ipv6PeeringConfig != null)
 106            {
 0107                writer.WritePropertyName("ipv6PeeringConfig");
 0108                writer.WriteObjectValue(Ipv6PeeringConfig);
 109            }
 0110            writer.WriteEndObject();
 0111            writer.WriteEndObject();
 0112        }
 113
 114        internal static ExpressRouteCrossConnectionPeering DeserializeExpressRouteCrossConnectionPeering(JsonElement ele
 115        {
 0116            string name = default;
 0117            string etag = default;
 0118            string id = default;
 0119            ExpressRoutePeeringType? peeringType = default;
 0120            ExpressRoutePeeringState? state = default;
 0121            int? azureASN = default;
 0122            long? peerASN = default;
 0123            string primaryPeerAddressPrefix = default;
 0124            string secondaryPeerAddressPrefix = default;
 0125            string primaryAzurePort = default;
 0126            string secondaryAzurePort = default;
 0127            string sharedKey = default;
 0128            int? vlanId = default;
 0129            ExpressRouteCircuitPeeringConfig microsoftPeeringConfig = default;
 0130            ProvisioningState? provisioningState = default;
 0131            string gatewayManagerEtag = default;
 0132            string lastModifiedBy = default;
 0133            Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig = default;
 0134            foreach (var property in element.EnumerateObject())
 135            {
 0136                if (property.NameEquals("name"))
 137                {
 0138                    if (property.Value.ValueKind == JsonValueKind.Null)
 139                    {
 140                        continue;
 141                    }
 0142                    name = property.Value.GetString();
 0143                    continue;
 144                }
 0145                if (property.NameEquals("etag"))
 146                {
 0147                    if (property.Value.ValueKind == JsonValueKind.Null)
 148                    {
 149                        continue;
 150                    }
 0151                    etag = property.Value.GetString();
 0152                    continue;
 153                }
 0154                if (property.NameEquals("id"))
 155                {
 0156                    if (property.Value.ValueKind == JsonValueKind.Null)
 157                    {
 158                        continue;
 159                    }
 0160                    id = property.Value.GetString();
 0161                    continue;
 162                }
 0163                if (property.NameEquals("properties"))
 164                {
 0165                    foreach (var property0 in property.Value.EnumerateObject())
 166                    {
 0167                        if (property0.NameEquals("peeringType"))
 168                        {
 0169                            if (property0.Value.ValueKind == JsonValueKind.Null)
 170                            {
 171                                continue;
 172                            }
 0173                            peeringType = new ExpressRoutePeeringType(property0.Value.GetString());
 0174                            continue;
 175                        }
 0176                        if (property0.NameEquals("state"))
 177                        {
 0178                            if (property0.Value.ValueKind == JsonValueKind.Null)
 179                            {
 180                                continue;
 181                            }
 0182                            state = new ExpressRoutePeeringState(property0.Value.GetString());
 0183                            continue;
 184                        }
 0185                        if (property0.NameEquals("azureASN"))
 186                        {
 0187                            if (property0.Value.ValueKind == JsonValueKind.Null)
 188                            {
 189                                continue;
 190                            }
 0191                            azureASN = property0.Value.GetInt32();
 0192                            continue;
 193                        }
 0194                        if (property0.NameEquals("peerASN"))
 195                        {
 0196                            if (property0.Value.ValueKind == JsonValueKind.Null)
 197                            {
 198                                continue;
 199                            }
 0200                            peerASN = property0.Value.GetInt64();
 0201                            continue;
 202                        }
 0203                        if (property0.NameEquals("primaryPeerAddressPrefix"))
 204                        {
 0205                            if (property0.Value.ValueKind == JsonValueKind.Null)
 206                            {
 207                                continue;
 208                            }
 0209                            primaryPeerAddressPrefix = property0.Value.GetString();
 0210                            continue;
 211                        }
 0212                        if (property0.NameEquals("secondaryPeerAddressPrefix"))
 213                        {
 0214                            if (property0.Value.ValueKind == JsonValueKind.Null)
 215                            {
 216                                continue;
 217                            }
 0218                            secondaryPeerAddressPrefix = property0.Value.GetString();
 0219                            continue;
 220                        }
 0221                        if (property0.NameEquals("primaryAzurePort"))
 222                        {
 0223                            if (property0.Value.ValueKind == JsonValueKind.Null)
 224                            {
 225                                continue;
 226                            }
 0227                            primaryAzurePort = property0.Value.GetString();
 0228                            continue;
 229                        }
 0230                        if (property0.NameEquals("secondaryAzurePort"))
 231                        {
 0232                            if (property0.Value.ValueKind == JsonValueKind.Null)
 233                            {
 234                                continue;
 235                            }
 0236                            secondaryAzurePort = property0.Value.GetString();
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("sharedKey"))
 240                        {
 0241                            if (property0.Value.ValueKind == JsonValueKind.Null)
 242                            {
 243                                continue;
 244                            }
 0245                            sharedKey = property0.Value.GetString();
 0246                            continue;
 247                        }
 0248                        if (property0.NameEquals("vlanId"))
 249                        {
 0250                            if (property0.Value.ValueKind == JsonValueKind.Null)
 251                            {
 252                                continue;
 253                            }
 0254                            vlanId = property0.Value.GetInt32();
 0255                            continue;
 256                        }
 0257                        if (property0.NameEquals("microsoftPeeringConfig"))
 258                        {
 0259                            if (property0.Value.ValueKind == JsonValueKind.Null)
 260                            {
 261                                continue;
 262                            }
 0263                            microsoftPeeringConfig = ExpressRouteCircuitPeeringConfig.DeserializeExpressRouteCircuitPeer
 0264                            continue;
 265                        }
 0266                        if (property0.NameEquals("provisioningState"))
 267                        {
 0268                            if (property0.Value.ValueKind == JsonValueKind.Null)
 269                            {
 270                                continue;
 271                            }
 0272                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0273                            continue;
 274                        }
 0275                        if (property0.NameEquals("gatewayManagerEtag"))
 276                        {
 0277                            if (property0.Value.ValueKind == JsonValueKind.Null)
 278                            {
 279                                continue;
 280                            }
 0281                            gatewayManagerEtag = property0.Value.GetString();
 0282                            continue;
 283                        }
 0284                        if (property0.NameEquals("lastModifiedBy"))
 285                        {
 0286                            if (property0.Value.ValueKind == JsonValueKind.Null)
 287                            {
 288                                continue;
 289                            }
 0290                            lastModifiedBy = property0.Value.GetString();
 0291                            continue;
 292                        }
 0293                        if (property0.NameEquals("ipv6PeeringConfig"))
 294                        {
 0295                            if (property0.Value.ValueKind == JsonValueKind.Null)
 296                            {
 297                                continue;
 298                            }
 0299                            ipv6PeeringConfig = Ipv6ExpressRouteCircuitPeeringConfig.DeserializeIpv6ExpressRouteCircuitP
 300                            continue;
 301                        }
 302                    }
 303                    continue;
 304                }
 305            }
 0306            return new ExpressRouteCrossConnectionPeering(id, name, etag, peeringType, state, azureASN, peerASN, primary
 307        }
 308    }
 309}