toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var type = this.type;
  var status = this.status;
  var title = this.title;
  var container = this.container;
  var metadata = this.metadata;
  var extensions = this.extensions;
  var version = this.version;

  final json = <String, Object?>{};
  json[r'id'] = id;
  json[r'type'] = type;
  if (status != null) {
    json[r'status'] = status;
  }
  if (title != null) {
    json[r'title'] = title;
  }
  if (container != null) {
    json[r'container'] = container.toJson();
  }
  if (metadata != null) {
    json[r'metadata'] = metadata.toJson();
  }
  if (extensions != null) {
    json[r'extensions'] = extensions;
  }
  json[r'version'] = version.toJson();
  return json;
}