toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var name = this.name;
  var templateType = this.templateType;
  var body = this.body;
  var description = this.description;
  var labels = this.labels;
  var space = this.space;

  final json = <String, Object?>{};
  json[r'name'] = name;
  json[r'templateType'] = templateType;
  json[r'body'] = body.toJson();
  if (description != null) {
    json[r'description'] = description;
  }
  json[r'labels'] = labels.map((i) => i.toJson()).toList();
  if (space != null) {
    json[r'space'] = space.toJson();
  }
  return json;
}