| | 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.Face.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Linq; |
| | 16 | |
|
| | 17 | | public partial class ImageUrl |
| | 18 | | { |
| | 19 | | /// <summary> |
| | 20 | | /// Initializes a new instance of the ImageUrl class. |
| | 21 | | /// </summary> |
| 0 | 22 | | public ImageUrl() |
| | 23 | | { |
| | 24 | | CustomInit(); |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the ImageUrl class. |
| | 29 | | /// </summary> |
| | 30 | | /// <param name="url">Publicly reachable URL of an image</param> |
| 0 | 31 | | public ImageUrl(string url) |
| | 32 | | { |
| 0 | 33 | | Url = url; |
| | 34 | | CustomInit(); |
| 0 | 35 | | } |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// An initialization method that performs custom operations like setting defaults |
| | 39 | | /// </summary> |
| | 40 | | partial void CustomInit(); |
| | 41 | |
|
| | 42 | | /// <summary> |
| | 43 | | /// Gets or sets publicly reachable URL of an image |
| | 44 | | /// </summary> |
| | 45 | | [JsonProperty(PropertyName = "url")] |
| 0 | 46 | | public string Url { get; set; } |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// Validate the object. |
| | 50 | | /// </summary> |
| | 51 | | /// <exception cref="ValidationException"> |
| | 52 | | /// Thrown if validation fails |
| | 53 | | /// </exception> |
| | 54 | | public virtual void Validate() |
| | 55 | | { |
| 0 | 56 | | if (Url == null) |
| | 57 | | { |
| 0 | 58 | | throw new ValidationException(ValidationRules.CannotBeNull, "Url"); |
| | 59 | | } |
| 0 | 60 | | } |
| | 61 | | } |
| | 62 | | } |