< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DataDiskImageEncryption.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 encryption settings for a data disk image. </summary>
 11    public partial class DataDiskImageEncryption : DiskImageEncryption
 12    {
 13        /// <summary> Initializes a new instance of DataDiskImageEncryption. </summary>
 14        /// <param name="lun"> This property specifies the logical unit number of the data disk. This value is used to i
 015        public DataDiskImageEncryption(int lun)
 16        {
 017            Lun = lun;
 018        }
 19
 20        /// <summary> Initializes a new instance of DataDiskImageEncryption. </summary>
 21        /// <param name="diskEncryptionSetId"> A relative URI containing the resource ID of the disk encryption set. </p
 22        /// <param name="lun"> This property specifies the logical unit number of the data disk. This value is used to i
 023        internal DataDiskImageEncryption(string diskEncryptionSetId, int lun) : base(diskEncryptionSetId)
 24        {
 025            Lun = lun;
 026        }
 27
 28        /// <summary> This property specifies the logical unit number of the data disk. This value is used to identify d
 029        public int Lun { get; set; }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DataDiskImageEncryption.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 DataDiskImageEncryption : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("lun");
 019            writer.WriteNumberValue(Lun);
 020            if (DiskEncryptionSetId != null)
 21            {
 022                writer.WritePropertyName("diskEncryptionSetId");
 023                writer.WriteStringValue(DiskEncryptionSetId);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static DataDiskImageEncryption DeserializeDataDiskImageEncryption(JsonElement element)
 29        {
 030            int lun = default;
 031            string diskEncryptionSetId = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("lun"))
 35                {
 036                    lun = property.Value.GetInt32();
 037                    continue;
 38                }
 039                if (property.NameEquals("diskEncryptionSetId"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    diskEncryptionSetId = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 049            return new DataDiskImageEncryption(diskEncryptionSetId, lun);
 50        }
 51    }
 52}