< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingDataChunkDroppedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingDataChunkDroppedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingDataChunkDroppedEventData.Serialization.cs
Covered lines:39
Uncovered lines:2
Coverable lines:41
Total lines:107
Line coverage:95.1% (39 of 41)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Timestamp()-100%100%
get_TrackType()-100%100%
get_Bitrate()-100%100%
get_Timescale()-100%100%
get_ResultCode()-100%100%
get_TrackName()-100%100%
DeserializeMediaLiveEventIncomingDataChunkDroppedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingDataChunkDroppedEventData.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> Ingest fragment dropped event data. </summary>
 11    public partial class MediaLiveEventIncomingDataChunkDroppedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventIncomingDataChunkDroppedEventData. </summary>
 014        internal MediaLiveEventIncomingDataChunkDroppedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventIncomingDataChunkDroppedEventData. </summary>
 19        /// <param name="timestamp"> Gets the timestamp of the data chunk dropped. </param>
 20        /// <param name="trackType"> Gets the type of the track (Audio / Video). </param>
 21        /// <param name="bitrate"> Gets the bitrate of the track. </param>
 22        /// <param name="timescale"> Gets the timescale of the Timestamp. </param>
 23        /// <param name="resultCode"> Gets the result code for fragment drop operation. </param>
 24        /// <param name="trackName"> Gets the name of the track for which fragment is dropped. </param>
 225        internal MediaLiveEventIncomingDataChunkDroppedEventData(string timestamp, string trackType, long? bitrate, stri
 26        {
 227            Timestamp = timestamp;
 228            TrackType = trackType;
 229            Bitrate = bitrate;
 230            Timescale = timescale;
 231            ResultCode = resultCode;
 232            TrackName = trackName;
 233        }
 34
 35        /// <summary> Gets the timestamp of the data chunk dropped. </summary>
 236        public string Timestamp { get; }
 37        /// <summary> Gets the type of the track (Audio / Video). </summary>
 238        public string TrackType { get; }
 39        /// <summary> Gets the bitrate of the track. </summary>
 240        public long? Bitrate { get; }
 41        /// <summary> Gets the timescale of the Timestamp. </summary>
 242        public string Timescale { get; }
 43        /// <summary> Gets the result code for fragment drop operation. </summary>
 244        public string ResultCode { get; }
 45        /// <summary> Gets the name of the track for which fragment is dropped. </summary>
 246        public string TrackName { get; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingDataChunkDroppedEventData.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 MediaLiveEventIncomingDataChunkDroppedEventData
 14    {
 15        internal static MediaLiveEventIncomingDataChunkDroppedEventData DeserializeMediaLiveEventIncomingDataChunkDroppe
 16        {
 217            Optional<string> timestamp = default;
 218            Optional<string> trackType = default;
 219            Optional<long> bitrate = default;
 220            Optional<string> timescale = default;
 221            Optional<string> resultCode = default;
 222            Optional<string> trackName = default;
 2823            foreach (var property in element.EnumerateObject())
 24            {
 1225                if (property.NameEquals("timestamp"))
 26                {
 227                    timestamp = property.Value.GetString();
 228                    continue;
 29                }
 1030                if (property.NameEquals("trackType"))
 31                {
 232                    trackType = property.Value.GetString();
 233                    continue;
 34                }
 835                if (property.NameEquals("bitrate"))
 36                {
 237                    bitrate = property.Value.GetInt64();
 238                    continue;
 39                }
 640                if (property.NameEquals("timescale"))
 41                {
 242                    timescale = property.Value.GetString();
 243                    continue;
 44                }
 445                if (property.NameEquals("resultCode"))
 46                {
 247                    resultCode = property.Value.GetString();
 248                    continue;
 49                }
 250                if (property.NameEquals("trackName"))
 51                {
 252                    trackName = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 256            return new MediaLiveEventIncomingDataChunkDroppedEventData(timestamp.Value, trackType.Value, Optional.ToNull
 57        }
 58    }
 59}