toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var fields = this.fields;
  var historyMetadata = this.historyMetadata;
  var properties = this.properties;
  var transition = this.transition;
  var update = this.update;

  final json = <String, Object?>{};
  if (fields != null) {
    json[r'fields'] = fields;
  }
  if (historyMetadata != null) {
    json[r'historyMetadata'] = historyMetadata.toJson();
  }
  json[r'properties'] = properties.map((i) => i.toJson()).toList();
  if (transition != null) {
    json[r'transition'] = transition.toJson();
  }
  if (update != null) {
    json[r'update'] = update;
  }
  return json;
}