| | | 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 Newtonsoft.Json; |
| | | 14 | | using System.Linq; |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// A rectangle within which a face can be found |
| | | 18 | | /// </summary> |
| | | 19 | | public partial class FaceRectangle |
| | | 20 | | { |
| | | 21 | | /// <summary> |
| | | 22 | | /// Initializes a new instance of the FaceRectangle class. |
| | | 23 | | /// </summary> |
| | 98 | 24 | | public FaceRectangle() |
| | | 25 | | { |
| | | 26 | | CustomInit(); |
| | 98 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Initializes a new instance of the FaceRectangle class. |
| | | 31 | | /// </summary> |
| | | 32 | | /// <param name="width">The width of the rectangle, in pixels.</param> |
| | | 33 | | /// <param name="height">The height of the rectangle, in |
| | | 34 | | /// pixels.</param> |
| | | 35 | | /// <param name="left">The distance from the left edge if the image to |
| | | 36 | | /// the left edge of the rectangle, in pixels.</param> |
| | | 37 | | /// <param name="top">The distance from the top edge if the image to |
| | | 38 | | /// the top edge of the rectangle, in pixels.</param> |
| | 0 | 39 | | public FaceRectangle(int width, int height, int left, int top) |
| | | 40 | | { |
| | 0 | 41 | | Width = width; |
| | 0 | 42 | | Height = height; |
| | 0 | 43 | | Left = left; |
| | 0 | 44 | | Top = top; |
| | | 45 | | CustomInit(); |
| | 0 | 46 | | } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// An initialization method that performs custom operations like setting defaults |
| | | 50 | | /// </summary> |
| | | 51 | | partial void CustomInit(); |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets or sets the width of the rectangle, in pixels. |
| | | 55 | | /// </summary> |
| | | 56 | | [JsonProperty(PropertyName = "width")] |
| | 148 | 57 | | public int Width { get; set; } |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Gets or sets the height of the rectangle, in pixels. |
| | | 61 | | /// </summary> |
| | | 62 | | [JsonProperty(PropertyName = "height")] |
| | 148 | 63 | | public int Height { get; set; } |
| | | 64 | | |
| | | 65 | | /// <summary> |
| | | 66 | | /// Gets or sets the distance from the left edge if the image to the |
| | | 67 | | /// left edge of the rectangle, in pixels. |
| | | 68 | | /// </summary> |
| | | 69 | | [JsonProperty(PropertyName = "left")] |
| | 148 | 70 | | public int Left { get; set; } |
| | | 71 | | |
| | | 72 | | /// <summary> |
| | | 73 | | /// Gets or sets the distance from the top edge if the image to the top |
| | | 74 | | /// edge of the rectangle, in pixels. |
| | | 75 | | /// </summary> |
| | | 76 | | [JsonProperty(PropertyName = "top")] |
| | 148 | 77 | | public int Top { get; set; } |
| | | 78 | | |
| | | 79 | | /// <summary> |
| | | 80 | | /// Validate the object. |
| | | 81 | | /// </summary> |
| | | 82 | | /// <exception cref="Rest.ValidationException"> |
| | | 83 | | /// Thrown if validation fails |
| | | 84 | | /// </exception> |
| | | 85 | | public virtual void Validate() |
| | | 86 | | { |
| | | 87 | | //Nothing to validate |
| | 0 | 88 | | } |
| | | 89 | | } |
| | | 90 | | } |