toJson method
Implementation
Map<String, Object?> toJson() {
var allowedValues = this.allowedValues;
var defaultValue = this.defaultValue;
var desc = this.desc;
var example = this.example;
var id = this.id;
var key = this.key;
var name = this.name;
var type = this.type;
var value = this.value;
final json = <String, Object?>{};
json[r'allowedValues'] = allowedValues;
if (defaultValue != null) {
json[r'defaultValue'] = defaultValue;
}
if (desc != null) {
json[r'desc'] = desc;
}
if (example != null) {
json[r'example'] = example;
}
if (id != null) {
json[r'id'] = id;
}
if (key != null) {
json[r'key'] = key;
}
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
if (value != null) {
json[r'value'] = value;
}
return json;
}