< Summary

Class:Azure.ResourceManager.Compute.Models.BootDiagnosticsInstanceView
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnosticsInstanceView.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnosticsInstanceView.Serialization.cs
Covered lines:24
Uncovered lines:14
Coverable lines:38
Total lines:110
Line coverage:63.1% (24 of 38)
Covered branches:14
Total branches:20
Branch coverage:70% (14 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ConsoleScreenshotBlobUri()-100%100%
get_SerialConsoleLogBlobUri()-100%100%
get_Status()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeBootDiagnosticsInstanceView(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnosticsInstanceView.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> The instance view of a virtual machine boot diagnostics. </summary>
 11    public partial class BootDiagnosticsInstanceView
 12    {
 13        /// <summary> Initializes a new instance of BootDiagnosticsInstanceView. </summary>
 014        public BootDiagnosticsInstanceView()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of BootDiagnosticsInstanceView. </summary>
 19        /// <param name="consoleScreenshotBlobUri"> The console screenshot blob URI. </param>
 20        /// <param name="serialConsoleLogBlobUri"> The Linux serial console log blob Uri. </param>
 21        /// <param name="status"> The boot diagnostics status information for the VM. &lt;br&gt;&lt;br&gt; NOTE: It will
 1222        internal BootDiagnosticsInstanceView(string consoleScreenshotBlobUri, string serialConsoleLogBlobUri, InstanceVi
 23        {
 1224            ConsoleScreenshotBlobUri = consoleScreenshotBlobUri;
 1225            SerialConsoleLogBlobUri = serialConsoleLogBlobUri;
 1226            Status = status;
 1227        }
 28
 29        /// <summary> The console screenshot blob URI. </summary>
 830        public string ConsoleScreenshotBlobUri { get; }
 31        /// <summary> The Linux serial console log blob Uri. </summary>
 832        public string SerialConsoleLogBlobUri { get; }
 33        /// <summary> The boot diagnostics status information for the VM. &lt;br&gt;&lt;br&gt; NOTE: It will be set only
 834        public InstanceViewStatus Status { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\BootDiagnosticsInstanceView.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 BootDiagnosticsInstanceView : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (ConsoleScreenshotBlobUri != null)
 19            {
 020                writer.WritePropertyName("consoleScreenshotBlobUri");
 021                writer.WriteStringValue(ConsoleScreenshotBlobUri);
 22            }
 023            if (SerialConsoleLogBlobUri != null)
 24            {
 025                writer.WritePropertyName("serialConsoleLogBlobUri");
 026                writer.WriteStringValue(SerialConsoleLogBlobUri);
 27            }
 028            if (Status != null)
 29            {
 030                writer.WritePropertyName("status");
 031                writer.WriteObjectValue(Status);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static BootDiagnosticsInstanceView DeserializeBootDiagnosticsInstanceView(JsonElement element)
 37        {
 1238            string consoleScreenshotBlobUri = default;
 1239            string serialConsoleLogBlobUri = default;
 1240            InstanceViewStatus status = default;
 6441            foreach (var property in element.EnumerateObject())
 42            {
 2043                if (property.NameEquals("consoleScreenshotBlobUri"))
 44                {
 845                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 849                    consoleScreenshotBlobUri = property.Value.GetString();
 850                    continue;
 51                }
 1252                if (property.NameEquals("serialConsoleLogBlobUri"))
 53                {
 854                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 858                    serialConsoleLogBlobUri = property.Value.GetString();
 859                    continue;
 60                }
 461                if (property.NameEquals("status"))
 62                {
 463                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 467                    status = InstanceViewStatus.DeserializeInstanceViewStatus(property.Value);
 68                    continue;
 69                }
 70            }
 1271            return new BootDiagnosticsInstanceView(consoleScreenshotBlobUri, serialConsoleLogBlobUri, status);
 72        }
 73    }
 74}