< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_JobId()-0%100%
get_StartTimeUtc()-0%100%
get_EndTimeUtc()-0%100%
get_Type()-0%100%
get_Status()-0%100%
get_Progress()-0%100%
get_InputBlobContainerUri()-0%100%
get_InputBlobName()-0%100%
get_OutputBlobContainerUri()-0%100%
get_OutputBlobName()-0%100%
get_ExcludeKeysInExport()-0%100%
get_StorageAuthenticationType()-0%100%
get_FailureReason()-0%100%
get_IncludeConfigurations()-0%100%
get_ConfigurationsBlobName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeJobProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobProperties.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 JobProperties. </summary>
 13    public partial class JobProperties
 14    {
 15        /// <summary> Initializes a new instance of JobProperties. </summary>
 016        public JobProperties()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of JobProperties. </summary>
 21        /// <param name="jobId"> The unique identifier of the job. </param>
 22        /// <param name="startTimeUtc"> System generated. Ignored at creation. The start date and time of the job in UTC
 23        /// <param name="endTimeUtc"> System generated. Ignored at creation. The end date and time of the job in UTC. </
 24        /// <param name="type"> The job type. </param>
 25        /// <param name="status"> System generated. Ignored at creation. The status of the job. </param>
 26        /// <param name="progress"> System generated. Ignored at creation. The percentage of job completion. </param>
 27        /// <param name="inputBlobContainerUri"> The URI containing SAS token to a blob container that contains registry
 28        /// <param name="inputBlobName"> The blob name to use when importing from the input blob container. </param>
 29        /// <param name="outputBlobContainerUri"> The SAS token to access the blob container. This is used to output the
 30        /// <param name="outputBlobName"> The blob name that will be created in the output blob container. This blob wil
 31        /// <param name="excludeKeysInExport"> Optional for export jobs; ignored for other jobs. If not specified, the s
 32        /// <param name="storageAuthenticationType"> The authentication type used for connecting to the storage account.
 33        /// <param name="failureReason"> System genereated.  Ignored at creation. The reason for failure, if a failure o
 34        /// <param name="includeConfigurations"> . </param>
 35        /// <param name="configurationsBlobName"> . </param>
 036        internal JobProperties(string jobId, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, JobPropertiesType
 37        {
 038            JobId = jobId;
 039            StartTimeUtc = startTimeUtc;
 040            EndTimeUtc = endTimeUtc;
 041            Type = type;
 042            Status = status;
 043            Progress = progress;
 044            InputBlobContainerUri = inputBlobContainerUri;
 045            InputBlobName = inputBlobName;
 046            OutputBlobContainerUri = outputBlobContainerUri;
 047            OutputBlobName = outputBlobName;
 048            ExcludeKeysInExport = excludeKeysInExport;
 049            StorageAuthenticationType = storageAuthenticationType;
 050            FailureReason = failureReason;
 051            IncludeConfigurations = includeConfigurations;
 052            ConfigurationsBlobName = configurationsBlobName;
 053        }
 54
 55        /// <summary> The unique identifier of the job. </summary>
 056        public string JobId { get; set; }
 57        /// <summary> System generated. Ignored at creation. The start date and time of the job in UTC. </summary>
 058        public DateTimeOffset? StartTimeUtc { get; set; }
 59        /// <summary> System generated. Ignored at creation. The end date and time of the job in UTC. </summary>
 060        public DateTimeOffset? EndTimeUtc { get; set; }
 61        /// <summary> The job type. </summary>
 062        public JobPropertiesType? Type { get; set; }
 63        /// <summary> System generated. Ignored at creation. The status of the job. </summary>
 064        public JobPropertiesStatus? Status { get; set; }
 65        /// <summary> System generated. Ignored at creation. The percentage of job completion. </summary>
 066        public int? Progress { get; set; }
 67        /// <summary> The URI containing SAS token to a blob container that contains registry data to sync. </summary>
 068        public string InputBlobContainerUri { get; set; }
 69        /// <summary> The blob name to use when importing from the input blob container. </summary>
 070        public string InputBlobName { get; set; }
 71        /// <summary> The SAS token to access the blob container. This is used to output the status and results of the j
 072        public string OutputBlobContainerUri { get; set; }
 73        /// <summary> The blob name that will be created in the output blob container. This blob will contain the export
 074        public string OutputBlobName { get; set; }
 75        /// <summary> Optional for export jobs; ignored for other jobs. If not specified, the service defaults to false.
 076        public bool? ExcludeKeysInExport { get; set; }
 77        /// <summary> The authentication type used for connecting to the storage account. </summary>
 078        public JobPropertiesStorageAuthenticationType? StorageAuthenticationType { get; set; }
 79        /// <summary> System genereated.  Ignored at creation. The reason for failure, if a failure occurred. </summary>
 080        public string FailureReason { get; set; }
 081        public bool? IncludeConfigurations { get; set; }
 082        public string ConfigurationsBlobName { get; set; }
 83    }
 84}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\JobProperties.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 JobProperties : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(JobId))
 20            {
 021                writer.WritePropertyName("jobId");
 022                writer.WriteStringValue(JobId);
 23            }
 024            if (Optional.IsDefined(StartTimeUtc))
 25            {
 026                writer.WritePropertyName("startTimeUtc");
 027                writer.WriteStringValue(StartTimeUtc.Value, "O");
 28            }
 029            if (Optional.IsDefined(EndTimeUtc))
 30            {
 031                writer.WritePropertyName("endTimeUtc");
 032                writer.WriteStringValue(EndTimeUtc.Value, "O");
 33            }
 034            if (Optional.IsDefined(Type))
 35            {
 036                writer.WritePropertyName("type");
 037                writer.WriteStringValue(Type.Value.ToString());
 38            }
 039            if (Optional.IsDefined(Status))
 40            {
 041                writer.WritePropertyName("status");
 042                writer.WriteStringValue(Status.Value.ToString());
 43            }
 044            if (Optional.IsDefined(Progress))
 45            {
 046                writer.WritePropertyName("progress");
 047                writer.WriteNumberValue(Progress.Value);
 48            }
 049            if (Optional.IsDefined(InputBlobContainerUri))
 50            {
 051                writer.WritePropertyName("inputBlobContainerUri");
 052                writer.WriteStringValue(InputBlobContainerUri);
 53            }
 054            if (Optional.IsDefined(InputBlobName))
 55            {
 056                writer.WritePropertyName("inputBlobName");
 057                writer.WriteStringValue(InputBlobName);
 58            }
 059            if (Optional.IsDefined(OutputBlobContainerUri))
 60            {
 061                writer.WritePropertyName("outputBlobContainerUri");
 062                writer.WriteStringValue(OutputBlobContainerUri);
 63            }
 064            if (Optional.IsDefined(OutputBlobName))
 65            {
 066                writer.WritePropertyName("outputBlobName");
 067                writer.WriteStringValue(OutputBlobName);
 68            }
 069            if (Optional.IsDefined(ExcludeKeysInExport))
 70            {
 071                writer.WritePropertyName("excludeKeysInExport");
 072                writer.WriteBooleanValue(ExcludeKeysInExport.Value);
 73            }
 074            if (Optional.IsDefined(StorageAuthenticationType))
 75            {
 076                writer.WritePropertyName("storageAuthenticationType");
 077                writer.WriteStringValue(StorageAuthenticationType.Value.ToString());
 78            }
 079            if (Optional.IsDefined(FailureReason))
 80            {
 081                writer.WritePropertyName("failureReason");
 082                writer.WriteStringValue(FailureReason);
 83            }
 084            if (Optional.IsDefined(IncludeConfigurations))
 85            {
 086                writer.WritePropertyName("includeConfigurations");
 087                writer.WriteBooleanValue(IncludeConfigurations.Value);
 88            }
 089            if (Optional.IsDefined(ConfigurationsBlobName))
 90            {
 091                writer.WritePropertyName("configurationsBlobName");
 092                writer.WriteStringValue(ConfigurationsBlobName);
 93            }
 094            writer.WriteEndObject();
 095        }
 96
 97        internal static JobProperties DeserializeJobProperties(JsonElement element)
 98        {
 099            Optional<string> jobId = default;
 0100            Optional<DateTimeOffset> startTimeUtc = default;
 0101            Optional<DateTimeOffset> endTimeUtc = default;
 0102            Optional<JobPropertiesType> type = default;
 0103            Optional<JobPropertiesStatus> status = default;
 0104            Optional<int> progress = default;
 0105            Optional<string> inputBlobContainerUri = default;
 0106            Optional<string> inputBlobName = default;
 0107            Optional<string> outputBlobContainerUri = default;
 0108            Optional<string> outputBlobName = default;
 0109            Optional<bool> excludeKeysInExport = default;
 0110            Optional<JobPropertiesStorageAuthenticationType> storageAuthenticationType = default;
 0111            Optional<string> failureReason = default;
 0112            Optional<bool> includeConfigurations = default;
 0113            Optional<string> configurationsBlobName = default;
 0114            foreach (var property in element.EnumerateObject())
 115            {
 0116                if (property.NameEquals("jobId"))
 117                {
 0118                    jobId = property.Value.GetString();
 0119                    continue;
 120                }
 0121                if (property.NameEquals("startTimeUtc"))
 122                {
 0123                    startTimeUtc = property.Value.GetDateTimeOffset("O");
 0124                    continue;
 125                }
 0126                if (property.NameEquals("endTimeUtc"))
 127                {
 0128                    endTimeUtc = property.Value.GetDateTimeOffset("O");
 0129                    continue;
 130                }
 0131                if (property.NameEquals("type"))
 132                {
 0133                    type = new JobPropertiesType(property.Value.GetString());
 0134                    continue;
 135                }
 0136                if (property.NameEquals("status"))
 137                {
 0138                    status = new JobPropertiesStatus(property.Value.GetString());
 0139                    continue;
 140                }
 0141                if (property.NameEquals("progress"))
 142                {
 0143                    progress = property.Value.GetInt32();
 0144                    continue;
 145                }
 0146                if (property.NameEquals("inputBlobContainerUri"))
 147                {
 0148                    inputBlobContainerUri = property.Value.GetString();
 0149                    continue;
 150                }
 0151                if (property.NameEquals("inputBlobName"))
 152                {
 0153                    inputBlobName = property.Value.GetString();
 0154                    continue;
 155                }
 0156                if (property.NameEquals("outputBlobContainerUri"))
 157                {
 0158                    outputBlobContainerUri = property.Value.GetString();
 0159                    continue;
 160                }
 0161                if (property.NameEquals("outputBlobName"))
 162                {
 0163                    outputBlobName = property.Value.GetString();
 0164                    continue;
 165                }
 0166                if (property.NameEquals("excludeKeysInExport"))
 167                {
 0168                    excludeKeysInExport = property.Value.GetBoolean();
 0169                    continue;
 170                }
 0171                if (property.NameEquals("storageAuthenticationType"))
 172                {
 0173                    storageAuthenticationType = new JobPropertiesStorageAuthenticationType(property.Value.GetString());
 0174                    continue;
 175                }
 0176                if (property.NameEquals("failureReason"))
 177                {
 0178                    failureReason = property.Value.GetString();
 0179                    continue;
 180                }
 0181                if (property.NameEquals("includeConfigurations"))
 182                {
 0183                    includeConfigurations = property.Value.GetBoolean();
 0184                    continue;
 185                }
 0186                if (property.NameEquals("configurationsBlobName"))
 187                {
 0188                    configurationsBlobName = property.Value.GetString();
 189                    continue;
 190                }
 191            }
 0192            return new JobProperties(jobId.Value, Optional.ToNullable(startTimeUtc), Optional.ToNullable(endTimeUtc), Op
 193        }
 194    }
 195}