< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetManagedDiskParameters
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetManagedDiskParameters.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetManagedDiskParameters.Serialization.cs
Covered lines:23
Uncovered lines:5
Coverable lines:28
Total lines:91
Line coverage:82.1% (23 of 28)
Covered branches:10
Total branches:14
Branch coverage:71.4% (10 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_StorageAccountType()-100%100%
get_DiskEncryptionSet()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-77.78%75%
DeserializeVirtualMachineScaleSetManagedDiskParameters(...)-72.73%70%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetManagedDiskParameters.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 the parameters of a ScaleSet managed disk. </summary>
 11    public partial class VirtualMachineScaleSetManagedDiskParameters
 12    {
 13        /// <summary> Initializes a new instance of VirtualMachineScaleSetManagedDiskParameters. </summary>
 814        public VirtualMachineScaleSetManagedDiskParameters()
 15        {
 816        }
 17
 18        /// <summary> Initializes a new instance of VirtualMachineScaleSetManagedDiskParameters. </summary>
 19        /// <param name="storageAccountType"> Specifies the storage account type for the managed disk. NOTE: UltraSSD_LR
 20        /// <param name="diskEncryptionSet"> Specifies the customer managed disk encryption set resource id for the mana
 60021        internal VirtualMachineScaleSetManagedDiskParameters(StorageAccountTypes? storageAccountType, SubResource diskEn
 22        {
 60023            StorageAccountType = storageAccountType;
 60024            DiskEncryptionSet = diskEncryptionSet;
 60025        }
 26
 27        /// <summary> Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with 
 92828        public StorageAccountTypes? StorageAccountType { get; set; }
 29        /// <summary> Specifies the customer managed disk encryption set resource id for the managed disk. </summary>
 61630        public SubResource DiskEncryptionSet { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetManagedDiskParameters.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 VirtualMachineScaleSetManagedDiskParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            if (StorageAccountType != null)
 19            {
 1620                writer.WritePropertyName("storageAccountType");
 1621                writer.WriteStringValue(StorageAccountType.Value.ToString());
 22            }
 1623            if (DiskEncryptionSet != null)
 24            {
 025                writer.WritePropertyName("diskEncryptionSet");
 026                writer.WriteObjectValue(DiskEncryptionSet);
 27            }
 1628            writer.WriteEndObject();
 1629        }
 30
 31        internal static VirtualMachineScaleSetManagedDiskParameters DeserializeVirtualMachineScaleSetManagedDiskParamete
 32        {
 60033            StorageAccountTypes? storageAccountType = default;
 60034            SubResource diskEncryptionSet = default;
 240035            foreach (var property in element.EnumerateObject())
 36            {
 60037                if (property.NameEquals("storageAccountType"))
 38                {
 60039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 60043                    storageAccountType = new StorageAccountTypes(property.Value.GetString());
 60044                    continue;
 45                }
 046                if (property.NameEquals("diskEncryptionSet"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    diskEncryptionSet = SubResource.DeserializeSubResource(property.Value);
 53                    continue;
 54                }
 55            }
 60056            return new VirtualMachineScaleSetManagedDiskParameters(storageAccountType, diskEncryptionSet);
 57        }
 58    }
 59}