< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventEncoderConnectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderConnectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderConnectedEventData.Serialization.cs
Covered lines:27
Uncovered lines:2
Coverable lines:29
Total lines:87
Line coverage:93.1% (27 of 29)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_IngestUrl()-100%100%
get_StreamId()-100%100%
get_EncoderIp()-100%100%
get_EncoderPort()-100%100%
DeserializeMediaLiveEventEncoderConnectedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderConnectedEventData.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 MediaLiveEventEncoderConnectedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventEncoderConnectedEventData. </summary>
 014        internal MediaLiveEventEncoderConnectedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventEncoderConnectedEventData. </summary>
 19        /// <param name="ingestUrl"> Gets the ingest URL provided by the live event. </param>
 20        /// <param name="streamId"> Gets the stream Id. </param>
 21        /// <param name="encoderIp"> Gets the remote IP. </param>
 22        /// <param name="encoderPort"> Gets the remote port. </param>
 223        internal MediaLiveEventEncoderConnectedEventData(string ingestUrl, string streamId, string encoderIp, string enc
 24        {
 225            IngestUrl = ingestUrl;
 226            StreamId = streamId;
 227            EncoderIp = encoderIp;
 228            EncoderPort = encoderPort;
 229        }
 30
 31        /// <summary> Gets the ingest URL provided by the live event. </summary>
 232        public string IngestUrl { get; }
 33        /// <summary> Gets the stream Id. </summary>
 234        public string StreamId { get; }
 35        /// <summary> Gets the remote IP. </summary>
 236        public string EncoderIp { get; }
 37        /// <summary> Gets the remote port. </summary>
 238        public string EncoderPort { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderConnectedEventData.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 MediaLiveEventEncoderConnectedEventData
 14    {
 15        internal static MediaLiveEventEncoderConnectedEventData DeserializeMediaLiveEventEncoderConnectedEventData(JsonE
 16        {
 217            Optional<string> ingestUrl = default;
 218            Optional<string> streamId = default;
 219            Optional<string> encoderIp = default;
 220            Optional<string> encoderPort = default;
 2021            foreach (var property in element.EnumerateObject())
 22            {
 823                if (property.NameEquals("ingestUrl"))
 24                {
 225                    ingestUrl = property.Value.GetString();
 226                    continue;
 27                }
 628                if (property.NameEquals("streamId"))
 29                {
 230                    streamId = property.Value.GetString();
 231                    continue;
 32                }
 433                if (property.NameEquals("encoderIp"))
 34                {
 235                    encoderIp = property.Value.GetString();
 236                    continue;
 37                }
 238                if (property.NameEquals("encoderPort"))
 39                {
 240                    encoderPort = property.Value.GetString();
 41                    continue;
 42                }
 43            }
 244            return new MediaLiveEventEncoderConnectedEventData(ingestUrl.Value, streamId.Value, encoderIp.Value, encoder
 45        }
 46    }
 47}