< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\QueueServiceProperties.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
 8namespace Azure.ResourceManager.Storage.Models
 9{
 10    /// <summary> The properties of a storage account’s Queue service. </summary>
 11    public partial class QueueServiceProperties : Resource
 12    {
 13        /// <summary> Initializes a new instance of QueueServiceProperties. </summary>
 014        public QueueServiceProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of QueueServiceProperties. </summary>
 19        /// <param name="id"> Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourc
 20        /// <param name="name"> The name of the resource. </param>
 21        /// <param name="type"> The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/sto
 22        /// <param name="cors"> Specifies CORS rules for the Queue service. You can include up to five CorsRule elements
 023        internal QueueServiceProperties(string id, string name, string type, CorsRules cors) : base(id, name, type)
 24        {
 025            Cors = cors;
 026        }
 27
 28        /// <summary> Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the re
 029        public CorsRules Cors { get; set; }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\QueueServiceProperties.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Storage.Models
 12{
 13    public partial class QueueServiceProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Id != null)
 19            {
 020                writer.WritePropertyName("id");
 021                writer.WriteStringValue(Id);
 22            }
 023            if (Name != null)
 24            {
 025                writer.WritePropertyName("name");
 026                writer.WriteStringValue(Name);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            writer.WritePropertyName("properties");
 034            writer.WriteStartObject();
 035            if (Cors != null)
 36            {
 037                writer.WritePropertyName("cors");
 038                writer.WriteObjectValue(Cors);
 39            }
 040            writer.WriteEndObject();
 041            writer.WriteEndObject();
 042        }
 43
 44        internal static QueueServiceProperties DeserializeQueueServiceProperties(JsonElement element)
 45        {
 046            string id = default;
 047            string name = default;
 048            string type = default;
 049            CorsRules cors = default;
 050            foreach (var property in element.EnumerateObject())
 51            {
 052                if (property.NameEquals("id"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    id = property.Value.GetString();
 059                    continue;
 60                }
 061                if (property.NameEquals("name"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    name = property.Value.GetString();
 068                    continue;
 69                }
 070                if (property.NameEquals("type"))
 71                {
 072                    if (property.Value.ValueKind == JsonValueKind.Null)
 73                    {
 74                        continue;
 75                    }
 076                    type = property.Value.GetString();
 077                    continue;
 78                }
 079                if (property.NameEquals("properties"))
 80                {
 081                    foreach (var property0 in property.Value.EnumerateObject())
 82                    {
 083                        if (property0.NameEquals("cors"))
 84                        {
 085                            if (property0.Value.ValueKind == JsonValueKind.Null)
 86                            {
 87                                continue;
 88                            }
 089                            cors = CorsRules.DeserializeCorsRules(property0.Value);
 90                            continue;
 91                        }
 92                    }
 93                    continue;
 94                }
 95            }
 096            return new QueueServiceProperties(id, name, type, cors);
 97        }
 98    }
 99}