< Summary

Class:Azure.ResourceManager.Network.Models.ConnectionMonitorDestination
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorDestination.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorDestination.Serialization.cs
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:110
Line coverage:0% (0 of 38)
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_ResourceId()-0%100%
get_Address()-0%100%
get_Port()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorDestination(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorDestination.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> Describes the destination of connection monitor. </summary>
 11    public partial class ConnectionMonitorDestination
 12    {
 13        /// <summary> Initializes a new instance of ConnectionMonitorDestination. </summary>
 014        public ConnectionMonitorDestination()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ConnectionMonitorDestination. </summary>
 19        /// <param name="resourceId"> The ID of the resource used as the destination by connection monitor. </param>
 20        /// <param name="address"> Address of the connection monitor destination (IP or domain name). </param>
 21        /// <param name="port"> The destination port used by connection monitor. </param>
 022        internal ConnectionMonitorDestination(string resourceId, string address, int? port)
 23        {
 024            ResourceId = resourceId;
 025            Address = address;
 026            Port = port;
 027        }
 28
 29        /// <summary> The ID of the resource used as the destination by connection monitor. </summary>
 030        public string ResourceId { get; set; }
 31        /// <summary> Address of the connection monitor destination (IP or domain name). </summary>
 032        public string Address { get; set; }
 33        /// <summary> The destination port used by connection monitor. </summary>
 034        public int? Port { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorDestination.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 ConnectionMonitorDestination : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (ResourceId != null)
 19            {
 020                writer.WritePropertyName("resourceId");
 021                writer.WriteStringValue(ResourceId);
 22            }
 023            if (Address != null)
 24            {
 025                writer.WritePropertyName("address");
 026                writer.WriteStringValue(Address);
 27            }
 028            if (Port != null)
 29            {
 030                writer.WritePropertyName("port");
 031                writer.WriteNumberValue(Port.Value);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static ConnectionMonitorDestination DeserializeConnectionMonitorDestination(JsonElement element)
 37        {
 038            string resourceId = default;
 039            string address = default;
 040            int? port = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("resourceId"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    resourceId = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("address"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    address = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("port"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    port = property.Value.GetInt32();
 68                    continue;
 69                }
 70            }
 071            return new ConnectionMonitorDestination(resourceId, address, port);
 72        }
 73    }
 74}