toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var defaultValues = this.defaultValues;
  var description = this.description;
  var fieldId = this.fieldId;
  var jiraSchema = this.jiraSchema;
  var name = this.name;
  var presetValues = this.presetValues;
  var required = this.required;
  var validValues = this.validValues;
  var visible = this.visible;

  final json = <String, Object?>{};
  json[r'defaultValues'] = defaultValues.map((i) => i.toJson()).toList();
  if (description != null) {
    json[r'description'] = description;
  }
  if (fieldId != null) {
    json[r'fieldId'] = fieldId;
  }
  if (jiraSchema != null) {
    json[r'jiraSchema'] = jiraSchema.toJson();
  }
  if (name != null) {
    json[r'name'] = name;
  }
  json[r'presetValues'] = presetValues;
  json[r'required'] = required;
  json[r'validValues'] = validValues.map((i) => i.toJson()).toList();
  json[r'visible'] = visible;
  return json;
}