< Summary

Class:Microsoft.Azure.CognitiveServices.Search.WebSearch.Models.SearchResultsAnswer
Assembly:Microsoft.Azure.CognitiveServices.Search.BingWebSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\SearchResultsAnswer.cs
Covered lines:2
Uncovered lines:11
Coverable lines:13
Total lines:79
Line coverage:15.3% (2 of 13)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_QueryContext()-0%100%
get_TotalEstimatedMatches()-0%100%
get_IsFamilyFriendly()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\SearchResultsAnswer.cs

#LineLine coverage
 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
 7namespace 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>
 819        public SearchResultsAnswer()
 20        {
 21            CustomInit();
 822        }
 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
 034            : base(id, webSearchUrl, followUpQueries)
 35        {
 036            QueryContext = queryContext;
 037            TotalEstimatedMatches = totalEstimatedMatches;
 038            IsFamilyFriendly = isFamilyFriendly;
 39            CustomInit();
 040        }
 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")]
 050        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")]
 058        public long? TotalEstimatedMatches { get; private set; }
 59
 60        /// <summary>
 61        /// </summary>
 62        [JsonProperty(PropertyName = "isFamilyFriendly")]
 063        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        {
 073            if (QueryContext != null)
 74            {
 075                QueryContext.Validate();
 76            }
 077        }
 78    }
 79}