< Summary

Class:Microsoft.Azure.EventGrid.Models.MediaJobErrorCodeEnumExtension
Assembly:Microsoft.Azure.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Generated\Models\MediaJobErrorCode.cs
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:142
Line coverage:0% (0 of 21)
Covered branches:0
Total branches:54
Branch coverage:0% (0 of 54)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Generated\Models\MediaJobErrorCode.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 MediaJobErrorCode.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum MediaJobErrorCode
 23    {
 24        /// <summary>
 25        /// Fatal service error, please contact support.
 26        /// </summary>
 27        [EnumMember(Value = "ServiceError")]
 28        ServiceError,
 29        /// <summary>
 30        /// Transient error, please retry, if retry is unsuccessful, please
 31        /// contact support.
 32        /// </summary>
 33        [EnumMember(Value = "ServiceTransientError")]
 34        ServiceTransientError,
 35        /// <summary>
 36        /// While trying to download the input files, the files were not
 37        /// accessible, please check the availability of the source.
 38        /// </summary>
 39        [EnumMember(Value = "DownloadNotAccessible")]
 40        DownloadNotAccessible,
 41        /// <summary>
 42        /// While trying to download the input files, there was an issue during
 43        /// transfer (storage service, network errors), see details and check
 44        /// your source.
 45        /// </summary>
 46        [EnumMember(Value = "DownloadTransientError")]
 47        DownloadTransientError,
 48        /// <summary>
 49        /// While trying to upload the output files, the destination was not
 50        /// reachable, please check the availability of the destination.
 51        /// </summary>
 52        [EnumMember(Value = "UploadNotAccessible")]
 53        UploadNotAccessible,
 54        /// <summary>
 55        /// While trying to upload the output files, there was an issue during
 56        /// transfer (storage service, network errors), see details and check
 57        /// your destination.
 58        /// </summary>
 59        [EnumMember(Value = "UploadTransientError")]
 60        UploadTransientError,
 61        /// <summary>
 62        /// There was a problem with the combination of input files and the
 63        /// configuration settings applied, fix the configuration settings and
 64        /// retry with the same input, or change input to match the
 65        /// configuration.
 66        /// </summary>
 67        [EnumMember(Value = "ConfigurationUnsupported")]
 68        ConfigurationUnsupported,
 69        /// <summary>
 70        /// There was a problem with the input content (for example: zero byte
 71        /// files, or corrupt/non-decodable files), check the input files.
 72        /// </summary>
 73        [EnumMember(Value = "ContentMalformed")]
 74        ContentMalformed,
 75        /// <summary>
 76        /// There was a problem with the format of the input (not valid media
 77        /// file, or an unsupported file/codec), check the validity of the
 78        /// input files.
 79        /// </summary>
 80        [EnumMember(Value = "ContentUnsupported")]
 81        ContentUnsupported
 82    }
 83    internal static class MediaJobErrorCodeEnumExtension
 84    {
 85        internal static string ToSerializedValue(this MediaJobErrorCode? value)
 86        {
 087            return value == null ? null : ((MediaJobErrorCode)value).ToSerializedValue();
 88        }
 89
 90        internal static string ToSerializedValue(this MediaJobErrorCode value)
 91        {
 92            switch( value )
 93            {
 94                case MediaJobErrorCode.ServiceError:
 095                    return "ServiceError";
 96                case MediaJobErrorCode.ServiceTransientError:
 097                    return "ServiceTransientError";
 98                case MediaJobErrorCode.DownloadNotAccessible:
 099                    return "DownloadNotAccessible";
 100                case MediaJobErrorCode.DownloadTransientError:
 0101                    return "DownloadTransientError";
 102                case MediaJobErrorCode.UploadNotAccessible:
 0103                    return "UploadNotAccessible";
 104                case MediaJobErrorCode.UploadTransientError:
 0105                    return "UploadTransientError";
 106                case MediaJobErrorCode.ConfigurationUnsupported:
 0107                    return "ConfigurationUnsupported";
 108                case MediaJobErrorCode.ContentMalformed:
 0109                    return "ContentMalformed";
 110                case MediaJobErrorCode.ContentUnsupported:
 0111                    return "ContentUnsupported";
 112            }
 0113            return null;
 114        }
 115
 116        internal static MediaJobErrorCode? ParseMediaJobErrorCode(this string value)
 117        {
 118            switch( value )
 119            {
 120                case "ServiceError":
 0121                    return MediaJobErrorCode.ServiceError;
 122                case "ServiceTransientError":
 0123                    return MediaJobErrorCode.ServiceTransientError;
 124                case "DownloadNotAccessible":
 0125                    return MediaJobErrorCode.DownloadNotAccessible;
 126                case "DownloadTransientError":
 0127                    return MediaJobErrorCode.DownloadTransientError;
 128                case "UploadNotAccessible":
 0129                    return MediaJobErrorCode.UploadNotAccessible;
 130                case "UploadTransientError":
 0131                    return MediaJobErrorCode.UploadTransientError;
 132                case "ConfigurationUnsupported":
 0133                    return MediaJobErrorCode.ConfigurationUnsupported;
 134                case "ContentMalformed":
 0135                    return MediaJobErrorCode.ContentMalformed;
 136                case "ContentUnsupported":
 0137                    return MediaJobErrorCode.ContentUnsupported;
 138            }
 0139            return null;
 140        }
 141    }
 142}