toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var changelog = this.changelog;
  var editmeta = this.editmeta;
  var expand = this.expand;
  var fields = this.fields;
  var fieldsToInclude = this.fieldsToInclude;
  var id = this.id;
  var key = this.key;
  var names = this.names;
  var operations = this.operations;
  var properties = this.properties;
  var renderedFields = this.renderedFields;
  var schema = this.schema;
  var self = this.self;
  var transitions = this.transitions;
  var versionedRepresentations = this.versionedRepresentations;

  final json = <String, Object?>{};
  if (changelog != null) {
    json[r'changelog'] = changelog.toJson();
  }
  if (editmeta != null) {
    json[r'editmeta'] = editmeta.toJson();
  }
  if (expand != null) {
    json[r'expand'] = expand;
  }
  if (fields != null) {
    json[r'fields'] = fields;
  }
  if (fieldsToInclude != null) {
    json[r'fieldsToInclude'] = fieldsToInclude.toJson();
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (key != null) {
    json[r'key'] = key;
  }
  if (names != null) {
    json[r'names'] = names;
  }
  if (operations != null) {
    json[r'operations'] = operations.toJson();
  }
  if (properties != null) {
    json[r'properties'] = properties;
  }
  if (renderedFields != null) {
    json[r'renderedFields'] = renderedFields;
  }
  if (schema != null) {
    json[r'schema'] = schema;
  }
  if (self != null) {
    json[r'self'] = self;
  }
  json[r'transitions'] = transitions.map((i) => i.toJson()).toList();
  if (versionedRepresentations != null) {
    json[r'versionedRepresentations'] = versionedRepresentations;
  }
  return json;
}