| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models |
| | 8 | | { |
| | 9 | | using Newtonsoft.Json; |
| | 10 | | using Newtonsoft.Json.Converters; |
| | 11 | | using System.Runtime; |
| | 12 | | using System.Runtime.Serialization; |
| | 13 | |
|
| | 14 | | /// <summary> |
| | 15 | | /// Defines values for TextFormat. |
| | 16 | | /// </summary> |
| | 17 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 18 | | public enum TextFormat |
| | 19 | | { |
| | 20 | | [EnumMember(Value = "Raw")] |
| | 21 | | Raw, |
| | 22 | | [EnumMember(Value = "Html")] |
| | 23 | | Html |
| | 24 | | } |
| | 25 | | internal static class TextFormatEnumExtension |
| | 26 | | { |
| | 27 | | internal static string ToSerializedValue(this TextFormat? value) |
| | 28 | | { |
| 0 | 29 | | return value == null ? null : ((TextFormat)value).ToSerializedValue(); |
| | 30 | | } |
| | 31 | |
|
| | 32 | | internal static string ToSerializedValue(this TextFormat value) |
| | 33 | | { |
| | 34 | | switch( value ) |
| | 35 | | { |
| | 36 | | case TextFormat.Raw: |
| 0 | 37 | | return "Raw"; |
| | 38 | | case TextFormat.Html: |
| 0 | 39 | | return "Html"; |
| | 40 | | } |
| 0 | 41 | | return null; |
| | 42 | | } |
| | 43 | |
|
| | 44 | | internal static TextFormat? ParseTextFormat(this string value) |
| | 45 | | { |
| | 46 | | switch( value ) |
| | 47 | | { |
| | 48 | | case "Raw": |
| 0 | 49 | | return TextFormat.Raw; |
| | 50 | | case "Html": |
| 0 | 51 | | return TextFormat.Html; |
| | 52 | | } |
| 0 | 53 | | return null; |
| | 54 | | } |
| | 55 | | } |
| | 56 | | } |