< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceSkuCapacity
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacity.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacity.Serialization.cs
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:103
Line coverage:0% (0 of 33)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Minimum()-0%100%
get_Maximum()-0%100%
get_Default()-0%100%
get_ScaleType()-0%100%
DeserializeResourceSkuCapacity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacity.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
 8namespace Azure.ResourceManager.Compute.Models
 9{
 10    /// <summary> Describes scaling information of a SKU. </summary>
 11    public partial class ResourceSkuCapacity
 12    {
 13        /// <summary> Initializes a new instance of ResourceSkuCapacity. </summary>
 014        internal ResourceSkuCapacity()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ResourceSkuCapacity. </summary>
 19        /// <param name="minimum"> The minimum capacity. </param>
 20        /// <param name="maximum"> The maximum capacity that can be set. </param>
 21        /// <param name="default"> The default capacity. </param>
 22        /// <param name="scaleType"> The scale type applicable to the sku. </param>
 023        internal ResourceSkuCapacity(long? minimum, long? maximum, long? @default, ResourceSkuCapacityScaleType? scaleTy
 24        {
 025            Minimum = minimum;
 026            Maximum = maximum;
 027            Default = @default;
 028            ScaleType = scaleType;
 029        }
 30
 31        /// <summary> The minimum capacity. </summary>
 032        public long? Minimum { get; }
 33        /// <summary> The maximum capacity that can be set. </summary>
 034        public long? Maximum { get; }
 35        /// <summary> The default capacity. </summary>
 036        public long? Default { get; }
 37        /// <summary> The scale type applicable to the sku. </summary>
 038        public ResourceSkuCapacityScaleType? ScaleType { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacity.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Compute.Models
 12{
 13    public partial class ResourceSkuCapacity
 14    {
 15        internal static ResourceSkuCapacity DeserializeResourceSkuCapacity(JsonElement element)
 16        {
 017            long? minimum = default;
 018            long? maximum = default;
 019            long? @default = default;
 020            ResourceSkuCapacityScaleType? scaleType = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("minimum"))
 24                {
 025                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 029                    minimum = property.Value.GetInt64();
 030                    continue;
 31                }
 032                if (property.NameEquals("maximum"))
 33                {
 034                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 038                    maximum = property.Value.GetInt64();
 039                    continue;
 40                }
 041                if (property.NameEquals("default"))
 42                {
 043                    if (property.Value.ValueKind == JsonValueKind.Null)
 44                    {
 45                        continue;
 46                    }
 047                    @default = property.Value.GetInt64();
 048                    continue;
 49                }
 050                if (property.NameEquals("scaleType"))
 51                {
 052                    if (property.Value.ValueKind == JsonValueKind.Null)
 53                    {
 54                        continue;
 55                    }
 056                    scaleType = property.Value.GetString().ToResourceSkuCapacityScaleType();
 57                    continue;
 58                }
 59            }
 060            return new ResourceSkuCapacity(minimum, maximum, @default, scaleType);
 61        }
 62    }
 63}