< Summary

Class:Azure.ResourceManager.EventHubs.Models.ClusterQuotaConfigurationProperties
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ClusterQuotaConfigurationProperties.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ClusterQuotaConfigurationProperties.Serialization.cs
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:93
Line coverage:0% (0 of 27)
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%
get_Settings()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeClusterQuotaConfigurationProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ClusterQuotaConfigurationProperties.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.EventHubs.Models
 11{
 12    /// <summary> Contains all settings for the cluster. </summary>
 13    public partial class ClusterQuotaConfigurationProperties
 14    {
 15        /// <summary> Initializes a new instance of ClusterQuotaConfigurationProperties. </summary>
 016        public ClusterQuotaConfigurationProperties()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ClusterQuotaConfigurationProperties. </summary>
 21        /// <param name="settings"> All possible Cluster settings - a collection of key/value paired settings which appl
 022        internal ClusterQuotaConfigurationProperties(IDictionary<string, string> settings)
 23        {
 024            Settings = settings;
 025        }
 26
 27        /// <summary> All possible Cluster settings - a collection of key/value paired settings which apply to quotas an
 028        public IDictionary<string, string> Settings { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ClusterQuotaConfigurationProperties.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.EventHubs.Models
 13{
 14    public partial class ClusterQuotaConfigurationProperties : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Settings != null)
 20            {
 021                writer.WritePropertyName("settings");
 022                writer.WriteStartObject();
 023                foreach (var item in Settings)
 24                {
 025                    writer.WritePropertyName(item.Key);
 026                    writer.WriteStringValue(item.Value);
 27                }
 028                writer.WriteEndObject();
 29            }
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static ClusterQuotaConfigurationProperties DeserializeClusterQuotaConfigurationProperties(JsonElement e
 34        {
 035            IDictionary<string, string> settings = default;
 036            foreach (var property in element.EnumerateObject())
 37            {
 038                if (property.NameEquals("settings"))
 39                {
 040                    if (property.Value.ValueKind == JsonValueKind.Null)
 41                    {
 42                        continue;
 43                    }
 044                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 045                    foreach (var property0 in property.Value.EnumerateObject())
 46                    {
 047                        if (property0.Value.ValueKind == JsonValueKind.Null)
 48                        {
 049                            dictionary.Add(property0.Name, null);
 50                        }
 51                        else
 52                        {
 053                            dictionary.Add(property0.Name, property0.Value.GetString());
 54                        }
 55                    }
 056                    settings = dictionary;
 57                    continue;
 58                }
 59            }
 060            return new ClusterQuotaConfigurationProperties(settings);
 61        }
 62    }
 63}