< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
get_JobId()-0%100%
get_Type()-0%100%
get_CloudToDeviceMethod()-0%100%
get_UpdateTwin()-0%100%
get_QueryCondition()-0%100%
get_StartTime()-0%100%
get_MaxExecutionTimeInSeconds()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobRequest.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 JobRequest. </summary>
 13    public partial class JobRequest
 14    {
 15        /// <summary> Initializes a new instance of JobRequest. </summary>
 016        public JobRequest()
 17        {
 018        }
 19
 20        /// <summary> The unique identifier of the job. </summary>
 021        public string JobId { get; set; }
 22        /// <summary> The job type. </summary>
 023        public JobRequestType? Type { get; set; }
 24        /// <summary> The method type and parameters. This is required if the job type is cloudToDeviceMethod. </summary
 025        public CloudToDeviceMethodRequest CloudToDeviceMethod { get; set; }
 26        /// <summary> The state information for a device or module. This is implicitly created and deleted when the corr
 027        public TwinData UpdateTwin { get; set; }
 28        /// <summary> The condition for devices to execute the job. This is required if the job type is updateTwin or cl
 029        public string QueryCondition { get; set; }
 30        /// <summary> The start date and time of the job in ISO 8601 standard. </summary>
 031        public DateTimeOffset? StartTime { get; set; }
 32        /// <summary> The maximum execution time in secounds. </summary>
 033        public long? MaxExecutionTimeInSeconds { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobRequest.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 JobRequest : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(JobId))
 19            {
 020                writer.WritePropertyName("jobId");
 021                writer.WriteStringValue(JobId);
 22            }
 023            if (Optional.IsDefined(Type))
 24            {
 025                writer.WritePropertyName("type");
 026                writer.WriteStringValue(Type.Value.ToString());
 27            }
 028            if (Optional.IsDefined(CloudToDeviceMethod))
 29            {
 030                writer.WritePropertyName("cloudToDeviceMethod");
 031                writer.WriteObjectValue(CloudToDeviceMethod);
 32            }
 033            if (Optional.IsDefined(UpdateTwin))
 34            {
 035                writer.WritePropertyName("updateTwin");
 036                writer.WriteObjectValue(UpdateTwin);
 37            }
 038            if (Optional.IsDefined(QueryCondition))
 39            {
 040                writer.WritePropertyName("queryCondition");
 041                writer.WriteStringValue(QueryCondition);
 42            }
 043            if (Optional.IsDefined(StartTime))
 44            {
 045                writer.WritePropertyName("startTime");
 046                writer.WriteStringValue(StartTime.Value, "O");
 47            }
 048            if (Optional.IsDefined(MaxExecutionTimeInSeconds))
 49            {
 050                writer.WritePropertyName("maxExecutionTimeInSeconds");
 051                writer.WriteNumberValue(MaxExecutionTimeInSeconds.Value);
 52            }
 053            writer.WriteEndObject();
 054        }
 55    }
 56}