< Summary

Class:Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRule
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallRule.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallRule.Serialization.cs
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:86
Line coverage:0% (0 of 27)
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_RuleId()-0%100%
get_Description()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayFirewallRule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallRule.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> A web application firewall rule. </summary>
 11    public partial class ApplicationGatewayFirewallRule
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayFirewallRule. </summary>
 14        /// <param name="ruleId"> The identifier of the web application firewall rule. </param>
 015        public ApplicationGatewayFirewallRule(int ruleId)
 16        {
 017            RuleId = ruleId;
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayFirewallRule. </summary>
 21        /// <param name="ruleId"> The identifier of the web application firewall rule. </param>
 22        /// <param name="description"> The description of the web application firewall rule. </param>
 023        internal ApplicationGatewayFirewallRule(int ruleId, string description)
 24        {
 025            RuleId = ruleId;
 026            Description = description;
 027        }
 28
 29        /// <summary> The identifier of the web application firewall rule. </summary>
 030        public int RuleId { get; set; }
 31        /// <summary> The description of the web application firewall rule. </summary>
 032        public string Description { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayFirewallRule.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 ApplicationGatewayFirewallRule : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("ruleId");
 019            writer.WriteNumberValue(RuleId);
 020            if (Description != null)
 21            {
 022                writer.WritePropertyName("description");
 023                writer.WriteStringValue(Description);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static ApplicationGatewayFirewallRule DeserializeApplicationGatewayFirewallRule(JsonElement element)
 29        {
 030            int ruleId = default;
 031            string description = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("ruleId"))
 35                {
 036                    ruleId = property.Value.GetInt32();
 037                    continue;
 38                }
 039                if (property.NameEquals("description"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    description = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 049            return new ApplicationGatewayFirewallRule(ruleId, description);
 50        }
 51    }
 52}