< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_OsProfile()-100%100%
get_StorageProfile()-100%100%
get_NetworkProfile()-100%100%
get_DiagnosticsProfile()-100%100%
get_ExtensionProfile()-100%100%
get_LicenseType()-100%100%
get_Priority()-100%100%
get_EvictionPolicy()-100%100%
get_BillingProfile()-100%100%
get_ScheduledEventsProfile()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeVirtualMachineScaleSetVMProfile(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMProfile.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 a virtual machine scale set virtual machine profile. </summary>
 11    public partial class VirtualMachineScaleSetVMProfile
 12    {
 13        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMProfile. </summary>
 16014        public VirtualMachineScaleSetVMProfile()
 15        {
 16016        }
 17
 18        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMProfile. </summary>
 19        /// <param name="osProfile"> Specifies the operating system settings for the virtual machines in the scale set. 
 20        /// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
 21        /// <param name="networkProfile"> Specifies properties of the network interfaces of the virtual machines in the 
 22        /// <param name="diagnosticsProfile"> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum 
 23        /// <param name="extensionProfile"> Specifies a collection of settings for extensions installed on virtual machi
 24        /// <param name="licenseType"> Specifies that the image or disk that is being used was licensed on-premises. Thi
 25        /// <param name="priority"> Specifies the priority for the virtual machines in the scale set. &lt;br&gt;&lt;br&g
 26        /// <param name="evictionPolicy"> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spo
 27        /// <param name="billingProfile"> Specifies the billing related details of a Azure Spot VMSS. &lt;br&gt;&lt;br&g
 28        /// <param name="scheduledEventsProfile"> Specifies Scheduled Event related configurations. </param>
 44829        internal VirtualMachineScaleSetVMProfile(VirtualMachineScaleSetOSProfile osProfile, VirtualMachineScaleSetStorag
 30        {
 44831            OsProfile = osProfile;
 44832            StorageProfile = storageProfile;
 44833            NetworkProfile = networkProfile;
 44834            DiagnosticsProfile = diagnosticsProfile;
 44835            ExtensionProfile = extensionProfile;
 44836            LicenseType = licenseType;
 44837            Priority = priority;
 44838            EvictionPolicy = evictionPolicy;
 44839            BillingProfile = billingProfile;
 44840            ScheduledEventsProfile = scheduledEventsProfile;
 44841        }
 42
 43        /// <summary> Specifies the operating system settings for the virtual machines in the scale set. </summary>
 174844        public VirtualMachineScaleSetOSProfile OsProfile { get; set; }
 45        /// <summary> Specifies the storage settings for the virtual machine disks. </summary>
 421646        public VirtualMachineScaleSetStorageProfile StorageProfile { get; set; }
 47        /// <summary> Specifies properties of the network interfaces of the virtual machines in the scale set. </summary
 372848        public VirtualMachineScaleSetNetworkProfile NetworkProfile { get; set; }
 49        /// <summary> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum api-version: 2015-06-15.
 82850        public DiagnosticsProfile DiagnosticsProfile { get; set; }
 51        /// <summary> Specifies a collection of settings for extensions installed on virtual machines in the scale set. 
 148852        public VirtualMachineScaleSetExtensionProfile ExtensionProfile { get; set; }
 53        /// <summary> Specifies that the image or disk that is being used was licensed on-premises. This element is only
 82854        public string LicenseType { get; set; }
 55        /// <summary> Specifies the priority for the virtual machines in the scale set. &lt;br&gt;&lt;br&gt;Minimum api-
 90856        public VirtualMachinePriorityTypes? Priority { get; set; }
 57        /// <summary> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. &lt;br&
 84458        public VirtualMachineEvictionPolicyTypes? EvictionPolicy { get; set; }
 59        /// <summary> Specifies the billing related details of a Azure Spot VMSS. &lt;br&gt;&lt;br&gt;Minimum api-versio
 85260        public BillingProfile BillingProfile { get; set; }
 61        /// <summary> Specifies Scheduled Event related configurations. </summary>
 83262        public ScheduledEventsProfile ScheduledEventsProfile { get; set; }
 63    }
 64}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMProfile.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 VirtualMachineScaleSetVMProfile : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 36417            writer.WriteStartObject();
 36418            if (OsProfile != null)
 19            {
 36420                writer.WritePropertyName("osProfile");
 36421                writer.WriteObjectValue(OsProfile);
 22            }
 36423            if (StorageProfile != null)
 24            {
 36425                writer.WritePropertyName("storageProfile");
 36426                writer.WriteObjectValue(StorageProfile);
 27            }
 36428            if (NetworkProfile != null)
 29            {
 36430                writer.WritePropertyName("networkProfile");
 36431                writer.WriteObjectValue(NetworkProfile);
 32            }
 36433            if (DiagnosticsProfile != null)
 34            {
 835                writer.WritePropertyName("diagnosticsProfile");
 836                writer.WriteObjectValue(DiagnosticsProfile);
 37            }
 36438            if (ExtensionProfile != null)
 39            {
 840                writer.WritePropertyName("extensionProfile");
 841                writer.WriteObjectValue(ExtensionProfile);
 42            }
 36443            if (LicenseType != null)
 44            {
 845                writer.WritePropertyName("licenseType");
 846                writer.WriteStringValue(LicenseType);
 47            }
 36448            if (Priority != null)
 49            {
 4850                writer.WritePropertyName("priority");
 4851                writer.WriteStringValue(Priority.Value.ToString());
 52            }
 36453            if (EvictionPolicy != null)
 54            {
 855                writer.WritePropertyName("evictionPolicy");
 856                writer.WriteStringValue(EvictionPolicy.Value.ToString());
 57            }
 36458            if (BillingProfile != null)
 59            {
 1660                writer.WritePropertyName("billingProfile");
 1661                writer.WriteObjectValue(BillingProfile);
 62            }
 36463            if (ScheduledEventsProfile != null)
 64            {
 865                writer.WritePropertyName("scheduledEventsProfile");
 866                writer.WriteObjectValue(ScheduledEventsProfile);
 67            }
 36468            writer.WriteEndObject();
 36469        }
 70
 71        internal static VirtualMachineScaleSetVMProfile DeserializeVirtualMachineScaleSetVMProfile(JsonElement element)
 72        {
 44873            VirtualMachineScaleSetOSProfile osProfile = default;
 44874            VirtualMachineScaleSetStorageProfile storageProfile = default;
 44875            VirtualMachineScaleSetNetworkProfile networkProfile = default;
 44876            DiagnosticsProfile diagnosticsProfile = default;
 44877            VirtualMachineScaleSetExtensionProfile extensionProfile = default;
 44878            string licenseType = default;
 44879            VirtualMachinePriorityTypes? priority = default;
 44880            VirtualMachineEvictionPolicyTypes? evictionPolicy = default;
 44881            BillingProfile billingProfile = default;
 44882            ScheduledEventsProfile scheduledEventsProfile = default;
 493683            foreach (var property in element.EnumerateObject())
 84            {
 202085                if (property.NameEquals("osProfile"))
 86                {
 44887                    if (property.Value.ValueKind == JsonValueKind.Null)
 88                    {
 89                        continue;
 90                    }
 44891                    osProfile = VirtualMachineScaleSetOSProfile.DeserializeVirtualMachineScaleSetOSProfile(property.Valu
 44892                    continue;
 93                }
 157294                if (property.NameEquals("storageProfile"))
 95                {
 44896                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 448100                    storageProfile = VirtualMachineScaleSetStorageProfile.DeserializeVirtualMachineScaleSetStorageProfil
 448101                    continue;
 102                }
 1124103                if (property.NameEquals("networkProfile"))
 104                {
 448105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 448109                    networkProfile = VirtualMachineScaleSetNetworkProfile.DeserializeVirtualMachineScaleSetNetworkProfil
 448110                    continue;
 111                }
 676112                if (property.NameEquals("diagnosticsProfile"))
 113                {
 12114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 12118                    diagnosticsProfile = DiagnosticsProfile.DeserializeDiagnosticsProfile(property.Value);
 12119                    continue;
 120                }
 664121                if (property.NameEquals("extensionProfile"))
 122                {
 448123                    if (property.Value.ValueKind == JsonValueKind.Null)
 124                    {
 125                        continue;
 126                    }
 448127                    extensionProfile = VirtualMachineScaleSetExtensionProfile.DeserializeVirtualMachineScaleSetExtension
 448128                    continue;
 129                }
 216130                if (property.NameEquals("licenseType"))
 131                {
 12132                    if (property.Value.ValueKind == JsonValueKind.Null)
 133                    {
 134                        continue;
 135                    }
 12136                    licenseType = property.Value.GetString();
 12137                    continue;
 138                }
 204139                if (property.NameEquals("priority"))
 140                {
 72141                    if (property.Value.ValueKind == JsonValueKind.Null)
 142                    {
 143                        continue;
 144                    }
 72145                    priority = new VirtualMachinePriorityTypes(property.Value.GetString());
 72146                    continue;
 147                }
 132148                if (property.NameEquals("evictionPolicy"))
 149                {
 60150                    if (property.Value.ValueKind == JsonValueKind.Null)
 151                    {
 152                        continue;
 153                    }
 60154                    evictionPolicy = new VirtualMachineEvictionPolicyTypes(property.Value.GetString());
 60155                    continue;
 156                }
 72157                if (property.NameEquals("billingProfile"))
 158                {
 60159                    if (property.Value.ValueKind == JsonValueKind.Null)
 160                    {
 161                        continue;
 162                    }
 60163                    billingProfile = BillingProfile.DeserializeBillingProfile(property.Value);
 60164                    continue;
 165                }
 12166                if (property.NameEquals("scheduledEventsProfile"))
 167                {
 12168                    if (property.Value.ValueKind == JsonValueKind.Null)
 169                    {
 170                        continue;
 171                    }
 12172                    scheduledEventsProfile = ScheduledEventsProfile.DeserializeScheduledEventsProfile(property.Value);
 173                    continue;
 174                }
 175            }
 448176            return new VirtualMachineScaleSetVMProfile(osProfile, storageProfile, networkProfile, diagnosticsProfile, ex
 177        }
 178    }
 179}