toJson method
Implementation
Map<String, dynamic> toJson() {
final name = this.name;
final slotConstraint = this.slotConstraint;
final defaultValueSpec = this.defaultValueSpec;
final description = this.description;
final obfuscationSetting = this.obfuscationSetting;
final priority = this.priority;
final responseCard = this.responseCard;
final sampleUtterances = this.sampleUtterances;
final slotType = this.slotType;
final slotTypeVersion = this.slotTypeVersion;
final valueElicitationPrompt = this.valueElicitationPrompt;
return {
'name': name,
'slotConstraint': slotConstraint.toValue(),
if (defaultValueSpec != null) 'defaultValueSpec': defaultValueSpec,
if (description != null) 'description': description,
if (obfuscationSetting != null)
'obfuscationSetting': obfuscationSetting.toValue(),
if (priority != null) 'priority': priority,
if (responseCard != null) 'responseCard': responseCard,
if (sampleUtterances != null) 'sampleUtterances': sampleUtterances,
if (slotType != null) 'slotType': slotType,
if (slotTypeVersion != null) 'slotTypeVersion': slotTypeVersion,
if (valueElicitationPrompt != null)
'valueElicitationPrompt': valueElicitationPrompt,
};
}