< Summary

Class:Azure.ResourceManager.Network.Models.DnsNameAvailabilityResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\DnsNameAvailabilityResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\DnsNameAvailabilityResult.Serialization.cs
Covered lines:10
Uncovered lines:2
Coverable lines:12
Total lines:61
Line coverage:83.3% (10 of 12)
Covered branches:6
Total branches:6
Branch coverage:100% (6 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Available()-100%100%
DeserializeDnsNameAvailabilityResult(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\DnsNameAvailabilityResult.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> Response for the CheckDnsNameAvailability API service call. </summary>
 11    public partial class DnsNameAvailabilityResult
 12    {
 13        /// <summary> Initializes a new instance of DnsNameAvailabilityResult. </summary>
 014        internal DnsNameAvailabilityResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DnsNameAvailabilityResult. </summary>
 19        /// <param name="available"> Domain availability (True/False). </param>
 420        internal DnsNameAvailabilityResult(bool? available)
 21        {
 422            Available = available;
 423        }
 24
 25        /// <summary> Domain availability (True/False). </summary>
 426        public bool? Available { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\DnsNameAvailabilityResult.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 DnsNameAvailabilityResult
 14    {
 15        internal static DnsNameAvailabilityResult DeserializeDnsNameAvailabilityResult(JsonElement element)
 16        {
 417            bool? available = default;
 1618            foreach (var property in element.EnumerateObject())
 19            {
 420                if (property.NameEquals("available"))
 21                {
 422                    if (property.Value.ValueKind == JsonValueKind.Null)
 23                    {
 24                        continue;
 25                    }
 426                    available = property.Value.GetBoolean();
 27                    continue;
 28                }
 29            }
 430            return new DnsNameAvailabilityResult(available);
 31        }
 32    }
 33}