| | 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.CustomImageSearch.Models |
| | 8 | | { |
| | 9 | | using Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Collections; |
| | 12 | | using System.Collections.Generic; |
| | 13 | | using System.Linq; |
| | 14 | |
|
| | 15 | | /// <summary> |
| | 16 | | /// Defines an image answer |
| | 17 | | /// </summary> |
| | 18 | | public partial class Images : SearchResultsAnswer |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the Images class. |
| | 22 | | /// </summary> |
| 2 | 23 | | public Images() |
| | 24 | | { |
| | 25 | | CustomInit(); |
| 2 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the Images class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="value">A list of image objects that are relevant to |
| | 32 | | /// the query. If there are no results, the List is empty.</param> |
| | 33 | | /// <param name="id">A String identifier.</param> |
| | 34 | | /// <param name="readLink">The URL that returns this resource.</param> |
| | 35 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | 36 | | /// item.</param> |
| | 37 | | /// <param name="totalEstimatedMatches">The estimated number of |
| | 38 | | /// webpages that are relevant to the query. Use this number along with |
| | 39 | | /// the count and offset query parameters to page the results.</param> |
| | 40 | | /// <param name="nextOffset">Used as part of deduping. Tells client the |
| | 41 | | /// next offset that client should use in the next pagination |
| | 42 | | /// request</param> |
| | 43 | | public Images(IList<ImageObject> value, string id = default(string), string readLink = default(string), string w |
| 0 | 44 | | : base(id, readLink, webSearchUrl, totalEstimatedMatches) |
| | 45 | | { |
| 0 | 46 | | NextOffset = nextOffset; |
| 0 | 47 | | Value = value; |
| | 48 | | CustomInit(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets used as part of deduping. Tells client the next offset that |
| | 58 | | /// client should use in the next pagination request |
| | 59 | | /// </summary> |
| | 60 | | [JsonProperty(PropertyName = "nextOffset")] |
| 0 | 61 | | public int? NextOffset { get; private set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets a list of image objects that are relevant to the |
| | 65 | | /// query. If there are no results, the List is empty. |
| | 66 | | /// </summary> |
| | 67 | | [JsonProperty(PropertyName = "value")] |
| 12 | 68 | | public IList<ImageObject> Value { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Validate the object. |
| | 72 | | /// </summary> |
| | 73 | | /// <exception cref="ValidationException"> |
| | 74 | | /// Thrown if validation fails |
| | 75 | | /// </exception> |
| | 76 | | public virtual void Validate() |
| | 77 | | { |
| 0 | 78 | | if (Value == null) |
| | 79 | | { |
| 0 | 80 | | throw new ValidationException(ValidationRules.CannotBeNull, "Value"); |
| | 81 | | } |
| 0 | 82 | | } |
| | 83 | | } |
| | 84 | | } |