< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_DeviceCount()-0%100%
get_FailedCount()-0%100%
get_SucceededCount()-0%100%
get_RunningCount()-0%100%
get_PendingCount()-0%100%
DeserializeDeviceJobStatistics(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceJobStatistics.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 job statistics regarding execution status. </summary>
 11    public partial class DeviceJobStatistics
 12    {
 13        /// <summary> Initializes a new instance of DeviceJobStatistics. </summary>
 014        internal DeviceJobStatistics()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeviceJobStatistics. </summary>
 19        /// <param name="deviceCount"> The number of devices targeted by the job. </param>
 20        /// <param name="failedCount"> The number of failed jobs. </param>
 21        /// <param name="succeededCount"> The number of succeeded jobs. </param>
 22        /// <param name="runningCount"> The number of running jobs. </param>
 23        /// <param name="pendingCount"> The number of pending (scheduled) jobs. </param>
 024        internal DeviceJobStatistics(int? deviceCount, int? failedCount, int? succeededCount, int? runningCount, int? pe
 25        {
 026            DeviceCount = deviceCount;
 027            FailedCount = failedCount;
 028            SucceededCount = succeededCount;
 029            RunningCount = runningCount;
 030            PendingCount = pendingCount;
 031        }
 32
 33        /// <summary> The number of devices targeted by the job. </summary>
 034        public int? DeviceCount { get; }
 35        /// <summary> The number of failed jobs. </summary>
 036        public int? FailedCount { get; }
 37        /// <summary> The number of succeeded jobs. </summary>
 038        public int? SucceededCount { get; }
 39        /// <summary> The number of running jobs. </summary>
 040        public int? RunningCount { get; }
 41        /// <summary> The number of pending (scheduled) jobs. </summary>
 042        public int? PendingCount { get; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceJobStatistics.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 DeviceJobStatistics
 14    {
 15        internal static DeviceJobStatistics DeserializeDeviceJobStatistics(JsonElement element)
 16        {
 017            Optional<int> deviceCount = default;
 018            Optional<int> failedCount = default;
 019            Optional<int> succeededCount = default;
 020            Optional<int> runningCount = default;
 021            Optional<int> pendingCount = default;
 022            foreach (var property in element.EnumerateObject())
 23            {
 024                if (property.NameEquals("deviceCount"))
 25                {
 026                    deviceCount = property.Value.GetInt32();
 027                    continue;
 28                }
 029                if (property.NameEquals("failedCount"))
 30                {
 031                    failedCount = property.Value.GetInt32();
 032                    continue;
 33                }
 034                if (property.NameEquals("succeededCount"))
 35                {
 036                    succeededCount = property.Value.GetInt32();
 037                    continue;
 38                }
 039                if (property.NameEquals("runningCount"))
 40                {
 041                    runningCount = property.Value.GetInt32();
 042                    continue;
 43                }
 044                if (property.NameEquals("pendingCount"))
 45                {
 046                    pendingCount = property.Value.GetInt32();
 47                    continue;
 48                }
 49            }
 050            return new DeviceJobStatistics(Optional.ToNullable(deviceCount), Optional.ToNullable(failedCount), Optional.
 51        }
 52    }
 53}