< Summary

Class:Azure.ResourceManager.Storage.Models.ListQueue
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ListQueue.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ListQueue.Serialization.cs
Covered lines:0
Uncovered lines:56
Coverable lines:56
Total lines:151
Line coverage:0% (0 of 56)
Covered branches:0
Total branches:36
Branch coverage:0% (0 of 36)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ListQueue.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.Storage.Models
 11{
 12    /// <summary> The ListQueue. </summary>
 13    public partial class ListQueue : Resource
 14    {
 15        /// <summary> Initializes a new instance of ListQueue. </summary>
 016        public ListQueue()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ListQueue. </summary>
 21        /// <param name="id"> Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourc
 22        /// <param name="name"> The name of the resource. </param>
 23        /// <param name="type"> The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/sto
 24        /// <param name="metadata"> A name-value pair that represents queue metadata. </param>
 025        internal ListQueue(string id, string name, string type, IDictionary<string, string> metadata) : base(id, name, t
 26        {
 027            Metadata = metadata;
 028        }
 29
 30        /// <summary> A name-value pair that represents queue metadata. </summary>
 031        public IDictionary<string, string> Metadata { get; set; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ListQueue.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.Storage.Models
 13{
 14    public partial class ListQueue : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Id != null)
 20            {
 021                writer.WritePropertyName("id");
 022                writer.WriteStringValue(Id);
 23            }
 024            if (Name != null)
 25            {
 026                writer.WritePropertyName("name");
 027                writer.WriteStringValue(Name);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            writer.WritePropertyName("properties");
 035            writer.WriteStartObject();
 036            if (Metadata != null)
 37            {
 038                writer.WritePropertyName("metadata");
 039                writer.WriteStartObject();
 040                foreach (var item in Metadata)
 41                {
 042                    writer.WritePropertyName(item.Key);
 043                    writer.WriteStringValue(item.Value);
 44                }
 045                writer.WriteEndObject();
 46            }
 047            writer.WriteEndObject();
 048            writer.WriteEndObject();
 049        }
 50
 51        internal static ListQueue DeserializeListQueue(JsonElement element)
 52        {
 053            string id = default;
 054            string name = default;
 055            string type = default;
 056            IDictionary<string, string> metadata = default;
 057            foreach (var property in element.EnumerateObject())
 58            {
 059                if (property.NameEquals("id"))
 60                {
 061                    if (property.Value.ValueKind == JsonValueKind.Null)
 62                    {
 63                        continue;
 64                    }
 065                    id = property.Value.GetString();
 066                    continue;
 67                }
 068                if (property.NameEquals("name"))
 69                {
 070                    if (property.Value.ValueKind == JsonValueKind.Null)
 71                    {
 72                        continue;
 73                    }
 074                    name = property.Value.GetString();
 075                    continue;
 76                }
 077                if (property.NameEquals("type"))
 78                {
 079                    if (property.Value.ValueKind == JsonValueKind.Null)
 80                    {
 81                        continue;
 82                    }
 083                    type = property.Value.GetString();
 084                    continue;
 85                }
 086                if (property.NameEquals("properties"))
 87                {
 088                    foreach (var property0 in property.Value.EnumerateObject())
 89                    {
 090                        if (property0.NameEquals("metadata"))
 91                        {
 092                            if (property0.Value.ValueKind == JsonValueKind.Null)
 93                            {
 94                                continue;
 95                            }
 096                            Dictionary<string, string> dictionary = new Dictionary<string, string>();
 097                            foreach (var property1 in property0.Value.EnumerateObject())
 98                            {
 099                                if (property1.Value.ValueKind == JsonValueKind.Null)
 100                                {
 0101                                    dictionary.Add(property1.Name, null);
 102                                }
 103                                else
 104                                {
 0105                                    dictionary.Add(property1.Name, property1.Value.GetString());
 106                                }
 107                            }
 0108                            metadata = dictionary;
 109                            continue;
 110                        }
 111                    }
 112                    continue;
 113                }
 114            }
 0115            return new ListQueue(id, name, type, metadata);
 116        }
 117    }
 118}