QueryResult constructor

QueryResult({
  1. String? text,
  2. String? languageCode,
  3. Struct? parameters,
  4. Iterable<ResponseMessage>? responseMessages,
  5. Iterable<Struct>? webhookPayloads,
  6. Page? currentPage,
  7. @Deprecated('This field is deprecated.') Intent? intent,
  8. @Deprecated('This field is deprecated.') double? intentDetectionConfidence,
  9. Struct? diagnosticInfo,
  10. String? triggerIntent,
  11. String? transcript,
  12. Iterable<Status>? webhookStatuses,
  13. String? triggerEvent,
  14. Match? match,
  15. SentimentAnalysisResult? sentimentAnalysisResult,
})

Implementation

factory QueryResult({
  $core.String? text,
  $core.String? languageCode,
  $16.Struct? parameters,
  $core.Iterable<$17.ResponseMessage>? responseMessages,
  $core.Iterable<$16.Struct>? webhookPayloads,
  $0.Page? currentPage,
  @$core.Deprecated('This field is deprecated.') $7.Intent? intent,
  @$core.Deprecated('This field is deprecated.')
      $core.double? intentDetectionConfidence,
  $16.Struct? diagnosticInfo,
  $core.String? triggerIntent,
  $core.String? transcript,
  $core.Iterable<$25.Status>? webhookStatuses,
  $core.String? triggerEvent,
  Match? match,
  SentimentAnalysisResult? sentimentAnalysisResult,
}) {
  final _result = create();
  if (text != null) {
    _result.text = text;
  }
  if (languageCode != null) {
    _result.languageCode = languageCode;
  }
  if (parameters != null) {
    _result.parameters = parameters;
  }
  if (responseMessages != null) {
    _result.responseMessages.addAll(responseMessages);
  }
  if (webhookPayloads != null) {
    _result.webhookPayloads.addAll(webhookPayloads);
  }
  if (currentPage != null) {
    _result.currentPage = currentPage;
  }
  if (intent != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.intent = intent;
  }
  if (intentDetectionConfidence != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.intentDetectionConfidence = intentDetectionConfidence;
  }
  if (diagnosticInfo != null) {
    _result.diagnosticInfo = diagnosticInfo;
  }
  if (triggerIntent != null) {
    _result.triggerIntent = triggerIntent;
  }
  if (transcript != null) {
    _result.transcript = transcript;
  }
  if (webhookStatuses != null) {
    _result.webhookStatuses.addAll(webhookStatuses);
  }
  if (triggerEvent != null) {
    _result.triggerEvent = triggerEvent;
  }
  if (match != null) {
    _result.match = match;
  }
  if (sentimentAnalysisResult != null) {
    _result.sentimentAnalysisResult = sentimentAnalysisResult;
  }
  return _result;
}