< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Variable()-0%100%
get_Pattern()-0%100%
get_IgnoreCase()-0%100%
get_Negate()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayRewriteRuleCondition(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRewriteRuleCondition.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> Set of conditions in the Rewrite Rule in Application Gateway. </summary>
 11    public partial class ApplicationGatewayRewriteRuleCondition
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayRewriteRuleCondition. </summary>
 014        public ApplicationGatewayRewriteRuleCondition()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ApplicationGatewayRewriteRuleCondition. </summary>
 19        /// <param name="variable"> The condition parameter of the RewriteRuleCondition. </param>
 20        /// <param name="pattern"> The pattern, either fixed string or regular expression, that evaluates the truthfulne
 21        /// <param name="ignoreCase"> Setting this paramter to truth value with force the pattern to do a case in-sensit
 22        /// <param name="negate"> Setting this value as truth will force to check the negation of the condition given by
 023        internal ApplicationGatewayRewriteRuleCondition(string variable, string pattern, bool? ignoreCase, bool? negate)
 24        {
 025            Variable = variable;
 026            Pattern = pattern;
 027            IgnoreCase = ignoreCase;
 028            Negate = negate;
 029        }
 30
 31        /// <summary> The condition parameter of the RewriteRuleCondition. </summary>
 032        public string Variable { get; set; }
 33        /// <summary> The pattern, either fixed string or regular expression, that evaluates the truthfulness of the con
 034        public string Pattern { get; set; }
 35        /// <summary> Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison. 
 036        public bool? IgnoreCase { get; set; }
 37        /// <summary> Setting this value as truth will force to check the negation of the condition given by the user. <
 038        public bool? Negate { get; set; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRewriteRuleCondition.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 ApplicationGatewayRewriteRuleCondition : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Variable != null)
 19            {
 020                writer.WritePropertyName("variable");
 021                writer.WriteStringValue(Variable);
 22            }
 023            if (Pattern != null)
 24            {
 025                writer.WritePropertyName("pattern");
 026                writer.WriteStringValue(Pattern);
 27            }
 028            if (IgnoreCase != null)
 29            {
 030                writer.WritePropertyName("ignoreCase");
 031                writer.WriteBooleanValue(IgnoreCase.Value);
 32            }
 033            if (Negate != null)
 34            {
 035                writer.WritePropertyName("negate");
 036                writer.WriteBooleanValue(Negate.Value);
 37            }
 038            writer.WriteEndObject();
 039        }
 40
 41        internal static ApplicationGatewayRewriteRuleCondition DeserializeApplicationGatewayRewriteRuleCondition(JsonEle
 42        {
 043            string variable = default;
 044            string pattern = default;
 045            bool? ignoreCase = default;
 046            bool? negate = default;
 047            foreach (var property in element.EnumerateObject())
 48            {
 049                if (property.NameEquals("variable"))
 50                {
 051                    if (property.Value.ValueKind == JsonValueKind.Null)
 52                    {
 53                        continue;
 54                    }
 055                    variable = property.Value.GetString();
 056                    continue;
 57                }
 058                if (property.NameEquals("pattern"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    pattern = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("ignoreCase"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    ignoreCase = property.Value.GetBoolean();
 074                    continue;
 75                }
 076                if (property.NameEquals("negate"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    negate = property.Value.GetBoolean();
 83                    continue;
 84                }
 85            }
 086            return new ApplicationGatewayRewriteRuleCondition(variable, pattern, ignoreCase, negate);
 87        }
 88    }
 89}