< Summary

Class:Microsoft.Azure.EventGrid.Models.MediaJobErrorCategoryEnumExtension
Assembly:Microsoft.Azure.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Generated\Models\MediaJobErrorCategory.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:93
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerializedValue(...)-0%0%
ToSerializedValue(...)-0%0%
ParseMediaJobErrorCategory(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Generated\Models\MediaJobErrorCategory.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.EventGrid.Models
 12{
 13    using Newtonsoft.Json;
 14    using Newtonsoft.Json.Converters;
 15    using System.Runtime;
 16    using System.Runtime.Serialization;
 17
 18    /// <summary>
 19    /// Defines values for MediaJobErrorCategory.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum MediaJobErrorCategory
 23    {
 24        /// <summary>
 25        /// The error is service related.
 26        /// </summary>
 27        [EnumMember(Value = "Service")]
 28        Service,
 29        /// <summary>
 30        /// The error is download related.
 31        /// </summary>
 32        [EnumMember(Value = "Download")]
 33        Download,
 34        /// <summary>
 35        /// The error is upload related.
 36        /// </summary>
 37        [EnumMember(Value = "Upload")]
 38        Upload,
 39        /// <summary>
 40        /// The error is configuration related.
 41        /// </summary>
 42        [EnumMember(Value = "Configuration")]
 43        Configuration,
 44        /// <summary>
 45        /// The error is related to data in the input files.
 46        /// </summary>
 47        [EnumMember(Value = "Content")]
 48        Content
 49    }
 50    internal static class MediaJobErrorCategoryEnumExtension
 51    {
 52        internal static string ToSerializedValue(this MediaJobErrorCategory? value)
 53        {
 054            return value == null ? null : ((MediaJobErrorCategory)value).ToSerializedValue();
 55        }
 56
 57        internal static string ToSerializedValue(this MediaJobErrorCategory value)
 58        {
 59            switch( value )
 60            {
 61                case MediaJobErrorCategory.Service:
 062                    return "Service";
 63                case MediaJobErrorCategory.Download:
 064                    return "Download";
 65                case MediaJobErrorCategory.Upload:
 066                    return "Upload";
 67                case MediaJobErrorCategory.Configuration:
 068                    return "Configuration";
 69                case MediaJobErrorCategory.Content:
 070                    return "Content";
 71            }
 072            return null;
 73        }
 74
 75        internal static MediaJobErrorCategory? ParseMediaJobErrorCategory(this string value)
 76        {
 77            switch( value )
 78            {
 79                case "Service":
 080                    return MediaJobErrorCategory.Service;
 81                case "Download":
 082                    return MediaJobErrorCategory.Download;
 83                case "Upload":
 084                    return MediaJobErrorCategory.Upload;
 85                case "Configuration":
 086                    return MediaJobErrorCategory.Configuration;
 87                case "Content":
 088                    return MediaJobErrorCategory.Content;
 89            }
 090            return null;
 91        }
 92    }
 93}