< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.PrivateLinkServiceConnectionState
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkServiceConnectionState.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkServiceConnectionState.Serialization.cs
Covered lines:34
Uncovered lines:4
Coverable lines:38
Total lines:110
Line coverage:89.4% (34 of 38)
Covered branches:19
Total branches:20
Branch coverage:95% (19 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Status()-100%100%
get_Description()-100%100%
get_ActionsRequired()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-83.33%83.33%
DeserializePrivateLinkServiceConnectionState(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkServiceConnectionState.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.AppConfiguration.Models
 9{
 10    /// <summary> The state of a private link service connection. </summary>
 11    public partial class PrivateLinkServiceConnectionState
 12    {
 13        /// <summary> Initializes a new instance of PrivateLinkServiceConnectionState. </summary>
 014        public PrivateLinkServiceConnectionState()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PrivateLinkServiceConnectionState. </summary>
 19        /// <param name="status"> The private link service connection status. </param>
 20        /// <param name="description"> The private link service connection description. </param>
 21        /// <param name="actionsRequired"> Any action that is required beyond basic workflow (approve/ reject/ disconnec
 3222        internal PrivateLinkServiceConnectionState(ConnectionStatus? status, string description, ActionsRequired? action
 23        {
 3224            Status = status;
 3225            Description = description;
 3226            ActionsRequired = actionsRequired;
 3227        }
 28
 29        /// <summary> The private link service connection status. </summary>
 4830        public ConnectionStatus? Status { get; set; }
 31        /// <summary> The private link service connection description. </summary>
 4832        public string Description { get; set; }
 33        /// <summary> Any action that is required beyond basic workflow (approve/ reject/ disconnect). </summary>
 834        public ActionsRequired? ActionsRequired { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkServiceConnectionState.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.AppConfiguration.Models
 12{
 13    public partial class PrivateLinkServiceConnectionState : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Status != null)
 19            {
 820                writer.WritePropertyName("status");
 821                writer.WriteStringValue(Status.Value.ToString());
 22            }
 823            if (Description != null)
 24            {
 825                writer.WritePropertyName("description");
 826                writer.WriteStringValue(Description);
 27            }
 828            if (ActionsRequired != null)
 29            {
 030                writer.WritePropertyName("actionsRequired");
 031                writer.WriteStringValue(ActionsRequired.Value.ToString());
 32            }
 833            writer.WriteEndObject();
 834        }
 35
 36        internal static PrivateLinkServiceConnectionState DeserializePrivateLinkServiceConnectionState(JsonElement eleme
 37        {
 2838            ConnectionStatus? status = default;
 2839            string description = default;
 2840            ActionsRequired? actionsRequired = default;
 20041            foreach (var property in element.EnumerateObject())
 42            {
 7243                if (property.NameEquals("status"))
 44                {
 2845                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 2849                    status = new ConnectionStatus(property.Value.GetString());
 2850                    continue;
 51                }
 4452                if (property.NameEquals("description"))
 53                {
 2854                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 2858                    description = property.Value.GetString();
 2859                    continue;
 60                }
 1661                if (property.NameEquals("actionsRequired"))
 62                {
 1663                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 1667                    actionsRequired = new ActionsRequired(property.Value.GetString());
 68                    continue;
 69                }
 70            }
 2871            return new PrivateLinkServiceConnectionState(status, description, actionsRequired);
 72        }
 73    }
 74}