< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventIncomingStreamReceivedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingStreamReceivedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingStreamReceivedEventData.Serialization.cs
Covered lines:57
Uncovered lines:2
Coverable lines:59
Total lines:137
Line coverage:96.6% (57 of 59)
Covered branches:20
Total branches:20
Branch coverage:100% (20 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_IngestUrl()-100%100%
get_TrackType()-100%100%
get_TrackName()-100%100%
get_Bitrate()-100%100%
get_EncoderIp()-100%100%
get_EncoderPort()-100%100%
get_Timestamp()-100%100%
get_Duration()-100%100%
get_Timescale()-100%100%
DeserializeMediaLiveEventIncomingStreamReceivedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingStreamReceivedEventData.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> Encoder connect event data. </summary>
 11    public partial class MediaLiveEventIncomingStreamReceivedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventIncomingStreamReceivedEventData. </summary>
 014        internal MediaLiveEventIncomingStreamReceivedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventIncomingStreamReceivedEventData. </summary>
 19        /// <param name="ingestUrl"> Gets the ingest URL provided by the live event. </param>
 20        /// <param name="trackType"> Gets the type of the track (Audio / Video). </param>
 21        /// <param name="trackName"> Gets the track name. </param>
 22        /// <param name="bitrate"> Gets the bitrate of the track. </param>
 23        /// <param name="encoderIp"> Gets the remote IP. </param>
 24        /// <param name="encoderPort"> Gets the remote port. </param>
 25        /// <param name="timestamp"> Gets the first timestamp of the data chunk received. </param>
 26        /// <param name="duration"> Gets the duration of the first data chunk. </param>
 27        /// <param name="timescale"> Gets the timescale in which timestamp is represented. </param>
 228        internal MediaLiveEventIncomingStreamReceivedEventData(string ingestUrl, string trackType, string trackName, lon
 29        {
 230            IngestUrl = ingestUrl;
 231            TrackType = trackType;
 232            TrackName = trackName;
 233            Bitrate = bitrate;
 234            EncoderIp = encoderIp;
 235            EncoderPort = encoderPort;
 236            Timestamp = timestamp;
 237            Duration = duration;
 238            Timescale = timescale;
 239        }
 40
 41        /// <summary> Gets the ingest URL provided by the live event. </summary>
 242        public string IngestUrl { get; }
 43        /// <summary> Gets the type of the track (Audio / Video). </summary>
 244        public string TrackType { get; }
 45        /// <summary> Gets the track name. </summary>
 246        public string TrackName { get; }
 47        /// <summary> Gets the bitrate of the track. </summary>
 248        public long? Bitrate { get; }
 49        /// <summary> Gets the remote IP. </summary>
 250        public string EncoderIp { get; }
 51        /// <summary> Gets the remote port. </summary>
 252        public string EncoderPort { get; }
 53        /// <summary> Gets the first timestamp of the data chunk received. </summary>
 254        public string Timestamp { get; }
 55        /// <summary> Gets the duration of the first data chunk. </summary>
 256        public string Duration { get; }
 57        /// <summary> Gets the timescale in which timestamp is represented. </summary>
 258        public string Timescale { get; }
 59    }
 60}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventIncomingStreamReceivedEventData.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 MediaLiveEventIncomingStreamReceivedEventData
 14    {
 15        internal static MediaLiveEventIncomingStreamReceivedEventData DeserializeMediaLiveEventIncomingStreamReceivedEve
 16        {
 217            Optional<string> ingestUrl = default;
 218            Optional<string> trackType = default;
 219            Optional<string> trackName = default;
 220            Optional<long> bitrate = default;
 221            Optional<string> encoderIp = default;
 222            Optional<string> encoderPort = default;
 223            Optional<string> timestamp = default;
 224            Optional<string> duration = default;
 225            Optional<string> timescale = default;
 4026            foreach (var property in element.EnumerateObject())
 27            {
 1828                if (property.NameEquals("ingestUrl"))
 29                {
 230                    ingestUrl = property.Value.GetString();
 231                    continue;
 32                }
 1633                if (property.NameEquals("trackType"))
 34                {
 235                    trackType = property.Value.GetString();
 236                    continue;
 37                }
 1438                if (property.NameEquals("trackName"))
 39                {
 240                    trackName = property.Value.GetString();
 241                    continue;
 42                }
 1243                if (property.NameEquals("bitrate"))
 44                {
 245                    bitrate = property.Value.GetInt64();
 246                    continue;
 47                }
 1048                if (property.NameEquals("encoderIp"))
 49                {
 250                    encoderIp = property.Value.GetString();
 251                    continue;
 52                }
 853                if (property.NameEquals("encoderPort"))
 54                {
 255                    encoderPort = property.Value.GetString();
 256                    continue;
 57                }
 658                if (property.NameEquals("timestamp"))
 59                {
 260                    timestamp = property.Value.GetString();
 261                    continue;
 62                }
 463                if (property.NameEquals("duration"))
 64                {
 265                    duration = property.Value.GetString();
 266                    continue;
 67                }
 268                if (property.NameEquals("timescale"))
 69                {
 270                    timescale = property.Value.GetString();
 71                    continue;
 72                }
 73            }
 274            return new MediaLiveEventIncomingStreamReceivedEventData(ingestUrl.Value, trackType.Value, trackName.Value, 
 75        }
 76    }
 77}