< Summary

Class:Azure.ResourceManager.Network.Models.ConnectionMonitorOutput
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorOutput.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorOutput.Serialization.cs
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:92
Line coverage:0% (0 of 29)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Type()-0%100%
get_WorkspaceSettings()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorOutput(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorOutput.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.Network.Models
 9{
 10    /// <summary> Describes a connection monitor output destination. </summary>
 11    public partial class ConnectionMonitorOutput
 12    {
 13        /// <summary> Initializes a new instance of ConnectionMonitorOutput. </summary>
 014        public ConnectionMonitorOutput()
 15        {
 016            Type = "Workspace";
 017        }
 18
 19        /// <summary> Initializes a new instance of ConnectionMonitorOutput. </summary>
 20        /// <param name="type"> Connection monitor output destination type. Currently, only &quot;Workspace&quot; is sup
 21        /// <param name="workspaceSettings"> Describes the settings for producing output into a log analytics workspace.
 022        internal ConnectionMonitorOutput(string type, ConnectionMonitorWorkspaceSettings workspaceSettings)
 23        {
 024            Type = type;
 025            WorkspaceSettings = workspaceSettings;
 026        }
 27
 28        /// <summary> Connection monitor output destination type. Currently, only &quot;Workspace&quot; is supported. </
 029        public string Type { get; set; }
 30        /// <summary> Describes the settings for producing output into a log analytics workspace. </summary>
 031        public ConnectionMonitorWorkspaceSettings WorkspaceSettings { get; set; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorOutput.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.Network.Models
 12{
 13    public partial class ConnectionMonitorOutput : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Type != null)
 19            {
 020                writer.WritePropertyName("type");
 021                writer.WriteStringValue(Type);
 22            }
 023            if (WorkspaceSettings != null)
 24            {
 025                writer.WritePropertyName("workspaceSettings");
 026                writer.WriteObjectValue(WorkspaceSettings);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static ConnectionMonitorOutput DeserializeConnectionMonitorOutput(JsonElement element)
 32        {
 033            string type = default;
 034            ConnectionMonitorWorkspaceSettings workspaceSettings = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("type"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    type = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("workspaceSettings"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    workspaceSettings = ConnectionMonitorWorkspaceSettings.DeserializeConnectionMonitorWorkspaceSettings
 53                    continue;
 54                }
 55            }
 056            return new ConnectionMonitorOutput(type, workspaceSettings);
 57        }
 58    }
 59}