< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_RuleType()-0%100%
get_Priority()-0%100%
get_BackendAddressPool()-0%100%
get_BackendHttpSettings()-0%100%
get_HttpListener()-0%100%
get_UrlPathMap()-0%100%
get_RewriteRuleSet()-0%100%
get_RedirectConfiguration()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayRequestRoutingRule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRequestRoutingRule.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> Request routing rule of an application gateway. </summary>
 11    public partial class ApplicationGatewayRequestRoutingRule : SubResource
 12    {
 13        /// <summary> Initializes a new instance of ApplicationGatewayRequestRoutingRule. </summary>
 014        public ApplicationGatewayRequestRoutingRule()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ApplicationGatewayRequestRoutingRule. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the request routing rule that is unique within an Application Gateway. </param>
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="type"> Type of the resource. </param>
 23        /// <param name="ruleType"> Rule type. </param>
 24        /// <param name="priority"> Priority of the request routing rule. </param>
 25        /// <param name="backendAddressPool"> Backend address pool resource of the application gateway. </param>
 26        /// <param name="backendHttpSettings"> Backend http settings resource of the application gateway. </param>
 27        /// <param name="httpListener"> Http listener resource of the application gateway. </param>
 28        /// <param name="urlPathMap"> URL path map resource of the application gateway. </param>
 29        /// <param name="rewriteRuleSet"> Rewrite Rule Set resource in Basic rule of the application gateway. </param>
 30        /// <param name="redirectConfiguration"> Redirect configuration resource of the application gateway. </param>
 31        /// <param name="provisioningState"> The provisioning state of the request routing rule resource. </param>
 032        internal ApplicationGatewayRequestRoutingRule(string id, string name, string etag, string type, ApplicationGatew
 33        {
 034            Name = name;
 035            Etag = etag;
 036            Type = type;
 037            RuleType = ruleType;
 038            Priority = priority;
 039            BackendAddressPool = backendAddressPool;
 040            BackendHttpSettings = backendHttpSettings;
 041            HttpListener = httpListener;
 042            UrlPathMap = urlPathMap;
 043            RewriteRuleSet = rewriteRuleSet;
 044            RedirectConfiguration = redirectConfiguration;
 045            ProvisioningState = provisioningState;
 046        }
 47
 48        /// <summary> Name of the request routing rule that is unique within an Application Gateway. </summary>
 049        public string Name { get; set; }
 50        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 051        public string Etag { get; }
 52        /// <summary> Type of the resource. </summary>
 053        public string Type { get; }
 54        /// <summary> Rule type. </summary>
 055        public ApplicationGatewayRequestRoutingRuleType? RuleType { get; set; }
 56        /// <summary> Priority of the request routing rule. </summary>
 057        public int? Priority { get; set; }
 58        /// <summary> Backend address pool resource of the application gateway. </summary>
 059        public SubResource BackendAddressPool { get; set; }
 60        /// <summary> Backend http settings resource of the application gateway. </summary>
 061        public SubResource BackendHttpSettings { get; set; }
 62        /// <summary> Http listener resource of the application gateway. </summary>
 063        public SubResource HttpListener { get; set; }
 64        /// <summary> URL path map resource of the application gateway. </summary>
 065        public SubResource UrlPathMap { get; set; }
 66        /// <summary> Rewrite Rule Set resource in Basic rule of the application gateway. </summary>
 067        public SubResource RewriteRuleSet { get; set; }
 68        /// <summary> Redirect configuration resource of the application gateway. </summary>
 069        public SubResource RedirectConfiguration { get; set; }
 70        /// <summary> The provisioning state of the request routing rule resource. </summary>
 071        public ProvisioningState? ProvisioningState { get; }
 72    }
 73}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayRequestRoutingRule.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 ApplicationGatewayRequestRoutingRule : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (RuleType != null)
 41            {
 042                writer.WritePropertyName("ruleType");
 043                writer.WriteStringValue(RuleType.Value.ToString());
 44            }
 045            if (Priority != null)
 46            {
 047                writer.WritePropertyName("priority");
 048                writer.WriteNumberValue(Priority.Value);
 49            }
 050            if (BackendAddressPool != null)
 51            {
 052                writer.WritePropertyName("backendAddressPool");
 053                writer.WriteObjectValue(BackendAddressPool);
 54            }
 055            if (BackendHttpSettings != null)
 56            {
 057                writer.WritePropertyName("backendHttpSettings");
 058                writer.WriteObjectValue(BackendHttpSettings);
 59            }
 060            if (HttpListener != null)
 61            {
 062                writer.WritePropertyName("httpListener");
 063                writer.WriteObjectValue(HttpListener);
 64            }
 065            if (UrlPathMap != null)
 66            {
 067                writer.WritePropertyName("urlPathMap");
 068                writer.WriteObjectValue(UrlPathMap);
 69            }
 070            if (RewriteRuleSet != null)
 71            {
 072                writer.WritePropertyName("rewriteRuleSet");
 073                writer.WriteObjectValue(RewriteRuleSet);
 74            }
 075            if (RedirectConfiguration != null)
 76            {
 077                writer.WritePropertyName("redirectConfiguration");
 078                writer.WriteObjectValue(RedirectConfiguration);
 79            }
 080            if (ProvisioningState != null)
 81            {
 082                writer.WritePropertyName("provisioningState");
 083                writer.WriteStringValue(ProvisioningState.Value.ToString());
 84            }
 085            writer.WriteEndObject();
 086            writer.WriteEndObject();
 087        }
 88
 89        internal static ApplicationGatewayRequestRoutingRule DeserializeApplicationGatewayRequestRoutingRule(JsonElement
 90        {
 091            string name = default;
 092            string etag = default;
 093            string type = default;
 094            string id = default;
 095            ApplicationGatewayRequestRoutingRuleType? ruleType = default;
 096            int? priority = default;
 097            SubResource backendAddressPool = default;
 098            SubResource backendHttpSettings = default;
 099            SubResource httpListener = default;
 0100            SubResource urlPathMap = default;
 0101            SubResource rewriteRuleSet = default;
 0102            SubResource redirectConfiguration = default;
 0103            ProvisioningState? provisioningState = default;
 0104            foreach (var property in element.EnumerateObject())
 105            {
 0106                if (property.NameEquals("name"))
 107                {
 0108                    if (property.Value.ValueKind == JsonValueKind.Null)
 109                    {
 110                        continue;
 111                    }
 0112                    name = property.Value.GetString();
 0113                    continue;
 114                }
 0115                if (property.NameEquals("etag"))
 116                {
 0117                    if (property.Value.ValueKind == JsonValueKind.Null)
 118                    {
 119                        continue;
 120                    }
 0121                    etag = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("type"))
 125                {
 0126                    if (property.Value.ValueKind == JsonValueKind.Null)
 127                    {
 128                        continue;
 129                    }
 0130                    type = property.Value.GetString();
 0131                    continue;
 132                }
 0133                if (property.NameEquals("id"))
 134                {
 0135                    if (property.Value.ValueKind == JsonValueKind.Null)
 136                    {
 137                        continue;
 138                    }
 0139                    id = property.Value.GetString();
 0140                    continue;
 141                }
 0142                if (property.NameEquals("properties"))
 143                {
 0144                    foreach (var property0 in property.Value.EnumerateObject())
 145                    {
 0146                        if (property0.NameEquals("ruleType"))
 147                        {
 0148                            if (property0.Value.ValueKind == JsonValueKind.Null)
 149                            {
 150                                continue;
 151                            }
 0152                            ruleType = new ApplicationGatewayRequestRoutingRuleType(property0.Value.GetString());
 0153                            continue;
 154                        }
 0155                        if (property0.NameEquals("priority"))
 156                        {
 0157                            if (property0.Value.ValueKind == JsonValueKind.Null)
 158                            {
 159                                continue;
 160                            }
 0161                            priority = property0.Value.GetInt32();
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("backendAddressPool"))
 165                        {
 0166                            if (property0.Value.ValueKind == JsonValueKind.Null)
 167                            {
 168                                continue;
 169                            }
 0170                            backendAddressPool = DeserializeSubResource(property0.Value);
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("backendHttpSettings"))
 174                        {
 0175                            if (property0.Value.ValueKind == JsonValueKind.Null)
 176                            {
 177                                continue;
 178                            }
 0179                            backendHttpSettings = DeserializeSubResource(property0.Value);
 0180                            continue;
 181                        }
 0182                        if (property0.NameEquals("httpListener"))
 183                        {
 0184                            if (property0.Value.ValueKind == JsonValueKind.Null)
 185                            {
 186                                continue;
 187                            }
 0188                            httpListener = DeserializeSubResource(property0.Value);
 0189                            continue;
 190                        }
 0191                        if (property0.NameEquals("urlPathMap"))
 192                        {
 0193                            if (property0.Value.ValueKind == JsonValueKind.Null)
 194                            {
 195                                continue;
 196                            }
 0197                            urlPathMap = DeserializeSubResource(property0.Value);
 0198                            continue;
 199                        }
 0200                        if (property0.NameEquals("rewriteRuleSet"))
 201                        {
 0202                            if (property0.Value.ValueKind == JsonValueKind.Null)
 203                            {
 204                                continue;
 205                            }
 0206                            rewriteRuleSet = DeserializeSubResource(property0.Value);
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("redirectConfiguration"))
 210                        {
 0211                            if (property0.Value.ValueKind == JsonValueKind.Null)
 212                            {
 213                                continue;
 214                            }
 0215                            redirectConfiguration = DeserializeSubResource(property0.Value);
 0216                            continue;
 217                        }
 0218                        if (property0.NameEquals("provisioningState"))
 219                        {
 0220                            if (property0.Value.ValueKind == JsonValueKind.Null)
 221                            {
 222                                continue;
 223                            }
 0224                            provisioningState = new ProvisioningState(property0.Value.GetString());
 225                            continue;
 226                        }
 227                    }
 228                    continue;
 229                }
 230            }
 0231            return new ApplicationGatewayRequestRoutingRule(id, name, etag, type, ruleType, priority, backendAddressPool
 232        }
 233    }
 234}