| | | 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.ImageSearch.Models |
| | | 8 | | { |
| | | 9 | | using Newtonsoft.Json; |
| | | 10 | | using System.Linq; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Defines a region of an image. The region is defined by the coordinates |
| | | 14 | | /// of the top, left corner and bottom, right corner of the region. The |
| | | 15 | | /// coordinates are fractional values of the original image's width and |
| | | 16 | | /// height in the range 0.0 through 1.0. |
| | | 17 | | /// </summary> |
| | | 18 | | public partial class NormalizedRectangle : StructuredValue |
| | | 19 | | { |
| | | 20 | | /// <summary> |
| | | 21 | | /// Initializes a new instance of the NormalizedRectangle class. |
| | | 22 | | /// </summary> |
| | 0 | 23 | | public NormalizedRectangle() |
| | | 24 | | { |
| | | 25 | | CustomInit(); |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Initializes a new instance of the NormalizedRectangle class. |
| | | 30 | | /// </summary> |
| | | 31 | | /// <param name="left">The left coordinate.</param> |
| | | 32 | | /// <param name="top">The top coordinate</param> |
| | | 33 | | /// <param name="right">The right coordinate</param> |
| | | 34 | | /// <param name="bottom">The bottom coordinate</param> |
| | | 35 | | /// <param name="id">A String identifier.</param> |
| | | 36 | | /// <param name="readLink">The URL that returns this resource.</param> |
| | | 37 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | | 38 | | /// item.</param> |
| | | 39 | | /// <param name="name">The name of the thing represented by this |
| | | 40 | | /// object.</param> |
| | | 41 | | /// <param name="url">The URL to get more information about the thing |
| | | 42 | | /// represented by this object.</param> |
| | | 43 | | /// <param name="image">An image of the item.</param> |
| | | 44 | | /// <param name="description">A short description of the item.</param> |
| | | 45 | | /// <param name="alternateName">An alias for the item</param> |
| | | 46 | | /// <param name="bingId">An ID that uniquely identifies this |
| | | 47 | | /// item.</param> |
| | | 48 | | public NormalizedRectangle(double left, double top, double right, double bottom, string id = default(string), st |
| | 0 | 49 | | : base(id, readLink, webSearchUrl, name, url, image, description, alternateName, bingId) |
| | | 50 | | { |
| | 0 | 51 | | Left = left; |
| | 0 | 52 | | Top = top; |
| | 0 | 53 | | Right = right; |
| | 0 | 54 | | Bottom = bottom; |
| | | 55 | | CustomInit(); |
| | 0 | 56 | | } |
| | | 57 | | |
| | | 58 | | /// <summary> |
| | | 59 | | /// An initialization method that performs custom operations like setting defaults |
| | | 60 | | /// </summary> |
| | | 61 | | partial void CustomInit(); |
| | | 62 | | |
| | | 63 | | /// <summary> |
| | | 64 | | /// Gets or sets the left coordinate. |
| | | 65 | | /// </summary> |
| | | 66 | | [JsonProperty(PropertyName = "left")] |
| | 0 | 67 | | public double Left { get; set; } |
| | | 68 | | |
| | | 69 | | /// <summary> |
| | | 70 | | /// Gets or sets the top coordinate |
| | | 71 | | /// </summary> |
| | | 72 | | [JsonProperty(PropertyName = "top")] |
| | 0 | 73 | | public double Top { get; set; } |
| | | 74 | | |
| | | 75 | | /// <summary> |
| | | 76 | | /// Gets or sets the right coordinate |
| | | 77 | | /// </summary> |
| | | 78 | | [JsonProperty(PropertyName = "right")] |
| | 0 | 79 | | public double Right { get; set; } |
| | | 80 | | |
| | | 81 | | /// <summary> |
| | | 82 | | /// Gets or sets the bottom coordinate |
| | | 83 | | /// </summary> |
| | | 84 | | [JsonProperty(PropertyName = "bottom")] |
| | 0 | 85 | | public double Bottom { get; set; } |
| | | 86 | | |
| | | 87 | | /// <summary> |
| | | 88 | | /// Validate the object. |
| | | 89 | | /// </summary> |
| | | 90 | | /// <exception cref="Rest.ValidationException"> |
| | | 91 | | /// Thrown if validation fails |
| | | 92 | | /// </exception> |
| | | 93 | | public virtual void Validate() |
| | | 94 | | { |
| | | 95 | | //Nothing to validate |
| | 0 | 96 | | } |
| | | 97 | | } |
| | | 98 | | } |