| | | 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.Search.VisualSearch.Models |
| | | 8 | | { |
| | | 9 | | using Newtonsoft.Json; |
| | | 10 | | using System.Linq; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// A JSON object consisting of coordinates specifying the four corners of |
| | | 14 | | /// a cropped rectangle within the input image. |
| | | 15 | | /// </summary> |
| | | 16 | | public partial class CropArea |
| | | 17 | | { |
| | | 18 | | /// <summary> |
| | | 19 | | /// Initializes a new instance of the CropArea class. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public CropArea() |
| | | 22 | | { |
| | | 23 | | CustomInit(); |
| | 0 | 24 | | } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Initializes a new instance of the CropArea class. |
| | | 28 | | /// </summary> |
| | | 29 | | /// <param name="top">The top coordinate of the region to be cropped. |
| | | 30 | | /// The coordinate is a fractional value of the original image's height |
| | | 31 | | /// and is measured from the top edge of the image. Specify the |
| | | 32 | | /// coordinate as a value from 0.0 through 1.0.</param> |
| | | 33 | | /// <param name="bottom">The bottom coordinate of the region to be |
| | | 34 | | /// cropped. The coordinate is a fractional value of the original |
| | | 35 | | /// image's height and is measured from the top edge of the image. |
| | | 36 | | /// Specify the coordinate as a value from 0.0 through 1.0.</param> |
| | | 37 | | /// <param name="left">The left coordinate of the region to be cropped. |
| | | 38 | | /// The coordinate is a fractional value of the original image's width |
| | | 39 | | /// and is measured from the left edge of the image. Specify the |
| | | 40 | | /// coordinate as a value from 0.0 through 1.0.</param> |
| | | 41 | | /// <param name="right">The right coordinate of the region to be |
| | | 42 | | /// cropped. The coordinate is a fractional value of the original |
| | | 43 | | /// image's width and is measured from the left edge of the image. |
| | | 44 | | /// Specify the coordinate as a value from 0.0 through 1.0.</param> |
| | 8 | 45 | | public CropArea(double top, double bottom, double left, double right) |
| | | 46 | | { |
| | 8 | 47 | | Top = top; |
| | 8 | 48 | | Bottom = bottom; |
| | 8 | 49 | | Left = left; |
| | 8 | 50 | | Right = right; |
| | | 51 | | CustomInit(); |
| | 8 | 52 | | } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// An initialization method that performs custom operations like setting defaults |
| | | 56 | | /// </summary> |
| | | 57 | | partial void CustomInit(); |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Gets or sets the top coordinate of the region to be cropped. The |
| | | 61 | | /// coordinate is a fractional value of the original image's height and |
| | | 62 | | /// is measured from the top edge of the image. Specify the coordinate |
| | | 63 | | /// as a value from 0.0 through 1.0. |
| | | 64 | | /// </summary> |
| | | 65 | | [JsonProperty(PropertyName = "top")] |
| | 14 | 66 | | public double Top { get; set; } |
| | | 67 | | |
| | | 68 | | /// <summary> |
| | | 69 | | /// Gets or sets the bottom coordinate of the region to be cropped. The |
| | | 70 | | /// coordinate is a fractional value of the original image's height and |
| | | 71 | | /// is measured from the top edge of the image. Specify the coordinate |
| | | 72 | | /// as a value from 0.0 through 1.0. |
| | | 73 | | /// </summary> |
| | | 74 | | [JsonProperty(PropertyName = "bottom")] |
| | 14 | 75 | | public double Bottom { get; set; } |
| | | 76 | | |
| | | 77 | | /// <summary> |
| | | 78 | | /// Gets or sets the left coordinate of the region to be cropped. The |
| | | 79 | | /// coordinate is a fractional value of the original image's width and |
| | | 80 | | /// is measured from the left edge of the image. Specify the coordinate |
| | | 81 | | /// as a value from 0.0 through 1.0. |
| | | 82 | | /// </summary> |
| | | 83 | | [JsonProperty(PropertyName = "left")] |
| | 14 | 84 | | public double Left { get; set; } |
| | | 85 | | |
| | | 86 | | /// <summary> |
| | | 87 | | /// Gets or sets the right coordinate of the region to be cropped. The |
| | | 88 | | /// coordinate is a fractional value of the original image's width and |
| | | 89 | | /// is measured from the left edge of the image. Specify the coordinate |
| | | 90 | | /// as a value from 0.0 through 1.0. |
| | | 91 | | /// </summary> |
| | | 92 | | [JsonProperty(PropertyName = "right")] |
| | 14 | 93 | | public double Right { get; set; } |
| | | 94 | | |
| | | 95 | | /// <summary> |
| | | 96 | | /// Validate the object. |
| | | 97 | | /// </summary> |
| | | 98 | | /// <exception cref="Rest.ValidationException"> |
| | | 99 | | /// Thrown if validation fails |
| | | 100 | | /// </exception> |
| | | 101 | | public virtual void Validate() |
| | | 102 | | { |
| | | 103 | | //Nothing to validate |
| | 0 | 104 | | } |
| | | 105 | | } |
| | | 106 | | } |