< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceSkuZoneDetails
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuZoneDetails.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuZoneDetails.Serialization.cs
Covered lines:17
Uncovered lines:12
Coverable lines:29
Total lines:102
Line coverage:58.6% (17 of 29)
Covered branches:11
Total branches:18
Branch coverage:61.1% (11 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Name()-0%100%
get_Capabilities()-100%100%
DeserializeResourceSkuZoneDetails(...)-57.14%61.11%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuZoneDetails.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> Describes The zonal capabilities of a SKU. </summary>
 13    public partial class ResourceSkuZoneDetails
 14    {
 15        /// <summary> Initializes a new instance of ResourceSkuZoneDetails. </summary>
 016        internal ResourceSkuZoneDetails()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ResourceSkuZoneDetails. </summary>
 21        /// <param name="name"> The set of zones that the SKU is available in with the specified capabilities. </param>
 22        /// <param name="capabilities"> A list of capabilities that are available for the SKU in the specified list of z
 388023        internal ResourceSkuZoneDetails(IReadOnlyList<string> name, IReadOnlyList<ResourceSkuCapabilities> capabilities)
 24        {
 388025            Name = name;
 388026            Capabilities = capabilities;
 388027        }
 28
 29        /// <summary> The set of zones that the SKU is available in with the specified capabilities. </summary>
 030        public IReadOnlyList<string> Name { get; }
 31        /// <summary> A list of capabilities that are available for the SKU in the specified list of zones. </summary>
 1632        public IReadOnlyList<ResourceSkuCapabilities> Capabilities { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuZoneDetails.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 ResourceSkuZoneDetails
 15    {
 16        internal static ResourceSkuZoneDetails DeserializeResourceSkuZoneDetails(JsonElement element)
 17        {
 388018            IReadOnlyList<string> name = default;
 388019            IReadOnlyList<ResourceSkuCapabilities> capabilities = default;
 2328020            foreach (var property in element.EnumerateObject())
 21            {
 776022                if (property.NameEquals("name"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    List<string> array = new List<string>();
 029                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 031                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 037                            array.Add(item.GetString());
 38                        }
 39                    }
 040                    name = array;
 041                    continue;
 42                }
 776043                if (property.NameEquals("capabilities"))
 44                {
 388045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 388049                    List<ResourceSkuCapabilities> array = new List<ResourceSkuCapabilities>();
 1552050                    foreach (var item in property.Value.EnumerateArray())
 51                    {
 388052                        if (item.ValueKind == JsonValueKind.Null)
 53                        {
 054                            array.Add(null);
 55                        }
 56                        else
 57                        {
 388058                            array.Add(ResourceSkuCapabilities.DeserializeResourceSkuCapabilities(item));
 59                        }
 60                    }
 388061                    capabilities = array;
 62                    continue;
 63                }
 64            }
 388065            return new ResourceSkuZoneDetails(name, capabilities);
 66        }
 67    }
 68}