< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_RequestHeaderConfigurations()-0%100%
get_ResponseHeaderConfigurations()-0%100%
get_UrlConfiguration()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayRewriteRuleActionSet(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRewriteRuleActionSet.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> Set of actions in the Rewrite Rule in Application Gateway. </summary>
 13    public partial class ApplicationGatewayRewriteRuleActionSet
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayRewriteRuleActionSet. </summary>
 016        public ApplicationGatewayRewriteRuleActionSet()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayRewriteRuleActionSet. </summary>
 21        /// <param name="requestHeaderConfigurations"> Request Header Actions in the Action Set. </param>
 22        /// <param name="responseHeaderConfigurations"> Response Header Actions in the Action Set. </param>
 23        /// <param name="urlConfiguration"> Url Configuration Action in the Action Set. </param>
 024        internal ApplicationGatewayRewriteRuleActionSet(IList<ApplicationGatewayHeaderConfiguration> requestHeaderConfig
 25        {
 026            RequestHeaderConfigurations = requestHeaderConfigurations;
 027            ResponseHeaderConfigurations = responseHeaderConfigurations;
 028            UrlConfiguration = urlConfiguration;
 029        }
 30
 31        /// <summary> Request Header Actions in the Action Set. </summary>
 032        public IList<ApplicationGatewayHeaderConfiguration> RequestHeaderConfigurations { get; set; }
 33        /// <summary> Response Header Actions in the Action Set. </summary>
 034        public IList<ApplicationGatewayHeaderConfiguration> ResponseHeaderConfigurations { get; set; }
 35        /// <summary> Url Configuration Action in the Action Set. </summary>
 036        public ApplicationGatewayUrlConfiguration UrlConfiguration { get; set; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRewriteRuleActionSet.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 ApplicationGatewayRewriteRuleActionSet : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (RequestHeaderConfigurations != null)
 20            {
 021                writer.WritePropertyName("requestHeaderConfigurations");
 022                writer.WriteStartArray();
 023                foreach (var item in RequestHeaderConfigurations)
 24                {
 025                    writer.WriteObjectValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            if (ResponseHeaderConfigurations != null)
 30            {
 031                writer.WritePropertyName("responseHeaderConfigurations");
 032                writer.WriteStartArray();
 033                foreach (var item in ResponseHeaderConfigurations)
 34                {
 035                    writer.WriteObjectValue(item);
 36                }
 037                writer.WriteEndArray();
 38            }
 039            if (UrlConfiguration != null)
 40            {
 041                writer.WritePropertyName("urlConfiguration");
 042                writer.WriteObjectValue(UrlConfiguration);
 43            }
 044            writer.WriteEndObject();
 045        }
 46
 47        internal static ApplicationGatewayRewriteRuleActionSet DeserializeApplicationGatewayRewriteRuleActionSet(JsonEle
 48        {
 049            IList<ApplicationGatewayHeaderConfiguration> requestHeaderConfigurations = default;
 050            IList<ApplicationGatewayHeaderConfiguration> responseHeaderConfigurations = default;
 051            ApplicationGatewayUrlConfiguration urlConfiguration = default;
 052            foreach (var property in element.EnumerateObject())
 53            {
 054                if (property.NameEquals("requestHeaderConfigurations"))
 55                {
 056                    if (property.Value.ValueKind == JsonValueKind.Null)
 57                    {
 58                        continue;
 59                    }
 060                    List<ApplicationGatewayHeaderConfiguration> array = new List<ApplicationGatewayHeaderConfiguration>(
 061                    foreach (var item in property.Value.EnumerateArray())
 62                    {
 063                        if (item.ValueKind == JsonValueKind.Null)
 64                        {
 065                            array.Add(null);
 66                        }
 67                        else
 68                        {
 069                            array.Add(ApplicationGatewayHeaderConfiguration.DeserializeApplicationGatewayHeaderConfigura
 70                        }
 71                    }
 072                    requestHeaderConfigurations = array;
 073                    continue;
 74                }
 075                if (property.NameEquals("responseHeaderConfigurations"))
 76                {
 077                    if (property.Value.ValueKind == JsonValueKind.Null)
 78                    {
 79                        continue;
 80                    }
 081                    List<ApplicationGatewayHeaderConfiguration> array = new List<ApplicationGatewayHeaderConfiguration>(
 082                    foreach (var item in property.Value.EnumerateArray())
 83                    {
 084                        if (item.ValueKind == JsonValueKind.Null)
 85                        {
 086                            array.Add(null);
 87                        }
 88                        else
 89                        {
 090                            array.Add(ApplicationGatewayHeaderConfiguration.DeserializeApplicationGatewayHeaderConfigura
 91                        }
 92                    }
 093                    responseHeaderConfigurations = array;
 094                    continue;
 95                }
 096                if (property.NameEquals("urlConfiguration"))
 97                {
 098                    if (property.Value.ValueKind == JsonValueKind.Null)
 99                    {
 100                        continue;
 101                    }
 0102                    urlConfiguration = ApplicationGatewayUrlConfiguration.DeserializeApplicationGatewayUrlConfiguration(
 103                    continue;
 104                }
 105            }
 0106            return new ApplicationGatewayRewriteRuleActionSet(requestHeaderConfigurations, responseHeaderConfigurations,
 107        }
 108    }
 109}