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,
Implementation
factory QueryResult({
$core.String? queryText,
$core.double? speechRecognitionConfidence,
$core.String? action,
$18.Struct? parameters,
$core.bool? allRequiredParamsPresent,
$core.String? fulfillmentText,
$core.Iterable<$5.Intent_Message>? fulfillmentMessages,
$core.String? webhookSource,
$18.Struct? webhookPayload,
$core.Iterable<$4.Context>? outputContexts,
$5.Intent? intent,
$core.double? intentDetectionConfidence,
$18.Struct? diagnosticInfo,
$core.String? languageCode,
SentimentAnalysisResult? sentimentAnalysisResult,
}) {
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;
}
return _result;
}