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