< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_DeviceId()-0%100%
get_WarningCode()-0%100%
get_WarningStatus()-0%100%
DeserializeDeviceRegistryOperationWarning(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceRegistryOperationWarning.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 warning details. </summary>
 11    public partial class DeviceRegistryOperationWarning
 12    {
 13        /// <summary> Initializes a new instance of DeviceRegistryOperationWarning. </summary>
 014        internal DeviceRegistryOperationWarning()
 15        {
 016            WarningCode = "DeviceRegisteredWithoutTwin";
 017        }
 18
 19        /// <summary> Initializes a new instance of DeviceRegistryOperationWarning. </summary>
 20        /// <param name="deviceId"> The unique identifier of the device. </param>
 21        /// <param name="warningCode"> The warning code. </param>
 22        /// <param name="warningStatus"> The details of the warning. </param>
 023        internal DeviceRegistryOperationWarning(string deviceId, string warningCode, string warningStatus)
 24        {
 025            DeviceId = deviceId;
 026            WarningCode = warningCode;
 027            WarningStatus = warningStatus;
 028        }
 29
 30        /// <summary> The unique identifier of the device. </summary>
 031        public string DeviceId { get; }
 32        /// <summary> The warning code. </summary>
 033        public string WarningCode { get; }
 34        /// <summary> The details of the warning. </summary>
 035        public string WarningStatus { get; }
 36    }
 37}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\DeviceRegistryOperationWarning.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 DeviceRegistryOperationWarning
 14    {
 15        internal static DeviceRegistryOperationWarning DeserializeDeviceRegistryOperationWarning(JsonElement element)
 16        {
 017            Optional<string> deviceId = default;
 018            Optional<string> warningCode = default;
 019            Optional<string> warningStatus = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("deviceId"))
 23                {
 024                    deviceId = property.Value.GetString();
 025                    continue;
 26                }
 027                if (property.NameEquals("warningCode"))
 28                {
 029                    warningCode = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("warningStatus"))
 33                {
 034                    warningStatus = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 038            return new DeviceRegistryOperationWarning(deviceId.Value, warningCode.Value, warningStatus.Value);
 39        }
 40    }
 41}