< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkServicePropertiesAutoApproval.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> The auto-approval list of the private link service. </summary>
 13    public partial class PrivateLinkServicePropertiesAutoApproval : ResourceSet
 14    {
 15        /// <summary> Initializes a new instance of PrivateLinkServicePropertiesAutoApproval. </summary>
 016        public PrivateLinkServicePropertiesAutoApproval()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateLinkServicePropertiesAutoApproval. </summary>
 21        /// <param name="subscriptions"> The list of subscriptions. </param>
 022        internal PrivateLinkServicePropertiesAutoApproval(IList<string> subscriptions) : base(subscriptions)
 23        {
 024        }
 25    }
 26}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkServicePropertiesAutoApproval.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 PrivateLinkServicePropertiesAutoApproval : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Subscriptions != null)
 20            {
 021                writer.WritePropertyName("subscriptions");
 022                writer.WriteStartArray();
 023                foreach (var item in Subscriptions)
 24                {
 025                    writer.WriteStringValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            writer.WriteEndObject();
 030        }
 31
 32        internal static PrivateLinkServicePropertiesAutoApproval DeserializePrivateLinkServicePropertiesAutoApproval(Jso
 33        {
 034            IList<string> subscriptions = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("subscriptions"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    List<string> array = new List<string>();
 044                    foreach (var item in property.Value.EnumerateArray())
 45                    {
 046                        if (item.ValueKind == JsonValueKind.Null)
 47                        {
 048                            array.Add(null);
 49                        }
 50                        else
 51                        {
 052                            array.Add(item.GetString());
 53                        }
 54                    }
 055                    subscriptions = array;
 56                    continue;
 57                }
 58            }
 059            return new PrivateLinkServicePropertiesAutoApproval(subscriptions);
 60        }
 61    }
 62}