| | 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 VideoLength. |
| | 16 | | /// </summary> |
| | 17 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 18 | | public enum VideoLength |
| | 19 | | { |
| | 20 | | [EnumMember(Value = "All")] |
| | 21 | | All, |
| | 22 | | [EnumMember(Value = "Short")] |
| | 23 | | Short, |
| | 24 | | [EnumMember(Value = "Medium")] |
| | 25 | | Medium, |
| | 26 | | [EnumMember(Value = "Long")] |
| | 27 | | Long |
| | 28 | | } |
| | 29 | | internal static class VideoLengthEnumExtension |
| | 30 | | { |
| | 31 | | internal static string ToSerializedValue(this VideoLength? value) |
| | 32 | | { |
| 0 | 33 | | return value == null ? null : ((VideoLength)value).ToSerializedValue(); |
| | 34 | | } |
| | 35 | |
|
| | 36 | | internal static string ToSerializedValue(this VideoLength value) |
| | 37 | | { |
| | 38 | | switch( value ) |
| | 39 | | { |
| | 40 | | case VideoLength.All: |
| 0 | 41 | | return "All"; |
| | 42 | | case VideoLength.Short: |
| 0 | 43 | | return "Short"; |
| | 44 | | case VideoLength.Medium: |
| 0 | 45 | | return "Medium"; |
| | 46 | | case VideoLength.Long: |
| 0 | 47 | | return "Long"; |
| | 48 | | } |
| 0 | 49 | | return null; |
| | 50 | | } |
| | 51 | |
|
| | 52 | | internal static VideoLength? ParseVideoLength(this string value) |
| | 53 | | { |
| | 54 | | switch( value ) |
| | 55 | | { |
| | 56 | | case "All": |
| 0 | 57 | | return VideoLength.All; |
| | 58 | | case "Short": |
| 0 | 59 | | return VideoLength.Short; |
| | 60 | | case "Medium": |
| 0 | 61 | | return VideoLength.Medium; |
| | 62 | | case "Long": |
| 0 | 63 | | return VideoLength.Long; |
| | 64 | | } |
| 0 | 65 | | return null; |
| | 66 | | } |
| | 67 | | } |
| | 68 | | } |