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,
})

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;
}