| | | 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.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 VisualFeature. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum VisualFeature |
| | | 23 | | { |
| | | 24 | | [EnumMember(Value = "categories")] |
| | | 25 | | Categories, |
| | | 26 | | [EnumMember(Value = "tags")] |
| | | 27 | | Tags, |
| | | 28 | | [EnumMember(Value = "description")] |
| | | 29 | | Description, |
| | | 30 | | [EnumMember(Value = "faces")] |
| | | 31 | | Faces, |
| | | 32 | | [EnumMember(Value = "imageType")] |
| | | 33 | | ImageType, |
| | | 34 | | [EnumMember(Value = "color")] |
| | | 35 | | Color |
| | | 36 | | } |
| | | 37 | | internal static class VisualFeatureEnumExtension |
| | | 38 | | { |
| | | 39 | | internal static string ToSerializedValue(this VisualFeature? value) |
| | | 40 | | { |
| | 0 | 41 | | return value == null ? null : ((VisualFeature)value).ToSerializedValue(); |
| | | 42 | | } |
| | | 43 | | |
| | | 44 | | internal static string ToSerializedValue(this VisualFeature value) |
| | | 45 | | { |
| | | 46 | | switch( value ) |
| | | 47 | | { |
| | | 48 | | case VisualFeature.Categories: |
| | 0 | 49 | | return "categories"; |
| | | 50 | | case VisualFeature.Tags: |
| | 0 | 51 | | return "tags"; |
| | | 52 | | case VisualFeature.Description: |
| | 0 | 53 | | return "description"; |
| | | 54 | | case VisualFeature.Faces: |
| | 0 | 55 | | return "faces"; |
| | | 56 | | case VisualFeature.ImageType: |
| | 0 | 57 | | return "imageType"; |
| | | 58 | | case VisualFeature.Color: |
| | 0 | 59 | | return "color"; |
| | | 60 | | } |
| | 0 | 61 | | return null; |
| | | 62 | | } |
| | | 63 | | |
| | | 64 | | internal static VisualFeature? ParseVisualFeature(this string value) |
| | | 65 | | { |
| | | 66 | | switch( value ) |
| | | 67 | | { |
| | | 68 | | case "categories": |
| | 0 | 69 | | return VisualFeature.Categories; |
| | | 70 | | case "tags": |
| | 0 | 71 | | return VisualFeature.Tags; |
| | | 72 | | case "description": |
| | 0 | 73 | | return VisualFeature.Description; |
| | | 74 | | case "faces": |
| | 0 | 75 | | return VisualFeature.Faces; |
| | | 76 | | case "imageType": |
| | 0 | 77 | | return VisualFeature.ImageType; |
| | | 78 | | case "color": |
| | 0 | 79 | | return VisualFeature.Color; |
| | | 80 | | } |
| | 0 | 81 | | return null; |
| | | 82 | | } |
| | | 83 | | } |
| | | 84 | | } |