< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineUpdate.Serialization.cs
Covered lines:38
Uncovered lines:82
Coverable lines:120
Total lines:247
Line coverage:31.6% (38 of 120)
Covered branches:24
Total branches:46
Branch coverage:52.1% (24 of 46)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Plan()-0%100%
get_Identity()-0%100%
get_Zones()-0%100%
get_HardwareProfile()-0%100%
get_StorageProfile()-0%100%
get_AdditionalCapabilities()-0%100%
get_OsProfile()-0%100%
get_NetworkProfile()-0%100%
get_DiagnosticsProfile()-0%100%
get_AvailabilitySet()-0%100%
get_VirtualMachineScaleSet()-0%100%
get_ProximityPlacementGroup()-0%100%
get_Priority()-0%100%
get_EvictionPolicy()-0%100%
get_BillingProfile()-0%100%
get_Host()-0%100%
get_ProvisioningState()-100%100%
get_InstanceView()-100%100%
get_LicenseType()-0%100%
get_VmId()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-43.42%52.17%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineUpdate.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> Describes a Virtual Machine Update. </summary>
 13    public partial class VirtualMachineUpdate : UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineUpdate. </summary>
 416        public VirtualMachineUpdate()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="plan"> Specifies information about the marketplace image used to create the virtual machine. Th
 23        /// <param name="identity"> The identity of the virtual machine, if configured. </param>
 24        /// <param name="zones"> The virtual machine zones. </param>
 25        /// <param name="hardwareProfile"> Specifies the hardware settings for the virtual machine. </param>
 26        /// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
 27        /// <param name="additionalCapabilities"> Specifies additional capabilities enabled or disabled on the virtual m
 28        /// <param name="osProfile"> Specifies the operating system settings used while creating the virtual machine. So
 29        /// <param name="networkProfile"> Specifies the network interfaces of the virtual machine. </param>
 30        /// <param name="diagnosticsProfile"> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum 
 31        /// <param name="availabilitySet"> Specifies information about the availability set that the virtual machine sho
 32        /// <param name="virtualMachineScaleSet"> Specifies information about the virtual machine scale set that the vir
 33        /// <param name="proximityPlacementGroup"> Specifies information about the proximity placement group that the vi
 34        /// <param name="priority"> Specifies the priority for the virtual machine. &lt;br&gt;&lt;br&gt;Minimum api-vers
 35        /// <param name="evictionPolicy"> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spo
 36        /// <param name="billingProfile"> Specifies the billing related details of a Azure Spot virtual machine. &lt;br&
 37        /// <param name="host"> Specifies information about the dedicated host that the virtual machine resides in. &lt;
 38        /// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
 39        /// <param name="instanceView"> The virtual machine instance view. </param>
 40        /// <param name="licenseType"> Specifies that the image or disk that is being used was licensed on-premises. Thi
 41        /// <param name="vmId"> Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in 
 042        internal VirtualMachineUpdate(IDictionary<string, string> tags, Plan plan, VirtualMachineIdentity identity, ILis
 43        {
 044            Plan = plan;
 045            Identity = identity;
 046            Zones = zones;
 047            HardwareProfile = hardwareProfile;
 048            StorageProfile = storageProfile;
 049            AdditionalCapabilities = additionalCapabilities;
 050            OsProfile = osProfile;
 051            NetworkProfile = networkProfile;
 052            DiagnosticsProfile = diagnosticsProfile;
 053            AvailabilitySet = availabilitySet;
 054            VirtualMachineScaleSet = virtualMachineScaleSet;
 055            ProximityPlacementGroup = proximityPlacementGroup;
 056            Priority = priority;
 057            EvictionPolicy = evictionPolicy;
 058            BillingProfile = billingProfile;
 059            Host = host;
 060            ProvisioningState = provisioningState;
 061            InstanceView = instanceView;
 062            LicenseType = licenseType;
 063            VmId = vmId;
 064        }
 65
 66        /// <summary> Specifies information about the marketplace image used to create the virtual machine. This element
 067        public Plan Plan { get; set; }
 68        /// <summary> The identity of the virtual machine, if configured. </summary>
 069        public VirtualMachineIdentity Identity { get; set; }
 70        /// <summary> The virtual machine zones. </summary>
 071        public IList<string> Zones { get; set; }
 72        /// <summary> Specifies the hardware settings for the virtual machine. </summary>
 073        public HardwareProfile HardwareProfile { get; set; }
 74        /// <summary> Specifies the storage settings for the virtual machine disks. </summary>
 075        public StorageProfile StorageProfile { get; set; }
 76        /// <summary> Specifies additional capabilities enabled or disabled on the virtual machine. </summary>
 077        public AdditionalCapabilities AdditionalCapabilities { get; set; }
 78        /// <summary> Specifies the operating system settings used while creating the virtual machine. Some of the setti
 079        public OSProfile OsProfile { get; set; }
 80        /// <summary> Specifies the network interfaces of the virtual machine. </summary>
 081        public NetworkProfile NetworkProfile { get; set; }
 82        /// <summary> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum api-version: 2015-06-15.
 083        public DiagnosticsProfile DiagnosticsProfile { get; set; }
 84        /// <summary> Specifies information about the availability set that the virtual machine should be assigned to. V
 085        public SubResource AvailabilitySet { get; set; }
 86        /// <summary> Specifies information about the virtual machine scale set that the virtual machine should be assig
 087        public SubResource VirtualMachineScaleSet { get; set; }
 88        /// <summary> Specifies information about the proximity placement group that the virtual machine should be assig
 089        public SubResource ProximityPlacementGroup { get; set; }
 90        /// <summary> Specifies the priority for the virtual machine. &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-0
 091        public VirtualMachinePriorityTypes? Priority { get; set; }
 92        /// <summary> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. &lt;br&
 093        public VirtualMachineEvictionPolicyTypes? EvictionPolicy { get; set; }
 94        /// <summary> Specifies the billing related details of a Azure Spot virtual machine. &lt;br&gt;&lt;br&gt;Minimum
 095        public BillingProfile BillingProfile { get; set; }
 96        /// <summary> Specifies information about the dedicated host that the virtual machine resides in. &lt;br&gt;&lt;
 097        public SubResource Host { get; set; }
 98        /// <summary> The provisioning state, which only appears in the response. </summary>
 899        public string ProvisioningState { get; }
 100        /// <summary> The virtual machine instance view. </summary>
 8101        public VirtualMachineInstanceView InstanceView { get; }
 102        /// <summary> Specifies that the image or disk that is being used was licensed on-premises. This element is only
 0103        public string LicenseType { get; set; }
 104        /// <summary> Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure 
 8105        public string VmId { get; }
 106    }
 107}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineUpdate.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 VirtualMachineUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Plan != null)
 19            {
 020                writer.WritePropertyName("plan");
 021                writer.WriteObjectValue(Plan);
 22            }
 823            if (Identity != null)
 24            {
 025                writer.WritePropertyName("identity");
 026                writer.WriteObjectValue(Identity);
 27            }
 828            if (Zones != null)
 29            {
 030                writer.WritePropertyName("zones");
 031                writer.WriteStartArray();
 032                foreach (var item in Zones)
 33                {
 034                    writer.WriteStringValue(item);
 35                }
 036                writer.WriteEndArray();
 37            }
 838            if (Tags != null)
 39            {
 840                writer.WritePropertyName("tags");
 841                writer.WriteStartObject();
 6442                foreach (var item in Tags)
 43                {
 2444                    writer.WritePropertyName(item.Key);
 2445                    writer.WriteStringValue(item.Value);
 46                }
 847                writer.WriteEndObject();
 48            }
 849            writer.WritePropertyName("properties");
 850            writer.WriteStartObject();
 851            if (HardwareProfile != null)
 52            {
 053                writer.WritePropertyName("hardwareProfile");
 054                writer.WriteObjectValue(HardwareProfile);
 55            }
 856            if (StorageProfile != null)
 57            {
 058                writer.WritePropertyName("storageProfile");
 059                writer.WriteObjectValue(StorageProfile);
 60            }
 861            if (AdditionalCapabilities != null)
 62            {
 063                writer.WritePropertyName("additionalCapabilities");
 064                writer.WriteObjectValue(AdditionalCapabilities);
 65            }
 866            if (OsProfile != null)
 67            {
 068                writer.WritePropertyName("osProfile");
 069                writer.WriteObjectValue(OsProfile);
 70            }
 871            if (NetworkProfile != null)
 72            {
 073                writer.WritePropertyName("networkProfile");
 074                writer.WriteObjectValue(NetworkProfile);
 75            }
 876            if (DiagnosticsProfile != null)
 77            {
 078                writer.WritePropertyName("diagnosticsProfile");
 079                writer.WriteObjectValue(DiagnosticsProfile);
 80            }
 881            if (AvailabilitySet != null)
 82            {
 083                writer.WritePropertyName("availabilitySet");
 084                writer.WriteObjectValue(AvailabilitySet);
 85            }
 886            if (VirtualMachineScaleSet != null)
 87            {
 088                writer.WritePropertyName("virtualMachineScaleSet");
 089                writer.WriteObjectValue(VirtualMachineScaleSet);
 90            }
 891            if (ProximityPlacementGroup != null)
 92            {
 093                writer.WritePropertyName("proximityPlacementGroup");
 094                writer.WriteObjectValue(ProximityPlacementGroup);
 95            }
 896            if (Priority != null)
 97            {
 098                writer.WritePropertyName("priority");
 099                writer.WriteStringValue(Priority.Value.ToString());
 100            }
 8101            if (EvictionPolicy != null)
 102            {
 0103                writer.WritePropertyName("evictionPolicy");
 0104                writer.WriteStringValue(EvictionPolicy.Value.ToString());
 105            }
 8106            if (BillingProfile != null)
 107            {
 0108                writer.WritePropertyName("billingProfile");
 0109                writer.WriteObjectValue(BillingProfile);
 110            }
 8111            if (Host != null)
 112            {
 0113                writer.WritePropertyName("host");
 0114                writer.WriteObjectValue(Host);
 115            }
 8116            if (ProvisioningState != null)
 117            {
 0118                writer.WritePropertyName("provisioningState");
 0119                writer.WriteStringValue(ProvisioningState);
 120            }
 8121            if (InstanceView != null)
 122            {
 0123                writer.WritePropertyName("instanceView");
 0124                writer.WriteObjectValue(InstanceView);
 125            }
 8126            if (LicenseType != null)
 127            {
 0128                writer.WritePropertyName("licenseType");
 0129                writer.WriteStringValue(LicenseType);
 130            }
 8131            if (VmId != null)
 132            {
 0133                writer.WritePropertyName("vmId");
 0134                writer.WriteStringValue(VmId);
 135            }
 8136            writer.WriteEndObject();
 8137            writer.WriteEndObject();
 8138        }
 139    }
 140}