< Summary

Class:Microsoft.Azure.Search.Models.OcrSkillLanguageEnumExtension
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\OcrSkillLanguage.cs
Covered lines:0
Uncovered lines:55
Coverable lines:55
Total lines:204
Line coverage:0% (0 of 55)
Covered branches:0
Total branches:151
Branch coverage:0% (0 of 151)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\OcrSkillLanguage.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.Search.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 OcrSkillLanguage.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum OcrSkillLanguage
 23    {
 24        [EnumMember(Value = "zh-Hans")]
 25        ZhHans,
 26        [EnumMember(Value = "zh-Hant")]
 27        ZhHant,
 28        [EnumMember(Value = "cs")]
 29        Cs,
 30        [EnumMember(Value = "da")]
 31        Da,
 32        [EnumMember(Value = "nl")]
 33        Nl,
 34        [EnumMember(Value = "en")]
 35        En,
 36        [EnumMember(Value = "fi")]
 37        Fi,
 38        [EnumMember(Value = "fr")]
 39        Fr,
 40        [EnumMember(Value = "de")]
 41        De,
 42        [EnumMember(Value = "el")]
 43        El,
 44        [EnumMember(Value = "hu")]
 45        Hu,
 46        [EnumMember(Value = "it")]
 47        It,
 48        [EnumMember(Value = "ja")]
 49        Ja,
 50        [EnumMember(Value = "ko")]
 51        Ko,
 52        [EnumMember(Value = "nb")]
 53        Nb,
 54        [EnumMember(Value = "pl")]
 55        Pl,
 56        [EnumMember(Value = "pt")]
 57        Pt,
 58        [EnumMember(Value = "ru")]
 59        Ru,
 60        [EnumMember(Value = "es")]
 61        Es,
 62        [EnumMember(Value = "sv")]
 63        Sv,
 64        [EnumMember(Value = "tr")]
 65        Tr,
 66        [EnumMember(Value = "ar")]
 67        Ar,
 68        [EnumMember(Value = "ro")]
 69        Ro,
 70        [EnumMember(Value = "sr-Cyrl")]
 71        SrCyrl,
 72        [EnumMember(Value = "sr-Latn")]
 73        SrLatn,
 74        [EnumMember(Value = "sk")]
 75        Sk
 76    }
 77    internal static class OcrSkillLanguageEnumExtension
 78    {
 79        internal static string ToSerializedValue(this OcrSkillLanguage? value)
 80        {
 081            return value == null ? null : ((OcrSkillLanguage)value).ToSerializedValue();
 82        }
 83
 84        internal static string ToSerializedValue(this OcrSkillLanguage value)
 85        {
 86            switch( value )
 87            {
 88                case OcrSkillLanguage.ZhHans:
 089                    return "zh-Hans";
 90                case OcrSkillLanguage.ZhHant:
 091                    return "zh-Hant";
 92                case OcrSkillLanguage.Cs:
 093                    return "cs";
 94                case OcrSkillLanguage.Da:
 095                    return "da";
 96                case OcrSkillLanguage.Nl:
 097                    return "nl";
 98                case OcrSkillLanguage.En:
 099                    return "en";
 100                case OcrSkillLanguage.Fi:
 0101                    return "fi";
 102                case OcrSkillLanguage.Fr:
 0103                    return "fr";
 104                case OcrSkillLanguage.De:
 0105                    return "de";
 106                case OcrSkillLanguage.El:
 0107                    return "el";
 108                case OcrSkillLanguage.Hu:
 0109                    return "hu";
 110                case OcrSkillLanguage.It:
 0111                    return "it";
 112                case OcrSkillLanguage.Ja:
 0113                    return "ja";
 114                case OcrSkillLanguage.Ko:
 0115                    return "ko";
 116                case OcrSkillLanguage.Nb:
 0117                    return "nb";
 118                case OcrSkillLanguage.Pl:
 0119                    return "pl";
 120                case OcrSkillLanguage.Pt:
 0121                    return "pt";
 122                case OcrSkillLanguage.Ru:
 0123                    return "ru";
 124                case OcrSkillLanguage.Es:
 0125                    return "es";
 126                case OcrSkillLanguage.Sv:
 0127                    return "sv";
 128                case OcrSkillLanguage.Tr:
 0129                    return "tr";
 130                case OcrSkillLanguage.Ar:
 0131                    return "ar";
 132                case OcrSkillLanguage.Ro:
 0133                    return "ro";
 134                case OcrSkillLanguage.SrCyrl:
 0135                    return "sr-Cyrl";
 136                case OcrSkillLanguage.SrLatn:
 0137                    return "sr-Latn";
 138                case OcrSkillLanguage.Sk:
 0139                    return "sk";
 140            }
 0141            return null;
 142        }
 143
 144        internal static OcrSkillLanguage? ParseOcrSkillLanguage(this string value)
 145        {
 146            switch( value )
 147            {
 148                case "zh-Hans":
 0149                    return OcrSkillLanguage.ZhHans;
 150                case "zh-Hant":
 0151                    return OcrSkillLanguage.ZhHant;
 152                case "cs":
 0153                    return OcrSkillLanguage.Cs;
 154                case "da":
 0155                    return OcrSkillLanguage.Da;
 156                case "nl":
 0157                    return OcrSkillLanguage.Nl;
 158                case "en":
 0159                    return OcrSkillLanguage.En;
 160                case "fi":
 0161                    return OcrSkillLanguage.Fi;
 162                case "fr":
 0163                    return OcrSkillLanguage.Fr;
 164                case "de":
 0165                    return OcrSkillLanguage.De;
 166                case "el":
 0167                    return OcrSkillLanguage.El;
 168                case "hu":
 0169                    return OcrSkillLanguage.Hu;
 170                case "it":
 0171                    return OcrSkillLanguage.It;
 172                case "ja":
 0173                    return OcrSkillLanguage.Ja;
 174                case "ko":
 0175                    return OcrSkillLanguage.Ko;
 176                case "nb":
 0177                    return OcrSkillLanguage.Nb;
 178                case "pl":
 0179                    return OcrSkillLanguage.Pl;
 180                case "pt":
 0181                    return OcrSkillLanguage.Pt;
 182                case "ru":
 0183                    return OcrSkillLanguage.Ru;
 184                case "es":
 0185                    return OcrSkillLanguage.Es;
 186                case "sv":
 0187                    return OcrSkillLanguage.Sv;
 188                case "tr":
 0189                    return OcrSkillLanguage.Tr;
 190                case "ar":
 0191                    return OcrSkillLanguage.Ar;
 192                case "ro":
 0193                    return OcrSkillLanguage.Ro;
 194                case "sr-Cyrl":
 0195                    return OcrSkillLanguage.SrCyrl;
 196                case "sr-Latn":
 0197                    return OcrSkillLanguage.SrLatn;
 198                case "sk":
 0199                    return OcrSkillLanguage.Sk;
 200            }
 0201            return null;
 202        }
 203    }
 204}