< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Fqdn()-0%100%
get_IpAddresses()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeCustomDnsConfigPropertiesFormat(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\CustomDnsConfigPropertiesFormat.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> Contains custom Dns resolution configuration from customer. </summary>
 13    public partial class CustomDnsConfigPropertiesFormat
 14    {
 15        /// <summary> Initializes a new instance of CustomDnsConfigPropertiesFormat. </summary>
 016        public CustomDnsConfigPropertiesFormat()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of CustomDnsConfigPropertiesFormat. </summary>
 21        /// <param name="fqdn"> Fqdn that resolves to private endpoint ip address. </param>
 22        /// <param name="ipAddresses"> A list of private ip addresses of the private endpoint. </param>
 023        internal CustomDnsConfigPropertiesFormat(string fqdn, IList<string> ipAddresses)
 24        {
 025            Fqdn = fqdn;
 026            IpAddresses = ipAddresses;
 027        }
 28
 29        /// <summary> Fqdn that resolves to private endpoint ip address. </summary>
 030        public string Fqdn { get; set; }
 31        /// <summary> A list of private ip addresses of the private endpoint. </summary>
 032        public IList<string> IpAddresses { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\CustomDnsConfigPropertiesFormat.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 CustomDnsConfigPropertiesFormat : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Fqdn != null)
 20            {
 021                writer.WritePropertyName("fqdn");
 022                writer.WriteStringValue(Fqdn);
 23            }
 024            if (IpAddresses != null)
 25            {
 026                writer.WritePropertyName("ipAddresses");
 027                writer.WriteStartArray();
 028                foreach (var item in IpAddresses)
 29                {
 030                    writer.WriteStringValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static CustomDnsConfigPropertiesFormat DeserializeCustomDnsConfigPropertiesFormat(JsonElement element)
 38        {
 039            string fqdn = default;
 040            IList<string> ipAddresses = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("fqdn"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    fqdn = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("ipAddresses"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    List<string> array = new List<string>();
 059                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 061                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 067                            array.Add(item.GetString());
 68                        }
 69                    }
 070                    ipAddresses = array;
 71                    continue;
 72                }
 73            }
 074            return new CustomDnsConfigPropertiesFormat(fqdn, ipAddresses);
 75        }
 76    }
 77}