< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaLiveEventConnectionRejectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventConnectionRejectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventConnectionRejectedEventData.Serialization.cs
Covered lines:28
Uncovered lines:7
Coverable lines:35
Total lines:97
Line coverage:80% (28 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()-0%100%
get_StreamId()-0%100%
get_EncoderIp()-0%100%
get_EncoderPort()-0%100%
get_ResultCode()-0%100%
DeserializeMediaLiveEventConnectionRejectedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventConnectionRejectedEventData.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 connection rejected event data. </summary>
 11    public partial class MediaLiveEventConnectionRejectedEventData
 12    {
 13        /// <summary> Initializes a new instance of MediaLiveEventConnectionRejectedEventData. </summary>
 014        internal MediaLiveEventConnectionRejectedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaLiveEventConnectionRejectedEventData. </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 MediaLiveEventConnectionRejectedEventData(string ingestUrl, string streamId, string encoderIp, string e
 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>
 034        public string IngestUrl { get; }
 35        /// <summary> Gets the stream Id. </summary>
 036        public string StreamId { get; }
 37        /// <summary> Gets the remote IP. </summary>
 038        public string EncoderIp { get; }
 39        /// <summary> Gets the remote port. </summary>
 040        public string EncoderPort { get; }
 41        /// <summary> Gets the result code. </summary>
 042        public string ResultCode { get; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaLiveEventConnectionRejectedEventData.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 MediaLiveEventConnectionRejectedEventData
 14    {
 15        internal static MediaLiveEventConnectionRejectedEventData DeserializeMediaLiveEventConnectionRejectedEventData(J
 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 MediaLiveEventConnectionRejectedEventData(ingestUrl.Value, streamId.Value, encoderIp.Value, encod
 51        }
 52    }
 53}