< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceSkuLocationInfo
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuLocationInfo.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuLocationInfo.Serialization.cs
Covered lines:31
Uncovered lines:5
Coverable lines:36
Total lines:116
Line coverage:86.1% (31 of 36)
Covered branches:20
Total branches:22
Branch coverage:90.9% (20 of 22)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Location()-100%100%
get_Zones()-0%100%
get_ZoneDetails()-100%100%
DeserializeResourceSkuLocationInfo(...)-92.31%90.91%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuLocationInfo.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.Compute.Models
 11{
 12    /// <summary> The ResourceSkuLocationInfo. </summary>
 13    public partial class ResourceSkuLocationInfo
 14    {
 15        /// <summary> Initializes a new instance of ResourceSkuLocationInfo. </summary>
 016        internal ResourceSkuLocationInfo()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ResourceSkuLocationInfo. </summary>
 21        /// <param name="location"> Location of the SKU. </param>
 22        /// <param name="zones"> List of availability zones where the SKU is supported. </param>
 23        /// <param name="zoneDetails"> Details of capabilities available to a SKU in specific zones. </param>
 4080024        internal ResourceSkuLocationInfo(string location, IReadOnlyList<string> zones, IReadOnlyList<ResourceSkuZoneDeta
 25        {
 4080026            Location = location;
 4080027            Zones = zones;
 4080028            ZoneDetails = zoneDetails;
 4080029        }
 30
 31        /// <summary> Location of the SKU. </summary>
 2032        public string Location { get; }
 33        /// <summary> List of availability zones where the SKU is supported. </summary>
 034        public IReadOnlyList<string> Zones { get; }
 35        /// <summary> Details of capabilities available to a SKU in specific zones. </summary>
 2836        public IReadOnlyList<ResourceSkuZoneDetails> ZoneDetails { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuLocationInfo.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.Compute.Models
 13{
 14    public partial class ResourceSkuLocationInfo
 15    {
 16        internal static ResourceSkuLocationInfo DeserializeResourceSkuLocationInfo(JsonElement element)
 17        {
 4080018            string location = default;
 4080019            IReadOnlyList<string> zones = default;
 4080020            IReadOnlyList<ResourceSkuZoneDetails> zoneDetails = default;
 32640021            foreach (var property in element.EnumerateObject())
 22            {
 12240023                if (property.NameEquals("location"))
 24                {
 4080025                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 4080029                    location = property.Value.GetString();
 4080030                    continue;
 31                }
 8160032                if (property.NameEquals("zones"))
 33                {
 4080034                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 4080038                    List<string> array = new List<string>();
 14469239                    foreach (var item in property.Value.EnumerateArray())
 40                    {
 3154641                        if (item.ValueKind == JsonValueKind.Null)
 42                        {
 043                            array.Add(null);
 44                        }
 45                        else
 46                        {
 3154647                            array.Add(item.GetString());
 48                        }
 49                    }
 4080050                    zones = array;
 4080051                    continue;
 52                }
 4080053                if (property.NameEquals("zoneDetails"))
 54                {
 4080055                    if (property.Value.ValueKind == JsonValueKind.Null)
 56                    {
 57                        continue;
 58                    }
 4080059                    List<ResourceSkuZoneDetails> array = new List<ResourceSkuZoneDetails>();
 8936060                    foreach (var item in property.Value.EnumerateArray())
 61                    {
 388062                        if (item.ValueKind == JsonValueKind.Null)
 63                        {
 064                            array.Add(null);
 65                        }
 66                        else
 67                        {
 388068                            array.Add(ResourceSkuZoneDetails.DeserializeResourceSkuZoneDetails(item));
 69                        }
 70                    }
 4080071                    zoneDetails = array;
 72                    continue;
 73                }
 74            }
 4080075            return new ResourceSkuLocationInfo(location, zones, zoneDetails);
 76        }
 77    }
 78}