< Summary

Class:Azure.Iot.Hub.Service.Models.PurgeMessageQueueResult
Assembly:Azure.Iot.Hub.Service
File(s):C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\PurgeMessageQueueResult.cs
C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\PurgeMessageQueueResult.Serialization.cs
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:76
Line coverage:0% (0 of 23)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_TotalMessagesPurged()-0%100%
get_DeviceId()-0%100%
get_ModuleId()-0%100%
DeserializePurgeMessageQueueResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\PurgeMessageQueueResult.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.Iot.Hub.Service.Models
 9{
 10    /// <summary> The result of a device message queue purge operation. </summary>
 11    public partial class PurgeMessageQueueResult
 12    {
 13        /// <summary> Initializes a new instance of PurgeMessageQueueResult. </summary>
 014        internal PurgeMessageQueueResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PurgeMessageQueueResult. </summary>
 19        /// <param name="totalMessagesPurged"> . </param>
 20        /// <param name="deviceId"> The unique identifier of the device. </param>
 21        /// <param name="moduleId"> The unique identifier of the module. </param>
 022        internal PurgeMessageQueueResult(int? totalMessagesPurged, string deviceId, string moduleId)
 23        {
 024            TotalMessagesPurged = totalMessagesPurged;
 025            DeviceId = deviceId;
 026            ModuleId = moduleId;
 027        }
 28
 029        public int? TotalMessagesPurged { get; }
 30        /// <summary> The unique identifier of the device. </summary>
 031        public string DeviceId { get; }
 32        /// <summary> The unique identifier of the module. </summary>
 033        public string ModuleId { get; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\PurgeMessageQueueResult.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.Iot.Hub.Service.Models
 12{
 13    public partial class PurgeMessageQueueResult
 14    {
 15        internal static PurgeMessageQueueResult DeserializePurgeMessageQueueResult(JsonElement element)
 16        {
 017            Optional<int> totalMessagesPurged = default;
 018            Optional<string> deviceId = default;
 019            Optional<string> moduleId = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("totalMessagesPurged"))
 23                {
 024                    totalMessagesPurged = property.Value.GetInt32();
 025                    continue;
 26                }
 027                if (property.NameEquals("deviceId"))
 28                {
 029                    deviceId = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("moduleId"))
 33                {
 034                    moduleId = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 038            return new PurgeMessageQueueResult(Optional.ToNullable(totalMessagesPurged), deviceId.Value, moduleId.Value)
 39        }
 40    }
 41}