toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var principal = this.principal;
  var operation = this.operation;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (principal != null) {
    json[r'principal'] = principal.toJson();
  }
  if (operation != null) {
    json[r'operation'] = operation.toJson();
  }
  return json;
}