toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final type = this.type;
  final fulfillmentState = this.fulfillmentState;
  final intentName = this.intentName;
  final message = this.message;
  final messageFormat = this.messageFormat;
  final slotToElicit = this.slotToElicit;
  final slots = this.slots;
  return {
    'type': type.toValue(),
    if (fulfillmentState != null)
      'fulfillmentState': fulfillmentState.toValue(),
    if (intentName != null) 'intentName': intentName,
    if (message != null) 'message': message,
    if (messageFormat != null) 'messageFormat': messageFormat.toValue(),
    if (slotToElicit != null) 'slotToElicit': slotToElicit,
    if (slots != null) 'slots': slots,
  };
}