toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var created = this.created;
  var description = this.description;
  var hasDraftWorkflow = this.hasDraftWorkflow;
  var id = this.id;
  var isDefault = this.isDefault;
  var operations = this.operations;
  var projects = this.projects;
  var schemes = this.schemes;
  var statuses = this.statuses;
  var transitions = this.transitions;
  var updated = this.updated;

  final json = <String, Object?>{};
  if (created != null) {
    json[r'created'] = created.toIso8601String();
  }
  json[r'description'] = description;
  json[r'hasDraftWorkflow'] = hasDraftWorkflow;
  json[r'id'] = id.toJson();
  json[r'isDefault'] = isDefault;
  if (operations != null) {
    json[r'operations'] = operations.toJson();
  }
  json[r'projects'] = projects.map((i) => i.toJson()).toList();
  json[r'schemes'] = schemes.map((i) => i.toJson()).toList();
  json[r'statuses'] = statuses.map((i) => i.toJson()).toList();
  json[r'transitions'] = transitions.map((i) => i.toJson()).toList();
  if (updated != null) {
    json[r'updated'] = updated.toIso8601String();
  }
  return json;
}