< Summary

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

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_DefaultBackendAddressPool()-0%100%
get_DefaultBackendHttpSettings()-0%100%
get_DefaultRewriteRuleSet()-0%100%
get_DefaultRedirectConfiguration()-0%100%
get_PathRules()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationGatewayUrlPathMap(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayUrlPathMap.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> UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. </summary>
 13    public partial class ApplicationGatewayUrlPathMap : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ApplicationGatewayUrlPathMap. </summary>
 016        public ApplicationGatewayUrlPathMap()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationGatewayUrlPathMap. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the URL path map that is unique within an Application Gateway. </param>
 23        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 24        /// <param name="type"> Type of the resource. </param>
 25        /// <param name="defaultBackendAddressPool"> Default backend address pool resource of URL path map. </param>
 26        /// <param name="defaultBackendHttpSettings"> Default backend http settings resource of URL path map. </param>
 27        /// <param name="defaultRewriteRuleSet"> Default Rewrite rule set resource of URL path map. </param>
 28        /// <param name="defaultRedirectConfiguration"> Default redirect configuration resource of URL path map. </param
 29        /// <param name="pathRules"> Path rule of URL path map resource. </param>
 30        /// <param name="provisioningState"> The provisioning state of the URL path map resource. </param>
 031        internal ApplicationGatewayUrlPathMap(string id, string name, string etag, string type, SubResource defaultBacke
 32        {
 033            Name = name;
 034            Etag = etag;
 035            Type = type;
 036            DefaultBackendAddressPool = defaultBackendAddressPool;
 037            DefaultBackendHttpSettings = defaultBackendHttpSettings;
 038            DefaultRewriteRuleSet = defaultRewriteRuleSet;
 039            DefaultRedirectConfiguration = defaultRedirectConfiguration;
 040            PathRules = pathRules;
 041            ProvisioningState = provisioningState;
 042        }
 43
 44        /// <summary> Name of the URL path map that is unique within an Application Gateway. </summary>
 045        public string Name { get; set; }
 46        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 047        public string Etag { get; }
 48        /// <summary> Type of the resource. </summary>
 049        public string Type { get; }
 50        /// <summary> Default backend address pool resource of URL path map. </summary>
 051        public SubResource DefaultBackendAddressPool { get; set; }
 52        /// <summary> Default backend http settings resource of URL path map. </summary>
 053        public SubResource DefaultBackendHttpSettings { get; set; }
 54        /// <summary> Default Rewrite rule set resource of URL path map. </summary>
 055        public SubResource DefaultRewriteRuleSet { get; set; }
 56        /// <summary> Default redirect configuration resource of URL path map. </summary>
 057        public SubResource DefaultRedirectConfiguration { get; set; }
 58        /// <summary> Path rule of URL path map resource. </summary>
 059        public IList<ApplicationGatewayPathRule> PathRules { get; set; }
 60        /// <summary> The provisioning state of the URL path map resource. </summary>
 061        public ProvisioningState? ProvisioningState { get; }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ApplicationGatewayUrlPathMap.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 ApplicationGatewayUrlPathMap : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Etag != null)
 25            {
 026                writer.WritePropertyName("etag");
 027                writer.WriteStringValue(Etag);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            if (Id != null)
 35            {
 036                writer.WritePropertyName("id");
 037                writer.WriteStringValue(Id);
 38            }
 039            writer.WritePropertyName("properties");
 040            writer.WriteStartObject();
 041            if (DefaultBackendAddressPool != null)
 42            {
 043                writer.WritePropertyName("defaultBackendAddressPool");
 044                writer.WriteObjectValue(DefaultBackendAddressPool);
 45            }
 046            if (DefaultBackendHttpSettings != null)
 47            {
 048                writer.WritePropertyName("defaultBackendHttpSettings");
 049                writer.WriteObjectValue(DefaultBackendHttpSettings);
 50            }
 051            if (DefaultRewriteRuleSet != null)
 52            {
 053                writer.WritePropertyName("defaultRewriteRuleSet");
 054                writer.WriteObjectValue(DefaultRewriteRuleSet);
 55            }
 056            if (DefaultRedirectConfiguration != null)
 57            {
 058                writer.WritePropertyName("defaultRedirectConfiguration");
 059                writer.WriteObjectValue(DefaultRedirectConfiguration);
 60            }
 061            if (PathRules != null)
 62            {
 063                writer.WritePropertyName("pathRules");
 064                writer.WriteStartArray();
 065                foreach (var item in PathRules)
 66                {
 067                    writer.WriteObjectValue(item);
 68                }
 069                writer.WriteEndArray();
 70            }
 071            if (ProvisioningState != null)
 72            {
 073                writer.WritePropertyName("provisioningState");
 074                writer.WriteStringValue(ProvisioningState.Value.ToString());
 75            }
 076            writer.WriteEndObject();
 077            writer.WriteEndObject();
 078        }
 79
 80        internal static ApplicationGatewayUrlPathMap DeserializeApplicationGatewayUrlPathMap(JsonElement element)
 81        {
 082            string name = default;
 083            string etag = default;
 084            string type = default;
 085            string id = default;
 086            SubResource defaultBackendAddressPool = default;
 087            SubResource defaultBackendHttpSettings = default;
 088            SubResource defaultRewriteRuleSet = default;
 089            SubResource defaultRedirectConfiguration = default;
 090            IList<ApplicationGatewayPathRule> pathRules = default;
 091            ProvisioningState? provisioningState = default;
 092            foreach (var property in element.EnumerateObject())
 93            {
 094                if (property.NameEquals("name"))
 95                {
 096                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 0100                    name = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("etag"))
 104                {
 0105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 0109                    etag = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("type"))
 113                {
 0114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 0118                    type = property.Value.GetString();
 0119                    continue;
 120                }
 0121                if (property.NameEquals("id"))
 122                {
 0123                    if (property.Value.ValueKind == JsonValueKind.Null)
 124                    {
 125                        continue;
 126                    }
 0127                    id = property.Value.GetString();
 0128                    continue;
 129                }
 0130                if (property.NameEquals("properties"))
 131                {
 0132                    foreach (var property0 in property.Value.EnumerateObject())
 133                    {
 0134                        if (property0.NameEquals("defaultBackendAddressPool"))
 135                        {
 0136                            if (property0.Value.ValueKind == JsonValueKind.Null)
 137                            {
 138                                continue;
 139                            }
 0140                            defaultBackendAddressPool = DeserializeSubResource(property0.Value);
 0141                            continue;
 142                        }
 0143                        if (property0.NameEquals("defaultBackendHttpSettings"))
 144                        {
 0145                            if (property0.Value.ValueKind == JsonValueKind.Null)
 146                            {
 147                                continue;
 148                            }
 0149                            defaultBackendHttpSettings = DeserializeSubResource(property0.Value);
 0150                            continue;
 151                        }
 0152                        if (property0.NameEquals("defaultRewriteRuleSet"))
 153                        {
 0154                            if (property0.Value.ValueKind == JsonValueKind.Null)
 155                            {
 156                                continue;
 157                            }
 0158                            defaultRewriteRuleSet = DeserializeSubResource(property0.Value);
 0159                            continue;
 160                        }
 0161                        if (property0.NameEquals("defaultRedirectConfiguration"))
 162                        {
 0163                            if (property0.Value.ValueKind == JsonValueKind.Null)
 164                            {
 165                                continue;
 166                            }
 0167                            defaultRedirectConfiguration = DeserializeSubResource(property0.Value);
 0168                            continue;
 169                        }
 0170                        if (property0.NameEquals("pathRules"))
 171                        {
 0172                            if (property0.Value.ValueKind == JsonValueKind.Null)
 173                            {
 174                                continue;
 175                            }
 0176                            List<ApplicationGatewayPathRule> array = new List<ApplicationGatewayPathRule>();
 0177                            foreach (var item in property0.Value.EnumerateArray())
 178                            {
 0179                                if (item.ValueKind == JsonValueKind.Null)
 180                                {
 0181                                    array.Add(null);
 182                                }
 183                                else
 184                                {
 0185                                    array.Add(ApplicationGatewayPathRule.DeserializeApplicationGatewayPathRule(item));
 186                                }
 187                            }
 0188                            pathRules = array;
 0189                            continue;
 190                        }
 0191                        if (property0.NameEquals("provisioningState"))
 192                        {
 0193                            if (property0.Value.ValueKind == JsonValueKind.Null)
 194                            {
 195                                continue;
 196                            }
 0197                            provisioningState = new ProvisioningState(property0.Value.GetString());
 198                            continue;
 199                        }
 200                    }
 201                    continue;
 202                }
 203            }
 0204            return new ApplicationGatewayUrlPathMap(id, name, etag, type, defaultBackendAddressPool, defaultBackendHttpS
 205        }
 206    }
 207}