< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Name()-0%100%
get_ResourceId()-0%100%
get_Address()-0%100%
get_Filter()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorEndpoint(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpoint.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;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Describes the connection monitor endpoint. </summary>
 13    public partial class ConnectionMonitorEndpoint
 14    {
 15        /// <summary> Initializes a new instance of ConnectionMonitorEndpoint. </summary>
 16        /// <param name="name"> The name of the connection monitor endpoint. </param>
 017        public ConnectionMonitorEndpoint(string name)
 18        {
 019            if (name == null)
 20            {
 021                throw new ArgumentNullException(nameof(name));
 22            }
 23
 024            Name = name;
 025        }
 26
 27        /// <summary> Initializes a new instance of ConnectionMonitorEndpoint. </summary>
 28        /// <param name="name"> The name of the connection monitor endpoint. </param>
 29        /// <param name="resourceId"> Resource ID of the connection monitor endpoint. </param>
 30        /// <param name="address"> Address of the connection monitor endpoint (IP or domain name). </param>
 31        /// <param name="filter"> Filter for sub-items within the endpoint. </param>
 032        internal ConnectionMonitorEndpoint(string name, string resourceId, string address, ConnectionMonitorEndpointFilt
 33        {
 034            Name = name;
 035            ResourceId = resourceId;
 036            Address = address;
 037            Filter = filter;
 038        }
 39
 40        /// <summary> The name of the connection monitor endpoint. </summary>
 041        public string Name { get; set; }
 42        /// <summary> Resource ID of the connection monitor endpoint. </summary>
 043        public string ResourceId { get; set; }
 44        /// <summary> Address of the connection monitor endpoint (IP or domain name). </summary>
 045        public string Address { get; set; }
 46        /// <summary> Filter for sub-items within the endpoint. </summary>
 047        public ConnectionMonitorEndpointFilter Filter { get; set; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpoint.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 ConnectionMonitorEndpoint : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("name");
 019            writer.WriteStringValue(Name);
 020            if (ResourceId != null)
 21            {
 022                writer.WritePropertyName("resourceId");
 023                writer.WriteStringValue(ResourceId);
 24            }
 025            if (Address != null)
 26            {
 027                writer.WritePropertyName("address");
 028                writer.WriteStringValue(Address);
 29            }
 030            if (Filter != null)
 31            {
 032                writer.WritePropertyName("filter");
 033                writer.WriteObjectValue(Filter);
 34            }
 035            writer.WriteEndObject();
 036        }
 37
 38        internal static ConnectionMonitorEndpoint DeserializeConnectionMonitorEndpoint(JsonElement element)
 39        {
 040            string name = default;
 041            string resourceId = default;
 042            string address = default;
 043            ConnectionMonitorEndpointFilter filter = default;
 044            foreach (var property in element.EnumerateObject())
 45            {
 046                if (property.NameEquals("name"))
 47                {
 048                    name = property.Value.GetString();
 049                    continue;
 50                }
 051                if (property.NameEquals("resourceId"))
 52                {
 053                    if (property.Value.ValueKind == JsonValueKind.Null)
 54                    {
 55                        continue;
 56                    }
 057                    resourceId = property.Value.GetString();
 058                    continue;
 59                }
 060                if (property.NameEquals("address"))
 61                {
 062                    if (property.Value.ValueKind == JsonValueKind.Null)
 63                    {
 64                        continue;
 65                    }
 066                    address = property.Value.GetString();
 067                    continue;
 68                }
 069                if (property.NameEquals("filter"))
 70                {
 071                    if (property.Value.ValueKind == JsonValueKind.Null)
 72                    {
 73                        continue;
 74                    }
 075                    filter = ConnectionMonitorEndpointFilter.DeserializeConnectionMonitorEndpointFilter(property.Value);
 76                    continue;
 77                }
 78            }
 079            return new ConnectionMonitorEndpoint(name, resourceId, address, filter);
 80        }
 81    }
 82}