< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIngestHeartbeatEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIngestHeartbeatEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIngestHeartbeatEventData.Serialization.cs
Covered lines:75
Uncovered lines:2
Coverable lines:77
Total lines:167
Line coverage:97.4% (75 of 77)
Covered branches:26
Total branches:26
Branch coverage:100% (26 of 26)

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_IncomingBitrate()-100%100%
get_LastTimestamp()-100%100%
get_Timescale()-100%100%
get_OverlapCount()-100%100%
get_DiscontinuityCount()-100%100%
get_NonincreasingCount()-100%100%
get_UnexpectedBitrate()-100%100%
get_State()-100%100%
get_Healthy()-100%100%
DeserializeMediaLiveEventIngestHeartbeatEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIngestHeartbeatEventData.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 MediaLiveEventIngestHeartbeatEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventIngestHeartbeatEventData. </summary>
 014        internal MediaLiveEventIngestHeartbeatEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventIngestHeartbeatEventData. </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 of the track. </param>
 22        /// <param name="incomingBitrate"> Gets the incoming bitrate. </param>
 23        /// <param name="lastTimestamp"> Gets the last timestamp. </param>
 24        /// <param name="timescale"> Gets the timescale of the last timestamp. </param>
 25        /// <param name="overlapCount"> Gets the fragment Overlap count. </param>
 26        /// <param name="discontinuityCount"> Gets the fragment Discontinuity count. </param>
 27        /// <param name="nonincreasingCount"> Gets Non increasing count. </param>
 28        /// <param name="unexpectedBitrate"> Gets a value indicating whether unexpected bitrate is present or not. </par
 29        /// <param name="state"> Gets the state of the live event. </param>
 30        /// <param name="healthy"> Gets a value indicating whether preview is healthy or not. </param>
 231        internal MediaLiveEventIngestHeartbeatEventData(string trackType, string trackName, long? bitrate, long? incomin
 32        {
 233            TrackType = trackType;
 234            TrackName = trackName;
 235            Bitrate = bitrate;
 236            IncomingBitrate = incomingBitrate;
 237            LastTimestamp = lastTimestamp;
 238            Timescale = timescale;
 239            OverlapCount = overlapCount;
 240            DiscontinuityCount = discontinuityCount;
 241            NonincreasingCount = nonincreasingCount;
 242            UnexpectedBitrate = unexpectedBitrate;
 243            State = state;
 244            Healthy = healthy;
 245        }
 46
 47        /// <summary> Gets the type of the track (Audio / Video). </summary>
 248        public string TrackType { get; }
 49        /// <summary> Gets the track name. </summary>
 250        public string TrackName { get; }
 51        /// <summary> Gets the bitrate of the track. </summary>
 252        public long? Bitrate { get; }
 53        /// <summary> Gets the incoming bitrate. </summary>
 254        public long? IncomingBitrate { get; }
 55        /// <summary> Gets the last timestamp. </summary>
 256        public string LastTimestamp { get; }
 57        /// <summary> Gets the timescale of the last timestamp. </summary>
 258        public string Timescale { get; }
 59        /// <summary> Gets the fragment Overlap count. </summary>
 260        public long? OverlapCount { get; }
 61        /// <summary> Gets the fragment Discontinuity count. </summary>
 262        public long? DiscontinuityCount { get; }
 63        /// <summary> Gets Non increasing count. </summary>
 264        public long? NonincreasingCount { get; }
 65        /// <summary> Gets a value indicating whether unexpected bitrate is present or not. </summary>
 266        public bool? UnexpectedBitrate { get; }
 67        /// <summary> Gets the state of the live event. </summary>
 268        public string State { get; }
 69        /// <summary> Gets a value indicating whether preview is healthy or not. </summary>
 270        public bool? Healthy { get; }
 71    }
 72}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIngestHeartbeatEventData.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 MediaLiveEventIngestHeartbeatEventData
 14    {
 15        internal static MediaLiveEventIngestHeartbeatEventData DeserializeMediaLiveEventIngestHeartbeatEventData(JsonEle
 16        {
 217            Optional<string> trackType = default;
 218            Optional<string> trackName = default;
 219            Optional<long> bitrate = default;
 220            Optional<long> incomingBitrate = default;
 221            Optional<string> lastTimestamp = default;
 222            Optional<string> timescale = default;
 223            Optional<long> overlapCount = default;
 224            Optional<long> discontinuityCount = default;
 225            Optional<long> nonincreasingCount = default;
 226            Optional<bool> unexpectedBitrate = default;
 227            Optional<string> state = default;
 228            Optional<bool> healthy = default;
 5229            foreach (var property in element.EnumerateObject())
 30            {
 2431                if (property.NameEquals("trackType"))
 32                {
 233                    trackType = property.Value.GetString();
 234                    continue;
 35                }
 2236                if (property.NameEquals("trackName"))
 37                {
 238                    trackName = property.Value.GetString();
 239                    continue;
 40                }
 2041                if (property.NameEquals("bitrate"))
 42                {
 243                    bitrate = property.Value.GetInt64();
 244                    continue;
 45                }
 1846                if (property.NameEquals("incomingBitrate"))
 47                {
 248                    incomingBitrate = property.Value.GetInt64();
 249                    continue;
 50                }
 1651                if (property.NameEquals("lastTimestamp"))
 52                {
 253                    lastTimestamp = property.Value.GetString();
 254                    continue;
 55                }
 1456                if (property.NameEquals("timescale"))
 57                {
 258                    timescale = property.Value.GetString();
 259                    continue;
 60                }
 1261                if (property.NameEquals("overlapCount"))
 62                {
 263                    overlapCount = property.Value.GetInt64();
 264                    continue;
 65                }
 1066                if (property.NameEquals("discontinuityCount"))
 67                {
 268                    discontinuityCount = property.Value.GetInt64();
 269                    continue;
 70                }
 871                if (property.NameEquals("nonincreasingCount"))
 72                {
 273                    nonincreasingCount = property.Value.GetInt64();
 274                    continue;
 75                }
 676                if (property.NameEquals("unexpectedBitrate"))
 77                {
 278                    unexpectedBitrate = property.Value.GetBoolean();
 279                    continue;
 80                }
 481                if (property.NameEquals("state"))
 82                {
 283                    state = property.Value.GetString();
 284                    continue;
 85                }
 286                if (property.NameEquals("healthy"))
 87                {
 288                    healthy = property.Value.GetBoolean();
 89                    continue;
 90                }
 91            }
 292            return new MediaLiveEventIngestHeartbeatEventData(trackType.Value, trackName.Value, Optional.ToNullable(bitr
 93        }
 94    }
 95}