toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var actorGroup = this.actorGroup;
  var actorUser = this.actorUser;
  var avatarUrl = this.avatarUrl;
  var displayName = this.displayName;
  var id = this.id;
  var name = this.name;
  var type = this.type;

  final json = <String, Object?>{};
  if (actorGroup != null) {
    json[r'actorGroup'] = actorGroup.toJson();
  }
  if (actorUser != null) {
    json[r'actorUser'] = actorUser.toJson();
  }
  if (avatarUrl != null) {
    json[r'avatarUrl'] = avatarUrl;
  }
  if (displayName != null) {
    json[r'displayName'] = displayName;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (type != null) {
    json[r'type'] = type.value;
  }
  return json;
}