< Summary

Class:Azure.ResourceManager.Resources.Models.TagDetails
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagDetails.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagDetails.Serialization.cs
Covered lines:32
Uncovered lines:6
Coverable lines:38
Total lines:118
Line coverage:84.2% (32 of 38)
Covered branches:21
Total branches:22
Branch coverage:95.4% (21 of 22)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-0%100%
get_TagName()-100%100%
get_Count()-0%100%
get_Values()-0%100%
DeserializeTagDetails(...)-96.15%95.45%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagDetails.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.Resources.Models
 11{
 12    /// <summary> Tag details. </summary>
 13    public partial class TagDetails
 14    {
 15        /// <summary> Initializes a new instance of TagDetails. </summary>
 016        internal TagDetails()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of TagDetails. </summary>
 21        /// <param name="id"> The tag name ID. </param>
 22        /// <param name="tagName"> The tag name. </param>
 23        /// <param name="count"> The total number of resources that use the resource tag. When a tag is initially create
 24        /// <param name="values"> The list of tag values. </param>
 16425        internal TagDetails(string id, string tagName, TagCount count, IReadOnlyList<TagValue> values)
 26        {
 16427            Id = id;
 16428            TagName = tagName;
 16429            Count = count;
 16430            Values = values;
 16431        }
 32
 33        /// <summary> The tag name ID. </summary>
 034        public string Id { get; }
 35        /// <summary> The tag name. </summary>
 836        public string TagName { get; }
 37        /// <summary> The total number of resources that use the resource tag. When a tag is initially created and has n
 038        public TagCount Count { get; }
 39        /// <summary> The list of tag values. </summary>
 040        public IReadOnlyList<TagValue> Values { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagDetails.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.Resources.Models
 13{
 14    public partial class TagDetails
 15    {
 16        internal static TagDetails DeserializeTagDetails(JsonElement element)
 17        {
 16418            string id = default;
 16419            string tagName = default;
 16420            TagCount count = default;
 16421            IReadOnlyList<TagValue> values = default;
 164022            foreach (var property in element.EnumerateObject())
 23            {
 65624                if (property.NameEquals("id"))
 25                {
 16426                    if (property.Value.ValueKind == JsonValueKind.Null)
 27                    {
 28                        continue;
 29                    }
 16430                    id = property.Value.GetString();
 16431                    continue;
 32                }
 49233                if (property.NameEquals("tagName"))
 34                {
 16435                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 37                        continue;
 38                    }
 16439                    tagName = property.Value.GetString();
 16440                    continue;
 41                }
 32842                if (property.NameEquals("count"))
 43                {
 16444                    if (property.Value.ValueKind == JsonValueKind.Null)
 45                    {
 46                        continue;
 47                    }
 16448                    count = TagCount.DeserializeTagCount(property.Value);
 16449                    continue;
 50                }
 16451                if (property.NameEquals("values"))
 52                {
 16453                    if (property.Value.ValueKind == JsonValueKind.Null)
 54                    {
 55                        continue;
 56                    }
 16457                    List<TagValue> array = new List<TagValue>();
 88858                    foreach (var item in property.Value.EnumerateArray())
 59                    {
 28060                        if (item.ValueKind == JsonValueKind.Null)
 61                        {
 062                            array.Add(null);
 63                        }
 64                        else
 65                        {
 28066                            array.Add(TagValue.DeserializeTagValue(item));
 67                        }
 68                    }
 16469                    values = array;
 70                    continue;
 71                }
 72            }
 16473            return new TagDetails(id, tagName, count, values);
 74        }
 75    }
 76}