< Summary

Class:Azure.ResourceManager.Compute.Models.DiskUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskUpdate.Serialization.cs
Covered lines:35
Uncovered lines:34
Coverable lines:69
Total lines:155
Line coverage:50.7% (35 of 69)
Covered branches:17
Total branches:24
Branch coverage:70.8% (17 of 24)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Tags()-100%100%
get_Sku()-100%100%
get_OsType()-0%100%
get_DiskSizeGB()-0%100%
get_EncryptionSettingsCollection()-0%100%
get_DiskIopsReadWrite()-100%100%
get_DiskMBpsReadWrite()-100%100%
get_DiskIopsReadOnly()-0%100%
get_DiskMBpsReadOnly()-0%100%
get_MaxShares()-0%100%
get_Encryption()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-67.44%70.83%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskUpdate.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Compute.Models
 11{
 12    /// <summary> Disk update resource. </summary>
 13    public partial class DiskUpdate
 14    {
 15        /// <summary> Initializes a new instance of DiskUpdate. </summary>
 1216        public DiskUpdate()
 17        {
 1218        }
 19
 20        /// <summary> Initializes a new instance of DiskUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="sku"> The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. <
 23        /// <param name="osType"> the Operating System type. </param>
 24        /// <param name="diskSizeGB"> If creationData.createOption is Empty, this field is mandatory and it indicates th
 25        /// <param name="encryptionSettingsCollection"> Encryption settings collection used be Azure Disk Encryption, ca
 26        /// <param name="diskIopsReadWrite"> The number of IOPS allowed for this disk; only settable for UltraSSD disks.
 27        /// <param name="diskMBpsReadWrite"> The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps
 28        /// <param name="diskIopsReadOnly"> The total number of IOPS that will be allowed across all VMs mounting the sh
 29        /// <param name="diskMBpsReadOnly"> The total throughput (MBps) that will be allowed across all VMs mounting the
 30        /// <param name="maxShares"> The maximum number of VMs that can attach to the disk at the same time. Value great
 31        /// <param name="encryption"> Encryption property can be used to encrypt data at rest with customer managed keys
 032        internal DiskUpdate(IDictionary<string, string> tags, DiskSku sku, OperatingSystemTypes? osType, int? diskSizeGB
 33        {
 034            Tags = tags;
 035            Sku = sku;
 036            OsType = osType;
 037            DiskSizeGB = diskSizeGB;
 038            EncryptionSettingsCollection = encryptionSettingsCollection;
 039            DiskIopsReadWrite = diskIopsReadWrite;
 040            DiskMBpsReadWrite = diskMBpsReadWrite;
 041            DiskIopsReadOnly = diskIopsReadOnly;
 042            DiskMBpsReadOnly = diskMBpsReadOnly;
 043            MaxShares = maxShares;
 044            Encryption = encryption;
 045        }
 46
 47        /// <summary> Resource tags. </summary>
 6048        public IDictionary<string, string> Tags { get; set; }
 49        /// <summary> The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. </summary>
 3650        public DiskSku Sku { get; set; }
 51        /// <summary> the Operating System type. </summary>
 052        public OperatingSystemTypes? OsType { get; set; }
 53        /// <summary> If creationData.createOption is Empty, this field is mandatory and it indicates the size of the di
 054        public int? DiskSizeGB { get; set; }
 55        /// <summary> Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption sett
 056        public EncryptionSettingsCollection EncryptionSettingsCollection { get; set; }
 57        /// <summary> The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can tran
 4458        public long? DiskIopsReadWrite { get; set; }
 59        /// <summary> The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of byte
 4460        public long? DiskMBpsReadWrite { get; set; }
 61        /// <summary> The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly.
 062        public long? DiskIopsReadOnly { get; set; }
 63        /// <summary> The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOn
 064        public long? DiskMBpsReadOnly { get; set; }
 65        /// <summary> The maximum number of VMs that can attach to the disk at the same time. Value greater than one ind
 066        public int? MaxShares { get; set; }
 67        /// <summary> Encryption property can be used to encrypt data at rest with customer managed keys or platform man
 068        public Encryption Encryption { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskUpdate.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 DiskUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 2417            writer.WriteStartObject();
 2418            if (Tags != null)
 19            {
 2420                writer.WritePropertyName("tags");
 2421                writer.WriteStartObject();
 9622                foreach (var item in Tags)
 23                {
 2424                    writer.WritePropertyName(item.Key);
 2425                    writer.WriteStringValue(item.Value);
 26                }
 2427                writer.WriteEndObject();
 28            }
 2429            if (Sku != null)
 30            {
 831                writer.WritePropertyName("sku");
 832                writer.WriteObjectValue(Sku);
 33            }
 2434            writer.WritePropertyName("properties");
 2435            writer.WriteStartObject();
 2436            if (OsType != null)
 37            {
 038                writer.WritePropertyName("osType");
 039                writer.WriteStringValue(OsType.Value.ToSerialString());
 40            }
 2441            if (DiskSizeGB != null)
 42            {
 043                writer.WritePropertyName("diskSizeGB");
 044                writer.WriteNumberValue(DiskSizeGB.Value);
 45            }
 2446            if (EncryptionSettingsCollection != null)
 47            {
 048                writer.WritePropertyName("encryptionSettingsCollection");
 049                writer.WriteObjectValue(EncryptionSettingsCollection);
 50            }
 2451            if (DiskIopsReadWrite != null)
 52            {
 853                writer.WritePropertyName("diskIOPSReadWrite");
 854                writer.WriteNumberValue(DiskIopsReadWrite.Value);
 55            }
 2456            if (DiskMBpsReadWrite != null)
 57            {
 858                writer.WritePropertyName("diskMBpsReadWrite");
 859                writer.WriteNumberValue(DiskMBpsReadWrite.Value);
 60            }
 2461            if (DiskIopsReadOnly != null)
 62            {
 063                writer.WritePropertyName("diskIOPSReadOnly");
 064                writer.WriteNumberValue(DiskIopsReadOnly.Value);
 65            }
 2466            if (DiskMBpsReadOnly != null)
 67            {
 068                writer.WritePropertyName("diskMBpsReadOnly");
 069                writer.WriteNumberValue(DiskMBpsReadOnly.Value);
 70            }
 2471            if (MaxShares != null)
 72            {
 073                writer.WritePropertyName("maxShares");
 074                writer.WriteNumberValue(MaxShares.Value);
 75            }
 2476            if (Encryption != null)
 77            {
 078                writer.WritePropertyName("encryption");
 079                writer.WriteObjectValue(Encryption);
 80            }
 2481            writer.WriteEndObject();
 2482            writer.WriteEndObject();
 2483        }
 84    }
 85}