WebhookRequest constructor

WebhookRequest({
  1. String? detectIntentResponseId,
  2. WebhookRequest_IntentInfo? intentInfo,
  3. PageInfo? pageInfo,
  4. SessionInfo? sessionInfo,
  5. WebhookRequest_FulfillmentInfo? fulfillmentInfo,
  6. Iterable<ResponseMessage>? messages,
  7. Struct? payload,
  8. WebhookRequest_SentimentAnalysisResult? sentimentAnalysisResult,
})

Implementation

factory WebhookRequest({
  $core.String? detectIntentResponseId,
  WebhookRequest_IntentInfo? intentInfo,
  PageInfo? pageInfo,
  SessionInfo? sessionInfo,
  WebhookRequest_FulfillmentInfo? fulfillmentInfo,
  $core.Iterable<$17.ResponseMessage>? messages,
  $16.Struct? payload,
  WebhookRequest_SentimentAnalysisResult? sentimentAnalysisResult,
}) {
  final _result = create();
  if (detectIntentResponseId != null) {
    _result.detectIntentResponseId = detectIntentResponseId;
  }
  if (intentInfo != null) {
    _result.intentInfo = intentInfo;
  }
  if (pageInfo != null) {
    _result.pageInfo = pageInfo;
  }
  if (sessionInfo != null) {
    _result.sessionInfo = sessionInfo;
  }
  if (fulfillmentInfo != null) {
    _result.fulfillmentInfo = fulfillmentInfo;
  }
  if (messages != null) {
    _result.messages.addAll(messages);
  }
  if (payload != null) {
    _result.payload = payload;
  }
  if (sentimentAnalysisResult != null) {
    _result.sentimentAnalysisResult = sentimentAnalysisResult;
  }
  return _result;
}