| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Collections; |
| | 16 | | using System.Collections.Generic; |
| | 17 | | using System.Linq; |
| | 18 | |
|
| | 19 | | public partial class ImageUrlCreateEntry |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the ImageUrlCreateEntry class. |
| | 23 | | /// </summary> |
| 0 | 24 | | public ImageUrlCreateEntry() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 0 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the ImageUrlCreateEntry class. |
| | 31 | | /// </summary> |
| | 32 | | /// <param name="url">Url of the image.</param> |
| 4 | 33 | | public ImageUrlCreateEntry(string url, IList<System.Guid> tagIds = default(IList<System.Guid>), IList<Region> re |
| | 34 | | { |
| 4 | 35 | | Url = url; |
| 4 | 36 | | TagIds = tagIds; |
| 4 | 37 | | Regions = regions; |
| | 38 | | CustomInit(); |
| 4 | 39 | | } |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// An initialization method that performs custom operations like setting defaults |
| | 43 | | /// </summary> |
| | 44 | | partial void CustomInit(); |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// Gets or sets url of the image. |
| | 48 | | /// </summary> |
| | 49 | | [JsonProperty(PropertyName = "url")] |
| 8 | 50 | | public string Url { get; set; } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// </summary> |
| | 54 | | [JsonProperty(PropertyName = "tagIds")] |
| 8 | 55 | | public IList<System.Guid> TagIds { get; set; } |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// </summary> |
| | 59 | | [JsonProperty(PropertyName = "regions")] |
| 8 | 60 | | public IList<Region> Regions { get; set; } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Validate the object. |
| | 64 | | /// </summary> |
| | 65 | | /// <exception cref="ValidationException"> |
| | 66 | | /// Thrown if validation fails |
| | 67 | | /// </exception> |
| | 68 | | public virtual void Validate() |
| | 69 | | { |
| 0 | 70 | | if (Url == null) |
| | 71 | | { |
| 0 | 72 | | throw new ValidationException(ValidationRules.CannotBeNull, "Url"); |
| | 73 | | } |
| 0 | 74 | | if (Regions != null) |
| | 75 | | { |
| 0 | 76 | | foreach (var element in Regions) |
| | 77 | | { |
| 0 | 78 | | if (element != null) |
| | 79 | | { |
| 0 | 80 | | element.Validate(); |
| | 81 | | } |
| | 82 | | } |
| | 83 | | } |
| 0 | 84 | | } |
| | 85 | | } |
| | 86 | | } |