< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.PrivateEndpointConnection
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpointConnection.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpointConnection.Serialization.cs
Covered lines:65
Uncovered lines:8
Coverable lines:73
Total lines:177
Line coverage:89% (65 of 73)
Covered branches:39
Total branches:42
Branch coverage:92.8% (39 of 42)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
get_Name()-100%100%
get_Type()-100%100%
get_ProvisioningState()-100%100%
get_PrivateEndpoint()-100%100%
get_PrivateLinkServiceConnectionState()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-83.33%83.33%
DeserializePrivateEndpointConnection(...)-93.94%96.67%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpointConnection.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> A private endpoint connection. </summary>
 11    public partial class PrivateEndpointConnection
 12    {
 13        /// <summary> Initializes a new instance of PrivateEndpointConnection. </summary>
 014        public PrivateEndpointConnection()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PrivateEndpointConnection. </summary>
 19        /// <param name="id"> The resource ID. </param>
 20        /// <param name="name"> The name of the resource. </param>
 21        /// <param name="type"> The type of the resource. </param>
 22        /// <param name="provisioningState"> The provisioning status of the private endpoint connection. </param>
 23        /// <param name="privateEndpoint"> The resource of private endpoint. </param>
 24        /// <param name="privateLinkServiceConnectionState"> A collection of information about the state of the connecti
 1625        internal PrivateEndpointConnection(string id, string name, string type, ProvisioningState? provisioningState, Pr
 26        {
 1627            Id = id;
 1628            Name = name;
 1629            Type = type;
 1630            ProvisioningState = provisioningState;
 1631            PrivateEndpoint = privateEndpoint;
 1632            PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 1633        }
 34
 35        /// <summary> The resource ID. </summary>
 1636        public string Id { get; }
 37        /// <summary> The name of the resource. </summary>
 1638        public string Name { get; }
 39        /// <summary> The type of the resource. </summary>
 840        public string Type { get; }
 41        /// <summary> The provisioning status of the private endpoint connection. </summary>
 842        public ProvisioningState? ProvisioningState { get; }
 43        /// <summary> The resource of private endpoint. </summary>
 3244        public PrivateEndpoint PrivateEndpoint { get; set; }
 45        /// <summary> A collection of information about the state of the connection between service consumer and provide
 3246        public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpointConnection.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 PrivateEndpointConnection : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Id != null)
 19            {
 820                writer.WritePropertyName("id");
 821                writer.WriteStringValue(Id);
 22            }
 823            if (Name != null)
 24            {
 825                writer.WritePropertyName("name");
 826                writer.WriteStringValue(Name);
 27            }
 828            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 833            writer.WritePropertyName("properties");
 834            writer.WriteStartObject();
 835            if (ProvisioningState != null)
 36            {
 037                writer.WritePropertyName("provisioningState");
 038                writer.WriteStringValue(ProvisioningState.Value.ToString());
 39            }
 840            if (PrivateEndpoint != null)
 41            {
 842                writer.WritePropertyName("privateEndpoint");
 843                writer.WriteObjectValue(PrivateEndpoint);
 44            }
 845            if (PrivateLinkServiceConnectionState != null)
 46            {
 847                writer.WritePropertyName("privateLinkServiceConnectionState");
 848                writer.WriteObjectValue(PrivateLinkServiceConnectionState);
 49            }
 850            writer.WriteEndObject();
 851            writer.WriteEndObject();
 852        }
 53
 54        internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element)
 55        {
 1256            string id = default;
 1257            string name = default;
 1258            string type = default;
 1259            ProvisioningState? provisioningState = default;
 1260            PrivateEndpoint privateEndpoint = default;
 1261            PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default;
 16862            foreach (var property in element.EnumerateObject())
 63            {
 7264                if (property.NameEquals("id"))
 65                {
 1266                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 1270                    id = property.Value.GetString();
 1271                    continue;
 72                }
 6073                if (property.NameEquals("name"))
 74                {
 1275                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    name = property.Value.GetString();
 080                    continue;
 81                }
 4882                if (property.NameEquals("type"))
 83                {
 1284                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 1288                    type = property.Value.GetString();
 1289                    continue;
 90                }
 3691                if (property.NameEquals("properties"))
 92                {
 9693                    foreach (var property0 in property.Value.EnumerateObject())
 94                    {
 3695                        if (property0.NameEquals("provisioningState"))
 96                        {
 1297                            if (property0.Value.ValueKind == JsonValueKind.Null)
 98                            {
 99                                continue;
 100                            }
 12101                            provisioningState = new ProvisioningState(property0.Value.GetString());
 12102                            continue;
 103                        }
 24104                        if (property0.NameEquals("privateEndpoint"))
 105                        {
 12106                            if (property0.Value.ValueKind == JsonValueKind.Null)
 107                            {
 108                                continue;
 109                            }
 12110                            privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
 12111                            continue;
 112                        }
 12113                        if (property0.NameEquals("privateLinkServiceConnectionState"))
 114                        {
 12115                            if (property0.Value.ValueKind == JsonValueKind.Null)
 116                            {
 117                                continue;
 118                            }
 12119                            privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLink
 120                            continue;
 121                        }
 122                    }
 123                    continue;
 124                }
 125            }
 12126            return new PrivateEndpointConnection(id, name, type, provisioningState, privateEndpoint, privateLinkServiceC
 127        }
 128    }
 129}