-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
QueryDTO.cs
137 lines (122 loc) · 5.36 KB
/
QueryDTO.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// POST body schema to query the knowledgebase.
/// </summary>
public partial class QueryDTO
{
/// <summary>
/// Initializes a new instance of the QueryDTO class.
/// </summary>
public QueryDTO()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the QueryDTO class.
/// </summary>
/// <param name="qnaId">Exact qnaId to fetch from the knowledgebase,
/// this field takes priority over question.</param>
/// <param name="question">User question to query against the knowledge
/// base.</param>
/// <param name="top">Max number of answers to be returned for the
/// question.</param>
/// <param name="userId">Unique identifier for the user.</param>
/// <param name="isTest">Query against the test index.</param>
/// <param name="scoreThreshold">Threshold for answers returned based
/// on score.</param>
/// <param name="context">Context object with previous QnA's
/// information.</param>
/// <param name="rankerType">Optional field. Set to 'QuestionOnly' for
/// using a question only Ranker.</param>
/// <param name="strictFilters">Find only answers that contain these
/// metadata.</param>
/// <param name="strictFiltersCompoundOperationType">Optional field.
/// Set to OR for using OR as Operation for Strict Filters. Possible
/// values include: 'AND', 'OR'</param>
public QueryDTO(string qnaId = default(string), string question = default(string), int? top = default(int?), string userId = default(string), bool? isTest = default(bool?), double? scoreThreshold = default(double?), QueryDTOContext context = default(QueryDTOContext), string rankerType = default(string), IList<MetadataDTO> strictFilters = default(IList<MetadataDTO>), string strictFiltersCompoundOperationType = default(string))
{
QnaId = qnaId;
Question = question;
Top = top;
UserId = userId;
IsTest = isTest;
ScoreThreshold = scoreThreshold;
Context = context;
RankerType = rankerType;
StrictFilters = strictFilters;
StrictFiltersCompoundOperationType = strictFiltersCompoundOperationType;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets exact qnaId to fetch from the knowledgebase, this
/// field takes priority over question.
/// </summary>
[JsonProperty(PropertyName = "qnaId")]
public string QnaId { get; set; }
/// <summary>
/// Gets or sets user question to query against the knowledge base.
/// </summary>
[JsonProperty(PropertyName = "question")]
public string Question { get; set; }
/// <summary>
/// Gets or sets max number of answers to be returned for the question.
/// </summary>
[JsonProperty(PropertyName = "top")]
public int? Top { get; set; }
/// <summary>
/// Gets or sets unique identifier for the user.
/// </summary>
[JsonProperty(PropertyName = "userId")]
public string UserId { get; set; }
/// <summary>
/// Gets or sets query against the test index.
/// </summary>
[JsonProperty(PropertyName = "isTest")]
public bool? IsTest { get; set; }
/// <summary>
/// Gets or sets threshold for answers returned based on score.
/// </summary>
[JsonProperty(PropertyName = "scoreThreshold")]
public double? ScoreThreshold { get; set; }
/// <summary>
/// Gets or sets context object with previous QnA's information.
/// </summary>
[JsonProperty(PropertyName = "context")]
public QueryDTOContext Context { get; set; }
/// <summary>
/// Gets or sets optional field. Set to 'QuestionOnly' for using a
/// question only Ranker.
/// </summary>
[JsonProperty(PropertyName = "rankerType")]
public string RankerType { get; set; }
/// <summary>
/// Gets or sets find only answers that contain these metadata.
/// </summary>
[JsonProperty(PropertyName = "strictFilters")]
public IList<MetadataDTO> StrictFilters { get; set; }
/// <summary>
/// Gets or sets optional field. Set to OR for using OR as Operation
/// for Strict Filters. Possible values include: 'AND', 'OR'
/// </summary>
[JsonProperty(PropertyName = "strictFiltersCompoundOperationType")]
public string StrictFiltersCompoundOperationType { get; set; }
}
}