| | | 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 EntityCategory. |
| | | 20 | | /// </summary> |
| | | 21 | | [JsonConverter(typeof(StringEnumConverter))] |
| | | 22 | | public enum EntityCategory |
| | | 23 | | { |
| | | 24 | | [EnumMember(Value = "location")] |
| | | 25 | | Location, |
| | | 26 | | [EnumMember(Value = "organization")] |
| | | 27 | | Organization, |
| | | 28 | | [EnumMember(Value = "person")] |
| | | 29 | | Person, |
| | | 30 | | [EnumMember(Value = "quantity")] |
| | | 31 | | Quantity, |
| | | 32 | | [EnumMember(Value = "datetime")] |
| | | 33 | | Datetime, |
| | | 34 | | [EnumMember(Value = "url")] |
| | | 35 | | Url, |
| | | 36 | | [EnumMember(Value = "email")] |
| | | 37 | | Email |
| | | 38 | | } |
| | | 39 | | internal static class EntityCategoryEnumExtension |
| | | 40 | | { |
| | | 41 | | internal static string ToSerializedValue(this EntityCategory? value) |
| | | 42 | | { |
| | 0 | 43 | | return value == null ? null : ((EntityCategory)value).ToSerializedValue(); |
| | | 44 | | } |
| | | 45 | | |
| | | 46 | | internal static string ToSerializedValue(this EntityCategory value) |
| | | 47 | | { |
| | | 48 | | switch( value ) |
| | | 49 | | { |
| | | 50 | | case EntityCategory.Location: |
| | 0 | 51 | | return "location"; |
| | | 52 | | case EntityCategory.Organization: |
| | 0 | 53 | | return "organization"; |
| | | 54 | | case EntityCategory.Person: |
| | 0 | 55 | | return "person"; |
| | | 56 | | case EntityCategory.Quantity: |
| | 0 | 57 | | return "quantity"; |
| | | 58 | | case EntityCategory.Datetime: |
| | 0 | 59 | | return "datetime"; |
| | | 60 | | case EntityCategory.Url: |
| | 0 | 61 | | return "url"; |
| | | 62 | | case EntityCategory.Email: |
| | 0 | 63 | | return "email"; |
| | | 64 | | } |
| | 0 | 65 | | return null; |
| | | 66 | | } |
| | | 67 | | |
| | | 68 | | internal static EntityCategory? ParseEntityCategory(this string value) |
| | | 69 | | { |
| | | 70 | | switch( value ) |
| | | 71 | | { |
| | | 72 | | case "location": |
| | 0 | 73 | | return EntityCategory.Location; |
| | | 74 | | case "organization": |
| | 0 | 75 | | return EntityCategory.Organization; |
| | | 76 | | case "person": |
| | 0 | 77 | | return EntityCategory.Person; |
| | | 78 | | case "quantity": |
| | 0 | 79 | | return EntityCategory.Quantity; |
| | | 80 | | case "datetime": |
| | 0 | 81 | | return EntityCategory.Datetime; |
| | | 82 | | case "url": |
| | 0 | 83 | | return EntityCategory.Url; |
| | | 84 | | case "email": |
| | 0 | 85 | | return EntityCategory.Email; |
| | | 86 | | } |
| | 0 | 87 | | return null; |
| | | 88 | | } |
| | | 89 | | } |
| | | 90 | | } |