< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_Enabled()-100%100%
get_StorageUri()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeBootDiagnostics(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnostics.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> Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diag
 11    public partial class BootDiagnostics
 12    {
 13        /// <summary> Initializes a new instance of BootDiagnostics. </summary>
 814        public BootDiagnostics()
 15        {
 816        }
 17
 18        /// <summary> Initializes a new instance of BootDiagnostics. </summary>
 19        /// <param name="enabled"> Whether boot diagnostics should be enabled on the Virtual Machine. </param>
 20        /// <param name="storageUri"> Uri of the storage account to use for placing the console output and screenshot. <
 2821        internal BootDiagnostics(bool? enabled, string storageUri)
 22        {
 2823            Enabled = enabled;
 2824            StorageUri = storageUri;
 2825        }
 26
 27        /// <summary> Whether boot diagnostics should be enabled on the Virtual Machine. </summary>
 7228        public bool? Enabled { get; set; }
 29        /// <summary> Uri of the storage account to use for placing the console output and screenshot. </summary>
 6830        public string StorageUri { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnostics.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 BootDiagnostics : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            if (Enabled != null)
 19            {
 1620                writer.WritePropertyName("enabled");
 1621                writer.WriteBooleanValue(Enabled.Value);
 22            }
 1623            if (StorageUri != null)
 24            {
 1625                writer.WritePropertyName("storageUri");
 1626                writer.WriteStringValue(StorageUri);
 27            }
 1628            writer.WriteEndObject();
 1629        }
 30
 31        internal static BootDiagnostics DeserializeBootDiagnostics(JsonElement element)
 32        {
 2833            bool? enabled = default;
 2834            string storageUri = default;
 16835            foreach (var property in element.EnumerateObject())
 36            {
 5637                if (property.NameEquals("enabled"))
 38                {
 2839                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 2843                    enabled = property.Value.GetBoolean();
 2844                    continue;
 45                }
 2846                if (property.NameEquals("storageUri"))
 47                {
 2848                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 2852                    storageUri = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 2856            return new BootDiagnostics(enabled, storageUri);
 57        }
 58    }
 59}