< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_PrivateDnsZoneId()-0%100%
get_RecordSets()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateDnsZoneConfig(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateDnsZoneConfig.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> PrivateDnsZoneConfig resource. </summary>
 13    public partial class PrivateDnsZoneConfig
 14    {
 15        /// <summary> Initializes a new instance of PrivateDnsZoneConfig. </summary>
 016        public PrivateDnsZoneConfig()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateDnsZoneConfig. </summary>
 21        /// <param name="name"> Name of the resource that is unique within a resource group. This name can be used to ac
 22        /// <param name="privateDnsZoneId"> The resource id of the private dns zone. </param>
 23        /// <param name="recordSets"> A collection of information regarding a recordSet, holding information to identify
 024        internal PrivateDnsZoneConfig(string name, string privateDnsZoneId, IList<RecordSet> recordSets)
 25        {
 026            Name = name;
 027            PrivateDnsZoneId = privateDnsZoneId;
 028            RecordSets = recordSets;
 029        }
 30
 31        /// <summary> Name of the resource that is unique within a resource group. This name can be used to access the r
 032        public string Name { get; set; }
 33        /// <summary> The resource id of the private dns zone. </summary>
 034        public string PrivateDnsZoneId { get; set; }
 35        /// <summary> A collection of information regarding a recordSet, holding information to identify private resourc
 036        public IList<RecordSet> RecordSets { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateDnsZoneConfig.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 PrivateDnsZoneConfig : 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            writer.WritePropertyName("properties");
 025            writer.WriteStartObject();
 026            if (PrivateDnsZoneId != null)
 27            {
 028                writer.WritePropertyName("privateDnsZoneId");
 029                writer.WriteStringValue(PrivateDnsZoneId);
 30            }
 031            if (RecordSets != null)
 32            {
 033                writer.WritePropertyName("recordSets");
 034                writer.WriteStartArray();
 035                foreach (var item in RecordSets)
 36                {
 037                    writer.WriteObjectValue(item);
 38                }
 039                writer.WriteEndArray();
 40            }
 041            writer.WriteEndObject();
 042            writer.WriteEndObject();
 043        }
 44
 45        internal static PrivateDnsZoneConfig DeserializePrivateDnsZoneConfig(JsonElement element)
 46        {
 047            string name = default;
 048            string privateDnsZoneId = default;
 049            IList<RecordSet> recordSets = default;
 050            foreach (var property in element.EnumerateObject())
 51            {
 052                if (property.NameEquals("name"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    name = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("properties"))
 62                {
 063                    foreach (var property0 in property.Value.EnumerateObject())
 64                    {
 065                        if (property0.NameEquals("privateDnsZoneId"))
 66                        {
 067                            if (property0.Value.ValueKind == JsonValueKind.Null)
 68                            {
 69                                continue;
 70                            }
 071                            privateDnsZoneId = property0.Value.GetString();
 072                            continue;
 73                        }
 074                        if (property0.NameEquals("recordSets"))
 75                        {
 076                            if (property0.Value.ValueKind == JsonValueKind.Null)
 77                            {
 78                                continue;
 79                            }
 080                            List<RecordSet> array = new List<RecordSet>();
 081                            foreach (var item in property0.Value.EnumerateArray())
 82                            {
 083                                if (item.ValueKind == JsonValueKind.Null)
 84                                {
 085                                    array.Add(null);
 86                                }
 87                                else
 88                                {
 089                                    array.Add(RecordSet.DeserializeRecordSet(item));
 90                                }
 91                            }
 092                            recordSets = array;
 93                            continue;
 94                        }
 95                    }
 96                    continue;
 97                }
 98            }
 099            return new PrivateDnsZoneConfig(name, privateDnsZoneId, recordSets);
 100        }
 101    }
 102}