< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinMetadata.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinMetadata.Serialization.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:57
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_LastUpdated()-0%100%
DeserializeDeviceTwinMetadata(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinMetadata.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.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Metadata information for the properties JSON document. </summary>
 11    public partial class DeviceTwinMetadata
 12    {
 13        /// <summary> Initializes a new instance of DeviceTwinMetadata. </summary>
 014        internal DeviceTwinMetadata()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeviceTwinMetadata. </summary>
 19        /// <param name="lastUpdated"> The ISO8601 timestamp of the last time the properties were updated. </param>
 020        internal DeviceTwinMetadata(string lastUpdated)
 21        {
 022            LastUpdated = lastUpdated;
 023        }
 24
 25        /// <summary> The ISO8601 timestamp of the last time the properties were updated. </summary>
 026        public string LastUpdated { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinMetadata.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class DeviceTwinMetadata
 14    {
 15        internal static DeviceTwinMetadata DeserializeDeviceTwinMetadata(JsonElement element)
 16        {
 017            Optional<string> lastUpdated = default;
 018            foreach (var property in element.EnumerateObject())
 19            {
 020                if (property.NameEquals("lastUpdated"))
 21                {
 022                    lastUpdated = property.Value.GetString();
 23                    continue;
 24                }
 25            }
 026            return new DeviceTwinMetadata(lastUpdated.Value);
 27        }
 28    }
 29}