< Summary

Class:Azure.Iot.Hub.Service.Models.DeviceRegistryOperationError
Assembly:Azure.Iot.Hub.Service
File(s):C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceRegistryOperationError.cs
C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceRegistryOperationError.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_DeviceId()-0%100%
get_ErrorCode()-0%100%
get_ErrorStatus()-0%100%
get_ModuleId()-0%100%
get_Operation()-0%100%
DeserializeDeviceRegistryOperationError(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceRegistryOperationError.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 device registry operation error details. </summary>
 11    public partial class DeviceRegistryOperationError
 12    {
 13        /// <summary> Initializes a new instance of DeviceRegistryOperationError. </summary>
 014        internal DeviceRegistryOperationError()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeviceRegistryOperationError. </summary>
 19        /// <param name="deviceId"> The unique identifier of the device. </param>
 20        /// <param name="errorCode"> The error code. </param>
 21        /// <param name="errorStatus"> The details of the error. </param>
 22        /// <param name="moduleId"> The unique identifier of the module, if applicable. </param>
 23        /// <param name="operation"> The type of the operation that failed. </param>
 024        internal DeviceRegistryOperationError(string deviceId, DeviceRegistryOperationErrorCode? errorCode, string error
 25        {
 026            DeviceId = deviceId;
 027            ErrorCode = errorCode;
 028            ErrorStatus = errorStatus;
 029            ModuleId = moduleId;
 030            Operation = operation;
 031        }
 32
 33        /// <summary> The unique identifier of the device. </summary>
 034        public string DeviceId { get; }
 35        /// <summary> The error code. </summary>
 036        public DeviceRegistryOperationErrorCode? ErrorCode { get; }
 37        /// <summary> The details of the error. </summary>
 038        public string ErrorStatus { get; }
 39        /// <summary> The unique identifier of the module, if applicable. </summary>
 040        public string ModuleId { get; }
 41        /// <summary> The type of the operation that failed. </summary>
 042        public string Operation { get; }
 43    }
 44}

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