toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var actors = this.actors;
  var admin = this.admin;
  var currentUserRole = this.currentUserRole;
  var default$ = this.default$;
  var description = this.description;
  var id = this.id;
  var name = this.name;
  var roleConfigurable = this.roleConfigurable;
  var scope = this.scope;
  var self = this.self;
  var translatedName = this.translatedName;

  final json = <String, Object?>{};
  json[r'actors'] = actors.map((i) => i.toJson()).toList();
  json[r'admin'] = admin;
  json[r'currentUserRole'] = currentUserRole;
  json[r'default'] = default$;
  if (description != null) {
    json[r'description'] = description;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  json[r'roleConfigurable'] = roleConfigurable;
  if (scope != null) {
    json[r'scope'] = scope.toJson();
  }
  if (self != null) {
    json[r'self'] = self;
  }
  if (translatedName != null) {
    json[r'translatedName'] = translatedName;
  }
  return json;
}