| | 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 Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Linq; |
| | 12 | |
|
| | 13 | | public partial class TrendingVideosTile |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// Initializes a new instance of the TrendingVideosTile class. |
| | 17 | | /// </summary> |
| 202 | 18 | | public TrendingVideosTile() |
| | 19 | | { |
| 202 | 20 | | Query = new Query(); |
| | 21 | | CustomInit(); |
| 202 | 22 | | } |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the TrendingVideosTile class. |
| | 26 | | /// </summary> |
| 0 | 27 | | public TrendingVideosTile(Query query, ImageObject image) |
| | 28 | | { |
| 0 | 29 | | Query = query; |
| 0 | 30 | | Image = image; |
| | 31 | | CustomInit(); |
| 0 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// An initialization method that performs custom operations like setting defaults |
| | 36 | | /// </summary> |
| | 37 | | partial void CustomInit(); |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// </summary> |
| | 41 | | [JsonProperty(PropertyName = "query")] |
| 408 | 42 | | public Query Query { get; set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// </summary> |
| | 46 | | [JsonProperty(PropertyName = "image")] |
| 408 | 47 | | public ImageObject Image { get; set; } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Validate the object. |
| | 51 | | /// </summary> |
| | 52 | | /// <exception cref="ValidationException"> |
| | 53 | | /// Thrown if validation fails |
| | 54 | | /// </exception> |
| | 55 | | public virtual void Validate() |
| | 56 | | { |
| 0 | 57 | | if (Query == null) |
| | 58 | | { |
| 0 | 59 | | throw new ValidationException(ValidationRules.CannotBeNull, "Query"); |
| | 60 | | } |
| 0 | 61 | | if (Image == null) |
| | 62 | | { |
| 0 | 63 | | throw new ValidationException(ValidationRules.CannotBeNull, "Image"); |
| | 64 | | } |
| 0 | 65 | | if (Query != null) |
| | 66 | | { |
| 0 | 67 | | Query.Validate(); |
| | 68 | | } |
| 0 | 69 | | } |
| | 70 | | } |
| | 71 | | } |