< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventEncoderDisconnectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderDisconnectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderDisconnectedEventData.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_IngestUrl()-100%100%
get_StreamId()-100%100%
get_EncoderIp()-100%100%
get_EncoderPort()-100%100%
get_ResultCode()-100%100%
DeserializeMediaLiveEventEncoderDisconnectedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventEncoderDisconnectedEventData.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 disconnected event data. </summary>
 11    public partial class MediaLiveEventEncoderDisconnectedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventEncoderDisconnectedEventData. </summary>
 014        internal MediaLiveEventEncoderDisconnectedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventEncoderDisconnectedEventData. </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>
 23        /// <param name="resultCode"> Gets the result code. </param>
 224        internal MediaLiveEventEncoderDisconnectedEventData(string ingestUrl, string streamId, string encoderIp, string 
 25        {
 226            IngestUrl = ingestUrl;
 227            StreamId = streamId;
 228            EncoderIp = encoderIp;
 229            EncoderPort = encoderPort;
 230            ResultCode = resultCode;
 231        }
 32
 33        /// <summary> Gets the ingest URL provided by the live event. </summary>
 234        public string IngestUrl { get; }
 35        /// <summary> Gets the stream Id. </summary>
 236        public string StreamId { get; }
 37        /// <summary> Gets the remote IP. </summary>
 238        public string EncoderIp { get; }
 39        /// <summary> Gets the remote port. </summary>
 240        public string EncoderPort { get; }
 41        /// <summary> Gets the result code. </summary>
 242        public string ResultCode { get; }
 43    }
 44}

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