< Summary

Class:Azure.ResourceManager.Network.Models.Subnet
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Subnet.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Subnet.Serialization.cs
Covered lines:173
Uncovered lines:128
Coverable lines:301
Total lines:632
Line coverage:57.4% (173 of 301)
Covered branches:105
Total branches:192
Branch coverage:54.6% (105 of 192)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_Name()-100%100%
get_Etag()-100%100%
get_AddressPrefix()-100%100%
get_AddressPrefixes()-100%100%
get_NetworkSecurityGroup()-100%100%
get_RouteTable()-100%100%
get_NatGateway()-100%100%
get_ServiceEndpoints()-100%100%
get_ServiceEndpointPolicies()-100%100%
get_PrivateEndpoints()-100%100%
get_IpConfigurations()-100%100%
get_IpConfigurationProfiles()-100%100%
get_IpAllocations()-100%100%
get_ResourceNavigationLinks()-100%100%
get_ServiceAssociationLinks()-100%100%
get_Delegations()-100%100%
get_Purpose()-100%100%
get_ProvisioningState()-100%100%
get_PrivateEndpointNetworkPolicies()-100%100%
get_PrivateLinkServiceNetworkPolicies()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-46.46%50%
DeserializeSubnet(...)-52.53%56.92%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Subnet.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> Subnet in a virtual network resource. </summary>
 13    public partial class Subnet : SubResource
 14    {
 15        /// <summary> Initializes a new instance of Subnet. </summary>
 20416        public Subnet()
 17        {
 20418        }
 19
 20        /// <summary> Initializes a new instance of Subnet. </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="addressPrefix"> The address prefix for the subnet. </param>
 25        /// <param name="addressPrefixes"> List of address prefixes for the subnet. </param>
 26        /// <param name="networkSecurityGroup"> The reference to the NetworkSecurityGroup resource. </param>
 27        /// <param name="routeTable"> The reference to the RouteTable resource. </param>
 28        /// <param name="natGateway"> Nat gateway associated with this subnet. </param>
 29        /// <param name="serviceEndpoints"> An array of service endpoints. </param>
 30        /// <param name="serviceEndpointPolicies"> An array of service endpoint policies. </param>
 31        /// <param name="privateEndpoints"> An array of references to private endpoints. </param>
 32        /// <param name="ipConfigurations"> An array of references to the network interface IP configurations using subn
 33        /// <param name="ipConfigurationProfiles"> Array of IP configuration profiles which reference this subnet. </par
 34        /// <param name="ipAllocations"> Array of IpAllocation which reference this subnet. </param>
 35        /// <param name="resourceNavigationLinks"> An array of references to the external resources using subnet. </para
 36        /// <param name="serviceAssociationLinks"> An array of references to services injecting into this subnet. </para
 37        /// <param name="delegations"> An array of references to the delegations on the subnet. </param>
 38        /// <param name="purpose"> A read-only string identifying the intention of use for this subnet based on delegati
 39        /// <param name="provisioningState"> The provisioning state of the subnet resource. </param>
 40        /// <param name="privateEndpointNetworkPolicies"> Enable or Disable apply network policies on private end point 
 41        /// <param name="privateLinkServiceNetworkPolicies"> Enable or Disable apply network policies on private link se
 70842        internal Subnet(string id, string name, string etag, string addressPrefix, IList<string> addressPrefixes, Networ
 43        {
 70844            Name = name;
 70845            Etag = etag;
 70846            AddressPrefix = addressPrefix;
 70847            AddressPrefixes = addressPrefixes;
 70848            NetworkSecurityGroup = networkSecurityGroup;
 70849            RouteTable = routeTable;
 70850            NatGateway = natGateway;
 70851            ServiceEndpoints = serviceEndpoints;
 70852            ServiceEndpointPolicies = serviceEndpointPolicies;
 70853            PrivateEndpoints = privateEndpoints;
 70854            IpConfigurations = ipConfigurations;
 70855            IpConfigurationProfiles = ipConfigurationProfiles;
 70856            IpAllocations = ipAllocations;
 70857            ResourceNavigationLinks = resourceNavigationLinks;
 70858            ServiceAssociationLinks = serviceAssociationLinks;
 70859            Delegations = delegations;
 70860            Purpose = purpose;
 70861            ProvisioningState = provisioningState;
 70862            PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies;
 70863            PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies;
 70864        }
 65
 66        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 172067        public string Name { get; set; }
 68        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 60469        public string Etag { get; }
 70        /// <summary> The address prefix for the subnet. </summary>
 170471        public string AddressPrefix { get; set; }
 72        /// <summary> List of address prefixes for the subnet. </summary>
 123673        public IList<string> AddressPrefixes { get; set; }
 74        /// <summary> The reference to the NetworkSecurityGroup resource. </summary>
 123675        public NetworkSecurityGroup NetworkSecurityGroup { get; set; }
 76        /// <summary> The reference to the RouteTable resource. </summary>
 125277        public RouteTable RouteTable { get; set; }
 78        /// <summary> Nat gateway associated with this subnet. </summary>
 123679        public SubResource NatGateway { get; set; }
 80        /// <summary> An array of service endpoints. </summary>
 123681        public IList<ServiceEndpointPropertiesFormat> ServiceEndpoints { get; set; }
 82        /// <summary> An array of service endpoint policies. </summary>
 123683        public IList<ServiceEndpointPolicy> ServiceEndpointPolicies { get; set; }
 84        /// <summary> An array of references to private endpoints. </summary>
 52885        public IList<PrivateEndpoint> PrivateEndpoints { get; }
 86        /// <summary> An array of references to the network interface IP configurations using subnet. </summary>
 53687        public IList<IPConfiguration> IpConfigurations { get; }
 88        /// <summary> Array of IP configuration profiles which reference this subnet. </summary>
 52889        public IList<IPConfigurationProfile> IpConfigurationProfiles { get; }
 90        /// <summary> Array of IpAllocation which reference this subnet. </summary>
 123691        public IList<SubResource> IpAllocations { get; set; }
 92        /// <summary> An array of references to the external resources using subnet. </summary>
 52893        public IList<ResourceNavigationLink> ResourceNavigationLinks { get; }
 94        /// <summary> An array of references to services injecting into this subnet. </summary>
 52895        public IList<ServiceAssociationLink> ServiceAssociationLinks { get; }
 96        /// <summary> An array of references to the delegations on the subnet. </summary>
 128497        public IList<Delegation> Delegations { get; set; }
 98        /// <summary> A read-only string identifying the intention of use for this subnet based on delegations and other
 52899        public string Purpose { get; }
 100        /// <summary> The provisioning state of the subnet resource. </summary>
 600101        public ProvisioningState? ProvisioningState { get; }
 102        /// <summary> Enable or Disable apply network policies on private end point in the subnet. </summary>
 1284103        public string PrivateEndpointNetworkPolicies { get; set; }
 104        /// <summary> Enable or Disable apply network policies on private link service in the subnet. </summary>
 1284105        public string PrivateLinkServiceNetworkPolicies { get; set; }
 106    }
 107}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Subnet.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 Subnet : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 52818            writer.WriteStartObject();
 52819            if (Name != null)
 20            {
 31221                writer.WritePropertyName("name");
 31222                writer.WriteStringValue(Name);
 23            }
 52824            if (Etag != null)
 25            {
 4826                writer.WritePropertyName("etag");
 4827                writer.WriteStringValue(Etag);
 28            }
 52829            if (Id != null)
 30            {
 26431                writer.WritePropertyName("id");
 26432                writer.WriteStringValue(Id);
 33            }
 52834            writer.WritePropertyName("properties");
 52835            writer.WriteStartObject();
 52836            if (AddressPrefix != null)
 37            {
 31238                writer.WritePropertyName("addressPrefix");
 31239                writer.WriteStringValue(AddressPrefix);
 40            }
 52841            if (AddressPrefixes != null)
 42            {
 043                writer.WritePropertyName("addressPrefixes");
 044                writer.WriteStartArray();
 045                foreach (var item in AddressPrefixes)
 46                {
 047                    writer.WriteStringValue(item);
 48                }
 049                writer.WriteEndArray();
 50            }
 52851            if (NetworkSecurityGroup != null)
 52            {
 053                writer.WritePropertyName("networkSecurityGroup");
 054                writer.WriteObjectValue(NetworkSecurityGroup);
 55            }
 52856            if (RouteTable != null)
 57            {
 858                writer.WritePropertyName("routeTable");
 859                writer.WriteObjectValue(RouteTable);
 60            }
 52861            if (NatGateway != null)
 62            {
 063                writer.WritePropertyName("natGateway");
 064                writer.WriteObjectValue(NatGateway);
 65            }
 52866            if (ServiceEndpoints != null)
 67            {
 068                writer.WritePropertyName("serviceEndpoints");
 069                writer.WriteStartArray();
 070                foreach (var item in ServiceEndpoints)
 71                {
 072                    writer.WriteObjectValue(item);
 73                }
 074                writer.WriteEndArray();
 75            }
 52876            if (ServiceEndpointPolicies != null)
 77            {
 078                writer.WritePropertyName("serviceEndpointPolicies");
 079                writer.WriteStartArray();
 080                foreach (var item in ServiceEndpointPolicies)
 81                {
 082                    writer.WriteObjectValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 52886            if (PrivateEndpoints != null)
 87            {
 088                writer.WritePropertyName("privateEndpoints");
 089                writer.WriteStartArray();
 090                foreach (var item in PrivateEndpoints)
 91                {
 092                    writer.WriteObjectValue(item);
 93                }
 094                writer.WriteEndArray();
 95            }
 52896            if (IpConfigurations != null)
 97            {
 098                writer.WritePropertyName("ipConfigurations");
 099                writer.WriteStartArray();
 0100                foreach (var item in IpConfigurations)
 101                {
 0102                    writer.WriteObjectValue(item);
 103                }
 0104                writer.WriteEndArray();
 105            }
 528106            if (IpConfigurationProfiles != null)
 107            {
 0108                writer.WritePropertyName("ipConfigurationProfiles");
 0109                writer.WriteStartArray();
 0110                foreach (var item in IpConfigurationProfiles)
 111                {
 0112                    writer.WriteObjectValue(item);
 113                }
 0114                writer.WriteEndArray();
 115            }
 528116            if (IpAllocations != null)
 117            {
 0118                writer.WritePropertyName("ipAllocations");
 0119                writer.WriteStartArray();
 0120                foreach (var item in IpAllocations)
 121                {
 0122                    writer.WriteObjectValue(item);
 123                }
 0124                writer.WriteEndArray();
 125            }
 528126            if (ResourceNavigationLinks != null)
 127            {
 0128                writer.WritePropertyName("resourceNavigationLinks");
 0129                writer.WriteStartArray();
 0130                foreach (var item in ResourceNavigationLinks)
 131                {
 0132                    writer.WriteObjectValue(item);
 133                }
 0134                writer.WriteEndArray();
 135            }
 528136            if (ServiceAssociationLinks != null)
 137            {
 0138                writer.WritePropertyName("serviceAssociationLinks");
 0139                writer.WriteStartArray();
 0140                foreach (var item in ServiceAssociationLinks)
 141                {
 0142                    writer.WriteObjectValue(item);
 143                }
 0144                writer.WriteEndArray();
 145            }
 528146            if (Delegations != null)
 147            {
 48148                writer.WritePropertyName("delegations");
 48149                writer.WriteStartArray();
 0150                foreach (var item in Delegations)
 151                {
 0152                    writer.WriteObjectValue(item);
 153                }
 48154                writer.WriteEndArray();
 155            }
 528156            if (Purpose != null)
 157            {
 0158                writer.WritePropertyName("purpose");
 0159                writer.WriteStringValue(Purpose);
 160            }
 528161            if (ProvisioningState != null)
 162            {
 48163                writer.WritePropertyName("provisioningState");
 48164                writer.WriteStringValue(ProvisioningState.Value.ToString());
 165            }
 528166            if (PrivateEndpointNetworkPolicies != null)
 167            {
 48168                writer.WritePropertyName("privateEndpointNetworkPolicies");
 48169                writer.WriteStringValue(PrivateEndpointNetworkPolicies);
 170            }
 528171            if (PrivateLinkServiceNetworkPolicies != null)
 172            {
 48173                writer.WritePropertyName("privateLinkServiceNetworkPolicies");
 48174                writer.WriteStringValue(PrivateLinkServiceNetworkPolicies);
 175            }
 528176            writer.WriteEndObject();
 528177            writer.WriteEndObject();
 528178        }
 179
 180        internal static Subnet DeserializeSubnet(JsonElement element)
 181        {
 708182            string name = default;
 708183            string etag = default;
 708184            string id = default;
 708185            string addressPrefix = default;
 708186            IList<string> addressPrefixes = default;
 708187            NetworkSecurityGroup networkSecurityGroup = default;
 708188            RouteTable routeTable = default;
 708189            SubResource natGateway = default;
 708190            IList<ServiceEndpointPropertiesFormat> serviceEndpoints = default;
 708191            IList<ServiceEndpointPolicy> serviceEndpointPolicies = default;
 708192            IList<PrivateEndpoint> privateEndpoints = default;
 708193            IList<IPConfiguration> ipConfigurations = default;
 708194            IList<IPConfigurationProfile> ipConfigurationProfiles = default;
 708195            IList<SubResource> ipAllocations = default;
 708196            IList<ResourceNavigationLink> resourceNavigationLinks = default;
 708197            IList<ServiceAssociationLink> serviceAssociationLinks = default;
 708198            IList<Delegation> delegations = default;
 708199            string purpose = default;
 708200            ProvisioningState? provisioningState = default;
 708201            string privateEndpointNetworkPolicies = default;
 708202            string privateLinkServiceNetworkPolicies = default;
 5232203            foreach (var property in element.EnumerateObject())
 204            {
 1908205                if (property.NameEquals("name"))
 206                {
 300207                    if (property.Value.ValueKind == JsonValueKind.Null)
 208                    {
 209                        continue;
 210                    }
 300211                    name = property.Value.GetString();
 300212                    continue;
 213                }
 1608214                if (property.NameEquals("etag"))
 215                {
 300216                    if (property.Value.ValueKind == JsonValueKind.Null)
 217                    {
 218                        continue;
 219                    }
 300220                    etag = property.Value.GetString();
 300221                    continue;
 222                }
 1308223                if (property.NameEquals("id"))
 224                {
 708225                    if (property.Value.ValueKind == JsonValueKind.Null)
 226                    {
 227                        continue;
 228                    }
 708229                    id = property.Value.GetString();
 708230                    continue;
 231                }
 600232                if (property.NameEquals("properties"))
 233                {
 3664234                    foreach (var property0 in property.Value.EnumerateObject())
 235                    {
 1532236                        if (property0.NameEquals("addressPrefix"))
 237                        {
 300238                            if (property0.Value.ValueKind == JsonValueKind.Null)
 239                            {
 240                                continue;
 241                            }
 300242                            addressPrefix = property0.Value.GetString();
 300243                            continue;
 244                        }
 1232245                        if (property0.NameEquals("addressPrefixes"))
 246                        {
 0247                            if (property0.Value.ValueKind == JsonValueKind.Null)
 248                            {
 249                                continue;
 250                            }
 0251                            List<string> array = new List<string>();
 0252                            foreach (var item in property0.Value.EnumerateArray())
 253                            {
 0254                                if (item.ValueKind == JsonValueKind.Null)
 255                                {
 0256                                    array.Add(null);
 257                                }
 258                                else
 259                                {
 0260                                    array.Add(item.GetString());
 261                                }
 262                            }
 0263                            addressPrefixes = array;
 0264                            continue;
 265                        }
 1232266                        if (property0.NameEquals("networkSecurityGroup"))
 267                        {
 4268                            if (property0.Value.ValueKind == JsonValueKind.Null)
 269                            {
 270                                continue;
 271                            }
 4272                            networkSecurityGroup = NetworkSecurityGroup.DeserializeNetworkSecurityGroup(property0.Value)
 4273                            continue;
 274                        }
 1228275                        if (property0.NameEquals("routeTable"))
 276                        {
 8277                            if (property0.Value.ValueKind == JsonValueKind.Null)
 278                            {
 279                                continue;
 280                            }
 8281                            routeTable = RouteTable.DeserializeRouteTable(property0.Value);
 8282                            continue;
 283                        }
 1220284                        if (property0.NameEquals("natGateway"))
 285                        {
 0286                            if (property0.Value.ValueKind == JsonValueKind.Null)
 287                            {
 288                                continue;
 289                            }
 0290                            natGateway = DeserializeSubResource(property0.Value);
 0291                            continue;
 292                        }
 1220293                        if (property0.NameEquals("serviceEndpoints"))
 294                        {
 0295                            if (property0.Value.ValueKind == JsonValueKind.Null)
 296                            {
 297                                continue;
 298                            }
 0299                            List<ServiceEndpointPropertiesFormat> array = new List<ServiceEndpointPropertiesFormat>();
 0300                            foreach (var item in property0.Value.EnumerateArray())
 301                            {
 0302                                if (item.ValueKind == JsonValueKind.Null)
 303                                {
 0304                                    array.Add(null);
 305                                }
 306                                else
 307                                {
 0308                                    array.Add(ServiceEndpointPropertiesFormat.DeserializeServiceEndpointPropertiesFormat
 309                                }
 310                            }
 0311                            serviceEndpoints = array;
 0312                            continue;
 313                        }
 1220314                        if (property0.NameEquals("serviceEndpointPolicies"))
 315                        {
 0316                            if (property0.Value.ValueKind == JsonValueKind.Null)
 317                            {
 318                                continue;
 319                            }
 0320                            List<ServiceEndpointPolicy> array = new List<ServiceEndpointPolicy>();
 0321                            foreach (var item in property0.Value.EnumerateArray())
 322                            {
 0323                                if (item.ValueKind == JsonValueKind.Null)
 324                                {
 0325                                    array.Add(null);
 326                                }
 327                                else
 328                                {
 0329                                    array.Add(ServiceEndpointPolicy.DeserializeServiceEndpointPolicy(item));
 330                                }
 331                            }
 0332                            serviceEndpointPolicies = array;
 0333                            continue;
 334                        }
 1220335                        if (property0.NameEquals("privateEndpoints"))
 336                        {
 0337                            if (property0.Value.ValueKind == JsonValueKind.Null)
 338                            {
 339                                continue;
 340                            }
 0341                            List<PrivateEndpoint> array = new List<PrivateEndpoint>();
 0342                            foreach (var item in property0.Value.EnumerateArray())
 343                            {
 0344                                if (item.ValueKind == JsonValueKind.Null)
 345                                {
 0346                                    array.Add(null);
 347                                }
 348                                else
 349                                {
 0350                                    array.Add(PrivateEndpoint.DeserializePrivateEndpoint(item));
 351                                }
 352                            }
 0353                            privateEndpoints = array;
 0354                            continue;
 355                        }
 1220356                        if (property0.NameEquals("ipConfigurations"))
 357                        {
 20358                            if (property0.Value.ValueKind == JsonValueKind.Null)
 359                            {
 360                                continue;
 361                            }
 20362                            List<IPConfiguration> array = new List<IPConfiguration>();
 144363                            foreach (var item in property0.Value.EnumerateArray())
 364                            {
 52365                                if (item.ValueKind == JsonValueKind.Null)
 366                                {
 0367                                    array.Add(null);
 368                                }
 369                                else
 370                                {
 52371                                    array.Add(IPConfiguration.DeserializeIPConfiguration(item));
 372                                }
 373                            }
 20374                            ipConfigurations = array;
 20375                            continue;
 376                        }
 1200377                        if (property0.NameEquals("ipConfigurationProfiles"))
 378                        {
 0379                            if (property0.Value.ValueKind == JsonValueKind.Null)
 380                            {
 381                                continue;
 382                            }
 0383                            List<IPConfigurationProfile> array = new List<IPConfigurationProfile>();
 0384                            foreach (var item in property0.Value.EnumerateArray())
 385                            {
 0386                                if (item.ValueKind == JsonValueKind.Null)
 387                                {
 0388                                    array.Add(null);
 389                                }
 390                                else
 391                                {
 0392                                    array.Add(IPConfigurationProfile.DeserializeIPConfigurationProfile(item));
 393                                }
 394                            }
 0395                            ipConfigurationProfiles = array;
 0396                            continue;
 397                        }
 1200398                        if (property0.NameEquals("ipAllocations"))
 399                        {
 0400                            if (property0.Value.ValueKind == JsonValueKind.Null)
 401                            {
 402                                continue;
 403                            }
 0404                            List<SubResource> array = new List<SubResource>();
 0405                            foreach (var item in property0.Value.EnumerateArray())
 406                            {
 0407                                if (item.ValueKind == JsonValueKind.Null)
 408                                {
 0409                                    array.Add(null);
 410                                }
 411                                else
 412                                {
 0413                                    array.Add(DeserializeSubResource(item));
 414                                }
 415                            }
 0416                            ipAllocations = array;
 0417                            continue;
 418                        }
 1200419                        if (property0.NameEquals("resourceNavigationLinks"))
 420                        {
 0421                            if (property0.Value.ValueKind == JsonValueKind.Null)
 422                            {
 423                                continue;
 424                            }
 0425                            List<ResourceNavigationLink> array = new List<ResourceNavigationLink>();
 0426                            foreach (var item in property0.Value.EnumerateArray())
 427                            {
 0428                                if (item.ValueKind == JsonValueKind.Null)
 429                                {
 0430                                    array.Add(null);
 431                                }
 432                                else
 433                                {
 0434                                    array.Add(ResourceNavigationLink.DeserializeResourceNavigationLink(item));
 435                                }
 436                            }
 0437                            resourceNavigationLinks = array;
 0438                            continue;
 439                        }
 1200440                        if (property0.NameEquals("serviceAssociationLinks"))
 441                        {
 0442                            if (property0.Value.ValueKind == JsonValueKind.Null)
 443                            {
 444                                continue;
 445                            }
 0446                            List<ServiceAssociationLink> array = new List<ServiceAssociationLink>();
 0447                            foreach (var item in property0.Value.EnumerateArray())
 448                            {
 0449                                if (item.ValueKind == JsonValueKind.Null)
 450                                {
 0451                                    array.Add(null);
 452                                }
 453                                else
 454                                {
 0455                                    array.Add(ServiceAssociationLink.DeserializeServiceAssociationLink(item));
 456                                }
 457                            }
 0458                            serviceAssociationLinks = array;
 0459                            continue;
 460                        }
 1200461                        if (property0.NameEquals("delegations"))
 462                        {
 300463                            if (property0.Value.ValueKind == JsonValueKind.Null)
 464                            {
 465                                continue;
 466                            }
 300467                            List<Delegation> array = new List<Delegation>();
 0468                            foreach (var item in property0.Value.EnumerateArray())
 469                            {
 0470                                if (item.ValueKind == JsonValueKind.Null)
 471                                {
 0472                                    array.Add(null);
 473                                }
 474                                else
 475                                {
 0476                                    array.Add(Delegation.DeserializeDelegation(item));
 477                                }
 478                            }
 300479                            delegations = array;
 300480                            continue;
 481                        }
 900482                        if (property0.NameEquals("purpose"))
 483                        {
 0484                            if (property0.Value.ValueKind == JsonValueKind.Null)
 485                            {
 486                                continue;
 487                            }
 0488                            purpose = property0.Value.GetString();
 0489                            continue;
 490                        }
 900491                        if (property0.NameEquals("provisioningState"))
 492                        {
 300493                            if (property0.Value.ValueKind == JsonValueKind.Null)
 494                            {
 495                                continue;
 496                            }
 300497                            provisioningState = new ProvisioningState(property0.Value.GetString());
 300498                            continue;
 499                        }
 600500                        if (property0.NameEquals("privateEndpointNetworkPolicies"))
 501                        {
 300502                            if (property0.Value.ValueKind == JsonValueKind.Null)
 503                            {
 504                                continue;
 505                            }
 300506                            privateEndpointNetworkPolicies = property0.Value.GetString();
 300507                            continue;
 508                        }
 300509                        if (property0.NameEquals("privateLinkServiceNetworkPolicies"))
 510                        {
 300511                            if (property0.Value.ValueKind == JsonValueKind.Null)
 512                            {
 513                                continue;
 514                            }
 300515                            privateLinkServiceNetworkPolicies = property0.Value.GetString();
 516                            continue;
 517                        }
 518                    }
 519                    continue;
 520                }
 521            }
 708522            return new Subnet(id, name, etag, addressPrefix, addressPrefixes, networkSecurityGroup, routeTable, natGatew
 523        }
 524    }
 525}