< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Type()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeEndpointServiceResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\EndpointServiceResult.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> Endpoint service. </summary>
 11    public partial class EndpointServiceResult : SubResource
 12    {
 13        /// <summary> Initializes a new instance of EndpointServiceResult. </summary>
 014        public EndpointServiceResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of EndpointServiceResult. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the endpoint service. </param>
 21        /// <param name="type"> Type of the endpoint service. </param>
 022        internal EndpointServiceResult(string id, string name, string type) : base(id)
 23        {
 024            Name = name;
 025            Type = type;
 026        }
 27
 28        /// <summary> Name of the endpoint service. </summary>
 029        public string Name { get; }
 30        /// <summary> Type of the endpoint service. </summary>
 031        public string Type { get; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\EndpointServiceResult.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 EndpointServiceResult : 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 (Id != null)
 29            {
 030                writer.WritePropertyName("id");
 031                writer.WriteStringValue(Id);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static EndpointServiceResult DeserializeEndpointServiceResult(JsonElement element)
 37        {
 038            string name = default;
 039            string type = default;
 040            string id = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("name"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    name = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("type"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    type = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("id"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    id = property.Value.GetString();
 68                    continue;
 69                }
 70            }
 071            return new EndpointServiceResult(id, name, type);
 72        }
 73    }
 74}