toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var description = this.description;
  var from = this.from;
  var name = this.name;
  var properties = this.properties;
  var rules = this.rules;
  var screen = this.screen;
  var to = this.to;
  var type = this.type;

  final json = <String, Object?>{};
  if (description != null) {
    json[r'description'] = description;
  }
  json[r'from'] = from;
  json[r'name'] = name;
  if (properties != null) {
    json[r'properties'] = properties;
  }
  if (rules != null) {
    json[r'rules'] = rules.toJson();
  }
  if (screen != null) {
    json[r'screen'] = screen.toJson();
  }
  json[r'to'] = to;
  json[r'type'] = type.value;
  return json;
}