< Summary

Class:Azure.ResourceManager.Compute.Models.AutomaticOSUpgradeProperties
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AutomaticOSUpgradeProperties.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AutomaticOSUpgradeProperties.Serialization.cs
Covered lines:9
Uncovered lines:5
Coverable lines:14
Total lines:60
Line coverage:64.2% (9 of 14)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_AutomaticOSUpgradeSupported()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeAutomaticOSUpgradeProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AutomaticOSUpgradeProperties.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 automatic OS upgrade properties on the image. </summary>
 11    public partial class AutomaticOSUpgradeProperties
 12    {
 13        /// <summary> Initializes a new instance of AutomaticOSUpgradeProperties. </summary>
 14        /// <param name="automaticOSUpgradeSupported"> Specifies whether automatic OS upgrade is supported on the image.
 3215        public AutomaticOSUpgradeProperties(bool automaticOSUpgradeSupported)
 16        {
 3217            AutomaticOSUpgradeSupported = automaticOSUpgradeSupported;
 3218        }
 19
 20        /// <summary> Specifies whether automatic OS upgrade is supported on the image. </summary>
 4821        public bool AutomaticOSUpgradeSupported { get; set; }
 22    }
 23}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AutomaticOSUpgradeProperties.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 AutomaticOSUpgradeProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("automaticOSUpgradeSupported");
 019            writer.WriteBooleanValue(AutomaticOSUpgradeSupported);
 020            writer.WriteEndObject();
 021        }
 22
 23        internal static AutomaticOSUpgradeProperties DeserializeAutomaticOSUpgradeProperties(JsonElement element)
 24        {
 3225            bool automaticOSUpgradeSupported = default;
 12826            foreach (var property in element.EnumerateObject())
 27            {
 3228                if (property.NameEquals("automaticOSUpgradeSupported"))
 29                {
 3230                    automaticOSUpgradeSupported = property.Value.GetBoolean();
 31                    continue;
 32                }
 33            }
 3234            return new AutomaticOSUpgradeProperties(automaticOSUpgradeSupported);
 35        }
 36    }
 37}