< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryImageDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryImageDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryImageDeletedEventData.Serialization.cs
Covered lines:31
Uncovered lines:2
Coverable lines:33
Total lines:98
Line coverage:93.9% (31 of 33)
Covered branches:16
Total branches:16
Branch coverage:100% (16 of 16)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryImageDeletedEventData.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.ImageDeleted event.
 13    public partial class ContainerRegistryImageDeletedEventData : ContainerRegistryEventData
 14    {
 15        /// <summary> Initializes a new instance of ContainerRegistryImageDeletedEventData. </summary>
 016        internal ContainerRegistryImageDeletedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ContainerRegistryImageDeletedEventData. </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>
 25        /// <param name="request"> The request that generated the event. </param>
 26        /// <param name="actor"> The agent that initiated the event. For most situations, this could be from the authori
 27        /// <param name="source"> The registry node that generated the event. Put differently, while the actor initiates
 228        internal ContainerRegistryImageDeletedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRe
 29        {
 230        }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryImageDeletedEventData.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 ContainerRegistryImageDeletedEventData
 15    {
 16        internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegistryImageDeletedEventData(JsonEle
 17        {
 218            Optional<string> id = default;
 219            Optional<DateTimeOffset> timestamp = default;
 220            Optional<string> action = default;
 221            Optional<ContainerRegistryEventTarget> target = default;
 222            Optional<ContainerRegistryEventRequest> request = default;
 223            Optional<ContainerRegistryEventActor> actor = default;
 224            Optional<ContainerRegistryEventSource> source = default;
 3225            foreach (var property in element.EnumerateObject())
 26            {
 1427                if (property.NameEquals("id"))
 28                {
 229                    id = property.Value.GetString();
 230                    continue;
 31                }
 1232                if (property.NameEquals("timestamp"))
 33                {
 234                    timestamp = property.Value.GetDateTimeOffset("O");
 235                    continue;
 36                }
 1037                if (property.NameEquals("action"))
 38                {
 239                    action = property.Value.GetString();
 240                    continue;
 41                }
 842                if (property.NameEquals("target"))
 43                {
 244                    target = ContainerRegistryEventTarget.DeserializeContainerRegistryEventTarget(property.Value);
 245                    continue;
 46                }
 647                if (property.NameEquals("request"))
 48                {
 249                    request = ContainerRegistryEventRequest.DeserializeContainerRegistryEventRequest(property.Value);
 250                    continue;
 51                }
 452                if (property.NameEquals("actor"))
 53                {
 254                    actor = ContainerRegistryEventActor.DeserializeContainerRegistryEventActor(property.Value);
 255                    continue;
 56                }
 257                if (property.NameEquals("source"))
 58                {
 259                    source = ContainerRegistryEventSource.DeserializeContainerRegistryEventSource(property.Value);
 60                    continue;
 61                }
 62            }
 263            return new ContainerRegistryImageDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, ta
 64        }
 65    }
 66}