| | 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 CreateVideoReviewsBodyItem |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the CreateVideoReviewsBodyItem class. |
| | 22 | | /// </summary> |
| 1 | 23 | | public CreateVideoReviewsBodyItem() |
| | 24 | | { |
| | 25 | | CustomInit(); |
| 1 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the CreateVideoReviewsBodyItem class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="content">Video content url to review.</param> |
| | 32 | | /// <param name="contentId">Content Identifier.</param> |
| | 33 | | /// <param name="status">Status of the |
| | 34 | | /// video(Complete,Unpublished,Pending). Possible values include: |
| | 35 | | /// 'Complete', 'Unpublished', 'Pending'</param> |
| | 36 | | /// <param name="videoFrames">Optional metadata details.</param> |
| | 37 | | /// <param name="metadata">Optional metadata details.</param> |
| | 38 | | /// <param name="timescale">Timescale of the video.</param> |
| | 39 | | /// <param name="callbackEndpoint">Optional CallbackEndpoint.</param> |
| 0 | 40 | | public CreateVideoReviewsBodyItem(string content, string contentId, string status, IList<CreateVideoReviewsBodyI |
| | 41 | | { |
| 0 | 42 | | VideoFrames = videoFrames; |
| 0 | 43 | | Metadata = metadata; |
| 0 | 44 | | Content = content; |
| 0 | 45 | | ContentId = contentId; |
| 0 | 46 | | Status = status; |
| 0 | 47 | | Timescale = timescale; |
| 0 | 48 | | CallbackEndpoint = callbackEndpoint; |
| | 49 | | CustomInit(); |
| 0 | 50 | | } |
| | 51 | | /// <summary> |
| | 52 | | /// Static constructor for CreateVideoReviewsBodyItem class. |
| | 53 | | /// </summary> |
| | 54 | | static CreateVideoReviewsBodyItem() |
| | 55 | | { |
| 1 | 56 | | Type = "Video"; |
| 1 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// An initialization method that performs custom operations like setting defaults |
| | 61 | | /// </summary> |
| | 62 | | partial void CustomInit(); |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// Gets or sets optional metadata details. |
| | 66 | | /// </summary> |
| | 67 | | [JsonProperty(PropertyName = "VideoFrames")] |
| 4 | 68 | | public IList<CreateVideoReviewsBodyItemVideoFramesItem> VideoFrames { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets optional metadata details. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "Metadata")] |
| 4 | 74 | | public IList<CreateVideoReviewsBodyItemMetadataItem> Metadata { get; set; } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets or sets video content url to review. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "Content")] |
| 3 | 80 | | public string Content { get; set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets content Identifier. |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "ContentId")] |
| 3 | 86 | | public string ContentId { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets or sets status of the video(Complete,Unpublished,Pending). |
| | 90 | | /// Possible values include: 'Complete', 'Unpublished', 'Pending' |
| | 91 | | /// </summary> |
| | 92 | | [JsonProperty(PropertyName = "Status")] |
| 3 | 93 | | public string Status { get; set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// Gets or sets timescale of the video. |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "Timescale")] |
| 2 | 99 | | public int? Timescale { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets optional CallbackEndpoint. |
| | 103 | | /// </summary> |
| | 104 | | [JsonProperty(PropertyName = "CallbackEndpoint")] |
| 2 | 105 | | public string CallbackEndpoint { get; set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Type of the content. |
| | 109 | | /// </summary> |
| | 110 | | [JsonProperty(PropertyName = "Type")] |
| 2 | 111 | | public static string Type { get; private set; } |
| | 112 | |
|
| | 113 | | /// <summary> |
| | 114 | | /// Validate the object. |
| | 115 | | /// </summary> |
| | 116 | | /// <exception cref="ValidationException"> |
| | 117 | | /// Thrown if validation fails |
| | 118 | | /// </exception> |
| | 119 | | public virtual void Validate() |
| | 120 | | { |
| 1 | 121 | | if (Content == null) |
| | 122 | | { |
| 0 | 123 | | throw new ValidationException(ValidationRules.CannotBeNull, "Content"); |
| | 124 | | } |
| 1 | 125 | | if (ContentId == null) |
| | 126 | | { |
| 0 | 127 | | throw new ValidationException(ValidationRules.CannotBeNull, "ContentId"); |
| | 128 | | } |
| 1 | 129 | | if (Status == null) |
| | 130 | | { |
| 0 | 131 | | throw new ValidationException(ValidationRules.CannotBeNull, "Status"); |
| | 132 | | } |
| 1 | 133 | | if (VideoFrames != null) |
| | 134 | | { |
| 8 | 135 | | foreach (var element in VideoFrames) |
| | 136 | | { |
| 3 | 137 | | if (element != null) |
| | 138 | | { |
| 3 | 139 | | element.Validate(); |
| | 140 | | } |
| | 141 | | } |
| | 142 | | } |
| 1 | 143 | | if (Metadata != null) |
| | 144 | | { |
| 10 | 145 | | foreach (var element1 in Metadata) |
| | 146 | | { |
| 4 | 147 | | if (element1 != null) |
| | 148 | | { |
| 4 | 149 | | element1.Validate(); |
| | 150 | | } |
| | 151 | | } |
| | 152 | | } |
| 1 | 153 | | } |
| | 154 | | } |
| | 155 | | } |