< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaJobOutputProgressEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputProgressEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputProgressEventData.Serialization.cs
Covered lines:24
Uncovered lines:3
Coverable lines:27
Total lines:87
Line coverage:88.8% (24 of 27)
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%
get_Label()-100%100%
get_Progress()-100%100%
get_JobCorrelationData()-100%100%
DeserializeMediaJobOutputProgressEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputProgressEventData.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 Azure.Core;
 10
 11namespace Azure.Messaging.EventGrid.SystemEvents
 12{
 13    /// <summary> Job Output Progress Event Data. </summary>
 14    public partial class MediaJobOutputProgressEventData
 15    {
 16        /// <summary> Initializes a new instance of MediaJobOutputProgressEventData. </summary>
 017        internal MediaJobOutputProgressEventData()
 18        {
 019            JobCorrelationData = new ChangeTrackingDictionary<string, string>();
 020        }
 21
 22        /// <summary> Initializes a new instance of MediaJobOutputProgressEventData. </summary>
 23        /// <param name="label"> Gets the Job output label. </param>
 24        /// <param name="progress"> Gets the Job output progress. </param>
 25        /// <param name="jobCorrelationData"> Gets the Job correlation data. </param>
 226        internal MediaJobOutputProgressEventData(string label, long? progress, IReadOnlyDictionary<string, string> jobCo
 27        {
 228            Label = label;
 229            Progress = progress;
 230            JobCorrelationData = jobCorrelationData;
 231        }
 32
 33        /// <summary> Gets the Job output label. </summary>
 234        public string Label { get; }
 35        /// <summary> Gets the Job output progress. </summary>
 236        public long? Progress { get; }
 37        /// <summary> Gets the Job correlation data. </summary>
 838        public IReadOnlyDictionary<string, string> JobCorrelationData { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobOutputProgressEventData.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 MediaJobOutputProgressEventData
 15    {
 16        internal static MediaJobOutputProgressEventData DeserializeMediaJobOutputProgressEventData(JsonElement element)
 17        {
 218            Optional<string> label = default;
 219            Optional<long> progress = default;
 220            Optional<IReadOnlyDictionary<string, string>> jobCorrelationData = default;
 1621            foreach (var property in element.EnumerateObject())
 22            {
 623                if (property.NameEquals("label"))
 24                {
 225                    label = property.Value.GetString();
 226                    continue;
 27                }
 428                if (property.NameEquals("progress"))
 29                {
 230                    progress = property.Value.GetInt64();
 231                    continue;
 32                }
 233                if (property.NameEquals("jobCorrelationData"))
 34                {
 235                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 1236                    foreach (var property0 in property.Value.EnumerateObject())
 37                    {
 438                        dictionary.Add(property0.Name, property0.Value.GetString());
 39                    }
 240                    jobCorrelationData = dictionary;
 41                    continue;
 42                }
 43            }
 244            return new MediaJobOutputProgressEventData(label.Value, Optional.ToNullable(progress), Optional.ToDictionary
 45        }
 46    }
 47}