< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.ServiceBusActiveMessagesAvailableWithNoListenersEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ServiceBusActiveMessagesAvailableWithNoListenersEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs
Covered lines:34
Uncovered lines:7
Coverable lines:41
Total lines:107
Line coverage:82.9% (34 of 41)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_NamespaceName()-100%100%
get_RequestUri()-0%100%
get_EntityType()-0%100%
get_QueueName()-0%100%
get_TopicName()-0%100%
get_SubscriptionName()-0%100%
DeserializeServiceBusActiveMessagesAvailableWithNoListenersEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ServiceBusActiveMessagesAvailableWithNoListenersEventData.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.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailableWit
 11    public partial class ServiceBusActiveMessagesAvailableWithNoListenersEventData
 12    {
 13        /// <summary> Initializes a new instance of ServiceBusActiveMessagesAvailableWithNoListenersEventData. </summary
 014        internal ServiceBusActiveMessagesAvailableWithNoListenersEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ServiceBusActiveMessagesAvailableWithNoListenersEventData. </summary
 19        /// <param name="namespaceName"> The namespace name of the Microsoft.ServiceBus resource. </param>
 20        /// <param name="requestUri"> The endpoint of the Microsoft.ServiceBus resource. </param>
 21        /// <param name="entityType"> The entity type of the Microsoft.ServiceBus resource. Could be one of &apos;queue&
 22        /// <param name="queueName"> The name of the Microsoft.ServiceBus queue. If the entity type is of type &apos;sub
 23        /// <param name="topicName"> The name of the Microsoft.ServiceBus topic. If the entity type is of type &apos;que
 24        /// <param name="subscriptionName"> The name of the Microsoft.ServiceBus topic&apos;s subscription. If the entit
 225        internal ServiceBusActiveMessagesAvailableWithNoListenersEventData(string namespaceName, string requestUri, stri
 26        {
 227            NamespaceName = namespaceName;
 228            RequestUri = requestUri;
 229            EntityType = entityType;
 230            QueueName = queueName;
 231            TopicName = topicName;
 232            SubscriptionName = subscriptionName;
 233        }
 34
 35        /// <summary> The namespace name of the Microsoft.ServiceBus resource. </summary>
 236        public string NamespaceName { get; }
 37        /// <summary> The endpoint of the Microsoft.ServiceBus resource. </summary>
 038        public string RequestUri { get; }
 39        /// <summary> The entity type of the Microsoft.ServiceBus resource. Could be one of &apos;queue&apos; or &apos;s
 040        public string EntityType { get; }
 41        /// <summary> The name of the Microsoft.ServiceBus queue. If the entity type is of type &apos;subscriber&apos;, 
 042        public string QueueName { get; }
 43        /// <summary> The name of the Microsoft.ServiceBus topic. If the entity type is of type &apos;queue&apos;, then 
 044        public string TopicName { get; }
 45        /// <summary> The name of the Microsoft.ServiceBus topic&apos;s subscription. If the entity type is of type &apo
 046        public string SubscriptionName { get; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ServiceBusActiveMessagesAvailableWithNoListenersEventData.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class ServiceBusActiveMessagesAvailableWithNoListenersEventData
 14    {
 15        internal static ServiceBusActiveMessagesAvailableWithNoListenersEventData DeserializeServiceBusActiveMessagesAva
 16        {
 217            Optional<string> namespaceName = default;
 218            Optional<string> requestUri = default;
 219            Optional<string> entityType = default;
 220            Optional<string> queueName = default;
 221            Optional<string> topicName = default;
 222            Optional<string> subscriptionName = default;
 2823            foreach (var property in element.EnumerateObject())
 24            {
 1225                if (property.NameEquals("namespaceName"))
 26                {
 227                    namespaceName = property.Value.GetString();
 228                    continue;
 29                }
 1030                if (property.NameEquals("requestUri"))
 31                {
 232                    requestUri = property.Value.GetString();
 233                    continue;
 34                }
 835                if (property.NameEquals("entityType"))
 36                {
 237                    entityType = property.Value.GetString();
 238                    continue;
 39                }
 640                if (property.NameEquals("queueName"))
 41                {
 242                    queueName = property.Value.GetString();
 243                    continue;
 44                }
 445                if (property.NameEquals("topicName"))
 46                {
 247                    topicName = property.Value.GetString();
 248                    continue;
 49                }
 250                if (property.NameEquals("subscriptionName"))
 51                {
 252                    subscriptionName = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 256            return new ServiceBusActiveMessagesAvailableWithNoListenersEventData(namespaceName.Value, requestUri.Value, 
 57        }
 58    }
 59}