< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_JobId()-0%100%
get_QueryCondition()-0%100%
get_CreatedTime()-0%100%
get_StartTime()-0%100%
get_EndTime()-0%100%
get_MaxExecutionTimeInSeconds()-0%100%
get_Type()-0%100%
get_CloudToDeviceMethod()-0%100%
get_UpdateTwin()-0%100%
get_Status()-0%100%
get_FailureReason()-0%100%
get_StatusMessage()-0%100%
get_DeviceJobStatistics()-0%100%
DeserializeJobResponse(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobResponse.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;
 9
 10namespace Azure.Iot.Hub.Service.Models
 11{
 12    /// <summary> The JobResponse. </summary>
 13    public partial class JobResponse
 14    {
 15        /// <summary> Initializes a new instance of JobResponse. </summary>
 016        internal JobResponse()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of JobResponse. </summary>
 21        /// <param name="jobId"> System generated.  Ignored at creation. The unique identifier of the job. </param>
 22        /// <param name="queryCondition"> The device query condition. </param>
 23        /// <param name="createdTime"> System generated.  Ignored at creation. The creation date and time of the job. </
 24        /// <param name="startTime"> The start date and time of the scheduled job in UTC. </param>
 25        /// <param name="endTime"> System generated.  Ignored at creation. The end date and time of the job in UTC. </pa
 26        /// <param name="maxExecutionTimeInSeconds"> The maximum execution time in secounds. </param>
 27        /// <param name="type"> The job type. </param>
 28        /// <param name="cloudToDeviceMethod"> The method type and parameters. This is required if job type is cloudToDe
 29        /// <param name="updateTwin"> The state information for a device or module. This is implicitly created and delet
 30        /// <param name="status"> System generated.  Ignored at creation. The status of the job. </param>
 31        /// <param name="failureReason"> The reason for the failure, if a failure occurred. </param>
 32        /// <param name="statusMessage"> The status message of the job. </param>
 33        /// <param name="deviceJobStatistics"> The details regarding job execution status. </param>
 034        internal JobResponse(string jobId, string queryCondition, DateTimeOffset? createdTime, DateTimeOffset? startTime
 35        {
 036            JobId = jobId;
 037            QueryCondition = queryCondition;
 038            CreatedTime = createdTime;
 039            StartTime = startTime;
 040            EndTime = endTime;
 041            MaxExecutionTimeInSeconds = maxExecutionTimeInSeconds;
 042            Type = type;
 043            CloudToDeviceMethod = cloudToDeviceMethod;
 044            UpdateTwin = updateTwin;
 045            Status = status;
 046            FailureReason = failureReason;
 047            StatusMessage = statusMessage;
 048            DeviceJobStatistics = deviceJobStatistics;
 049        }
 50
 51        /// <summary> System generated.  Ignored at creation. The unique identifier of the job. </summary>
 052        public string JobId { get; }
 53        /// <summary> The device query condition. </summary>
 054        public string QueryCondition { get; }
 55        /// <summary> System generated.  Ignored at creation. The creation date and time of the job. </summary>
 056        public DateTimeOffset? CreatedTime { get; }
 57        /// <summary> The start date and time of the scheduled job in UTC. </summary>
 058        public DateTimeOffset? StartTime { get; }
 59        /// <summary> System generated.  Ignored at creation. The end date and time of the job in UTC. </summary>
 060        public DateTimeOffset? EndTime { get; }
 61        /// <summary> The maximum execution time in secounds. </summary>
 062        public long? MaxExecutionTimeInSeconds { get; }
 63        /// <summary> The job type. </summary>
 064        public JobResponseType? Type { get; }
 65        /// <summary> The method type and parameters. This is required if job type is cloudToDeviceMethod. </summary>
 066        public CloudToDeviceMethodRequest CloudToDeviceMethod { get; }
 67        /// <summary> The state information for a device or module. This is implicitly created and deleted when the corr
 068        public TwinData UpdateTwin { get; }
 69        /// <summary> System generated.  Ignored at creation. The status of the job. </summary>
 070        public JobResponseStatus? Status { get; }
 71        /// <summary> The reason for the failure, if a failure occurred. </summary>
 072        public string FailureReason { get; }
 73        /// <summary> The status message of the job. </summary>
 074        public string StatusMessage { get; }
 75        /// <summary> The details regarding job execution status. </summary>
 076        public DeviceJobStatistics DeviceJobStatistics { get; }
 77    }
 78}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobResponse.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;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Iot.Hub.Service.Models
 13{
 14    public partial class JobResponse
 15    {
 16        internal static JobResponse DeserializeJobResponse(JsonElement element)
 17        {
 018            Optional<string> jobId = default;
 019            Optional<string> queryCondition = default;
 020            Optional<DateTimeOffset> createdTime = default;
 021            Optional<DateTimeOffset> startTime = default;
 022            Optional<DateTimeOffset> endTime = default;
 023            Optional<long> maxExecutionTimeInSeconds = default;
 024            Optional<JobResponseType> type = default;
 025            Optional<CloudToDeviceMethodRequest> cloudToDeviceMethod = default;
 026            Optional<TwinData> updateTwin = default;
 027            Optional<JobResponseStatus> status = default;
 028            Optional<string> failureReason = default;
 029            Optional<string> statusMessage = default;
 030            Optional<DeviceJobStatistics> deviceJobStatistics = default;
 031            foreach (var property in element.EnumerateObject())
 32            {
 033                if (property.NameEquals("jobId"))
 34                {
 035                    jobId = property.Value.GetString();
 036                    continue;
 37                }
 038                if (property.NameEquals("queryCondition"))
 39                {
 040                    queryCondition = property.Value.GetString();
 041                    continue;
 42                }
 043                if (property.NameEquals("createdTime"))
 44                {
 045                    createdTime = property.Value.GetDateTimeOffset("O");
 046                    continue;
 47                }
 048                if (property.NameEquals("startTime"))
 49                {
 050                    startTime = property.Value.GetDateTimeOffset("O");
 051                    continue;
 52                }
 053                if (property.NameEquals("endTime"))
 54                {
 055                    endTime = property.Value.GetDateTimeOffset("O");
 056                    continue;
 57                }
 058                if (property.NameEquals("maxExecutionTimeInSeconds"))
 59                {
 060                    maxExecutionTimeInSeconds = property.Value.GetInt64();
 061                    continue;
 62                }
 063                if (property.NameEquals("type"))
 64                {
 065                    type = new JobResponseType(property.Value.GetString());
 066                    continue;
 67                }
 068                if (property.NameEquals("cloudToDeviceMethod"))
 69                {
 070                    cloudToDeviceMethod = CloudToDeviceMethodRequest.DeserializeCloudToDeviceMethodRequest(property.Valu
 071                    continue;
 72                }
 073                if (property.NameEquals("updateTwin"))
 74                {
 075                    updateTwin = TwinData.DeserializeTwinData(property.Value);
 076                    continue;
 77                }
 078                if (property.NameEquals("status"))
 79                {
 080                    status = new JobResponseStatus(property.Value.GetString());
 081                    continue;
 82                }
 083                if (property.NameEquals("failureReason"))
 84                {
 085                    failureReason = property.Value.GetString();
 086                    continue;
 87                }
 088                if (property.NameEquals("statusMessage"))
 89                {
 090                    statusMessage = property.Value.GetString();
 091                    continue;
 92                }
 093                if (property.NameEquals("deviceJobStatistics"))
 94                {
 095                    deviceJobStatistics = DeviceJobStatistics.DeserializeDeviceJobStatistics(property.Value);
 96                    continue;
 97                }
 98            }
 099            return new JobResponse(jobId.Value, queryCondition.Value, Optional.ToNullable(createdTime), Optional.ToNulla
 100        }
 101    }
 102}