WebhookResponse constructor

WebhookResponse({
  1. String? fulfillmentText,
  2. Iterable<Intent_Message>? fulfillmentMessages,
  3. String? source,
  4. Struct? payload,
  5. Iterable<Context>? outputContexts,
  6. EventInput? followupEventInput,
  7. bool? liveAgentHandoff,
  8. bool? endInteraction,
  9. Iterable<SessionEntityType>? sessionEntityTypes,
})

Implementation

factory WebhookResponse({
  $core.String? fulfillmentText,
  $core.Iterable<$6.Intent_Message>? fulfillmentMessages,
  $core.String? source,
  $19.Struct? payload,
  $core.Iterable<$5.Context>? outputContexts,
  $9.EventInput? followupEventInput,
  $core.bool? liveAgentHandoff,
  $core.bool? endInteraction,
  $core.Iterable<$8.SessionEntityType>? sessionEntityTypes,
}) {
  final _result = create();
  if (fulfillmentText != null) {
    _result.fulfillmentText = fulfillmentText;
  }
  if (fulfillmentMessages != null) {
    _result.fulfillmentMessages.addAll(fulfillmentMessages);
  }
  if (source != null) {
    _result.source = source;
  }
  if (payload != null) {
    _result.payload = payload;
  }
  if (outputContexts != null) {
    _result.outputContexts.addAll(outputContexts);
  }
  if (followupEventInput != null) {
    _result.followupEventInput = followupEventInput;
  }
  if (liveAgentHandoff != null) {
    _result.liveAgentHandoff = liveAgentHandoff;
  }
  if (endInteraction != null) {
    _result.endInteraction = endInteraction;
  }
  if (sessionEntityTypes != null) {
    _result.sessionEntityTypes.addAll(sessionEntityTypes);
  }
  return _result;
}