< Summary

Class:Azure.ResourceManager.Network.Models.BastionSessionState
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionSessionState.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionSessionState.Serialization.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:89
Line coverage:0% (0 of 26)
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_SessionId()-0%100%
get_Message()-0%100%
get_State()-0%100%
DeserializeBastionSessionState(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionSessionState.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> The session state detail for a target. </summary>
 11    public partial class BastionSessionState
 12    {
 13        /// <summary> Initializes a new instance of BastionSessionState. </summary>
 014        internal BastionSessionState()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of BastionSessionState. </summary>
 19        /// <param name="sessionId"> A unique id for the session. </param>
 20        /// <param name="message"> Used for extra information. </param>
 21        /// <param name="state"> The state of the session. Disconnected/Failed/NotFound. </param>
 022        internal BastionSessionState(string sessionId, string message, string state)
 23        {
 024            SessionId = sessionId;
 025            Message = message;
 026            State = state;
 027        }
 28
 29        /// <summary> A unique id for the session. </summary>
 030        public string SessionId { get; }
 31        /// <summary> Used for extra information. </summary>
 032        public string Message { get; }
 33        /// <summary> The state of the session. Disconnected/Failed/NotFound. </summary>
 034        public string State { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionSessionState.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 BastionSessionState
 14    {
 15        internal static BastionSessionState DeserializeBastionSessionState(JsonElement element)
 16        {
 017            string sessionId = default;
 018            string message = default;
 019            string state = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("sessionId"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    sessionId = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("message"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    message = property.Value.GetString();
 038                    continue;
 39                }
 040                if (property.NameEquals("state"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    state = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new BastionSessionState(sessionId, message, state);
 51        }
 52    }
 53}