< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputFinishedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputFinishedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputFinishedEventData.Serialization.cs
Covered lines:16
Uncovered lines:4
Coverable lines:20
Total lines:75
Line coverage:80% (16 of 20)
Covered branches:9
Total branches:10
Branch coverage:90% (9 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
DeserializeMediaJobOutputFinishedEventData(...)-87.5%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputFinishedEventData.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.Collections.Generic;
 9
 10namespace Azure.Messaging.EventGrid.SystemEvents
 11{
 12    /// <summary> Job output finished event data. </summary>
 13    public partial class MediaJobOutputFinishedEventData : MediaJobOutputStateChangeEventData
 14    {
 15        /// <summary> Initializes a new instance of MediaJobOutputFinishedEventData. </summary>
 016        internal MediaJobOutputFinishedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of MediaJobOutputFinishedEventData. </summary>
 21        /// <param name="previousState"> The previous state of the Job. </param>
 22        /// <param name="output"> Gets the output. </param>
 23        /// <param name="jobCorrelationData"> Gets the Job correlation data. </param>
 224        internal MediaJobOutputFinishedEventData(MediaJobState? previousState, MediaJobOutput output, IReadOnlyDictionar
 25        {
 226        }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputFinishedEventData.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Messaging.EventGrid.SystemEvents
 13{
 14    public partial class MediaJobOutputFinishedEventData
 15    {
 16        internal static MediaJobOutputFinishedEventData DeserializeMediaJobOutputFinishedEventData(JsonElement element)
 17        {
 218            Optional<MediaJobState> previousState = default;
 219            Optional<MediaJobOutput> output = default;
 220            Optional<IReadOnlyDictionary<string, string>> jobCorrelationData = default;
 1621            foreach (var property in element.EnumerateObject())
 22            {
 623                if (property.NameEquals("previousState"))
 24                {
 225                    previousState = property.Value.GetString().ToMediaJobState();
 226                    continue;
 27                }
 428                if (property.NameEquals("output"))
 29                {
 230                    output = MediaJobOutput.DeserializeMediaJobOutput(property.Value);
 231                    continue;
 32                }
 233                if (property.NameEquals("jobCorrelationData"))
 34                {
 235                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 036                    foreach (var property0 in property.Value.EnumerateObject())
 37                    {
 038                        dictionary.Add(property0.Name, property0.Value.GetString());
 39                    }
 240                    jobCorrelationData = dictionary;
 41                    continue;
 42                }
 43            }
 244            return new MediaJobOutputFinishedEventData(Optional.ToNullable(previousState), output.Value, Optional.ToDict
 45        }
 46    }
 47}