< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_ProvisioningState()-0%100%
get_FqdnTagName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureFirewallFqdnTag(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureFirewallFqdnTag.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> Azure Firewall FQDN Tag Resource. </summary>
 13    public partial class AzureFirewallFqdnTag : Resource
 14    {
 15        /// <summary> Initializes a new instance of AzureFirewallFqdnTag. </summary>
 016        public AzureFirewallFqdnTag()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of AzureFirewallFqdnTag. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 27        /// <param name="provisioningState"> The provisioning state of the Azure firewall FQDN tag resource. </param>
 28        /// <param name="fqdnTagName"> The name of this FQDN Tag. </param>
 029        internal AzureFirewallFqdnTag(string id, string name, string type, string location, IDictionary<string, string> 
 30        {
 031            Etag = etag;
 032            ProvisioningState = provisioningState;
 033            FqdnTagName = fqdnTagName;
 034        }
 35
 36        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 037        public string Etag { get; }
 38        /// <summary> The provisioning state of the Azure firewall FQDN tag resource. </summary>
 039        public ProvisioningState? ProvisioningState { get; }
 40        /// <summary> The name of this FQDN Tag. </summary>
 041        public string FqdnTagName { get; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureFirewallFqdnTag.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 AzureFirewallFqdnTag : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Etag != null)
 20            {
 021                writer.WritePropertyName("etag");
 022                writer.WriteStringValue(Etag);
 23            }
 024            if (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            if (Name != null)
 30            {
 031                writer.WritePropertyName("name");
 032                writer.WriteStringValue(Name);
 33            }
 034            if (Type != null)
 35            {
 036                writer.WritePropertyName("type");
 037                writer.WriteStringValue(Type);
 38            }
 039            if (Location != null)
 40            {
 041                writer.WritePropertyName("location");
 042                writer.WriteStringValue(Location);
 43            }
 044            if (Tags != null)
 45            {
 046                writer.WritePropertyName("tags");
 047                writer.WriteStartObject();
 048                foreach (var item in Tags)
 49                {
 050                    writer.WritePropertyName(item.Key);
 051                    writer.WriteStringValue(item.Value);
 52                }
 053                writer.WriteEndObject();
 54            }
 055            writer.WritePropertyName("properties");
 056            writer.WriteStartObject();
 057            if (ProvisioningState != null)
 58            {
 059                writer.WritePropertyName("provisioningState");
 060                writer.WriteStringValue(ProvisioningState.Value.ToString());
 61            }
 062            if (FqdnTagName != null)
 63            {
 064                writer.WritePropertyName("fqdnTagName");
 065                writer.WriteStringValue(FqdnTagName);
 66            }
 067            writer.WriteEndObject();
 068            writer.WriteEndObject();
 069        }
 70
 71        internal static AzureFirewallFqdnTag DeserializeAzureFirewallFqdnTag(JsonElement element)
 72        {
 073            string etag = default;
 074            string id = default;
 075            string name = default;
 076            string type = default;
 077            string location = default;
 078            IDictionary<string, string> tags = default;
 079            ProvisioningState? provisioningState = default;
 080            string fqdnTagName = default;
 081            foreach (var property in element.EnumerateObject())
 82            {
 083                if (property.NameEquals("etag"))
 84                {
 085                    if (property.Value.ValueKind == JsonValueKind.Null)
 86                    {
 87                        continue;
 88                    }
 089                    etag = property.Value.GetString();
 090                    continue;
 91                }
 092                if (property.NameEquals("id"))
 93                {
 094                    if (property.Value.ValueKind == JsonValueKind.Null)
 95                    {
 96                        continue;
 97                    }
 098                    id = property.Value.GetString();
 099                    continue;
 100                }
 0101                if (property.NameEquals("name"))
 102                {
 0103                    if (property.Value.ValueKind == JsonValueKind.Null)
 104                    {
 105                        continue;
 106                    }
 0107                    name = property.Value.GetString();
 0108                    continue;
 109                }
 0110                if (property.NameEquals("type"))
 111                {
 0112                    if (property.Value.ValueKind == JsonValueKind.Null)
 113                    {
 114                        continue;
 115                    }
 0116                    type = property.Value.GetString();
 0117                    continue;
 118                }
 0119                if (property.NameEquals("location"))
 120                {
 0121                    if (property.Value.ValueKind == JsonValueKind.Null)
 122                    {
 123                        continue;
 124                    }
 0125                    location = property.Value.GetString();
 0126                    continue;
 127                }
 0128                if (property.NameEquals("tags"))
 129                {
 0130                    if (property.Value.ValueKind == JsonValueKind.Null)
 131                    {
 132                        continue;
 133                    }
 0134                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0135                    foreach (var property0 in property.Value.EnumerateObject())
 136                    {
 0137                        if (property0.Value.ValueKind == JsonValueKind.Null)
 138                        {
 0139                            dictionary.Add(property0.Name, null);
 140                        }
 141                        else
 142                        {
 0143                            dictionary.Add(property0.Name, property0.Value.GetString());
 144                        }
 145                    }
 0146                    tags = dictionary;
 0147                    continue;
 148                }
 0149                if (property.NameEquals("properties"))
 150                {
 0151                    foreach (var property0 in property.Value.EnumerateObject())
 152                    {
 0153                        if (property0.NameEquals("provisioningState"))
 154                        {
 0155                            if (property0.Value.ValueKind == JsonValueKind.Null)
 156                            {
 157                                continue;
 158                            }
 0159                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0160                            continue;
 161                        }
 0162                        if (property0.NameEquals("fqdnTagName"))
 163                        {
 0164                            if (property0.Value.ValueKind == JsonValueKind.Null)
 165                            {
 166                                continue;
 167                            }
 0168                            fqdnTagName = property0.Value.GetString();
 169                            continue;
 170                        }
 171                    }
 172                    continue;
 173                }
 174            }
 0175            return new AzureFirewallFqdnTag(id, name, type, location, tags, etag, provisioningState, fqdnTagName);
 176        }
 177    }
 178}