< Summary

Class:Azure.ResourceManager.KeyVault.Models.PrivateEndpointConnection
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\PrivateEndpointConnection.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\PrivateEndpointConnection.Serialization.cs
Covered lines:0
Uncovered lines:60
Coverable lines:60
Total lines:146
Line coverage:0% (0 of 60)
Covered branches:0
Total branches:28
Branch coverage:0% (0 of 28)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_PrivateEndpoint()-0%100%
get_PrivateLinkServiceConnectionState()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateEndpointConnection(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\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
 8using System.Collections.Generic;
 9
 10namespace Azure.ResourceManager.KeyVault.Models
 11{
 12    /// <summary> Private endpoint connection resource. </summary>
 13    public partial class PrivateEndpointConnection : Resource
 14    {
 15        /// <summary> Initializes a new instance of PrivateEndpointConnection. </summary>
 016        public PrivateEndpointConnection()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateEndpointConnection. </summary>
 21        /// <param name="id"> Fully qualified identifier of the key vault resource. </param>
 22        /// <param name="name"> Name of the key vault resource. </param>
 23        /// <param name="type"> Resource type of the key vault resource. </param>
 24        /// <param name="location"> Azure location of the key vault resource. </param>
 25        /// <param name="tags"> Tags assigned to the key vault resource. </param>
 26        /// <param name="privateEndpoint"> Properties of the private endpoint object. </param>
 27        /// <param name="privateLinkServiceConnectionState"> Approval state of the private link connection. </param>
 28        /// <param name="provisioningState"> Provisioning state of the private endpoint connection. </param>
 029        internal PrivateEndpointConnection(string id, string name, string type, string location, IReadOnlyDictionary<str
 30        {
 031            PrivateEndpoint = privateEndpoint;
 032            PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 033            ProvisioningState = provisioningState;
 034        }
 35
 36        /// <summary> Properties of the private endpoint object. </summary>
 037        public PrivateEndpoint PrivateEndpoint { get; set; }
 38        /// <summary> Approval state of the private link connection. </summary>
 039        public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
 40        /// <summary> Provisioning state of the private endpoint connection. </summary>
 041        public PrivateEndpointConnectionProvisioningState? ProvisioningState { get; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.KeyVault.Models
 13{
 14    public partial class PrivateEndpointConnection : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("properties");
 020            writer.WriteStartObject();
 021            if (Optional.IsDefined(PrivateEndpoint))
 22            {
 023                writer.WritePropertyName("privateEndpoint");
 024                writer.WriteObjectValue(PrivateEndpoint);
 25            }
 026            if (Optional.IsDefined(PrivateLinkServiceConnectionState))
 27            {
 028                writer.WritePropertyName("privateLinkServiceConnectionState");
 029                writer.WriteObjectValue(PrivateLinkServiceConnectionState);
 30            }
 031            writer.WriteEndObject();
 032            writer.WriteEndObject();
 033        }
 34
 35        internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element)
 36        {
 037            Optional<string> id = default;
 038            Optional<string> name = default;
 039            Optional<string> type = default;
 040            Optional<string> location = default;
 041            Optional<IReadOnlyDictionary<string, string>> tags = default;
 042            Optional<PrivateEndpoint> privateEndpoint = default;
 043            Optional<PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default;
 044            Optional<PrivateEndpointConnectionProvisioningState> provisioningState = default;
 045            foreach (var property in element.EnumerateObject())
 46            {
 047                if (property.NameEquals("id"))
 48                {
 049                    id = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("name"))
 53                {
 054                    name = property.Value.GetString();
 055                    continue;
 56                }
 057                if (property.NameEquals("type"))
 58                {
 059                    type = property.Value.GetString();
 060                    continue;
 61                }
 062                if (property.NameEquals("location"))
 63                {
 064                    location = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("tags"))
 68                {
 069                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 070                    foreach (var property0 in property.Value.EnumerateObject())
 71                    {
 072                        dictionary.Add(property0.Name, property0.Value.GetString());
 73                    }
 074                    tags = dictionary;
 075                    continue;
 76                }
 077                if (property.NameEquals("properties"))
 78                {
 079                    foreach (var property0 in property.Value.EnumerateObject())
 80                    {
 081                        if (property0.NameEquals("privateEndpoint"))
 82                        {
 083                            privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
 084                            continue;
 85                        }
 086                        if (property0.NameEquals("privateLinkServiceConnectionState"))
 87                        {
 088                            privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLink
 089                            continue;
 90                        }
 091                        if (property0.NameEquals("provisioningState"))
 92                        {
 093                            provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString
 94                            continue;
 95                        }
 96                    }
 97                    continue;
 98                }
 99            }
 0100            return new PrivateEndpointConnection(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary
 101        }
 102    }
 103}