toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var operation = this.operation;
  var restrictions = this.restrictions;
  var content = this.content;
  var expandable = this.expandable;
  var links = this.links;

  final json = <String, Object?>{};
  json[r'operation'] = operation.value;
  if (restrictions != null) {
    json[r'restrictions'] = restrictions.toJson();
  }
  if (content != null) {
    json[r'content'] = content.toJson();
  }
  json[r'_expandable'] = expandable.toJson();
  json[r'_links'] = links.toJson();
  return json;
}