< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachine
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachine.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachine.Serialization.cs
Covered lines:246
Uncovered lines:42
Coverable lines:288
Total lines:596
Line coverage:85.4% (246 of 288)
Covered branches:152
Total branches:178
Branch coverage:85.3% (152 of 178)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachine.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Compute.Models
 12{
 13    /// <summary> Describes a Virtual Machine. </summary>
 14    public partial class VirtualMachine : Resource
 15    {
 16        /// <summary> Initializes a new instance of VirtualMachine. </summary>
 17        /// <param name="location"> Resource location. </param>
 018        public VirtualMachine(string location) : base(location)
 19        {
 020            if (location == null)
 21            {
 022                throw new ArgumentNullException(nameof(location));
 23            }
 024        }
 25
 26        /// <summary> Initializes a new instance of VirtualMachine. </summary>
 27        /// <param name="id"> Resource Id. </param>
 28        /// <param name="name"> Resource name. </param>
 29        /// <param name="type"> Resource type. </param>
 30        /// <param name="location"> Resource location. </param>
 31        /// <param name="tags"> Resource tags. </param>
 32        /// <param name="plan"> Specifies information about the marketplace image used to create the virtual machine. Th
 33        /// <param name="resources"> The virtual machine child extension resources. </param>
 34        /// <param name="identity"> The identity of the virtual machine, if configured. </param>
 35        /// <param name="zones"> The virtual machine zones. </param>
 36        /// <param name="hardwareProfile"> Specifies the hardware settings for the virtual machine. </param>
 37        /// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
 38        /// <param name="additionalCapabilities"> Specifies additional capabilities enabled or disabled on the virtual m
 39        /// <param name="osProfile"> Specifies the operating system settings used while creating the virtual machine. So
 40        /// <param name="networkProfile"> Specifies the network interfaces of the virtual machine. </param>
 41        /// <param name="diagnosticsProfile"> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum 
 42        /// <param name="availabilitySet"> Specifies information about the availability set that the virtual machine sho
 43        /// <param name="virtualMachineScaleSet"> Specifies information about the virtual machine scale set that the vir
 44        /// <param name="proximityPlacementGroup"> Specifies information about the proximity placement group that the vi
 45        /// <param name="priority"> Specifies the priority for the virtual machine. &lt;br&gt;&lt;br&gt;Minimum api-vers
 46        /// <param name="evictionPolicy"> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spo
 47        /// <param name="billingProfile"> Specifies the billing related details of a Azure Spot virtual machine. &lt;br&
 48        /// <param name="host"> Specifies information about the dedicated host that the virtual machine resides in. &lt;
 49        /// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
 50        /// <param name="instanceView"> The virtual machine instance view. </param>
 51        /// <param name="licenseType"> Specifies that the image or disk that is being used was licensed on-premises. Thi
 52        /// <param name="vmId"> Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in 
 46053        internal VirtualMachine(string id, string name, string type, string location, IDictionary<string, string> tags, 
 54        {
 46055            Plan = plan;
 46056            Resources = resources;
 46057            Identity = identity;
 46058            Zones = zones;
 46059            HardwareProfile = hardwareProfile;
 46060            StorageProfile = storageProfile;
 46061            AdditionalCapabilities = additionalCapabilities;
 46062            OsProfile = osProfile;
 46063            NetworkProfile = networkProfile;
 46064            DiagnosticsProfile = diagnosticsProfile;
 46065            AvailabilitySet = availabilitySet;
 46066            VirtualMachineScaleSet = virtualMachineScaleSet;
 46067            ProximityPlacementGroup = proximityPlacementGroup;
 46068            Priority = priority;
 46069            EvictionPolicy = evictionPolicy;
 46070            BillingProfile = billingProfile;
 46071            Host = host;
 46072            ProvisioningState = provisioningState;
 46073            InstanceView = instanceView;
 46074            LicenseType = licenseType;
 46075            VmId = vmId;
 46076        }
 77
 78        /// <summary> Specifies information about the marketplace image used to create the virtual machine. This element
 101679        public Plan Plan { get; set; }
 80        /// <summary> The virtual machine child extension resources. </summary>
 24481        public IList<VirtualMachineExtension> Resources { get; }
 82        /// <summary> The identity of the virtual machine, if configured. </summary>
 70483        public VirtualMachineIdentity Identity { get; set; }
 84        /// <summary> The virtual machine zones. </summary>
 71685        public IList<string> Zones { get; set; }
 86        /// <summary> Specifies the hardware settings for the virtual machine. </summary>
 127287        public HardwareProfile HardwareProfile { get; set; }
 88        /// <summary> Specifies the storage settings for the virtual machine disks. </summary>
 309689        public StorageProfile StorageProfile { get; set; }
 90        /// <summary> Specifies additional capabilities enabled or disabled on the virtual machine. </summary>
 76891        public AdditionalCapabilities AdditionalCapabilities { get; set; }
 92        /// <summary> Specifies the operating system settings used while creating the virtual machine. Some of the setti
 127693        public OSProfile OsProfile { get; set; }
 94        /// <summary> Specifies the network interfaces of the virtual machine. </summary>
 96495        public NetworkProfile NetworkProfile { get; set; }
 96        /// <summary> Specifies the boot diagnostic settings state. &lt;br&gt;&lt;br&gt;Minimum api-version: 2015-06-15.
 71697        public DiagnosticsProfile DiagnosticsProfile { get; set; }
 98        /// <summary> Specifies information about the availability set that the virtual machine should be assigned to. V
 71299        public SubResource AvailabilitySet { get; set; }
 100        /// <summary> Specifies information about the virtual machine scale set that the virtual machine should be assig
 704101        public SubResource VirtualMachineScaleSet { get; set; }
 102        /// <summary> Specifies information about the proximity placement group that the virtual machine should be assig
 856103        public SubResource ProximityPlacementGroup { get; set; }
 104        /// <summary> Specifies the priority for the virtual machine. &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-0
 904105        public VirtualMachinePriorityTypes? Priority { get; set; }
 106        /// <summary> Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. &lt;br&
 704107        public VirtualMachineEvictionPolicyTypes? EvictionPolicy { get; set; }
 108        /// <summary> Specifies the billing related details of a Azure Spot virtual machine. &lt;br&gt;&lt;br&gt;Minimum
 716109        public BillingProfile BillingProfile { get; set; }
 110        /// <summary> Specifies information about the dedicated host that the virtual machine resides in. &lt;br&gt;&lt;
 704111        public SubResource Host { get; set; }
 112        /// <summary> The provisioning state, which only appears in the response. </summary>
 416113        public string ProvisioningState { get; }
 114        /// <summary> The virtual machine instance view. </summary>
 324115        public VirtualMachineInstanceView InstanceView { get; }
 116        /// <summary> Specifies that the image or disk that is being used was licensed on-premises. This element is only
 1020117        public string LicenseType { get; set; }
 118        /// <summary> Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure 
 412119        public string VmId { get; }
 120    }
 121}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachine.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Compute.Models
 13{
 14    public partial class VirtualMachine : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 24418            writer.WriteStartObject();
 24419            if (Plan != null)
 20            {
 421                writer.WritePropertyName("plan");
 422                writer.WriteObjectValue(Plan);
 23            }
 24424            if (Resources != null)
 25            {
 026                writer.WritePropertyName("resources");
 027                writer.WriteStartArray();
 028                foreach (var item in Resources)
 29                {
 030                    writer.WriteObjectValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 24434            if (Identity != null)
 35            {
 036                writer.WritePropertyName("identity");
 037                writer.WriteObjectValue(Identity);
 38            }
 24439            if (Zones != null)
 40            {
 841                writer.WritePropertyName("zones");
 842                writer.WriteStartArray();
 3243                foreach (var item in Zones)
 44                {
 845                    writer.WriteStringValue(item);
 46                }
 847                writer.WriteEndArray();
 48            }
 24449            if (Id != null)
 50            {
 1651                writer.WritePropertyName("id");
 1652                writer.WriteStringValue(Id);
 53            }
 24454            if (Name != null)
 55            {
 24456                writer.WritePropertyName("name");
 24457                writer.WriteStringValue(Name);
 58            }
 24459            if (Type != null)
 60            {
 24461                writer.WritePropertyName("type");
 24462                writer.WriteStringValue(Type);
 63            }
 24464            writer.WritePropertyName("location");
 24465            writer.WriteStringValue(Location);
 24466            if (Tags != null)
 67            {
 24468                writer.WritePropertyName("tags");
 24469                writer.WriteStartObject();
 146470                foreach (var item in Tags)
 71                {
 48872                    writer.WritePropertyName(item.Key);
 48873                    writer.WriteStringValue(item.Value);
 74                }
 24475                writer.WriteEndObject();
 76            }
 24477            writer.WritePropertyName("properties");
 24478            writer.WriteStartObject();
 24479            if (HardwareProfile != null)
 80            {
 24481                writer.WritePropertyName("hardwareProfile");
 24482                writer.WriteObjectValue(HardwareProfile);
 83            }
 24484            if (StorageProfile != null)
 85            {
 24486                writer.WritePropertyName("storageProfile");
 24487                writer.WriteObjectValue(StorageProfile);
 88            }
 24489            if (AdditionalCapabilities != null)
 90            {
 891                writer.WritePropertyName("additionalCapabilities");
 892                writer.WriteObjectValue(AdditionalCapabilities);
 93            }
 24494            if (OsProfile != null)
 95            {
 24496                writer.WritePropertyName("osProfile");
 24497                writer.WriteObjectValue(OsProfile);
 98            }
 24499            if (NetworkProfile != null)
 100            {
 244101                writer.WritePropertyName("networkProfile");
 244102                writer.WriteObjectValue(NetworkProfile);
 103            }
 244104            if (DiagnosticsProfile != null)
 105            {
 8106                writer.WritePropertyName("diagnosticsProfile");
 8107                writer.WriteObjectValue(DiagnosticsProfile);
 108            }
 244109            if (AvailabilitySet != null)
 110            {
 0111                writer.WritePropertyName("availabilitySet");
 0112                writer.WriteObjectValue(AvailabilitySet);
 113            }
 244114            if (VirtualMachineScaleSet != null)
 115            {
 0116                writer.WritePropertyName("virtualMachineScaleSet");
 0117                writer.WriteObjectValue(VirtualMachineScaleSet);
 118            }
 244119            if (ProximityPlacementGroup != null)
 120            {
 0121                writer.WritePropertyName("proximityPlacementGroup");
 0122                writer.WriteObjectValue(ProximityPlacementGroup);
 123            }
 244124            if (Priority != null)
 125            {
 8126                writer.WritePropertyName("priority");
 8127                writer.WriteStringValue(Priority.Value.ToString());
 128            }
 244129            if (EvictionPolicy != null)
 130            {
 0131                writer.WritePropertyName("evictionPolicy");
 0132                writer.WriteStringValue(EvictionPolicy.Value.ToString());
 133            }
 244134            if (BillingProfile != null)
 135            {
 8136                writer.WritePropertyName("billingProfile");
 8137                writer.WriteObjectValue(BillingProfile);
 138            }
 244139            if (Host != null)
 140            {
 0141                writer.WritePropertyName("host");
 0142                writer.WriteObjectValue(Host);
 143            }
 244144            if (ProvisioningState != null)
 145            {
 16146                writer.WritePropertyName("provisioningState");
 16147                writer.WriteStringValue(ProvisioningState);
 148            }
 244149            if (InstanceView != null)
 150            {
 16151                writer.WritePropertyName("instanceView");
 16152                writer.WriteObjectValue(InstanceView);
 153            }
 244154            if (LicenseType != null)
 155            {
 8156                writer.WritePropertyName("licenseType");
 8157                writer.WriteStringValue(LicenseType);
 158            }
 244159            if (VmId != null)
 160            {
 16161                writer.WritePropertyName("vmId");
 16162                writer.WriteStringValue(VmId);
 163            }
 244164            writer.WriteEndObject();
 244165            writer.WriteEndObject();
 244166        }
 167
 168        internal static VirtualMachine DeserializeVirtualMachine(JsonElement element)
 169        {
 344170            Plan plan = default;
 344171            IList<VirtualMachineExtension> resources = default;
 344172            VirtualMachineIdentity identity = default;
 344173            IList<string> zones = default;
 344174            string id = default;
 344175            string name = default;
 344176            string type = default;
 344177            string location = default;
 344178            IDictionary<string, string> tags = default;
 344179            HardwareProfile hardwareProfile = default;
 344180            StorageProfile storageProfile = default;
 344181            AdditionalCapabilities additionalCapabilities = default;
 344182            OSProfile osProfile = default;
 344183            NetworkProfile networkProfile = default;
 344184            DiagnosticsProfile diagnosticsProfile = default;
 344185            SubResource availabilitySet = default;
 344186            SubResource virtualMachineScaleSet = default;
 344187            SubResource proximityPlacementGroup = default;
 344188            VirtualMachinePriorityTypes? priority = default;
 344189            VirtualMachineEvictionPolicyTypes? evictionPolicy = default;
 344190            BillingProfile billingProfile = default;
 344191            SubResource host = default;
 344192            string provisioningState = default;
 344193            VirtualMachineInstanceView instanceView = default;
 344194            string licenseType = default;
 344195            string vmId = default;
 4904196            foreach (var property in element.EnumerateObject())
 197            {
 2108198                if (property.NameEquals("plan"))
 199                {
 0200                    if (property.Value.ValueKind == JsonValueKind.Null)
 201                    {
 202                        continue;
 203                    }
 0204                    plan = Plan.DeserializePlan(property.Value);
 0205                    continue;
 206                }
 2108207                if (property.NameEquals("resources"))
 208                {
 24209                    if (property.Value.ValueKind == JsonValueKind.Null)
 210                    {
 211                        continue;
 212                    }
 24213                    List<VirtualMachineExtension> array = new List<VirtualMachineExtension>();
 112214                    foreach (var item in property.Value.EnumerateArray())
 215                    {
 32216                        if (item.ValueKind == JsonValueKind.Null)
 217                        {
 0218                            array.Add(null);
 219                        }
 220                        else
 221                        {
 32222                            array.Add(VirtualMachineExtension.DeserializeVirtualMachineExtension(item));
 223                        }
 224                    }
 24225                    resources = array;
 24226                    continue;
 227                }
 2084228                if (property.NameEquals("identity"))
 229                {
 0230                    if (property.Value.ValueKind == JsonValueKind.Null)
 231                    {
 232                        continue;
 233                    }
 0234                    identity = VirtualMachineIdentity.DeserializeVirtualMachineIdentity(property.Value);
 0235                    continue;
 236                }
 2084237                if (property.NameEquals("zones"))
 238                {
 20239                    if (property.Value.ValueKind == JsonValueKind.Null)
 240                    {
 241                        continue;
 242                    }
 20243                    List<string> array = new List<string>();
 80244                    foreach (var item in property.Value.EnumerateArray())
 245                    {
 20246                        if (item.ValueKind == JsonValueKind.Null)
 247                        {
 0248                            array.Add(null);
 249                        }
 250                        else
 251                        {
 20252                            array.Add(item.GetString());
 253                        }
 254                    }
 20255                    zones = array;
 20256                    continue;
 257                }
 2064258                if (property.NameEquals("id"))
 259                {
 344260                    if (property.Value.ValueKind == JsonValueKind.Null)
 261                    {
 262                        continue;
 263                    }
 344264                    id = property.Value.GetString();
 344265                    continue;
 266                }
 1720267                if (property.NameEquals("name"))
 268                {
 344269                    if (property.Value.ValueKind == JsonValueKind.Null)
 270                    {
 271                        continue;
 272                    }
 344273                    name = property.Value.GetString();
 344274                    continue;
 275                }
 1376276                if (property.NameEquals("type"))
 277                {
 344278                    if (property.Value.ValueKind == JsonValueKind.Null)
 279                    {
 280                        continue;
 281                    }
 344282                    type = property.Value.GetString();
 344283                    continue;
 284                }
 1032285                if (property.NameEquals("location"))
 286                {
 344287                    location = property.Value.GetString();
 344288                    continue;
 289                }
 688290                if (property.NameEquals("tags"))
 291                {
 344292                    if (property.Value.ValueKind == JsonValueKind.Null)
 293                    {
 294                        continue;
 295                    }
 344296                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 2072297                    foreach (var property0 in property.Value.EnumerateObject())
 298                    {
 692299                        if (property0.Value.ValueKind == JsonValueKind.Null)
 300                        {
 0301                            dictionary.Add(property0.Name, null);
 302                        }
 303                        else
 304                        {
 692305                            dictionary.Add(property0.Name, property0.Value.GetString());
 306                        }
 307                    }
 344308                    tags = dictionary;
 344309                    continue;
 310                }
 344311                if (property.NameEquals("properties"))
 312                {
 5264313                    foreach (var property0 in property.Value.EnumerateObject())
 314                    {
 2288315                        if (property0.NameEquals("hardwareProfile"))
 316                        {
 344317                            if (property0.Value.ValueKind == JsonValueKind.Null)
 318                            {
 319                                continue;
 320                            }
 344321                            hardwareProfile = HardwareProfile.DeserializeHardwareProfile(property0.Value);
 344322                            continue;
 323                        }
 1944324                        if (property0.NameEquals("storageProfile"))
 325                        {
 344326                            if (property0.Value.ValueKind == JsonValueKind.Null)
 327                            {
 328                                continue;
 329                            }
 344330                            storageProfile = StorageProfile.DeserializeStorageProfile(property0.Value);
 344331                            continue;
 332                        }
 1600333                        if (property0.NameEquals("additionalCapabilities"))
 334                        {
 20335                            if (property0.Value.ValueKind == JsonValueKind.Null)
 336                            {
 337                                continue;
 338                            }
 20339                            additionalCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property0.
 20340                            continue;
 341                        }
 1580342                        if (property0.NameEquals("osProfile"))
 343                        {
 344344                            if (property0.Value.ValueKind == JsonValueKind.Null)
 345                            {
 346                                continue;
 347                            }
 344348                            osProfile = OSProfile.DeserializeOSProfile(property0.Value);
 344349                            continue;
 350                        }
 1236351                        if (property0.NameEquals("networkProfile"))
 352                        {
 344353                            if (property0.Value.ValueKind == JsonValueKind.Null)
 354                            {
 355                                continue;
 356                            }
 344357                            networkProfile = NetworkProfile.DeserializeNetworkProfile(property0.Value);
 344358                            continue;
 359                        }
 892360                        if (property0.NameEquals("diagnosticsProfile"))
 361                        {
 16362                            if (property0.Value.ValueKind == JsonValueKind.Null)
 363                            {
 364                                continue;
 365                            }
 16366                            diagnosticsProfile = DiagnosticsProfile.DeserializeDiagnosticsProfile(property0.Value);
 16367                            continue;
 368                        }
 876369                        if (property0.NameEquals("availabilitySet"))
 370                        {
 0371                            if (property0.Value.ValueKind == JsonValueKind.Null)
 372                            {
 373                                continue;
 374                            }
 0375                            availabilitySet = SubResource.DeserializeSubResource(property0.Value);
 0376                            continue;
 377                        }
 876378                        if (property0.NameEquals("virtualMachineScaleSet"))
 379                        {
 0380                            if (property0.Value.ValueKind == JsonValueKind.Null)
 381                            {
 382                                continue;
 383                            }
 0384                            virtualMachineScaleSet = SubResource.DeserializeSubResource(property0.Value);
 0385                            continue;
 386                        }
 876387                        if (property0.NameEquals("proximityPlacementGroup"))
 388                        {
 0389                            if (property0.Value.ValueKind == JsonValueKind.Null)
 390                            {
 391                                continue;
 392                            }
 0393                            proximityPlacementGroup = SubResource.DeserializeSubResource(property0.Value);
 0394                            continue;
 395                        }
 876396                        if (property0.NameEquals("priority"))
 397                        {
 8398                            if (property0.Value.ValueKind == JsonValueKind.Null)
 399                            {
 400                                continue;
 401                            }
 8402                            priority = new VirtualMachinePriorityTypes(property0.Value.GetString());
 8403                            continue;
 404                        }
 868405                        if (property0.NameEquals("evictionPolicy"))
 406                        {
 8407                            if (property0.Value.ValueKind == JsonValueKind.Null)
 408                            {
 409                                continue;
 410                            }
 8411                            evictionPolicy = new VirtualMachineEvictionPolicyTypes(property0.Value.GetString());
 8412                            continue;
 413                        }
 860414                        if (property0.NameEquals("billingProfile"))
 415                        {
 8416                            if (property0.Value.ValueKind == JsonValueKind.Null)
 417                            {
 418                                continue;
 419                            }
 8420                            billingProfile = BillingProfile.DeserializeBillingProfile(property0.Value);
 8421                            continue;
 422                        }
 852423                        if (property0.NameEquals("host"))
 424                        {
 0425                            if (property0.Value.ValueKind == JsonValueKind.Null)
 426                            {
 427                                continue;
 428                            }
 0429                            host = SubResource.DeserializeSubResource(property0.Value);
 0430                            continue;
 431                        }
 852432                        if (property0.NameEquals("provisioningState"))
 433                        {
 344434                            if (property0.Value.ValueKind == JsonValueKind.Null)
 435                            {
 436                                continue;
 437                            }
 344438                            provisioningState = property0.Value.GetString();
 344439                            continue;
 440                        }
 508441                        if (property0.NameEquals("instanceView"))
 442                        {
 152443                            if (property0.Value.ValueKind == JsonValueKind.Null)
 444                            {
 445                                continue;
 446                            }
 152447                            instanceView = VirtualMachineInstanceView.DeserializeVirtualMachineInstanceView(property0.Va
 152448                            continue;
 449                        }
 356450                        if (property0.NameEquals("licenseType"))
 451                        {
 12452                            if (property0.Value.ValueKind == JsonValueKind.Null)
 453                            {
 454                                continue;
 455                            }
 12456                            licenseType = property0.Value.GetString();
 12457                            continue;
 458                        }
 344459                        if (property0.NameEquals("vmId"))
 460                        {
 344461                            if (property0.Value.ValueKind == JsonValueKind.Null)
 462                            {
 463                                continue;
 464                            }
 344465                            vmId = property0.Value.GetString();
 466                            continue;
 467                        }
 468                    }
 469                    continue;
 470                }
 471            }
 344472            return new VirtualMachine(id, name, type, location, tags, plan, resources, identity, zones, hardwareProfile,
 473        }
 474    }
 475}