< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ChangeNumber()-0%100%
get_Region()-0%100%
get_SystemService()-0%100%
get_AddressPrefixes()-0%100%
DeserializeServiceTagInformationPropertiesFormat(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ServiceTagInformationPropertiesFormat.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> Properties of the service tag information. </summary>
 13    public partial class ServiceTagInformationPropertiesFormat
 14    {
 15        /// <summary> Initializes a new instance of ServiceTagInformationPropertiesFormat. </summary>
 016        internal ServiceTagInformationPropertiesFormat()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ServiceTagInformationPropertiesFormat. </summary>
 21        /// <param name="changeNumber"> The iteration number of service tag. </param>
 22        /// <param name="region"> The region of service tag. </param>
 23        /// <param name="systemService"> The name of system service. </param>
 24        /// <param name="addressPrefixes"> The list of IP address prefixes. </param>
 025        internal ServiceTagInformationPropertiesFormat(string changeNumber, string region, string systemService, IReadOn
 26        {
 027            ChangeNumber = changeNumber;
 028            Region = region;
 029            SystemService = systemService;
 030            AddressPrefixes = addressPrefixes;
 031        }
 32
 33        /// <summary> The iteration number of service tag. </summary>
 034        public string ChangeNumber { get; }
 35        /// <summary> The region of service tag. </summary>
 036        public string Region { get; }
 37        /// <summary> The name of system service. </summary>
 038        public string SystemService { get; }
 39        /// <summary> The list of IP address prefixes. </summary>
 040        public IReadOnlyList<string> AddressPrefixes { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ServiceTagInformationPropertiesFormat.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 ServiceTagInformationPropertiesFormat
 15    {
 16        internal static ServiceTagInformationPropertiesFormat DeserializeServiceTagInformationPropertiesFormat(JsonEleme
 17        {
 018            string changeNumber = default;
 019            string region = default;
 020            string systemService = default;
 021            IReadOnlyList<string> addressPrefixes = default;
 022            foreach (var property in element.EnumerateObject())
 23            {
 024                if (property.NameEquals("changeNumber"))
 25                {
 026                    if (property.Value.ValueKind == JsonValueKind.Null)
 27                    {
 28                        continue;
 29                    }
 030                    changeNumber = property.Value.GetString();
 031                    continue;
 32                }
 033                if (property.NameEquals("region"))
 34                {
 035                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 37                        continue;
 38                    }
 039                    region = property.Value.GetString();
 040                    continue;
 41                }
 042                if (property.NameEquals("systemService"))
 43                {
 044                    if (property.Value.ValueKind == JsonValueKind.Null)
 45                    {
 46                        continue;
 47                    }
 048                    systemService = property.Value.GetString();
 049                    continue;
 50                }
 051                if (property.NameEquals("addressPrefixes"))
 52                {
 053                    if (property.Value.ValueKind == JsonValueKind.Null)
 54                    {
 55                        continue;
 56                    }
 057                    List<string> array = new List<string>();
 058                    foreach (var item in property.Value.EnumerateArray())
 59                    {
 060                        if (item.ValueKind == JsonValueKind.Null)
 61                        {
 062                            array.Add(null);
 63                        }
 64                        else
 65                        {
 066                            array.Add(item.GetString());
 67                        }
 68                    }
 069                    addressPrefixes = array;
 70                    continue;
 71                }
 72            }
 073            return new ServiceTagInformationPropertiesFormat(changeNumber, region, systemService, addressPrefixes);
 74        }
 75    }
 76}