< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_MatchVariable()-0%100%
get_SelectorMatchOperator()-0%100%
get_Selector()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeApplicationGatewayFirewallExclusion(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallExclusion.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> Allow to exclude some variable satisfy the condition for the WAF check. </summary>
 13    public partial class ApplicationGatewayFirewallExclusion
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayFirewallExclusion. </summary>
 16        /// <param name="matchVariable"> The variable to be excluded. </param>
 17        /// <param name="selectorMatchOperator"> When matchVariable is a collection, operate on the selector to specify 
 18        /// <param name="selector"> When matchVariable is a collection, operator used to specify which elements in the c
 019        public ApplicationGatewayFirewallExclusion(string matchVariable, string selectorMatchOperator, string selector)
 20        {
 021            if (matchVariable == null)
 22            {
 023                throw new ArgumentNullException(nameof(matchVariable));
 24            }
 025            if (selectorMatchOperator == null)
 26            {
 027                throw new ArgumentNullException(nameof(selectorMatchOperator));
 28            }
 029            if (selector == null)
 30            {
 031                throw new ArgumentNullException(nameof(selector));
 32            }
 33
 034            MatchVariable = matchVariable;
 035            SelectorMatchOperator = selectorMatchOperator;
 036            Selector = selector;
 037        }
 38
 39        /// <summary> The variable to be excluded. </summary>
 040        public string MatchVariable { get; set; }
 41        /// <summary> When matchVariable is a collection, operate on the selector to specify which elements in the colle
 042        public string SelectorMatchOperator { get; set; }
 43        /// <summary> When matchVariable is a collection, operator used to specify which elements in the collection this
 044        public string Selector { get; set; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallExclusion.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 ApplicationGatewayFirewallExclusion : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("matchVariable");
 019            writer.WriteStringValue(MatchVariable);
 020            writer.WritePropertyName("selectorMatchOperator");
 021            writer.WriteStringValue(SelectorMatchOperator);
 022            writer.WritePropertyName("selector");
 023            writer.WriteStringValue(Selector);
 024            writer.WriteEndObject();
 025        }
 26
 27        internal static ApplicationGatewayFirewallExclusion DeserializeApplicationGatewayFirewallExclusion(JsonElement e
 28        {
 029            string matchVariable = default;
 030            string selectorMatchOperator = default;
 031            string selector = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("matchVariable"))
 35                {
 036                    matchVariable = property.Value.GetString();
 037                    continue;
 38                }
 039                if (property.NameEquals("selectorMatchOperator"))
 40                {
 041                    selectorMatchOperator = property.Value.GetString();
 042                    continue;
 43                }
 044                if (property.NameEquals("selector"))
 45                {
 046                    selector = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new ApplicationGatewayFirewallExclusion(matchVariable, selectorMatchOperator, selector);
 51        }
 52    }
 53}