toJson method

Map toJson()

Implementation

Map toJson(){
  Map _result = {};

  if (name != null) _result.addAll({"name": name});
  if (id != null) _result.addAll({"id": id});
  if (metadata != null) _result.addAll({"metadata": metadata});
  if (createdAt != null) _result.addAll({"createdAt": createdAt});

  return _result;
}