QueryResult constructor
QueryResult({
- String? queryText,
- double? speechRecognitionConfidence,
- String? action,
- Struct? parameters,
- bool? allRequiredParamsPresent,
- String? fulfillmentText,
- Iterable<
Intent_Message> ? fulfillmentMessages, - String? webhookSource,
- Struct? webhookPayload,
- Iterable<
Context> ? outputContexts, - Intent? intent,
- double? intentDetectionConfidence,
- Struct? diagnosticInfo,
- String? languageCode,
- SentimentAnalysisResult? sentimentAnalysisResult,
- KnowledgeAnswers? knowledgeAnswers,
Implementation
factory QueryResult({
$core.String? queryText,
$core.double? speechRecognitionConfidence,
$core.String? action,
$19.Struct? parameters,
$core.bool? allRequiredParamsPresent,
$core.String? fulfillmentText,
$core.Iterable<$6.Intent_Message>? fulfillmentMessages,
$core.String? webhookSource,
$19.Struct? webhookPayload,
$core.Iterable<$5.Context>? outputContexts,
$6.Intent? intent,
$core.double? intentDetectionConfidence,
$19.Struct? diagnosticInfo,
$core.String? languageCode,
SentimentAnalysisResult? sentimentAnalysisResult,
KnowledgeAnswers? knowledgeAnswers,
}) {
final _result = create();
if (queryText != null) {
_result.queryText = queryText;
}
if (speechRecognitionConfidence != null) {
_result.speechRecognitionConfidence = speechRecognitionConfidence;
}
if (action != null) {
_result.action = action;
}
if (parameters != null) {
_result.parameters = parameters;
}
if (allRequiredParamsPresent != null) {
_result.allRequiredParamsPresent = allRequiredParamsPresent;
}
if (fulfillmentText != null) {
_result.fulfillmentText = fulfillmentText;
}
if (fulfillmentMessages != null) {
_result.fulfillmentMessages.addAll(fulfillmentMessages);
}
if (webhookSource != null) {
_result.webhookSource = webhookSource;
}
if (webhookPayload != null) {
_result.webhookPayload = webhookPayload;
}
if (outputContexts != null) {
_result.outputContexts.addAll(outputContexts);
}
if (intent != null) {
_result.intent = intent;
}
if (intentDetectionConfidence != null) {
_result.intentDetectionConfidence = intentDetectionConfidence;
}
if (diagnosticInfo != null) {
_result.diagnosticInfo = diagnosticInfo;
}
if (languageCode != null) {
_result.languageCode = languageCode;
}
if (sentimentAnalysisResult != null) {
_result.sentimentAnalysisResult = sentimentAnalysisResult;
}
if (knowledgeAnswers != null) {
_result.knowledgeAnswers = knowledgeAnswers;
}
return _result;
}