< Summary

Class:Microsoft.Azure.CognitiveServices.Search.WebSearch.Models.WebWebAnswer
Assembly:Microsoft.Azure.CognitiveServices.Search.BingWebSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\WebWebAnswer.cs
Covered lines:3
Uncovered lines:9
Coverable lines:12
Total lines:85
Line coverage:25% (3 of 12)
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_Value()-100%100%
get_SomeResultsRemoved()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\WebWebAnswer.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 Microsoft.Rest;
 10    using Newtonsoft.Json;
 11    using System.Collections;
 12    using System.Collections.Generic;
 13    using System.Linq;
 14
 15    /// <summary>
 16    /// Defines a list of relevant webpage links.
 17    /// </summary>
 18    [Newtonsoft.Json.JsonObject("Web/WebAnswer")]
 19    public partial class WebWebAnswer : SearchResultsAnswer
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the WebWebAnswer class.
 23        /// </summary>
 224        public WebWebAnswer()
 25        {
 26            CustomInit();
 227        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the WebWebAnswer class.
 31        /// </summary>
 32        /// <param name="value">A list of webpages that are relevant to the
 33        /// query.</param>
 34        /// <param name="id">A String identifier.</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="someResultsRemoved">A Boolean value that indicates
 41        /// whether the response excluded some results from the answer. If Bing
 42        /// excluded some results, the value is true.</param>
 43        public WebWebAnswer(IList<WebPage> value, string id = default(string), string webSearchUrl = default(string), IL
 044            : base(id, webSearchUrl, followUpQueries, queryContext, totalEstimatedMatches, isFamilyFriendly)
 45        {
 046            Value = value;
 047            SomeResultsRemoved = someResultsRemoved;
 48            CustomInit();
 049        }
 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 or sets a list of webpages that are relevant to the query.
 58        /// </summary>
 59        [JsonProperty(PropertyName = "value")]
 660        public IList<WebPage> Value { get; set; }
 61
 62        /// <summary>
 63        /// Gets a Boolean value that indicates whether the response excluded
 64        /// some results from the answer. If Bing excluded some results, the
 65        /// value is true.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "someResultsRemoved")]
 068        public bool? SomeResultsRemoved { get; private set; }
 69
 70        /// <summary>
 71        /// Validate the object.
 72        /// </summary>
 73        /// <exception cref="ValidationException">
 74        /// Thrown if validation fails
 75        /// </exception>
 76        public override void Validate()
 77        {
 078            base.Validate();
 079            if (Value == null)
 80            {
 081                throw new ValidationException(ValidationRules.CannotBeNull, "Value");
 82            }
 083        }
 84    }
 85}