| | 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.Linq; |
| | 12 | |
|
| | 13 | | public partial class Content |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// Initializes a new instance of the Content class. |
| | 17 | | /// </summary> |
| 5 | 18 | | public Content() |
| | 19 | | { |
| | 20 | | CustomInit(); |
| 5 | 21 | | } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the Content class. |
| | 25 | | /// </summary> |
| | 26 | | /// <param name="contentValue">Content to evaluate for a job.</param> |
| 0 | 27 | | public Content(string contentValue) |
| | 28 | | { |
| 0 | 29 | | ContentValue = contentValue; |
| | 30 | | CustomInit(); |
| 0 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// An initialization method that performs custom operations like setting defaults |
| | 35 | | /// </summary> |
| | 36 | | partial void CustomInit(); |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Gets or sets content to evaluate for a job. |
| | 40 | | /// </summary> |
| | 41 | | [JsonProperty(PropertyName = "ContentValue")] |
| 7 | 42 | | public string ContentValue { get; set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// Validate the object. |
| | 46 | | /// </summary> |
| | 47 | | /// <exception cref="ValidationException"> |
| | 48 | | /// Thrown if validation fails |
| | 49 | | /// </exception> |
| | 50 | | public virtual void Validate() |
| | 51 | | { |
| 1 | 52 | | if (ContentValue == null) |
| | 53 | | { |
| 0 | 54 | | throw new ValidationException(ValidationRules.CannotBeNull, "ContentValue"); |
| | 55 | | } |
| 1 | 56 | | } |
| | 57 | | } |
| | 58 | | } |