| | 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.ContentModerator.Models |
| | 8 | | { |
| | 9 | | using Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Collections; |
| | 12 | | using System.Collections.Generic; |
| | 13 | | using System.Linq; |
| | 14 | |
|
| | 15 | | /// <summary> |
| | 16 | | /// Schema items of the body. |
| | 17 | | /// </summary> |
| | 18 | | public partial class VideoFrameBodyItem |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the VideoFrameBodyItem class. |
| | 22 | | /// </summary> |
| 0 | 23 | | public VideoFrameBodyItem() |
| | 24 | | { |
| | 25 | | CustomInit(); |
| 0 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the VideoFrameBodyItem class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="timestamp">Timestamp of the frame.</param> |
| | 32 | | /// <param name="frameImage">Content to review.</param> |
| | 33 | | /// <param name="metadata">Optional metadata details.</param> |
| 0 | 34 | | public VideoFrameBodyItem(string timestamp, string frameImage, IList<VideoFrameBodyItemReviewerResultTagsItem> r |
| | 35 | | { |
| 0 | 36 | | Timestamp = timestamp; |
| 0 | 37 | | FrameImage = frameImage; |
| 0 | 38 | | ReviewerResultTags = reviewerResultTags; |
| 0 | 39 | | Metadata = metadata; |
| | 40 | | CustomInit(); |
| 0 | 41 | | } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// An initialization method that performs custom operations like setting defaults |
| | 45 | | /// </summary> |
| | 46 | | partial void CustomInit(); |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// Gets or sets timestamp of the frame. |
| | 50 | | /// </summary> |
| | 51 | | [JsonProperty(PropertyName = "Timestamp")] |
| 0 | 52 | | public string Timestamp { get; set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Gets or sets content to review. |
| | 56 | | /// </summary> |
| | 57 | | [JsonProperty(PropertyName = "FrameImage")] |
| 0 | 58 | | public string FrameImage { get; set; } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// </summary> |
| | 62 | | [JsonProperty(PropertyName = "ReviewerResultTags")] |
| 0 | 63 | | public IList<VideoFrameBodyItemReviewerResultTagsItem> ReviewerResultTags { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets or sets optional metadata details. |
| | 67 | | /// </summary> |
| | 68 | | [JsonProperty(PropertyName = "Metadata")] |
| 0 | 69 | | public IList<VideoFrameBodyItemMetadataItem> Metadata { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Validate the object. |
| | 73 | | /// </summary> |
| | 74 | | /// <exception cref="ValidationException"> |
| | 75 | | /// Thrown if validation fails |
| | 76 | | /// </exception> |
| | 77 | | public virtual void Validate() |
| | 78 | | { |
| 0 | 79 | | if (Timestamp == null) |
| | 80 | | { |
| 0 | 81 | | throw new ValidationException(ValidationRules.CannotBeNull, "Timestamp"); |
| | 82 | | } |
| 0 | 83 | | if (FrameImage == null) |
| | 84 | | { |
| 0 | 85 | | throw new ValidationException(ValidationRules.CannotBeNull, "FrameImage"); |
| | 86 | | } |
| 0 | 87 | | if (ReviewerResultTags != null) |
| | 88 | | { |
| 0 | 89 | | foreach (var element in ReviewerResultTags) |
| | 90 | | { |
| 0 | 91 | | if (element != null) |
| | 92 | | { |
| 0 | 93 | | element.Validate(); |
| | 94 | | } |
| | 95 | | } |
| | 96 | | } |
| 0 | 97 | | if (Metadata != null) |
| | 98 | | { |
| 0 | 99 | | foreach (var element1 in Metadata) |
| | 100 | | { |
| 0 | 101 | | if (element1 != null) |
| | 102 | | { |
| 0 | 103 | | element1.Validate(); |
| | 104 | | } |
| | 105 | | } |
| | 106 | | } |
| 0 | 107 | | } |
| | 108 | | } |
| | 109 | | } |