< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaJobErrorDetail
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobErrorDetail.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobErrorDetail.Serialization.cs
Covered lines:13
Uncovered lines:4
Coverable lines:17
Total lines:67
Line coverage:76.4% (13 of 17)
Covered branches:6
Total branches:6
Branch coverage:100% (6 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Code()-0%100%
get_Message()-0%100%
DeserializeMediaJobErrorDetail(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobErrorDetail.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> Details of JobOutput errors. </summary>
 11    public partial class MediaJobErrorDetail
 12    {
 13        /// <summary> Initializes a new instance of MediaJobErrorDetail. </summary>
 014        internal MediaJobErrorDetail()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MediaJobErrorDetail. </summary>
 19        /// <param name="code"> Code describing the error detail. </param>
 20        /// <param name="message"> A human-readable representation of the error. </param>
 1621        internal MediaJobErrorDetail(string code, string message)
 22        {
 1623            Code = code;
 1624            Message = message;
 1625        }
 26
 27        /// <summary> Code describing the error detail. </summary>
 028        public string Code { get; }
 29        /// <summary> A human-readable representation of the error. </summary>
 030        public string Message { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobErrorDetail.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 MediaJobErrorDetail
 14    {
 15        internal static MediaJobErrorDetail DeserializeMediaJobErrorDetail(JsonElement element)
 16        {
 1617            Optional<string> code = default;
 1618            Optional<string> message = default;
 9619            foreach (var property in element.EnumerateObject())
 20            {
 3221                if (property.NameEquals("code"))
 22                {
 1623                    code = property.Value.GetString();
 1624                    continue;
 25                }
 1626                if (property.NameEquals("message"))
 27                {
 1628                    message = property.Value.GetString();
 29                    continue;
 30                }
 31            }
 1632            return new MediaJobErrorDetail(code.Value, message.Value);
 33        }
 34    }
 35}