< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_RuleName()-0%100%
get_Action()-0%100%
DeserializeMatchedRule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\MatchedRule.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> Matched rule. </summary>
 11    public partial class MatchedRule
 12    {
 13        /// <summary> Initializes a new instance of MatchedRule. </summary>
 014        internal MatchedRule()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MatchedRule. </summary>
 19        /// <param name="ruleName"> Name of the matched network security rule. </param>
 20        /// <param name="action"> The network traffic is allowed or denied. Possible values are &apos;Allow&apos; and &a
 021        internal MatchedRule(string ruleName, string action)
 22        {
 023            RuleName = ruleName;
 024            Action = action;
 025        }
 26
 27        /// <summary> Name of the matched network security rule. </summary>
 028        public string RuleName { get; }
 29        /// <summary> The network traffic is allowed or denied. Possible values are &apos;Allow&apos; and &apos;Deny&apo
 030        public string Action { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\MatchedRule.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 MatchedRule
 14    {
 15        internal static MatchedRule DeserializeMatchedRule(JsonElement element)
 16        {
 017            string ruleName = default;
 018            string action = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("ruleName"))
 22                {
 023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 027                    ruleName = property.Value.GetString();
 028                    continue;
 29                }
 030                if (property.NameEquals("action"))
 31                {
 032                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 036                    action = property.Value.GetString();
 37                    continue;
 38                }
 39            }
 040            return new MatchedRule(ruleName, action);
 41        }
 42    }
 43}