< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Lun()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDataDiskImage(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DataDiskImage.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> Contains the data disk images information. </summary>
 11    public partial class DataDiskImage
 12    {
 13        /// <summary> Initializes a new instance of DataDiskImage. </summary>
 014        public DataDiskImage()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DataDiskImage. </summary>
 19        /// <param name="lun"> Specifies the logical unit number of the data disk. This value is used to identify data d
 020        internal DataDiskImage(int? lun)
 21        {
 022            Lun = lun;
 023        }
 24
 25        /// <summary> Specifies the logical unit number of the data disk. This value is used to identify data disks with
 026        public int? Lun { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DataDiskImage.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 DataDiskImage : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Lun != null)
 19            {
 020                writer.WritePropertyName("lun");
 021                writer.WriteNumberValue(Lun.Value);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static DataDiskImage DeserializeDataDiskImage(JsonElement element)
 27        {
 028            int? lun = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("lun"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    lun = property.Value.GetInt32();
 38                    continue;
 39                }
 40            }
 041            return new DataDiskImage(lun);
 42        }
 43    }
 44}