| | | 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.WebSearch.Models |
| | | 8 | | { |
| | | 9 | | using Newtonsoft.Json; |
| | | 10 | | using System.Collections; |
| | | 11 | | using System.Collections.Generic; |
| | | 12 | | using System.Linq; |
| | | 13 | | |
| | | 14 | | public partial class SearchResultsAnswer : Answer |
| | | 15 | | { |
| | | 16 | | /// <summary> |
| | | 17 | | /// Initializes a new instance of the SearchResultsAnswer class. |
| | | 18 | | /// </summary> |
| | 8 | 19 | | public SearchResultsAnswer() |
| | | 20 | | { |
| | | 21 | | CustomInit(); |
| | 8 | 22 | | } |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Initializes a new instance of the SearchResultsAnswer class. |
| | | 26 | | /// </summary> |
| | | 27 | | /// <param name="id">A String identifier.</param> |
| | | 28 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | | 29 | | /// item.</param> |
| | | 30 | | /// <param name="totalEstimatedMatches">The estimated number of |
| | | 31 | | /// webpages that are relevant to the query. Use this number along with |
| | | 32 | | /// the count and offset query parameters to page the results.</param> |
| | | 33 | | public SearchResultsAnswer(string id = default(string), string webSearchUrl = default(string), IList<Query> foll |
| | 0 | 34 | | : base(id, webSearchUrl, followUpQueries) |
| | | 35 | | { |
| | 0 | 36 | | QueryContext = queryContext; |
| | 0 | 37 | | TotalEstimatedMatches = totalEstimatedMatches; |
| | 0 | 38 | | IsFamilyFriendly = isFamilyFriendly; |
| | | 39 | | CustomInit(); |
| | 0 | 40 | | } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// An initialization method that performs custom operations like setting defaults |
| | | 44 | | /// </summary> |
| | | 45 | | partial void CustomInit(); |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// </summary> |
| | | 49 | | [JsonProperty(PropertyName = "queryContext")] |
| | 0 | 50 | | public QueryContext QueryContext { get; private set; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Gets the estimated number of webpages that are relevant to the |
| | | 54 | | /// query. Use this number along with the count and offset query |
| | | 55 | | /// parameters to page the results. |
| | | 56 | | /// </summary> |
| | | 57 | | [JsonProperty(PropertyName = "totalEstimatedMatches")] |
| | 0 | 58 | | public long? TotalEstimatedMatches { get; private set; } |
| | | 59 | | |
| | | 60 | | /// <summary> |
| | | 61 | | /// </summary> |
| | | 62 | | [JsonProperty(PropertyName = "isFamilyFriendly")] |
| | 0 | 63 | | public bool? IsFamilyFriendly { get; private set; } |
| | | 64 | | |
| | | 65 | | /// <summary> |
| | | 66 | | /// Validate the object. |
| | | 67 | | /// </summary> |
| | | 68 | | /// <exception cref="Rest.ValidationException"> |
| | | 69 | | /// Thrown if validation fails |
| | | 70 | | /// </exception> |
| | | 71 | | public virtual void Validate() |
| | | 72 | | { |
| | 0 | 73 | | if (QueryContext != null) |
| | | 74 | | { |
| | 0 | 75 | | QueryContext.Validate(); |
| | | 76 | | } |
| | 0 | 77 | | } |
| | | 78 | | } |
| | | 79 | | } |