< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.PrivateEndpoint
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpoint.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpoint.Serialization.cs
Covered lines:16
Uncovered lines:2
Coverable lines:18
Total lines:72
Line coverage:88.8% (16 of 18)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializePrivateEndpoint(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpoint.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> Private endpoint which a connection belongs to. </summary>
 11    public partial class PrivateEndpoint
 12    {
 13        /// <summary> Initializes a new instance of PrivateEndpoint. </summary>
 014        public PrivateEndpoint()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PrivateEndpoint. </summary>
 19        /// <param name="id"> The resource Id for private endpoint. </param>
 3220        internal PrivateEndpoint(string id)
 21        {
 3222            Id = id;
 3223        }
 24
 25        /// <summary> The resource Id for private endpoint. </summary>
 4826        public string Id { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateEndpoint.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 PrivateEndpoint : 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            writer.WriteEndObject();
 824        }
 25
 26        internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element)
 27        {
 2828            string id = default;
 11229            foreach (var property in element.EnumerateObject())
 30            {
 2831                if (property.NameEquals("id"))
 32                {
 2833                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 2837                    id = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 2841            return new PrivateEndpoint(id);
 42        }
 43    }
 44}