< Summary

Class:Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilter
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilter.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilter.Serialization.cs
Covered lines:0
Uncovered lines:37
Coverable lines:37
Total lines:112
Line coverage:0% (0 of 37)
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_Type()-0%100%
get_Items()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorEndpointFilter(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilter.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Describes the connection monitor endpoint filter. </summary>
 13    public partial class ConnectionMonitorEndpointFilter
 14    {
 15        /// <summary> Initializes a new instance of ConnectionMonitorEndpointFilter. </summary>
 016        public ConnectionMonitorEndpointFilter()
 17        {
 018            Type = "Include";
 019        }
 20
 21        /// <summary> Initializes a new instance of ConnectionMonitorEndpointFilter. </summary>
 22        /// <param name="type"> The behavior of the endpoint filter. Currently only &apos;Include&apos; is supported. </
 23        /// <param name="items"> List of items in the filter. </param>
 024        internal ConnectionMonitorEndpointFilter(string type, IList<ConnectionMonitorEndpointFilterItem> items)
 25        {
 026            Type = type;
 027            Items = items;
 028        }
 29
 30        /// <summary> The behavior of the endpoint filter. Currently only &apos;Include&apos; is supported. </summary>
 031        public string Type { get; set; }
 32        /// <summary> List of items in the filter. </summary>
 033        public IList<ConnectionMonitorEndpointFilterItem> Items { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorEndpointFilter.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class ConnectionMonitorEndpointFilter : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Type != null)
 20            {
 021                writer.WritePropertyName("type");
 022                writer.WriteStringValue(Type);
 23            }
 024            if (Items != null)
 25            {
 026                writer.WritePropertyName("items");
 027                writer.WriteStartArray();
 028                foreach (var item in Items)
 29                {
 030                    writer.WriteObjectValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static ConnectionMonitorEndpointFilter DeserializeConnectionMonitorEndpointFilter(JsonElement element)
 38        {
 039            string type = default;
 040            IList<ConnectionMonitorEndpointFilterItem> items = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("type"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    type = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("items"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    List<ConnectionMonitorEndpointFilterItem> array = new List<ConnectionMonitorEndpointFilterItem>();
 059                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 061                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 067                            array.Add(ConnectionMonitorEndpointFilterItem.DeserializeConnectionMonitorEndpointFilterItem
 68                        }
 69                    }
 070                    items = array;
 71                    continue;
 72                }
 73            }
 074            return new ConnectionMonitorEndpointFilter(type, items);
 75        }
 76    }
 77}