| | 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 that contains information about the image to get insights |
| | 14 | | /// of. Specify this object only in a knowledgeRequest form data. |
| | 15 | | /// </summary> |
| | 16 | | public partial class VisualSearchRequest |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// Initializes a new instance of the VisualSearchRequest class. |
| | 20 | | /// </summary> |
| 2 | 21 | | public VisualSearchRequest() |
| | 22 | | { |
| | 23 | | CustomInit(); |
| 2 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the VisualSearchRequest class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name="imageInfo">A JSON object that identities the image to |
| | 30 | | /// get insights of.</param> |
| | 31 | | /// <param name="knowledgeRequest">A JSON object containing information |
| | 32 | | /// about the request, such as filters, or a description.</param> |
| 6 | 33 | | public VisualSearchRequest(ImageInfo imageInfo = default(ImageInfo), KnowledgeRequest knowledgeRequest = default |
| | 34 | | { |
| 6 | 35 | | ImageInfo = imageInfo; |
| 6 | 36 | | KnowledgeRequest = knowledgeRequest; |
| | 37 | | CustomInit(); |
| 6 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> |
| | 41 | | /// An initialization method that performs custom operations like setting defaults |
| | 42 | | /// </summary> |
| | 43 | | partial void CustomInit(); |
| | 44 | |
|
| | 45 | | /// <summary> |
| | 46 | | /// Gets or sets a JSON object that identities the image to get |
| | 47 | | /// insights of. |
| | 48 | | /// </summary> |
| | 49 | | [JsonProperty(PropertyName = "imageInfo")] |
| 14 | 50 | | public ImageInfo ImageInfo { get; set; } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Gets or sets a JSON object containing information about the |
| | 54 | | /// request, such as filters, or a description. |
| | 55 | | /// </summary> |
| | 56 | | [JsonProperty(PropertyName = "knowledgeRequest")] |
| 14 | 57 | | public KnowledgeRequest KnowledgeRequest { get; set; } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// Validate the object. |
| | 61 | | /// </summary> |
| | 62 | | /// <exception cref="Rest.ValidationException"> |
| | 63 | | /// Thrown if validation fails |
| | 64 | | /// </exception> |
| | 65 | | public virtual void Validate() |
| | 66 | | { |
| 0 | 67 | | if (ImageInfo != null) |
| | 68 | | { |
| 0 | 69 | | ImageInfo.Validate(); |
| | 70 | | } |
| 0 | 71 | | } |
| | 72 | | } |
| | 73 | | } |