/// <summary> /// Initializes a new instance of the SearchResponse class. /// </summary> /// <param name="id">A String identifier.</param> /// <param name="webSearchUrl">The URL To Bing's search result for this /// item.</param> /// <param name="queryContext">An object that contains the query string /// that Bing used for the request. This object contains the query /// string as entered by the user. It may also contain an altered query /// string that Bing used for the query if the query string contained a /// spelling mistake.</param> /// <param name="webPages">A list of webpages that are relevant to the /// search query.</param> /// <param name="images">A list of images that are relevant to the /// search query.</param> /// <param name="news">A list of news articles that are relevant to the /// search query.</param> /// <param name="relatedSearches">A list of related queries made by /// others.</param> /// <param name="spellSuggestions">The query string that likely /// represents the user's intent.</param> /// <param name="timeZone">The date and time of one or more geographic /// locations.</param> /// <param name="videos">A list of videos that are relevant to the /// search query.</param> /// <param name="computation">The answer to a math expression or units /// conversion expression.</param> /// <param name="rankingResponse">The order that Bing suggests that you /// display the search results in.</param> public SearchResponse(string id = default(string), string webSearchUrl = default(string), QueryContext queryContext = default(QueryContext), WebWebAnswer webPages = default(WebWebAnswer), Images images = default(Images), News news = default(News), RelatedSearchesRelatedSearchAnswer relatedSearches = default(RelatedSearchesRelatedSearchAnswer), SpellSuggestions spellSuggestions = default(SpellSuggestions), TimeZone timeZone = default(TimeZone), Videos videos = default(Videos), Computation computation = default(Computation), RankingRankingResponse rankingResponse = default(RankingRankingResponse)) : base(id, webSearchUrl) { QueryContext = queryContext; WebPages = webPages; Images = images; News = news; RelatedSearches = relatedSearches; SpellSuggestions = spellSuggestions; TimeZone = timeZone; Videos = videos; Computation = computation; RankingResponse = rankingResponse; CustomInit(); }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="Rest.ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (QueryContext != null) { QueryContext.Validate(); } if (WebPages != null) { WebPages.Validate(); } if (Images != null) { Images.Validate(); } if (News != null) { News.Validate(); } if (RelatedSearches != null) { RelatedSearches.Validate(); } if (SpellSuggestions != null) { SpellSuggestions.Validate(); } if (TimeZone != null) { TimeZone.Validate(); } if (Videos != null) { Videos.Validate(); } if (Computation != null) { Computation.Validate(); } if (RankingResponse != null) { RankingResponse.Validate(); } }