| | 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.Collections; |
| | 11 | | using System.Collections.Generic; |
| | 12 | | using System.Linq; |
| | 13 | |
|
| | 14 | | /// <summary> |
| | 15 | | /// A visual search tag. |
| | 16 | | /// </summary> |
| | 17 | | public partial class ImageTag : Thing |
| | 18 | | { |
| | 19 | | /// <summary> |
| | 20 | | /// Initializes a new instance of the ImageTag class. |
| | 21 | | /// </summary> |
| 36 | 22 | | public ImageTag() |
| | 23 | | { |
| | 24 | | CustomInit(); |
| 36 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the ImageTag class. |
| | 29 | | /// </summary> |
| | 30 | | /// <param name="id">A String identifier.</param> |
| | 31 | | /// <param name="readLink">The URL that returns this resource. To use |
| | 32 | | /// the URL, append query parameters as appropriate and include the |
| | 33 | | /// Ocp-Apim-Subscription-Key header.</param> |
| | 34 | | /// <param name="webSearchUrl">The URL to Bing's search result for this |
| | 35 | | /// item.</param> |
| | 36 | | /// <param name="name">The name of the thing represented by this |
| | 37 | | /// object.</param> |
| | 38 | | /// <param name="url">The URL to get more information about the thing |
| | 39 | | /// represented by this object.</param> |
| | 40 | | /// <param name="image">An image of the item.</param> |
| | 41 | | /// <param name="description">A short description of the item.</param> |
| | 42 | | /// <param name="alternateName">An alias for the item.</param> |
| | 43 | | /// <param name="bingId">An ID that uniquely identifies this |
| | 44 | | /// item.</param> |
| | 45 | | /// <param name="displayName">Display name for this tag. For the |
| | 46 | | /// default tag, the display name is empty.</param> |
| | 47 | | /// <param name="boundingBox">The bounding box for this tag. For the |
| | 48 | | /// default tag, there is no bounding box.</param> |
| | 49 | | /// <param name="actions">Actions within this tag. The order of the |
| | 50 | | /// items denotes the default ranking order of these actions, with the |
| | 51 | | /// first action being the most likely user intent.</param> |
| | 52 | | public ImageTag(string id = default(string), string readLink = default(string), string webSearchUrl = default(st |
| 0 | 53 | | : base(id, readLink, webSearchUrl, name, url, image, description, alternateName, bingId) |
| | 54 | | { |
| 0 | 55 | | DisplayName = displayName; |
| 0 | 56 | | BoundingBox = boundingBox; |
| 0 | 57 | | Actions = actions; |
| | 58 | | CustomInit(); |
| 0 | 59 | | } |
| | 60 | |
|
| | 61 | | /// <summary> |
| | 62 | | /// An initialization method that performs custom operations like setting defaults |
| | 63 | | /// </summary> |
| | 64 | | partial void CustomInit(); |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets display name for this tag. For the default tag, the display |
| | 68 | | /// name is empty. |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "displayName")] |
| 0 | 71 | | public string DisplayName { get; private set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Gets the bounding box for this tag. For the default tag, there is |
| | 75 | | /// no bounding box. |
| | 76 | | /// </summary> |
| | 77 | | [JsonProperty(PropertyName = "boundingBox")] |
| 0 | 78 | | public ImageTagRegion BoundingBox { get; private set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets actions within this tag. The order of the items denotes the |
| | 82 | | /// default ranking order of these actions, with the first action being |
| | 83 | | /// the most likely user intent. |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "actions")] |
| 60 | 86 | | public IList<ImageAction> Actions { get; private set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Validate the object. |
| | 90 | | /// </summary> |
| | 91 | | /// <exception cref="Rest.ValidationException"> |
| | 92 | | /// Thrown if validation fails |
| | 93 | | /// </exception> |
| | 94 | | public virtual void Validate() |
| | 95 | | { |
| 0 | 96 | | if (BoundingBox != null) |
| | 97 | | { |
| 0 | 98 | | BoundingBox.Validate(); |
| | 99 | | } |
| 0 | 100 | | } |
| | 101 | | } |
| | 102 | | } |