< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventTrackDiscontinuityDetectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventTrackDiscontinuityDetectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventTrackDiscontinuityDetectedEventData.Serialization.cs
Covered lines:45
Uncovered lines:2
Coverable lines:47
Total lines:117
Line coverage:95.7% (45 of 47)
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%
get_TrackType()-100%100%
get_TrackName()-100%100%
get_Bitrate()-100%100%
get_PreviousTimestamp()-100%100%
get_NewTimestamp()-100%100%
get_Timescale()-100%100%
get_DiscontinuityGap()-100%100%
DeserializeMediaLiveEventTrackDiscontinuityDetectedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventTrackDiscontinuityDetectedEventData.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 track discontinuity detected event data. </summary>
 11    public partial class MediaLiveEventTrackDiscontinuityDetectedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventTrackDiscontinuityDetectedEventData. </summary>
 014        internal MediaLiveEventTrackDiscontinuityDetectedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventTrackDiscontinuityDetectedEventData. </summary>
 19        /// <param name="trackType"> Gets the type of the track (Audio / Video). </param>
 20        /// <param name="trackName"> Gets the track name. </param>
 21        /// <param name="bitrate"> Gets the bitrate. </param>
 22        /// <param name="previousTimestamp"> Gets the timestamp of the previous fragment. </param>
 23        /// <param name="newTimestamp"> Gets the timestamp of the current fragment. </param>
 24        /// <param name="timescale"> Gets the timescale in which both timestamps and discontinuity gap are represented. 
 25        /// <param name="discontinuityGap"> Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. </par
 226        internal MediaLiveEventTrackDiscontinuityDetectedEventData(string trackType, string trackName, long? bitrate, st
 27        {
 228            TrackType = trackType;
 229            TrackName = trackName;
 230            Bitrate = bitrate;
 231            PreviousTimestamp = previousTimestamp;
 232            NewTimestamp = newTimestamp;
 233            Timescale = timescale;
 234            DiscontinuityGap = discontinuityGap;
 235        }
 36
 37        /// <summary> Gets the type of the track (Audio / Video). </summary>
 238        public string TrackType { get; }
 39        /// <summary> Gets the track name. </summary>
 240        public string TrackName { get; }
 41        /// <summary> Gets the bitrate. </summary>
 242        public long? Bitrate { get; }
 43        /// <summary> Gets the timestamp of the previous fragment. </summary>
 244        public string PreviousTimestamp { get; }
 45        /// <summary> Gets the timestamp of the current fragment. </summary>
 246        public string NewTimestamp { get; }
 47        /// <summary> Gets the timescale in which both timestamps and discontinuity gap are represented. </summary>
 248        public string Timescale { get; }
 49        /// <summary> Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. </summary>
 250        public string DiscontinuityGap { get; }
 51    }
 52}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventTrackDiscontinuityDetectedEventData.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 MediaLiveEventTrackDiscontinuityDetectedEventData
 14    {
 15        internal static MediaLiveEventTrackDiscontinuityDetectedEventData DeserializeMediaLiveEventTrackDiscontinuityDet
 16        {
 217            Optional<string> trackType = default;
 218            Optional<string> trackName = default;
 219            Optional<long> bitrate = default;
 220            Optional<string> previousTimestamp = default;
 221            Optional<string> newTimestamp = default;
 222            Optional<string> timescale = default;
 223            Optional<string> discontinuityGap = default;
 3224            foreach (var property in element.EnumerateObject())
 25            {
 1426                if (property.NameEquals("trackType"))
 27                {
 228                    trackType = property.Value.GetString();
 229                    continue;
 30                }
 1231                if (property.NameEquals("trackName"))
 32                {
 233                    trackName = property.Value.GetString();
 234                    continue;
 35                }
 1036                if (property.NameEquals("bitrate"))
 37                {
 238                    bitrate = property.Value.GetInt64();
 239                    continue;
 40                }
 841                if (property.NameEquals("previousTimestamp"))
 42                {
 243                    previousTimestamp = property.Value.GetString();
 244                    continue;
 45                }
 646                if (property.NameEquals("newTimestamp"))
 47                {
 248                    newTimestamp = property.Value.GetString();
 249                    continue;
 50                }
 451                if (property.NameEquals("timescale"))
 52                {
 253                    timescale = property.Value.GetString();
 254                    continue;
 55                }
 256                if (property.NameEquals("discontinuityGap"))
 57                {
 258                    discontinuityGap = property.Value.GetString();
 59                    continue;
 60                }
 61            }
 262            return new MediaLiveEventTrackDiscontinuityDetectedEventData(trackType.Value, trackName.Value, Optional.ToNu
 63        }
 64    }
 65}