< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\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.Network.Models
 9{
 10    /// <summary> PrivateEndpointConnection resource. </summary>
 11    public partial class PrivateEndpointConnection : SubResource
 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"> Resource ID. </param>
 20        /// <param name="name"> The name of the resource that is unique within a resource group. This name can be used t
 21        /// <param name="type"> The resource type. </param>
 22        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 23        /// <param name="privateEndpoint"> The resource of private end point. </param>
 24        /// <param name="privateLinkServiceConnectionState"> A collection of information about the state of the connecti
 25        /// <param name="provisioningState"> The provisioning state of the private endpoint connection resource. </param
 26        /// <param name="linkIdentifier"> The consumer link id. </param>
 027        internal PrivateEndpointConnection(string id, string name, string type, string etag, PrivateEndpoint privateEndp
 28        {
 029            Name = name;
 030            Type = type;
 031            Etag = etag;
 032            PrivateEndpoint = privateEndpoint;
 033            PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 034            ProvisioningState = provisioningState;
 035            LinkIdentifier = linkIdentifier;
 036        }
 37
 38        /// <summary> The name of the resource that is unique within a resource group. This name can be used to access t
 039        public string Name { get; set; }
 40        /// <summary> The resource type. </summary>
 041        public string Type { get; }
 42        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 043        public string Etag { get; }
 44        /// <summary> The resource of private end point. </summary>
 045        public PrivateEndpoint PrivateEndpoint { get; }
 46        /// <summary> A collection of information about the state of the connection between service consumer and provide
 047        public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
 48        /// <summary> The provisioning state of the private endpoint connection resource. </summary>
 049        public ProvisioningState? ProvisioningState { get; }
 50        /// <summary> The consumer link id. </summary>
 051        public string LinkIdentifier { get; }
 52    }
 53}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\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.Network.Models
 12{
 13    public partial class PrivateEndpointConnection : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Type != null)
 24            {
 025                writer.WritePropertyName("type");
 026                writer.WriteStringValue(Type);
 27            }
 028            if (Etag != null)
 29            {
 030                writer.WritePropertyName("etag");
 031                writer.WriteStringValue(Etag);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (PrivateEndpoint != null)
 41            {
 042                writer.WritePropertyName("privateEndpoint");
 043                writer.WriteObjectValue(PrivateEndpoint);
 44            }
 045            if (PrivateLinkServiceConnectionState != null)
 46            {
 047                writer.WritePropertyName("privateLinkServiceConnectionState");
 048                writer.WriteObjectValue(PrivateLinkServiceConnectionState);
 49            }
 050            if (ProvisioningState != null)
 51            {
 052                writer.WritePropertyName("provisioningState");
 053                writer.WriteStringValue(ProvisioningState.Value.ToString());
 54            }
 055            if (LinkIdentifier != null)
 56            {
 057                writer.WritePropertyName("linkIdentifier");
 058                writer.WriteStringValue(LinkIdentifier);
 59            }
 060            writer.WriteEndObject();
 061            writer.WriteEndObject();
 062        }
 63
 64        internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element)
 65        {
 066            string name = default;
 067            string type = default;
 068            string etag = default;
 069            string id = default;
 070            PrivateEndpoint privateEndpoint = default;
 071            PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default;
 072            ProvisioningState? provisioningState = default;
 073            string linkIdentifier = default;
 074            foreach (var property in element.EnumerateObject())
 75            {
 076                if (property.NameEquals("name"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    name = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("type"))
 86                {
 087                    if (property.Value.ValueKind == JsonValueKind.Null)
 88                    {
 89                        continue;
 90                    }
 091                    type = property.Value.GetString();
 092                    continue;
 93                }
 094                if (property.NameEquals("etag"))
 95                {
 096                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 0100                    etag = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("id"))
 104                {
 0105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 0109                    id = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("properties"))
 113                {
 0114                    foreach (var property0 in property.Value.EnumerateObject())
 115                    {
 0116                        if (property0.NameEquals("privateEndpoint"))
 117                        {
 0118                            if (property0.Value.ValueKind == JsonValueKind.Null)
 119                            {
 120                                continue;
 121                            }
 0122                            privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
 0123                            continue;
 124                        }
 0125                        if (property0.NameEquals("privateLinkServiceConnectionState"))
 126                        {
 0127                            if (property0.Value.ValueKind == JsonValueKind.Null)
 128                            {
 129                                continue;
 130                            }
 0131                            privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLink
 0132                            continue;
 133                        }
 0134                        if (property0.NameEquals("provisioningState"))
 135                        {
 0136                            if (property0.Value.ValueKind == JsonValueKind.Null)
 137                            {
 138                                continue;
 139                            }
 0140                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0141                            continue;
 142                        }
 0143                        if (property0.NameEquals("linkIdentifier"))
 144                        {
 0145                            if (property0.Value.ValueKind == JsonValueKind.Null)
 146                            {
 147                                continue;
 148                            }
 0149                            linkIdentifier = property0.Value.GetString();
 150                            continue;
 151                        }
 152                    }
 153                    continue;
 154                }
 155            }
 0156            return new PrivateEndpointConnection(id, name, type, etag, privateEndpoint, privateLinkServiceConnectionStat
 157        }
 158    }
 159}