< Summary

Class:Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models.QnASearchResult
Assembly:Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\QnASearchResult.cs
Covered lines:6
Uncovered lines:12
Coverable lines:18
Total lines:101
Line coverage:33.3% (6 of 18)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Questions()-100%100%
get_Answer()-0%100%
get_Score()-100%100%
get_Id()-0%100%
get_Source()-0%100%
get_Metadata()-100%100%
get_Context()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\QnASearchResult.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
 12{
 13    using Newtonsoft.Json;
 14    using System.Collections;
 15    using System.Collections.Generic;
 16    using System.Linq;
 17
 18    /// <summary>
 19    /// Represents Search Result.
 20    /// </summary>
 21    public partial class QnASearchResult
 22    {
 23        /// <summary>
 24        /// Initializes a new instance of the QnASearchResult class.
 25        /// </summary>
 226        public QnASearchResult()
 27        {
 28            CustomInit();
 229        }
 30
 31        /// <summary>
 32        /// Initializes a new instance of the QnASearchResult class.
 33        /// </summary>
 34        /// <param name="questions">List of questions.</param>
 35        /// <param name="answer">Answer.</param>
 36        /// <param name="score">Search result score.</param>
 37        /// <param name="id">Id of the QnA result.</param>
 38        /// <param name="source">Source of QnA result.</param>
 39        /// <param name="metadata">List of metadata.</param>
 40        /// <param name="context">Context object of the QnA</param>
 041        public QnASearchResult(IList<string> questions = default(IList<string>), string answer = default(string), double
 42        {
 043            Questions = questions;
 044            Answer = answer;
 045            Score = score;
 046            Id = id;
 047            Source = source;
 048            Metadata = metadata;
 049            Context = context;
 50            CustomInit();
 051        }
 52
 53        /// <summary>
 54        /// An initialization method that performs custom operations like setting defaults
 55        /// </summary>
 56        partial void CustomInit();
 57
 58        /// <summary>
 59        /// Gets or sets list of questions.
 60        /// </summary>
 61        [JsonProperty(PropertyName = "questions")]
 462        public IList<string> Questions { get; set; }
 63
 64        /// <summary>
 65        /// Gets or sets answer.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "answer")]
 068        public string Answer { get; set; }
 69
 70        /// <summary>
 71        /// Gets or sets search result score.
 72        /// </summary>
 73        [JsonProperty(PropertyName = "score")]
 474        public double? Score { get; set; }
 75
 76        /// <summary>
 77        /// Gets or sets id of the QnA result.
 78        /// </summary>
 79        [JsonProperty(PropertyName = "id")]
 080        public int? Id { get; set; }
 81
 82        /// <summary>
 83        /// Gets or sets source of QnA result.
 84        /// </summary>
 85        [JsonProperty(PropertyName = "source")]
 086        public string Source { get; set; }
 87
 88        /// <summary>
 89        /// Gets or sets list of metadata.
 90        /// </summary>
 91        [JsonProperty(PropertyName = "metadata")]
 492        public IList<MetadataDTO> Metadata { get; set; }
 93
 94        /// <summary>
 95        /// Gets or sets context object of the QnA
 96        /// </summary>
 97        [JsonProperty(PropertyName = "context")]
 498        public QnASearchResultContext Context { get; set; }
 99
 100    }
 101}