< Summary

Class:Microsoft.Azure.CognitiveServices.Search.WebSearch.Models.RankingRankingResponse
Assembly:Microsoft.Azure.CognitiveServices.Search.BingWebSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\RankingRankingResponse.cs
Covered lines:4
Uncovered lines:13
Coverable lines:17
Total lines:90
Line coverage:23.5% (4 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Pole()-0%100%
get_Mainline()-100%100%
get_Sidebar()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\RankingRankingResponse.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.Linq;
 11
 12    /// <summary>
 13    /// Defines where on the search results page content should be placed and
 14    /// in what order.
 15    /// </summary>
 16    public partial class RankingRankingResponse
 17    {
 18        /// <summary>
 19        /// Initializes a new instance of the RankingRankingResponse class.
 20        /// </summary>
 221        public RankingRankingResponse()
 22        {
 23            CustomInit();
 224        }
 25
 26        /// <summary>
 27        /// Initializes a new instance of the RankingRankingResponse class.
 28        /// </summary>
 29        /// <param name="pole">The search results that should be afforded the
 30        /// most visible treatment (for example, displayed above the mainline
 31        /// and sidebar).</param>
 32        /// <param name="mainline">The search results to display in the
 33        /// mainline.</param>
 34        /// <param name="sidebar">The search results to display in the
 35        /// sidebar.</param>
 036        public RankingRankingResponse(RankingRankingGroup pole = default(RankingRankingGroup), RankingRankingGroup mainl
 37        {
 038            Pole = pole;
 039            Mainline = mainline;
 040            Sidebar = sidebar;
 41            CustomInit();
 042        }
 43
 44        /// <summary>
 45        /// An initialization method that performs custom operations like setting defaults
 46        /// </summary>
 47        partial void CustomInit();
 48
 49        /// <summary>
 50        /// Gets the search results that should be afforded the most visible
 51        /// treatment (for example, displayed above the mainline and sidebar).
 52        /// </summary>
 53        [JsonProperty(PropertyName = "pole")]
 054        public RankingRankingGroup Pole { get; private set; }
 55
 56        /// <summary>
 57        /// Gets the search results to display in the mainline.
 58        /// </summary>
 59        [JsonProperty(PropertyName = "mainline")]
 460        public RankingRankingGroup Mainline { get; private set; }
 61
 62        /// <summary>
 63        /// Gets the search results to display in the sidebar.
 64        /// </summary>
 65        [JsonProperty(PropertyName = "sidebar")]
 466        public RankingRankingGroup Sidebar { get; private set; }
 67
 68        /// <summary>
 69        /// Validate the object.
 70        /// </summary>
 71        /// <exception cref="Rest.ValidationException">
 72        /// Thrown if validation fails
 73        /// </exception>
 74        public virtual void Validate()
 75        {
 076            if (Pole != null)
 77            {
 078                Pole.Validate();
 79            }
 080            if (Mainline != null)
 81            {
 082                Mainline.Validate();
 83            }
 084            if (Sidebar != null)
 85            {
 086                Sidebar.Validate();
 87            }
 088        }
 89    }
 90}