< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceVMDiagnostics.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> Profile for diagnostics on the container service VMs. </summary>
 11    public partial class ContainerServiceVMDiagnostics
 12    {
 13        /// <summary> Initializes a new instance of ContainerServiceVMDiagnostics. </summary>
 14        /// <param name="enabled"> Whether the VM diagnostic agent is provisioned on the VM. </param>
 015        public ContainerServiceVMDiagnostics(bool enabled)
 16        {
 017            Enabled = enabled;
 018        }
 19
 20        /// <summary> Initializes a new instance of ContainerServiceVMDiagnostics. </summary>
 21        /// <param name="enabled"> Whether the VM diagnostic agent is provisioned on the VM. </param>
 22        /// <param name="storageUri"> The URI of the storage account where diagnostics are stored. </param>
 023        internal ContainerServiceVMDiagnostics(bool enabled, string storageUri)
 24        {
 025            Enabled = enabled;
 026            StorageUri = storageUri;
 027        }
 28
 29        /// <summary> Whether the VM diagnostic agent is provisioned on the VM. </summary>
 030        public bool Enabled { get; set; }
 31        /// <summary> The URI of the storage account where diagnostics are stored. </summary>
 032        public string StorageUri { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceVMDiagnostics.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 ContainerServiceVMDiagnostics : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("enabled");
 019            writer.WriteBooleanValue(Enabled);
 020            if (StorageUri != null)
 21            {
 022                writer.WritePropertyName("storageUri");
 023                writer.WriteStringValue(StorageUri);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static ContainerServiceVMDiagnostics DeserializeContainerServiceVMDiagnostics(JsonElement element)
 29        {
 030            bool enabled = default;
 031            string storageUri = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("enabled"))
 35                {
 036                    enabled = property.Value.GetBoolean();
 037                    continue;
 38                }
 039                if (property.NameEquals("storageUri"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    storageUri = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 049            return new ContainerServiceVMDiagnostics(enabled, storageUri);
 50        }
 51    }
 52}