< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_ProvisioningState()-0%100%
get_PrivateDnsZoneConfigs()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateDnsZoneGroup(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateDnsZoneGroup.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> Private dns zone group resource. </summary>
 13    public partial class PrivateDnsZoneGroup : SubResource
 14    {
 15        /// <summary> Initializes a new instance of PrivateDnsZoneGroup. </summary>
 016        public PrivateDnsZoneGroup()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateDnsZoneGroup. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Name of the resource that is unique within a resource group. This name can be used to ac
 23        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 24        /// <param name="provisioningState"> The provisioning state of the private dns zone group resource. </param>
 25        /// <param name="privateDnsZoneConfigs"> A collection of private dns zone configurations of the private dns zone
 026        internal PrivateDnsZoneGroup(string id, string name, string etag, ProvisioningState? provisioningState, IList<Pr
 27        {
 028            Name = name;
 029            Etag = etag;
 030            ProvisioningState = provisioningState;
 031            PrivateDnsZoneConfigs = privateDnsZoneConfigs;
 032        }
 33
 34        /// <summary> Name of the resource that is unique within a resource group. This name can be used to access the r
 035        public string Name { get; set; }
 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 private dns zone group resource. </summary>
 039        public ProvisioningState? ProvisioningState { get; }
 40        /// <summary> A collection of private dns zone configurations of the private dns zone group. </summary>
 041        public IList<PrivateDnsZoneConfig> PrivateDnsZoneConfigs { get; set; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateDnsZoneGroup.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 PrivateDnsZoneGroup : 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 (Id != null)
 30            {
 031                writer.WritePropertyName("id");
 032                writer.WriteStringValue(Id);
 33            }
 034            writer.WritePropertyName("properties");
 035            writer.WriteStartObject();
 036            if (ProvisioningState != null)
 37            {
 038                writer.WritePropertyName("provisioningState");
 039                writer.WriteStringValue(ProvisioningState.Value.ToString());
 40            }
 041            if (PrivateDnsZoneConfigs != null)
 42            {
 043                writer.WritePropertyName("privateDnsZoneConfigs");
 044                writer.WriteStartArray();
 045                foreach (var item in PrivateDnsZoneConfigs)
 46                {
 047                    writer.WriteObjectValue(item);
 48                }
 049                writer.WriteEndArray();
 50            }
 051            writer.WriteEndObject();
 052            writer.WriteEndObject();
 053        }
 54
 55        internal static PrivateDnsZoneGroup DeserializePrivateDnsZoneGroup(JsonElement element)
 56        {
 057            string name = default;
 058            string etag = default;
 059            string id = default;
 060            ProvisioningState? provisioningState = default;
 061            IList<PrivateDnsZoneConfig> privateDnsZoneConfigs = default;
 062            foreach (var property in element.EnumerateObject())
 63            {
 064                if (property.NameEquals("name"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    name = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("etag"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    etag = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("id"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    id = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("properties"))
 92                {
 093                    foreach (var property0 in property.Value.EnumerateObject())
 94                    {
 095                        if (property0.NameEquals("provisioningState"))
 96                        {
 097                            if (property0.Value.ValueKind == JsonValueKind.Null)
 98                            {
 99                                continue;
 100                            }
 0101                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0102                            continue;
 103                        }
 0104                        if (property0.NameEquals("privateDnsZoneConfigs"))
 105                        {
 0106                            if (property0.Value.ValueKind == JsonValueKind.Null)
 107                            {
 108                                continue;
 109                            }
 0110                            List<PrivateDnsZoneConfig> array = new List<PrivateDnsZoneConfig>();
 0111                            foreach (var item in property0.Value.EnumerateArray())
 112                            {
 0113                                if (item.ValueKind == JsonValueKind.Null)
 114                                {
 0115                                    array.Add(null);
 116                                }
 117                                else
 118                                {
 0119                                    array.Add(PrivateDnsZoneConfig.DeserializePrivateDnsZoneConfig(item));
 120                                }
 121                            }
 0122                            privateDnsZoneConfigs = array;
 123                            continue;
 124                        }
 125                    }
 126                    continue;
 127                }
 128            }
 0129            return new PrivateDnsZoneGroup(id, name, etag, provisioningState, privateDnsZoneConfigs);
 130        }
 131    }
 132}