| | 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 | |
|
| | 11 | | namespace 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 | | /// POST body schema to query the knowledgebase. |
| | 20 | | /// </summary> |
| | 21 | | public partial class QueryDTO |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the QueryDTO class. |
| | 25 | | /// </summary> |
| 0 | 26 | | public QueryDTO() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 0 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the QueryDTO class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="qnaId">Exact qnaId to fetch from the knowledgebase, |
| | 35 | | /// this field takes priority over question.</param> |
| | 36 | | /// <param name="question">User question to query against the knowledge |
| | 37 | | /// base.</param> |
| | 38 | | /// <param name="top">Max number of answers to be returned for the |
| | 39 | | /// question.</param> |
| | 40 | | /// <param name="userId">Unique identifier for the user.</param> |
| | 41 | | /// <param name="isTest">Query against the test index.</param> |
| | 42 | | /// <param name="scoreThreshold">Threshold for answers returned based |
| | 43 | | /// on score.</param> |
| | 44 | | /// <param name="context">Context object with previous QnA's |
| | 45 | | /// information.</param> |
| | 46 | | /// <param name="rankerType">Optional field. Set to 'QuestionOnly' for |
| | 47 | | /// using a question only Ranker.</param> |
| | 48 | | /// <param name="strictFilters">Find only answers that contain these |
| | 49 | | /// metadata.</param> |
| 2 | 50 | | public QueryDTO(string qnaId = default(string), string question = default(string), int? top = default(int?), str |
| | 51 | | { |
| 2 | 52 | | QnaId = qnaId; |
| 2 | 53 | | Question = question; |
| 2 | 54 | | Top = top; |
| 2 | 55 | | UserId = userId; |
| 2 | 56 | | IsTest = isTest; |
| 2 | 57 | | ScoreThreshold = scoreThreshold; |
| 2 | 58 | | Context = context; |
| 2 | 59 | | RankerType = rankerType; |
| 2 | 60 | | StrictFilters = strictFilters; |
| | 61 | | CustomInit(); |
| 2 | 62 | | } |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// An initialization method that performs custom operations like setting defaults |
| | 66 | | /// </summary> |
| | 67 | | partial void CustomInit(); |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets exact qnaId to fetch from the knowledgebase, this |
| | 71 | | /// field takes priority over question. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "qnaId")] |
| 4 | 74 | | public string QnaId { get; set; } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets or sets user question to query against the knowledge base. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "question")] |
| 4 | 80 | | public string Question { get; set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets max number of answers to be returned for the question. |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "top")] |
| 4 | 86 | | public int? Top { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets or sets unique identifier for the user. |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "userId")] |
| 4 | 92 | | public string UserId { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets or sets query against the test index. |
| | 96 | | /// </summary> |
| | 97 | | [JsonProperty(PropertyName = "isTest")] |
| 4 | 98 | | public bool? IsTest { get; set; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// Gets or sets threshold for answers returned based on score. |
| | 102 | | /// </summary> |
| | 103 | | [JsonProperty(PropertyName = "scoreThreshold")] |
| 4 | 104 | | public double? ScoreThreshold { get; set; } |
| | 105 | |
|
| | 106 | | /// <summary> |
| | 107 | | /// Gets or sets context object with previous QnA's information. |
| | 108 | | /// </summary> |
| | 109 | | [JsonProperty(PropertyName = "context")] |
| 4 | 110 | | public QueryDTOContext Context { get; set; } |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// Gets or sets optional field. Set to 'QuestionOnly' for using a |
| | 114 | | /// question only Ranker. |
| | 115 | | /// </summary> |
| | 116 | | [JsonProperty(PropertyName = "rankerType")] |
| 4 | 117 | | public string RankerType { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets find only answers that contain these metadata. |
| | 121 | | /// </summary> |
| | 122 | | [JsonProperty(PropertyName = "strictFilters")] |
| 4 | 123 | | public IList<MetadataDTO> StrictFilters { get; set; } |
| | 124 | |
|
| | 125 | | } |
| | 126 | | } |