< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_DisableVpnEncryption()-0%100%
get_VirtualHubs()-0%100%
get_VpnSites()-0%100%
get_AllowBranchToBranchTraffic()-0%100%
get_AllowVnetToVnetTraffic()-0%100%
get_Office365LocalBreakoutCategory()-0%100%
get_ProvisioningState()-0%100%
get_TypePropertiesType()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualWAN(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualWAN.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> VirtualWAN Resource. </summary>
 13    public partial class VirtualWAN : Resource
 14    {
 15        /// <summary> Initializes a new instance of VirtualWAN. </summary>
 016        public VirtualWAN()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualWAN. </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="disableVpnEncryption"> Vpn encryption to be disabled or not. </param>
 28        /// <param name="virtualHubs"> List of VirtualHubs in the VirtualWAN. </param>
 29        /// <param name="vpnSites"> List of VpnSites in the VirtualWAN. </param>
 30        /// <param name="allowBranchToBranchTraffic"> True if branch to branch traffic is allowed. </param>
 31        /// <param name="allowVnetToVnetTraffic"> True if Vnet to Vnet traffic is allowed. </param>
 32        /// <param name="office365LocalBreakoutCategory"> The office local breakout category. </param>
 33        /// <param name="provisioningState"> The provisioning state of the virtual WAN resource. </param>
 34        /// <param name="typePropertiesType"> The type of the VirtualWAN. </param>
 035        internal VirtualWAN(string id, string name, string type, string location, IDictionary<string, string> tags, stri
 36        {
 037            Etag = etag;
 038            DisableVpnEncryption = disableVpnEncryption;
 039            VirtualHubs = virtualHubs;
 040            VpnSites = vpnSites;
 041            AllowBranchToBranchTraffic = allowBranchToBranchTraffic;
 042            AllowVnetToVnetTraffic = allowVnetToVnetTraffic;
 043            Office365LocalBreakoutCategory = office365LocalBreakoutCategory;
 044            ProvisioningState = provisioningState;
 045            TypePropertiesType = typePropertiesType;
 046        }
 47
 48        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 049        public string Etag { get; }
 50        /// <summary> Vpn encryption to be disabled or not. </summary>
 051        public bool? DisableVpnEncryption { get; set; }
 52        /// <summary> List of VirtualHubs in the VirtualWAN. </summary>
 053        public IList<SubResource> VirtualHubs { get; }
 54        /// <summary> List of VpnSites in the VirtualWAN. </summary>
 055        public IList<SubResource> VpnSites { get; }
 56        /// <summary> True if branch to branch traffic is allowed. </summary>
 057        public bool? AllowBranchToBranchTraffic { get; set; }
 58        /// <summary> True if Vnet to Vnet traffic is allowed. </summary>
 059        public bool? AllowVnetToVnetTraffic { get; set; }
 60        /// <summary> The office local breakout category. </summary>
 061        public OfficeTrafficCategory? Office365LocalBreakoutCategory { get; }
 62        /// <summary> The provisioning state of the virtual WAN resource. </summary>
 063        public ProvisioningState? ProvisioningState { get; }
 64        /// <summary> The type of the VirtualWAN. </summary>
 065        public string TypePropertiesType { get; set; }
 66    }
 67}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualWAN.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 VirtualWAN : 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 (DisableVpnEncryption != null)
 58            {
 059                writer.WritePropertyName("disableVpnEncryption");
 060                writer.WriteBooleanValue(DisableVpnEncryption.Value);
 61            }
 062            if (VirtualHubs != null)
 63            {
 064                writer.WritePropertyName("virtualHubs");
 065                writer.WriteStartArray();
 066                foreach (var item in VirtualHubs)
 67                {
 068                    writer.WriteObjectValue(item);
 69                }
 070                writer.WriteEndArray();
 71            }
 072            if (VpnSites != null)
 73            {
 074                writer.WritePropertyName("vpnSites");
 075                writer.WriteStartArray();
 076                foreach (var item in VpnSites)
 77                {
 078                    writer.WriteObjectValue(item);
 79                }
 080                writer.WriteEndArray();
 81            }
 082            if (AllowBranchToBranchTraffic != null)
 83            {
 084                writer.WritePropertyName("allowBranchToBranchTraffic");
 085                writer.WriteBooleanValue(AllowBranchToBranchTraffic.Value);
 86            }
 087            if (AllowVnetToVnetTraffic != null)
 88            {
 089                writer.WritePropertyName("allowVnetToVnetTraffic");
 090                writer.WriteBooleanValue(AllowVnetToVnetTraffic.Value);
 91            }
 092            if (Office365LocalBreakoutCategory != null)
 93            {
 094                writer.WritePropertyName("office365LocalBreakoutCategory");
 095                writer.WriteStringValue(Office365LocalBreakoutCategory.Value.ToString());
 96            }
 097            if (ProvisioningState != null)
 98            {
 099                writer.WritePropertyName("provisioningState");
 0100                writer.WriteStringValue(ProvisioningState.Value.ToString());
 101            }
 0102            if (TypePropertiesType != null)
 103            {
 0104                writer.WritePropertyName("type");
 0105                writer.WriteStringValue(TypePropertiesType);
 106            }
 0107            writer.WriteEndObject();
 0108            writer.WriteEndObject();
 0109        }
 110
 111        internal static VirtualWAN DeserializeVirtualWAN(JsonElement element)
 112        {
 0113            string etag = default;
 0114            string id = default;
 0115            string name = default;
 0116            string type = default;
 0117            string location = default;
 0118            IDictionary<string, string> tags = default;
 0119            bool? disableVpnEncryption = default;
 0120            IList<SubResource> virtualHubs = default;
 0121            IList<SubResource> vpnSites = default;
 0122            bool? allowBranchToBranchTraffic = default;
 0123            bool? allowVnetToVnetTraffic = default;
 0124            OfficeTrafficCategory? office365LocalBreakoutCategory = default;
 0125            ProvisioningState? provisioningState = default;
 0126            string type0 = default;
 0127            foreach (var property in element.EnumerateObject())
 128            {
 0129                if (property.NameEquals("etag"))
 130                {
 0131                    if (property.Value.ValueKind == JsonValueKind.Null)
 132                    {
 133                        continue;
 134                    }
 0135                    etag = property.Value.GetString();
 0136                    continue;
 137                }
 0138                if (property.NameEquals("id"))
 139                {
 0140                    if (property.Value.ValueKind == JsonValueKind.Null)
 141                    {
 142                        continue;
 143                    }
 0144                    id = property.Value.GetString();
 0145                    continue;
 146                }
 0147                if (property.NameEquals("name"))
 148                {
 0149                    if (property.Value.ValueKind == JsonValueKind.Null)
 150                    {
 151                        continue;
 152                    }
 0153                    name = property.Value.GetString();
 0154                    continue;
 155                }
 0156                if (property.NameEquals("type"))
 157                {
 0158                    if (property.Value.ValueKind == JsonValueKind.Null)
 159                    {
 160                        continue;
 161                    }
 0162                    type = property.Value.GetString();
 0163                    continue;
 164                }
 0165                if (property.NameEquals("location"))
 166                {
 0167                    if (property.Value.ValueKind == JsonValueKind.Null)
 168                    {
 169                        continue;
 170                    }
 0171                    location = property.Value.GetString();
 0172                    continue;
 173                }
 0174                if (property.NameEquals("tags"))
 175                {
 0176                    if (property.Value.ValueKind == JsonValueKind.Null)
 177                    {
 178                        continue;
 179                    }
 0180                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0181                    foreach (var property0 in property.Value.EnumerateObject())
 182                    {
 0183                        if (property0.Value.ValueKind == JsonValueKind.Null)
 184                        {
 0185                            dictionary.Add(property0.Name, null);
 186                        }
 187                        else
 188                        {
 0189                            dictionary.Add(property0.Name, property0.Value.GetString());
 190                        }
 191                    }
 0192                    tags = dictionary;
 0193                    continue;
 194                }
 0195                if (property.NameEquals("properties"))
 196                {
 0197                    foreach (var property0 in property.Value.EnumerateObject())
 198                    {
 0199                        if (property0.NameEquals("disableVpnEncryption"))
 200                        {
 0201                            if (property0.Value.ValueKind == JsonValueKind.Null)
 202                            {
 203                                continue;
 204                            }
 0205                            disableVpnEncryption = property0.Value.GetBoolean();
 0206                            continue;
 207                        }
 0208                        if (property0.NameEquals("virtualHubs"))
 209                        {
 0210                            if (property0.Value.ValueKind == JsonValueKind.Null)
 211                            {
 212                                continue;
 213                            }
 0214                            List<SubResource> array = new List<SubResource>();
 0215                            foreach (var item in property0.Value.EnumerateArray())
 216                            {
 0217                                if (item.ValueKind == JsonValueKind.Null)
 218                                {
 0219                                    array.Add(null);
 220                                }
 221                                else
 222                                {
 0223                                    array.Add(SubResource.DeserializeSubResource(item));
 224                                }
 225                            }
 0226                            virtualHubs = array;
 0227                            continue;
 228                        }
 0229                        if (property0.NameEquals("vpnSites"))
 230                        {
 0231                            if (property0.Value.ValueKind == JsonValueKind.Null)
 232                            {
 233                                continue;
 234                            }
 0235                            List<SubResource> array = new List<SubResource>();
 0236                            foreach (var item in property0.Value.EnumerateArray())
 237                            {
 0238                                if (item.ValueKind == JsonValueKind.Null)
 239                                {
 0240                                    array.Add(null);
 241                                }
 242                                else
 243                                {
 0244                                    array.Add(SubResource.DeserializeSubResource(item));
 245                                }
 246                            }
 0247                            vpnSites = array;
 0248                            continue;
 249                        }
 0250                        if (property0.NameEquals("allowBranchToBranchTraffic"))
 251                        {
 0252                            if (property0.Value.ValueKind == JsonValueKind.Null)
 253                            {
 254                                continue;
 255                            }
 0256                            allowBranchToBranchTraffic = property0.Value.GetBoolean();
 0257                            continue;
 258                        }
 0259                        if (property0.NameEquals("allowVnetToVnetTraffic"))
 260                        {
 0261                            if (property0.Value.ValueKind == JsonValueKind.Null)
 262                            {
 263                                continue;
 264                            }
 0265                            allowVnetToVnetTraffic = property0.Value.GetBoolean();
 0266                            continue;
 267                        }
 0268                        if (property0.NameEquals("office365LocalBreakoutCategory"))
 269                        {
 0270                            if (property0.Value.ValueKind == JsonValueKind.Null)
 271                            {
 272                                continue;
 273                            }
 0274                            office365LocalBreakoutCategory = new OfficeTrafficCategory(property0.Value.GetString());
 0275                            continue;
 276                        }
 0277                        if (property0.NameEquals("provisioningState"))
 278                        {
 0279                            if (property0.Value.ValueKind == JsonValueKind.Null)
 280                            {
 281                                continue;
 282                            }
 0283                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0284                            continue;
 285                        }
 0286                        if (property0.NameEquals("type"))
 287                        {
 0288                            if (property0.Value.ValueKind == JsonValueKind.Null)
 289                            {
 290                                continue;
 291                            }
 0292                            type0 = property0.Value.GetString();
 293                            continue;
 294                        }
 295                    }
 296                    continue;
 297                }
 298            }
 0299            return new VirtualWAN(id, name, type, location, tags, etag, disableVpnEncryption, virtualHubs, vpnSites, all
 300        }
 301    }
 302}