< Summary

Class:Azure.ResourceManager.Compute.Models.DiskImageEncryption
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskImageEncryption.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskImageEncryption.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_DiskEncryptionSetId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDiskImageEncryption(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskImageEncryption.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> This is the disk image encryption base class. </summary>
 11    public partial class DiskImageEncryption
 12    {
 13        /// <summary> Initializes a new instance of DiskImageEncryption. </summary>
 014        public DiskImageEncryption()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DiskImageEncryption. </summary>
 19        /// <param name="diskEncryptionSetId"> A relative URI containing the resource ID of the disk encryption set. </p
 020        internal DiskImageEncryption(string diskEncryptionSetId)
 21        {
 022            DiskEncryptionSetId = diskEncryptionSetId;
 023        }
 24
 25        /// <summary> A relative URI containing the resource ID of the disk encryption set. </summary>
 026        public string DiskEncryptionSetId { get; set; }
 27    }
 28}

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