| | | 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 | | public partial class CreateVideoReviewsBodyItemVideoFramesItem |
| | | 16 | | { |
| | | 17 | | /// <summary> |
| | | 18 | | /// Initializes a new instance of the |
| | | 19 | | /// CreateVideoReviewsBodyItemVideoFramesItem class. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public CreateVideoReviewsBodyItemVideoFramesItem() |
| | | 22 | | { |
| | | 23 | | CustomInit(); |
| | 0 | 24 | | } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Initializes a new instance of the |
| | | 28 | | /// CreateVideoReviewsBodyItemVideoFramesItem class. |
| | | 29 | | /// </summary> |
| | | 30 | | /// <param name="id">Id of the frame.</param> |
| | | 31 | | /// <param name="timestamp">Timestamp of the frame.</param> |
| | | 32 | | /// <param name="frameImage">Frame image Url.</param> |
| | | 33 | | /// <param name="metadata">Optional metadata details.</param> |
| | 3 | 34 | | public CreateVideoReviewsBodyItemVideoFramesItem(string id, int timestamp, string frameImage, IList<CreateVideoR |
| | | 35 | | { |
| | 3 | 36 | | Id = id; |
| | 3 | 37 | | Timestamp = timestamp; |
| | 3 | 38 | | FrameImage = frameImage; |
| | 3 | 39 | | ReviewerResultTags = reviewerResultTags; |
| | 3 | 40 | | Metadata = metadata; |
| | | 41 | | CustomInit(); |
| | 3 | 42 | | } |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// An initialization method that performs custom operations like setting defaults |
| | | 46 | | /// </summary> |
| | | 47 | | partial void CustomInit(); |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Gets or sets id of the frame. |
| | | 51 | | /// </summary> |
| | | 52 | | [JsonProperty(PropertyName = "Id")] |
| | 9 | 53 | | public string Id { get; set; } |
| | | 54 | | |
| | | 55 | | /// <summary> |
| | | 56 | | /// Gets or sets timestamp of the frame. |
| | | 57 | | /// </summary> |
| | | 58 | | [JsonProperty(PropertyName = "Timestamp")] |
| | 6 | 59 | | public int Timestamp { get; set; } |
| | | 60 | | |
| | | 61 | | /// <summary> |
| | | 62 | | /// Gets or sets frame image Url. |
| | | 63 | | /// </summary> |
| | | 64 | | [JsonProperty(PropertyName = "FrameImage")] |
| | 9 | 65 | | public string FrameImage { get; set; } |
| | | 66 | | |
| | | 67 | | /// <summary> |
| | | 68 | | /// </summary> |
| | | 69 | | [JsonProperty(PropertyName = "ReviewerResultTags")] |
| | 12 | 70 | | public IList<CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem> ReviewerResultTags { get; set; } |
| | | 71 | | |
| | | 72 | | /// <summary> |
| | | 73 | | /// Gets or sets optional metadata details. |
| | | 74 | | /// </summary> |
| | | 75 | | [JsonProperty(PropertyName = "Metadata")] |
| | 12 | 76 | | public IList<CreateVideoReviewsBodyItemVideoFramesItemMetadataItem> Metadata { get; set; } |
| | | 77 | | |
| | | 78 | | /// <summary> |
| | | 79 | | /// Validate the object. |
| | | 80 | | /// </summary> |
| | | 81 | | /// <exception cref="ValidationException"> |
| | | 82 | | /// Thrown if validation fails |
| | | 83 | | /// </exception> |
| | | 84 | | public virtual void Validate() |
| | | 85 | | { |
| | 3 | 86 | | if (Id == null) |
| | | 87 | | { |
| | 0 | 88 | | throw new ValidationException(ValidationRules.CannotBeNull, "Id"); |
| | | 89 | | } |
| | 3 | 90 | | if (FrameImage == null) |
| | | 91 | | { |
| | 0 | 92 | | throw new ValidationException(ValidationRules.CannotBeNull, "FrameImage"); |
| | | 93 | | } |
| | 3 | 94 | | if (ReviewerResultTags != null) |
| | | 95 | | { |
| | 0 | 96 | | foreach (var element in ReviewerResultTags) |
| | | 97 | | { |
| | 0 | 98 | | if (element != null) |
| | | 99 | | { |
| | 0 | 100 | | element.Validate(); |
| | | 101 | | } |
| | | 102 | | } |
| | | 103 | | } |
| | 3 | 104 | | if (Metadata != null) |
| | | 105 | | { |
| | 18 | 106 | | foreach (var element1 in Metadata) |
| | | 107 | | { |
| | 6 | 108 | | if (element1 != null) |
| | | 109 | | { |
| | 6 | 110 | | element1.Validate(); |
| | | 111 | | } |
| | | 112 | | } |
| | | 113 | | } |
| | 3 | 114 | | } |
| | | 115 | | } |
| | | 116 | | } |