| | | 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.LocalSearch.Models |
| | | 8 | | { |
| | | 9 | | using Newtonsoft.Json; |
| | | 10 | | using System.Collections; |
| | | 11 | | using System.Collections.Generic; |
| | | 12 | | using System.Linq; |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Defines the top-level object that the response includes when the |
| | | 16 | | /// request succeeds. |
| | | 17 | | /// </summary> |
| | | 18 | | public partial class SearchResponse : Response |
| | | 19 | | { |
| | | 20 | | /// <summary> |
| | | 21 | | /// Initializes a new instance of the SearchResponse class. |
| | | 22 | | /// </summary> |
| | 0 | 23 | | public SearchResponse() |
| | | 24 | | { |
| | | 25 | | CustomInit(); |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Initializes a new instance of the SearchResponse class. |
| | | 30 | | /// </summary> |
| | | 31 | | /// <param name="id">A String identifier.</param> |
| | | 32 | | /// <param name="readLink">The URL that returns this resource.</param> |
| | | 33 | | /// <param name="webSearchUrl">The URL to Bing's search result for this |
| | | 34 | | /// item.</param> |
| | | 35 | | /// <param name="queryContext">An object that contains the query string |
| | | 36 | | /// that Bing used for the request. This object contains the query |
| | | 37 | | /// string as entered by the user. It may also contain an altered query |
| | | 38 | | /// string that Bing used for the query if the query string contained a |
| | | 39 | | /// spelling mistake.</param> |
| | | 40 | | /// <param name="places">A list of local entities such as restaurants |
| | | 41 | | /// or hotels that are relevant to the query.</param> |
| | | 42 | | public SearchResponse(string id = default(string), string readLink = default(string), string webSearchUrl = defa |
| | 0 | 43 | | : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard) |
| | | 44 | | { |
| | 0 | 45 | | QueryContext = queryContext; |
| | 0 | 46 | | Places = places; |
| | 0 | 47 | | Lottery = lottery; |
| | 0 | 48 | | SearchResultsConfidenceScore = searchResultsConfidenceScore; |
| | | 49 | | CustomInit(); |
| | 0 | 50 | | } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// An initialization method that performs custom operations like setting defaults |
| | | 54 | | /// </summary> |
| | | 55 | | partial void CustomInit(); |
| | | 56 | | |
| | | 57 | | /// <summary> |
| | | 58 | | /// Gets an object that contains the query string that Bing used for |
| | | 59 | | /// the request. This object contains the query string as entered by |
| | | 60 | | /// the user. It may also contain an altered query string that Bing |
| | | 61 | | /// used for the query if the query string contained a spelling |
| | | 62 | | /// mistake. |
| | | 63 | | /// </summary> |
| | | 64 | | [JsonProperty(PropertyName = "queryContext")] |
| | 0 | 65 | | public QueryContext QueryContext { get; private set; } |
| | | 66 | | |
| | | 67 | | /// <summary> |
| | | 68 | | /// Gets a list of local entities such as restaurants or hotels that |
| | | 69 | | /// are relevant to the query. |
| | | 70 | | /// </summary> |
| | | 71 | | [JsonProperty(PropertyName = "places")] |
| | 0 | 72 | | public Places Places { get; private set; } |
| | | 73 | | |
| | | 74 | | /// <summary> |
| | | 75 | | /// </summary> |
| | | 76 | | [JsonProperty(PropertyName = "lottery")] |
| | 0 | 77 | | public SearchResultsAnswer Lottery { get; private set; } |
| | | 78 | | |
| | | 79 | | /// <summary> |
| | | 80 | | /// </summary> |
| | | 81 | | [JsonProperty(PropertyName = "searchResultsConfidenceScore")] |
| | 0 | 82 | | public double? SearchResultsConfidenceScore { get; private set; } |
| | | 83 | | |
| | | 84 | | /// <summary> |
| | | 85 | | /// Validate the object. |
| | | 86 | | /// </summary> |
| | | 87 | | /// <exception cref="Rest.ValidationException"> |
| | | 88 | | /// Thrown if validation fails |
| | | 89 | | /// </exception> |
| | | 90 | | public virtual void Validate() |
| | | 91 | | { |
| | 0 | 92 | | if (QueryContext != null) |
| | | 93 | | { |
| | 0 | 94 | | QueryContext.Validate(); |
| | | 95 | | } |
| | 0 | 96 | | if (Places != null) |
| | | 97 | | { |
| | 0 | 98 | | Places.Validate(); |
| | | 99 | | } |
| | 0 | 100 | | if (Lottery != null) |
| | | 101 | | { |
| | 0 | 102 | | Lottery.Validate(); |
| | | 103 | | } |
| | 0 | 104 | | } |
| | | 105 | | } |
| | | 106 | | } |