< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_FirstTimestamp()-100%100%
get_FirstDuration()-100%100%
get_SecondTimestamp()-100%100%
get_SecondDuration()-100%100%
get_Timescale()-100%100%
DeserializeMediaLiveEventIncomingVideoStreamsOutOfSyncEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.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> Incoming video stream out of synch event data. </summary>
 11    public partial class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventIncomingVideoStreamsOutOfSyncEventData. </summary>
 014        internal MediaLiveEventIncomingVideoStreamsOutOfSyncEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventIncomingVideoStreamsOutOfSyncEventData. </summary>
 19        /// <param name="firstTimestamp"> Gets the first timestamp received for one of the quality levels. </param>
 20        /// <param name="firstDuration"> Gets the duration of the data chunk with first timestamp. </param>
 21        /// <param name="secondTimestamp"> Gets the timestamp received for some other quality levels. </param>
 22        /// <param name="secondDuration"> Gets the duration of the data chunk with second timestamp. </param>
 23        /// <param name="timescale"> Gets the timescale in which both the timestamps and durations are represented. </pa
 224        internal MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(string firstTimestamp, string firstDuration, strin
 25        {
 226            FirstTimestamp = firstTimestamp;
 227            FirstDuration = firstDuration;
 228            SecondTimestamp = secondTimestamp;
 229            SecondDuration = secondDuration;
 230            Timescale = timescale;
 231        }
 32
 33        /// <summary> Gets the first timestamp received for one of the quality levels. </summary>
 234        public string FirstTimestamp { get; }
 35        /// <summary> Gets the duration of the data chunk with first timestamp. </summary>
 236        public string FirstDuration { get; }
 37        /// <summary> Gets the timestamp received for some other quality levels. </summary>
 238        public string SecondTimestamp { get; }
 39        /// <summary> Gets the duration of the data chunk with second timestamp. </summary>
 240        public string SecondDuration { get; }
 41        /// <summary> Gets the timescale in which both the timestamps and durations are represented. </summary>
 242        public string Timescale { get; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.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 MediaLiveEventIncomingVideoStreamsOutOfSyncEventData
 14    {
 15        internal static MediaLiveEventIncomingVideoStreamsOutOfSyncEventData DeserializeMediaLiveEventIncomingVideoStrea
 16        {
 217            Optional<string> firstTimestamp = default;
 218            Optional<string> firstDuration = default;
 219            Optional<string> secondTimestamp = default;
 220            Optional<string> secondDuration = default;
 221            Optional<string> timescale = default;
 2422            foreach (var property in element.EnumerateObject())
 23            {
 1024                if (property.NameEquals("firstTimestamp"))
 25                {
 226                    firstTimestamp = property.Value.GetString();
 227                    continue;
 28                }
 829                if (property.NameEquals("firstDuration"))
 30                {
 231                    firstDuration = property.Value.GetString();
 232                    continue;
 33                }
 634                if (property.NameEquals("secondTimestamp"))
 35                {
 236                    secondTimestamp = property.Value.GetString();
 237                    continue;
 38                }
 439                if (property.NameEquals("secondDuration"))
 40                {
 241                    secondDuration = property.Value.GetString();
 242                    continue;
 43                }
 244                if (property.NameEquals("timescale"))
 45                {
 246                    timescale = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 250            return new MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(firstTimestamp.Value, firstDuration.Value, s
 51        }
 52    }
 53}