< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_MeterID()-0%100%
get_Quantity()-0%100%
get_ExtendedUnit()-0%100%
DeserializeResourceSkuCosts(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCosts.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 metadata for retrieving price info. </summary>
 11    public partial class ResourceSkuCosts
 12    {
 13        /// <summary> Initializes a new instance of ResourceSkuCosts. </summary>
 014        internal ResourceSkuCosts()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ResourceSkuCosts. </summary>
 19        /// <param name="meterID"> Used for querying price from commerce. </param>
 20        /// <param name="quantity"> The multiplier is needed to extend the base metered cost. </param>
 21        /// <param name="extendedUnit"> An invariant to show the extended unit. </param>
 022        internal ResourceSkuCosts(string meterID, long? quantity, string extendedUnit)
 23        {
 024            MeterID = meterID;
 025            Quantity = quantity;
 026            ExtendedUnit = extendedUnit;
 027        }
 28
 29        /// <summary> Used for querying price from commerce. </summary>
 030        public string MeterID { get; }
 31        /// <summary> The multiplier is needed to extend the base metered cost. </summary>
 032        public long? Quantity { get; }
 33        /// <summary> An invariant to show the extended unit. </summary>
 034        public string ExtendedUnit { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCosts.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 ResourceSkuCosts
 14    {
 15        internal static ResourceSkuCosts DeserializeResourceSkuCosts(JsonElement element)
 16        {
 017            string meterID = default;
 018            long? quantity = default;
 019            string extendedUnit = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("meterID"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    meterID = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("quantity"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    quantity = property.Value.GetInt64();
 038                    continue;
 39                }
 040                if (property.NameEquals("extendedUnit"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    extendedUnit = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new ResourceSkuCosts(meterID, quantity, extendedUnit);
 51        }
 52    }
 53}