< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_CountryName()-0%100%
get_Providers()-0%100%
get_States()-0%100%
DeserializeAvailableProvidersListCountry(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCountry.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> Country details. </summary>
 13    public partial class AvailableProvidersListCountry
 14    {
 15        /// <summary> Initializes a new instance of AvailableProvidersListCountry. </summary>
 016        internal AvailableProvidersListCountry()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of AvailableProvidersListCountry. </summary>
 21        /// <param name="countryName"> The country name. </param>
 22        /// <param name="providers"> A list of Internet service providers. </param>
 23        /// <param name="states"> List of available states in the country. </param>
 024        internal AvailableProvidersListCountry(string countryName, IReadOnlyList<string> providers, IReadOnlyList<Availa
 25        {
 026            CountryName = countryName;
 027            Providers = providers;
 028            States = states;
 029        }
 30
 31        /// <summary> The country name. </summary>
 032        public string CountryName { get; }
 33        /// <summary> A list of Internet service providers. </summary>
 034        public IReadOnlyList<string> Providers { get; }
 35        /// <summary> List of available states in the country. </summary>
 036        public IReadOnlyList<AvailableProvidersListState> States { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCountry.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 AvailableProvidersListCountry
 15    {
 16        internal static AvailableProvidersListCountry DeserializeAvailableProvidersListCountry(JsonElement element)
 17        {
 018            string countryName = default;
 019            IReadOnlyList<string> providers = default;
 020            IReadOnlyList<AvailableProvidersListState> states = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("countryName"))
 24                {
 025                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 029                    countryName = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("providers"))
 33                {
 034                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 038                    List<string> array = new List<string>();
 039                    foreach (var item in property.Value.EnumerateArray())
 40                    {
 041                        if (item.ValueKind == JsonValueKind.Null)
 42                        {
 043                            array.Add(null);
 44                        }
 45                        else
 46                        {
 047                            array.Add(item.GetString());
 48                        }
 49                    }
 050                    providers = array;
 051                    continue;
 52                }
 053                if (property.NameEquals("states"))
 54                {
 055                    if (property.Value.ValueKind == JsonValueKind.Null)
 56                    {
 57                        continue;
 58                    }
 059                    List<AvailableProvidersListState> array = new List<AvailableProvidersListState>();
 060                    foreach (var item in property.Value.EnumerateArray())
 61                    {
 062                        if (item.ValueKind == JsonValueKind.Null)
 63                        {
 064                            array.Add(null);
 65                        }
 66                        else
 67                        {
 068                            array.Add(AvailableProvidersListState.DeserializeAvailableProvidersListState(item));
 69                        }
 70                    }
 071                    states = array;
 72                    continue;
 73                }
 74            }
 075            return new AvailableProvidersListCountry(countryName, providers, states);
 76        }
 77    }
 78}