< Summary

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

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_PrivateIPAddress()-0%100%
get_Subnet()-0%100%
get_PublicIPAddress()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureFirewallIPConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureFirewallIPConfiguration.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> IP configuration of an Azure Firewall. </summary>
 11    public partial class AzureFirewallIPConfiguration : SubResource
 12    {
 13        /// <summary> Initializes a new instance of AzureFirewallIPConfiguration. </summary>
 014        public AzureFirewallIPConfiguration()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of AzureFirewallIPConfiguration. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> Name of the resource that is unique within a resource group. This name can be used to ac
 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="privateIPAddress"> The Firewall Internal Load Balancer IP to be used as the next hop in User De
 24        /// <param name="subnet"> Reference to the subnet resource. This resource must be named &apos;AzureFirewallSubne
 25        /// <param name="publicIPAddress"> Reference to the PublicIP resource. This field is a mandatory input if subnet
 26        /// <param name="provisioningState"> The provisioning state of the Azure firewall IP configuration resource. </p
 027        internal AzureFirewallIPConfiguration(string id, string name, string etag, string type, string privateIPAddress,
 28        {
 029            Name = name;
 030            Etag = etag;
 031            Type = type;
 032            PrivateIPAddress = privateIPAddress;
 033            Subnet = subnet;
 034            PublicIPAddress = publicIPAddress;
 035            ProvisioningState = provisioningState;
 036        }
 37
 38        /// <summary> Name of the resource that is unique within a resource group. This name can be used to access the r
 039        public string Name { get; set; }
 40        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 041        public string Etag { get; }
 42        /// <summary> Type of the resource. </summary>
 043        public string Type { get; }
 44        /// <summary> The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. </summar
 045        public string PrivateIPAddress { get; }
 46        /// <summary> Reference to the subnet resource. This resource must be named &apos;AzureFirewallSubnet&apos; or &
 047        public SubResource Subnet { get; set; }
 48        /// <summary> Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. </summa
 049        public SubResource PublicIPAddress { get; set; }
 50        /// <summary> The provisioning state of the Azure firewall IP configuration resource. </summary>
 051        public ProvisioningState? ProvisioningState { get; }
 52    }
 53}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AzureFirewallIPConfiguration.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 AzureFirewallIPConfiguration : 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 (PrivateIPAddress != null)
 41            {
 042                writer.WritePropertyName("privateIPAddress");
 043                writer.WriteStringValue(PrivateIPAddress);
 44            }
 045            if (Subnet != null)
 46            {
 047                writer.WritePropertyName("subnet");
 048                writer.WriteObjectValue(Subnet);
 49            }
 050            if (PublicIPAddress != null)
 51            {
 052                writer.WritePropertyName("publicIPAddress");
 053                writer.WriteObjectValue(PublicIPAddress);
 54            }
 055            if (ProvisioningState != null)
 56            {
 057                writer.WritePropertyName("provisioningState");
 058                writer.WriteStringValue(ProvisioningState.Value.ToString());
 59            }
 060            writer.WriteEndObject();
 061            writer.WriteEndObject();
 062        }
 63
 64        internal static AzureFirewallIPConfiguration DeserializeAzureFirewallIPConfiguration(JsonElement element)
 65        {
 066            string name = default;
 067            string etag = default;
 068            string type = default;
 069            string id = default;
 070            string privateIPAddress = default;
 071            SubResource subnet = default;
 072            SubResource publicIPAddress = default;
 073            ProvisioningState? provisioningState = default;
 074            foreach (var property in element.EnumerateObject())
 75            {
 076                if (property.NameEquals("name"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    name = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("etag"))
 86                {
 087                    if (property.Value.ValueKind == JsonValueKind.Null)
 88                    {
 89                        continue;
 90                    }
 091                    etag = property.Value.GetString();
 092                    continue;
 93                }
 094                if (property.NameEquals("type"))
 95                {
 096                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 0100                    type = property.Value.GetString();
 0101                    continue;
 102                }
 0103                if (property.NameEquals("id"))
 104                {
 0105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 0109                    id = property.Value.GetString();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("properties"))
 113                {
 0114                    foreach (var property0 in property.Value.EnumerateObject())
 115                    {
 0116                        if (property0.NameEquals("privateIPAddress"))
 117                        {
 0118                            if (property0.Value.ValueKind == JsonValueKind.Null)
 119                            {
 120                                continue;
 121                            }
 0122                            privateIPAddress = property0.Value.GetString();
 0123                            continue;
 124                        }
 0125                        if (property0.NameEquals("subnet"))
 126                        {
 0127                            if (property0.Value.ValueKind == JsonValueKind.Null)
 128                            {
 129                                continue;
 130                            }
 0131                            subnet = DeserializeSubResource(property0.Value);
 0132                            continue;
 133                        }
 0134                        if (property0.NameEquals("publicIPAddress"))
 135                        {
 0136                            if (property0.Value.ValueKind == JsonValueKind.Null)
 137                            {
 138                                continue;
 139                            }
 0140                            publicIPAddress = DeserializeSubResource(property0.Value);
 0141                            continue;
 142                        }
 0143                        if (property0.NameEquals("provisioningState"))
 144                        {
 0145                            if (property0.Value.ValueKind == JsonValueKind.Null)
 146                            {
 147                                continue;
 148                            }
 0149                            provisioningState = new ProvisioningState(property0.Value.GetString());
 150                            continue;
 151                        }
 152                    }
 153                    continue;
 154                }
 155            }
 0156            return new AzureFirewallIPConfiguration(id, name, etag, type, privateIPAddress, subnet, publicIPAddress, pro
 157        }
 158    }
 159}