| | 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 VisualFeatureTypes. |
| | 20 | | /// </summary> |
| | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 22 | | public enum VisualFeatureTypes |
| | 23 | | { |
| | 24 | | [EnumMember(Value = "ImageType")] |
| | 25 | | ImageType, |
| | 26 | | [EnumMember(Value = "Faces")] |
| | 27 | | Faces, |
| | 28 | | [EnumMember(Value = "Adult")] |
| | 29 | | Adult, |
| | 30 | | [EnumMember(Value = "Categories")] |
| | 31 | | Categories, |
| | 32 | | [EnumMember(Value = "Color")] |
| | 33 | | Color, |
| | 34 | | [EnumMember(Value = "Tags")] |
| | 35 | | Tags, |
| | 36 | | [EnumMember(Value = "Description")] |
| | 37 | | Description, |
| | 38 | | [EnumMember(Value = "Objects")] |
| | 39 | | Objects, |
| | 40 | | [EnumMember(Value = "Brands")] |
| | 41 | | Brands |
| | 42 | | } |
| | 43 | | internal static class VisualFeatureTypesEnumExtension |
| | 44 | | { |
| | 45 | | internal static string ToSerializedValue(this VisualFeatureTypes? value) |
| | 46 | | { |
| 0 | 47 | | return value == null ? null : ((VisualFeatureTypes)value).ToSerializedValue(); |
| | 48 | | } |
| | 49 | |
|
| | 50 | | internal static string ToSerializedValue(this VisualFeatureTypes value) |
| | 51 | | { |
| | 52 | | switch( value ) |
| | 53 | | { |
| | 54 | | case VisualFeatureTypes.ImageType: |
| 0 | 55 | | return "ImageType"; |
| | 56 | | case VisualFeatureTypes.Faces: |
| 0 | 57 | | return "Faces"; |
| | 58 | | case VisualFeatureTypes.Adult: |
| 0 | 59 | | return "Adult"; |
| | 60 | | case VisualFeatureTypes.Categories: |
| 0 | 61 | | return "Categories"; |
| | 62 | | case VisualFeatureTypes.Color: |
| 0 | 63 | | return "Color"; |
| | 64 | | case VisualFeatureTypes.Tags: |
| 0 | 65 | | return "Tags"; |
| | 66 | | case VisualFeatureTypes.Description: |
| 0 | 67 | | return "Description"; |
| | 68 | | case VisualFeatureTypes.Objects: |
| 0 | 69 | | return "Objects"; |
| | 70 | | case VisualFeatureTypes.Brands: |
| 0 | 71 | | return "Brands"; |
| | 72 | | } |
| 0 | 73 | | return null; |
| | 74 | | } |
| | 75 | |
|
| | 76 | | internal static VisualFeatureTypes? ParseVisualFeatureTypes(this string value) |
| | 77 | | { |
| | 78 | | switch( value ) |
| | 79 | | { |
| | 80 | | case "ImageType": |
| 0 | 81 | | return VisualFeatureTypes.ImageType; |
| | 82 | | case "Faces": |
| 0 | 83 | | return VisualFeatureTypes.Faces; |
| | 84 | | case "Adult": |
| 0 | 85 | | return VisualFeatureTypes.Adult; |
| | 86 | | case "Categories": |
| 0 | 87 | | return VisualFeatureTypes.Categories; |
| | 88 | | case "Color": |
| 0 | 89 | | return VisualFeatureTypes.Color; |
| | 90 | | case "Tags": |
| 0 | 91 | | return VisualFeatureTypes.Tags; |
| | 92 | | case "Description": |
| 0 | 93 | | return VisualFeatureTypes.Description; |
| | 94 | | case "Objects": |
| 0 | 95 | | return VisualFeatureTypes.Objects; |
| | 96 | | case "Brands": |
| 0 | 97 | | return VisualFeatureTypes.Brands; |
| | 98 | | } |
| 0 | 99 | | return null; |
| | 100 | | } |
| | 101 | | } |
| | 102 | | } |