< Summary

Class:Azure.ResourceManager.EventHubs.Models.MessagingRegions
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegions.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegions.Serialization.cs
Covered lines:0
Uncovered lines:67
Coverable lines:67
Total lines:173
Line coverage:0% (0 of 67)
Covered branches:0
Total branches:44
Branch coverage:0% (0 of 44)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegions.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> Messaging Region. </summary>
 13    public partial class MessagingRegions : TrackedResource
 14    {
 15        /// <summary> Initializes a new instance of MessagingRegions. </summary>
 016        public MessagingRegions()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of MessagingRegions. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="properties"> Properties of Messaging Region. </param>
 027        internal MessagingRegions(string id, string name, string type, string location, IDictionary<string, string> tags
 28        {
 029            Properties = properties;
 030        }
 31
 32        /// <summary> Properties of Messaging Region. </summary>
 033        public MessagingRegionsProperties Properties { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegions.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 MessagingRegions : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Properties != null)
 20            {
 021                writer.WritePropertyName("properties");
 022                writer.WriteObjectValue(Properties);
 23            }
 024            if (Location != null)
 25            {
 026                writer.WritePropertyName("location");
 027                writer.WriteStringValue(Location);
 28            }
 029            if (Tags != null)
 30            {
 031                writer.WritePropertyName("tags");
 032                writer.WriteStartObject();
 033                foreach (var item in Tags)
 34                {
 035                    writer.WritePropertyName(item.Key);
 036                    writer.WriteStringValue(item.Value);
 37                }
 038                writer.WriteEndObject();
 39            }
 040            if (Id != null)
 41            {
 042                writer.WritePropertyName("id");
 043                writer.WriteStringValue(Id);
 44            }
 045            if (Name != null)
 46            {
 047                writer.WritePropertyName("name");
 048                writer.WriteStringValue(Name);
 49            }
 050            if (Type != null)
 51            {
 052                writer.WritePropertyName("type");
 053                writer.WriteStringValue(Type);
 54            }
 055            writer.WriteEndObject();
 056        }
 57
 58        internal static MessagingRegions DeserializeMessagingRegions(JsonElement element)
 59        {
 060            MessagingRegionsProperties properties = default;
 061            string location = default;
 062            IDictionary<string, string> tags = default;
 063            string id = default;
 064            string name = default;
 065            string type = default;
 066            foreach (var property in element.EnumerateObject())
 67            {
 068                if (property.NameEquals("properties"))
 69                {
 070                    if (property.Value.ValueKind == JsonValueKind.Null)
 71                    {
 72                        continue;
 73                    }
 074                    properties = MessagingRegionsProperties.DeserializeMessagingRegionsProperties(property.Value);
 075                    continue;
 76                }
 077                if (property.NameEquals("location"))
 78                {
 079                    if (property.Value.ValueKind == JsonValueKind.Null)
 80                    {
 81                        continue;
 82                    }
 083                    location = property.Value.GetString();
 084                    continue;
 85                }
 086                if (property.NameEquals("tags"))
 87                {
 088                    if (property.Value.ValueKind == JsonValueKind.Null)
 89                    {
 90                        continue;
 91                    }
 092                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 093                    foreach (var property0 in property.Value.EnumerateObject())
 94                    {
 095                        if (property0.Value.ValueKind == JsonValueKind.Null)
 96                        {
 097                            dictionary.Add(property0.Name, null);
 98                        }
 99                        else
 100                        {
 0101                            dictionary.Add(property0.Name, property0.Value.GetString());
 102                        }
 103                    }
 0104                    tags = dictionary;
 0105                    continue;
 106                }
 0107                if (property.NameEquals("id"))
 108                {
 0109                    if (property.Value.ValueKind == JsonValueKind.Null)
 110                    {
 111                        continue;
 112                    }
 0113                    id = property.Value.GetString();
 0114                    continue;
 115                }
 0116                if (property.NameEquals("name"))
 117                {
 0118                    if (property.Value.ValueKind == JsonValueKind.Null)
 119                    {
 120                        continue;
 121                    }
 0122                    name = property.Value.GetString();
 0123                    continue;
 124                }
 0125                if (property.NameEquals("type"))
 126                {
 0127                    if (property.Value.ValueKind == JsonValueKind.Null)
 128                    {
 129                        continue;
 130                    }
 0131                    type = property.Value.GetString();
 132                    continue;
 133                }
 134            }
 0135            return new MessagingRegions(id, name, type, location, tags, properties);
 136        }
 137    }
 138}