< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilterItem.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 connection monitor endpoint filter item. </summary>
 11    public partial class ConnectionMonitorEndpointFilterItem
 12    {
 13        /// <summary> Initializes a new instance of ConnectionMonitorEndpointFilterItem. </summary>
 014        public ConnectionMonitorEndpointFilterItem()
 15        {
 016            Type = "AgentAddress";
 017        }
 18
 19        /// <summary> Initializes a new instance of ConnectionMonitorEndpointFilterItem. </summary>
 20        /// <param name="type"> The type of item included in the filter. Currently only &apos;AgentAddress&apos; is supp
 21        /// <param name="address"> The address of the filter item. </param>
 022        internal ConnectionMonitorEndpointFilterItem(string type, string address)
 23        {
 024            Type = type;
 025            Address = address;
 026        }
 27
 28        /// <summary> The type of item included in the filter. Currently only &apos;AgentAddress&apos; is supported. </s
 029        public string Type { get; set; }
 30        /// <summary> The address of the filter item. </summary>
 031        public string Address { get; set; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilterItem.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 ConnectionMonitorEndpointFilterItem : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Type != null)
 19            {
 020                writer.WritePropertyName("type");
 021                writer.WriteStringValue(Type);
 22            }
 023            if (Address != null)
 24            {
 025                writer.WritePropertyName("address");
 026                writer.WriteStringValue(Address);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static ConnectionMonitorEndpointFilterItem DeserializeConnectionMonitorEndpointFilterItem(JsonElement e
 32        {
 033            string type = default;
 034            string address = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("type"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    type = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("address"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    address = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new ConnectionMonitorEndpointFilterItem(type, address);
 57        }
 58    }
 59}