| | 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 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.ComputerVision.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 OcrLanguages. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum OcrLanguages |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "unk")] |
| | 25 | | Unk, |
| | 26 | | [EnumMember(Value = "zh-Hans")] |
| | 27 | | ZhHans, |
| | 28 | | [EnumMember(Value = "zh-Hant")] |
| | 29 | | ZhHant, |
| | 30 | | [EnumMember(Value = "cs")] |
| | 31 | | Cs, |
| | 32 | | [EnumMember(Value = "da")] |
| | 33 | | Da, |
| | 34 | | [EnumMember(Value = "nl")] |
| | 35 | | Nl, |
| | 36 | | [EnumMember(Value = "en")] |
| | 37 | | En, |
| | 38 | | [EnumMember(Value = "fi")] |
| | 39 | | Fi, |
| | 40 | | [EnumMember(Value = "fr")] |
| | 41 | | Fr, |
| | 42 | | [EnumMember(Value = "de")] |
| | 43 | | De, |
| | 44 | | [EnumMember(Value = "el")] |
| | 45 | | El, |
| | 46 | | [EnumMember(Value = "hu")] |
| | 47 | | Hu, |
| | 48 | | [EnumMember(Value = "it")] |
| | 49 | | It, |
| | 50 | | [EnumMember(Value = "ja")] |
| | 51 | | Ja, |
| | 52 | | [EnumMember(Value = "ko")] |
| | 53 | | Ko, |
| | 54 | | [EnumMember(Value = "nb")] |
| | 55 | | Nb, |
| | 56 | | [EnumMember(Value = "pl")] |
| | 57 | | Pl, |
| | 58 | | [EnumMember(Value = "pt")] |
| | 59 | | Pt, |
| | 60 | | [EnumMember(Value = "ru")] |
| | 61 | | Ru, |
| | 62 | | [EnumMember(Value = "es")] |
| | 63 | | Es, |
| | 64 | | [EnumMember(Value = "sv")] |
| | 65 | | Sv, |
| | 66 | | [EnumMember(Value = "tr")] |
| | 67 | | Tr, |
| | 68 | | [EnumMember(Value = "ar")] |
| | 69 | | Ar, |
| | 70 | | [EnumMember(Value = "ro")] |
| | 71 | | Ro, |
| | 72 | | [EnumMember(Value = "sr-Cyrl")] |
| | 73 | | SrCyrl, |
| | 74 | | [EnumMember(Value = "sr-Latn")] |
| | 75 | | SrLatn, |
| | 76 | | [EnumMember(Value = "sk")] |
| | 77 | | Sk |
| | 78 | | } |
| | 79 | | internal static class OcrLanguagesEnumExtension |
| | 80 | | { |
| | 81 | | internal static string ToSerializedValue(this OcrLanguages? value) |
| | 82 | | { |
| 0 | 83 | | return value == null ? null : ((OcrLanguages)value).ToSerializedValue(); |
| | 84 | | } |
| | 85 | |
|
| | 86 | | internal static string ToSerializedValue(this OcrLanguages value) |
| | 87 | | { |
| | 88 | | switch( value ) |
| | 89 | | { |
| | 90 | | case OcrLanguages.Unk: |
| 0 | 91 | | return "unk"; |
| | 92 | | case OcrLanguages.ZhHans: |
| 0 | 93 | | return "zh-Hans"; |
| | 94 | | case OcrLanguages.ZhHant: |
| 0 | 95 | | return "zh-Hant"; |
| | 96 | | case OcrLanguages.Cs: |
| 0 | 97 | | return "cs"; |
| | 98 | | case OcrLanguages.Da: |
| 0 | 99 | | return "da"; |
| | 100 | | case OcrLanguages.Nl: |
| 0 | 101 | | return "nl"; |
| | 102 | | case OcrLanguages.En: |
| 0 | 103 | | return "en"; |
| | 104 | | case OcrLanguages.Fi: |
| 0 | 105 | | return "fi"; |
| | 106 | | case OcrLanguages.Fr: |
| 0 | 107 | | return "fr"; |
| | 108 | | case OcrLanguages.De: |
| 0 | 109 | | return "de"; |
| | 110 | | case OcrLanguages.El: |
| 0 | 111 | | return "el"; |
| | 112 | | case OcrLanguages.Hu: |
| 0 | 113 | | return "hu"; |
| | 114 | | case OcrLanguages.It: |
| 0 | 115 | | return "it"; |
| | 116 | | case OcrLanguages.Ja: |
| 0 | 117 | | return "ja"; |
| | 118 | | case OcrLanguages.Ko: |
| 0 | 119 | | return "ko"; |
| | 120 | | case OcrLanguages.Nb: |
| 0 | 121 | | return "nb"; |
| | 122 | | case OcrLanguages.Pl: |
| 0 | 123 | | return "pl"; |
| | 124 | | case OcrLanguages.Pt: |
| 0 | 125 | | return "pt"; |
| | 126 | | case OcrLanguages.Ru: |
| 0 | 127 | | return "ru"; |
| | 128 | | case OcrLanguages.Es: |
| 0 | 129 | | return "es"; |
| | 130 | | case OcrLanguages.Sv: |
| 0 | 131 | | return "sv"; |
| | 132 | | case OcrLanguages.Tr: |
| 0 | 133 | | return "tr"; |
| | 134 | | case OcrLanguages.Ar: |
| 0 | 135 | | return "ar"; |
| | 136 | | case OcrLanguages.Ro: |
| 0 | 137 | | return "ro"; |
| | 138 | | case OcrLanguages.SrCyrl: |
| 0 | 139 | | return "sr-Cyrl"; |
| | 140 | | case OcrLanguages.SrLatn: |
| 0 | 141 | | return "sr-Latn"; |
| | 142 | | case OcrLanguages.Sk: |
| 0 | 143 | | return "sk"; |
| | 144 | | } |
| 0 | 145 | | return null; |
| | 146 | | } |
| | 147 | |
|
| | 148 | | internal static OcrLanguages? ParseOcrLanguages(this string value) |
| | 149 | | { |
| | 150 | | switch( value ) |
| | 151 | | { |
| | 152 | | case "unk": |
| 0 | 153 | | return OcrLanguages.Unk; |
| | 154 | | case "zh-Hans": |
| 0 | 155 | | return OcrLanguages.ZhHans; |
| | 156 | | case "zh-Hant": |
| 0 | 157 | | return OcrLanguages.ZhHant; |
| | 158 | | case "cs": |
| 0 | 159 | | return OcrLanguages.Cs; |
| | 160 | | case "da": |
| 0 | 161 | | return OcrLanguages.Da; |
| | 162 | | case "nl": |
| 0 | 163 | | return OcrLanguages.Nl; |
| | 164 | | case "en": |
| 0 | 165 | | return OcrLanguages.En; |
| | 166 | | case "fi": |
| 0 | 167 | | return OcrLanguages.Fi; |
| | 168 | | case "fr": |
| 0 | 169 | | return OcrLanguages.Fr; |
| | 170 | | case "de": |
| 0 | 171 | | return OcrLanguages.De; |
| | 172 | | case "el": |
| 0 | 173 | | return OcrLanguages.El; |
| | 174 | | case "hu": |
| 0 | 175 | | return OcrLanguages.Hu; |
| | 176 | | case "it": |
| 0 | 177 | | return OcrLanguages.It; |
| | 178 | | case "ja": |
| 0 | 179 | | return OcrLanguages.Ja; |
| | 180 | | case "ko": |
| 0 | 181 | | return OcrLanguages.Ko; |
| | 182 | | case "nb": |
| 0 | 183 | | return OcrLanguages.Nb; |
| | 184 | | case "pl": |
| 0 | 185 | | return OcrLanguages.Pl; |
| | 186 | | case "pt": |
| 0 | 187 | | return OcrLanguages.Pt; |
| | 188 | | case "ru": |
| 0 | 189 | | return OcrLanguages.Ru; |
| | 190 | | case "es": |
| 0 | 191 | | return OcrLanguages.Es; |
| | 192 | | case "sv": |
| 0 | 193 | | return OcrLanguages.Sv; |
| | 194 | | case "tr": |
| 0 | 195 | | return OcrLanguages.Tr; |
| | 196 | | case "ar": |
| 0 | 197 | | return OcrLanguages.Ar; |
| | 198 | | case "ro": |
| 0 | 199 | | return OcrLanguages.Ro; |
| | 200 | | case "sr-Cyrl": |
| 0 | 201 | | return OcrLanguages.SrCyrl; |
| | 202 | | case "sr-Latn": |
| 0 | 203 | | return OcrLanguages.SrLatn; |
| | 204 | | case "sk": |
| 0 | 205 | | return OcrLanguages.Sk; |
| | 206 | | } |
| 0 | 207 | | return null; |
| | 208 | | } |
| | 209 | | } |
| | 210 | | } |