| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models |
| | 8 | | { |
| | 9 | | using Newtonsoft.Json; |
| | 10 | | using Newtonsoft.Json.Converters; |
| | 11 | | using System.Runtime; |
| | 12 | | using System.Runtime.Serialization; |
| | 13 | |
|
| | 14 | | /// <summary> |
| | 15 | | /// Defines values for ErrorSubCode. |
| | 16 | | /// </summary> |
| | 17 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 18 | | public enum ErrorSubCode |
| | 19 | | { |
| | 20 | | [EnumMember(Value = "UnexpectedError")] |
| | 21 | | UnexpectedError, |
| | 22 | | [EnumMember(Value = "ResourceError")] |
| | 23 | | ResourceError, |
| | 24 | | [EnumMember(Value = "NotImplemented")] |
| | 25 | | NotImplemented, |
| | 26 | | [EnumMember(Value = "ParameterMissing")] |
| | 27 | | ParameterMissing, |
| | 28 | | [EnumMember(Value = "ParameterInvalidValue")] |
| | 29 | | ParameterInvalidValue, |
| | 30 | | [EnumMember(Value = "HttpNotAllowed")] |
| | 31 | | HttpNotAllowed, |
| | 32 | | [EnumMember(Value = "Blocked")] |
| | 33 | | Blocked, |
| | 34 | | [EnumMember(Value = "AuthorizationMissing")] |
| | 35 | | AuthorizationMissing, |
| | 36 | | [EnumMember(Value = "AuthorizationRedundancy")] |
| | 37 | | AuthorizationRedundancy, |
| | 38 | | [EnumMember(Value = "AuthorizationDisabled")] |
| | 39 | | AuthorizationDisabled, |
| | 40 | | [EnumMember(Value = "AuthorizationExpired")] |
| | 41 | | AuthorizationExpired |
| | 42 | | } |
| | 43 | | internal static class ErrorSubCodeEnumExtension |
| | 44 | | { |
| | 45 | | internal static string ToSerializedValue(this ErrorSubCode? value) |
| | 46 | | { |
| 0 | 47 | | return value == null ? null : ((ErrorSubCode)value).ToSerializedValue(); |
| | 48 | | } |
| | 49 | |
|
| | 50 | | internal static string ToSerializedValue(this ErrorSubCode value) |
| | 51 | | { |
| | 52 | | switch( value ) |
| | 53 | | { |
| | 54 | | case ErrorSubCode.UnexpectedError: |
| 0 | 55 | | return "UnexpectedError"; |
| | 56 | | case ErrorSubCode.ResourceError: |
| 0 | 57 | | return "ResourceError"; |
| | 58 | | case ErrorSubCode.NotImplemented: |
| 0 | 59 | | return "NotImplemented"; |
| | 60 | | case ErrorSubCode.ParameterMissing: |
| 0 | 61 | | return "ParameterMissing"; |
| | 62 | | case ErrorSubCode.ParameterInvalidValue: |
| 0 | 63 | | return "ParameterInvalidValue"; |
| | 64 | | case ErrorSubCode.HttpNotAllowed: |
| 0 | 65 | | return "HttpNotAllowed"; |
| | 66 | | case ErrorSubCode.Blocked: |
| 0 | 67 | | return "Blocked"; |
| | 68 | | case ErrorSubCode.AuthorizationMissing: |
| 0 | 69 | | return "AuthorizationMissing"; |
| | 70 | | case ErrorSubCode.AuthorizationRedundancy: |
| 0 | 71 | | return "AuthorizationRedundancy"; |
| | 72 | | case ErrorSubCode.AuthorizationDisabled: |
| 0 | 73 | | return "AuthorizationDisabled"; |
| | 74 | | case ErrorSubCode.AuthorizationExpired: |
| 0 | 75 | | return "AuthorizationExpired"; |
| | 76 | | } |
| 0 | 77 | | return null; |
| | 78 | | } |
| | 79 | |
|
| | 80 | | internal static ErrorSubCode? ParseErrorSubCode(this string value) |
| | 81 | | { |
| | 82 | | switch( value ) |
| | 83 | | { |
| | 84 | | case "UnexpectedError": |
| 0 | 85 | | return ErrorSubCode.UnexpectedError; |
| | 86 | | case "ResourceError": |
| 0 | 87 | | return ErrorSubCode.ResourceError; |
| | 88 | | case "NotImplemented": |
| 0 | 89 | | return ErrorSubCode.NotImplemented; |
| | 90 | | case "ParameterMissing": |
| 0 | 91 | | return ErrorSubCode.ParameterMissing; |
| | 92 | | case "ParameterInvalidValue": |
| 0 | 93 | | return ErrorSubCode.ParameterInvalidValue; |
| | 94 | | case "HttpNotAllowed": |
| 0 | 95 | | return ErrorSubCode.HttpNotAllowed; |
| | 96 | | case "Blocked": |
| 0 | 97 | | return ErrorSubCode.Blocked; |
| | 98 | | case "AuthorizationMissing": |
| 0 | 99 | | return ErrorSubCode.AuthorizationMissing; |
| | 100 | | case "AuthorizationRedundancy": |
| 0 | 101 | | return ErrorSubCode.AuthorizationRedundancy; |
| | 102 | | case "AuthorizationDisabled": |
| 0 | 103 | | return ErrorSubCode.AuthorizationDisabled; |
| | 104 | | case "AuthorizationExpired": |
| 0 | 105 | | return ErrorSubCode.AuthorizationExpired; |
| | 106 | | } |
| 0 | 107 | | return null; |
| | 108 | | } |
| | 109 | | } |
| | 110 | | } |