< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryChartDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryChartDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryChartDeletedEventData.Serialization.cs
Covered lines:19
Uncovered lines:2
Coverable lines:21
Total lines:77
Line coverage:90.4% (19 of 21)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryChartDeletedEventData.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.Messaging.EventGrid.SystemEvents
 11{
 12    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartDeleted event.
 13    public partial class ContainerRegistryChartDeletedEventData : ContainerRegistryArtifactEventData
 14    {
 15        /// <summary> Initializes a new instance of ContainerRegistryChartDeletedEventData. </summary>
 016        internal ContainerRegistryChartDeletedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ContainerRegistryChartDeletedEventData. </summary>
 21        /// <param name="id"> The event ID. </param>
 22        /// <param name="timestamp"> The time at which the event occurred. </param>
 23        /// <param name="action"> The action that encompasses the provided event. </param>
 24        /// <param name="target"> The target of the event. </param>
 225        internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRe
 26        {
 227        }
 28    }
 29}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryChartDeletedEventData.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.Messaging.EventGrid.SystemEvents
 13{
 14    public partial class ContainerRegistryChartDeletedEventData
 15    {
 16        internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegistryChartDeletedEventData(JsonEle
 17        {
 218            Optional<string> id = default;
 219            Optional<DateTimeOffset> timestamp = default;
 220            Optional<string> action = default;
 221            Optional<ContainerRegistryArtifactEventTarget> target = default;
 2022            foreach (var property in element.EnumerateObject())
 23            {
 824                if (property.NameEquals("id"))
 25                {
 226                    id = property.Value.GetString();
 227                    continue;
 28                }
 629                if (property.NameEquals("timestamp"))
 30                {
 231                    timestamp = property.Value.GetDateTimeOffset("O");
 232                    continue;
 33                }
 434                if (property.NameEquals("action"))
 35                {
 236                    action = property.Value.GetString();
 237                    continue;
 38                }
 239                if (property.NameEquals("target"))
 40                {
 241                    target = ContainerRegistryArtifactEventTarget.DeserializeContainerRegistryArtifactEventTarget(proper
 42                    continue;
 43                }
 44            }
 245            return new ContainerRegistryChartDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, ta
 46        }
 47    }
 48}