< Summary

Class:Azure.ResourceManager.Network.Models.PublicIPAddressListResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressListResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressListResult.Serialization.cs
Covered lines:18
Uncovered lines:6
Coverable lines:24
Total lines:90
Line coverage:75% (18 of 24)
Covered branches:10
Total branches:14
Branch coverage:71.4% (10 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializePublicIPAddressListResult(...)-75%71.43%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressListResult.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> Response for ListPublicIpAddresses API service call. </summary>
 13    public partial class PublicIPAddressListResult
 14    {
 15        /// <summary> Initializes a new instance of PublicIPAddressListResult. </summary>
 016        internal PublicIPAddressListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PublicIPAddressListResult. </summary>
 21        /// <param name="value"> A list of public IP addresses that exists in a resource group. </param>
 22        /// <param name="nextLink"> The URL to get the next set of results. </param>
 4823        internal PublicIPAddressListResult(IReadOnlyList<PublicIPAddress> value, string nextLink)
 24        {
 4825            Value = value;
 4826            NextLink = nextLink;
 4827        }
 28
 29        /// <summary> A list of public IP addresses that exists in a resource group. </summary>
 4830        public IReadOnlyList<PublicIPAddress> Value { get; }
 31        /// <summary> The URL to get the next set of results. </summary>
 4832        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PublicIPAddressListResult.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 PublicIPAddressListResult
 15    {
 16        internal static PublicIPAddressListResult DeserializePublicIPAddressListResult(JsonElement element)
 17        {
 4818            IReadOnlyList<PublicIPAddress> value = default;
 4819            string nextLink = default;
 19220            foreach (var property in element.EnumerateObject())
 21            {
 4822                if (property.NameEquals("value"))
 23                {
 4824                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 4828                    List<PublicIPAddress> array = new List<PublicIPAddress>();
 28829                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 9631                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 9637                            array.Add(PublicIPAddress.DeserializePublicIPAddress(item));
 38                        }
 39                    }
 4840                    value = array;
 4841                    continue;
 42                }
 043                if (property.NameEquals("nextLink"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 4853            return new PublicIPAddressListResult(value, nextLink);
 54        }
 55    }
 56}