< Summary

Class:Azure.ResourceManager.Storage.Models.PrivateEndpointConnection
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateEndpointConnection.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\PrivateEndpointConnection.Serialization.cs
Covered lines:0
Uncovered lines:67
Coverable lines:67
Total lines:168
Line coverage:0% (0 of 67)
Covered branches:0
Total branches:42
Branch coverage:0% (0 of 42)

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\storage\Azure.ResourceManager.Storage\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.Storage.Models
 9{
 10    /// <summary> The Private Endpoint Connection resource. </summary>
 11    public partial class PrivateEndpointConnection : Resource
 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"> Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourc
 20        /// <param name="name"> The name of the resource. </param>
 21        /// <param name="type"> The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/sto
 22        /// <param name="privateEndpoint"> The resource of private end point. </param>
 23        /// <param name="privateLinkServiceConnectionState"> A collection of information about the state of the connecti
 24        /// <param name="provisioningState"> The provisioning state of the private endpoint connection resource. </param
 025        internal PrivateEndpointConnection(string id, string name, string type, PrivateEndpoint privateEndpoint, Private
 26        {
 027            PrivateEndpoint = privateEndpoint;
 028            PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 029            ProvisioningState = provisioningState;
 030        }
 31
 32        /// <summary> The resource of private end point. </summary>
 033        public PrivateEndpoint PrivateEndpoint { get; set; }
 34        /// <summary> A collection of information about the state of the connection between service consumer and provide
 035        public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
 36        /// <summary> The provisioning state of the private endpoint connection resource. </summary>
 037        public PrivateEndpointConnectionProvisioningState? ProvisioningState { get; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\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.Storage.Models
 12{
 13    public partial class PrivateEndpointConnection : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Id != null)
 19            {
 020                writer.WritePropertyName("id");
 021                writer.WriteStringValue(Id);
 22            }
 023            if (Name != null)
 24            {
 025                writer.WritePropertyName("name");
 026                writer.WriteStringValue(Name);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            writer.WritePropertyName("properties");
 034            writer.WriteStartObject();
 035            if (PrivateEndpoint != null)
 36            {
 037                writer.WritePropertyName("privateEndpoint");
 038                writer.WriteObjectValue(PrivateEndpoint);
 39            }
 040            if (PrivateLinkServiceConnectionState != null)
 41            {
 042                writer.WritePropertyName("privateLinkServiceConnectionState");
 043                writer.WriteObjectValue(PrivateLinkServiceConnectionState);
 44            }
 045            if (ProvisioningState != null)
 46            {
 047                writer.WritePropertyName("provisioningState");
 048                writer.WriteStringValue(ProvisioningState.Value.ToString());
 49            }
 050            writer.WriteEndObject();
 051            writer.WriteEndObject();
 052        }
 53
 54        internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element)
 55        {
 056            string id = default;
 057            string name = default;
 058            string type = default;
 059            PrivateEndpoint privateEndpoint = default;
 060            PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default;
 061            PrivateEndpointConnectionProvisioningState? provisioningState = default;
 062            foreach (var property in element.EnumerateObject())
 63            {
 064                if (property.NameEquals("id"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    id = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("name"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    name = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("type"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    type = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("properties"))
 92                {
 093                    foreach (var property0 in property.Value.EnumerateObject())
 94                    {
 095                        if (property0.NameEquals("privateEndpoint"))
 96                        {
 097                            if (property0.Value.ValueKind == JsonValueKind.Null)
 98                            {
 99                                continue;
 100                            }
 0101                            privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value);
 0102                            continue;
 103                        }
 0104                        if (property0.NameEquals("privateLinkServiceConnectionState"))
 105                        {
 0106                            if (property0.Value.ValueKind == JsonValueKind.Null)
 107                            {
 108                                continue;
 109                            }
 0110                            privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLink
 0111                            continue;
 112                        }
 0113                        if (property0.NameEquals("provisioningState"))
 114                        {
 0115                            if (property0.Value.ValueKind == JsonValueKind.Null)
 116                            {
 117                                continue;
 118                            }
 0119                            provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString
 120                            continue;
 121                        }
 122                    }
 123                    continue;
 124                }
 125            }
 0126            return new PrivateEndpointConnection(id, name, type, privateEndpoint, privateLinkServiceConnectionState, pro
 127        }
 128    }
 129}