< Summary

Class:Azure.ResourceManager.Compute.Models.ImageUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ImageUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ImageUpdate.Serialization.cs
Covered lines:20
Uncovered lines:17
Coverable lines:37
Total lines:98
Line coverage:54% (20 of 37)
Covered branches:8
Total branches:12
Branch coverage:66.6% (8 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_SourceVirtualMachine()-0%100%
get_StorageProfile()-0%100%
get_ProvisioningState()-100%100%
get_HyperVGeneration()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-68%66.67%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ImageUpdate.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> The source user image virtual hard disk. Only tags may be updated. </summary>
 13    public partial class ImageUpdate : UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of ImageUpdate. </summary>
 416        public ImageUpdate()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of ImageUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="sourceVirtualMachine"> The source virtual machine from which Image is created. </param>
 23        /// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
 24        /// <param name="provisioningState"> The provisioning state. </param>
 25        /// <param name="hyperVGeneration"> Gets the HyperVGenerationType of the VirtualMachine created from the image. 
 026        internal ImageUpdate(IDictionary<string, string> tags, SubResource sourceVirtualMachine, ImageStorageProfile sto
 27        {
 028            SourceVirtualMachine = sourceVirtualMachine;
 029            StorageProfile = storageProfile;
 030            ProvisioningState = provisioningState;
 031            HyperVGeneration = hyperVGeneration;
 032        }
 33
 34        /// <summary> The source virtual machine from which Image is created. </summary>
 035        public SubResource SourceVirtualMachine { get; set; }
 36        /// <summary> Specifies the storage settings for the virtual machine disks. </summary>
 037        public ImageStorageProfile StorageProfile { get; set; }
 38        /// <summary> The provisioning state. </summary>
 839        public string ProvisioningState { get; }
 40        /// <summary> Gets the HyperVGenerationType of the VirtualMachine created from the image. </summary>
 041        public HyperVGenerationTypes? HyperVGeneration { get; set; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ImageUpdate.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 ImageUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Tags != null)
 19            {
 820                writer.WritePropertyName("tags");
 821                writer.WriteStartObject();
 6422                foreach (var item in Tags)
 23                {
 2424                    writer.WritePropertyName(item.Key);
 2425                    writer.WriteStringValue(item.Value);
 26                }
 827                writer.WriteEndObject();
 28            }
 829            writer.WritePropertyName("properties");
 830            writer.WriteStartObject();
 831            if (SourceVirtualMachine != null)
 32            {
 033                writer.WritePropertyName("sourceVirtualMachine");
 034                writer.WriteObjectValue(SourceVirtualMachine);
 35            }
 836            if (StorageProfile != null)
 37            {
 038                writer.WritePropertyName("storageProfile");
 039                writer.WriteObjectValue(StorageProfile);
 40            }
 841            if (ProvisioningState != null)
 42            {
 043                writer.WritePropertyName("provisioningState");
 044                writer.WriteStringValue(ProvisioningState);
 45            }
 846            if (HyperVGeneration != null)
 47            {
 048                writer.WritePropertyName("hyperVGeneration");
 049                writer.WriteStringValue(HyperVGeneration.Value.ToString());
 50            }
 851            writer.WriteEndObject();
 852            writer.WriteEndObject();
 853        }
 54    }
 55}