QueryResult constructor

QueryResult({
  1. String? queryText,
  2. double? speechRecognitionConfidence,
  3. String? action,
  4. Struct? parameters,
  5. bool? allRequiredParamsPresent,
  6. String? fulfillmentText,
  7. Iterable<Intent_Message>? fulfillmentMessages,
  8. String? webhookSource,
  9. Struct? webhookPayload,
  10. Iterable<Context>? outputContexts,
  11. Intent? intent,
  12. double? intentDetectionConfidence,
  13. Struct? diagnosticInfo,
  14. String? languageCode,
  15. SentimentAnalysisResult? sentimentAnalysisResult,
  16. 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;
}