core.Map<core.String, core.dynamic> toJson() => { if (relatedResources != null) 'relatedResources': relatedResources!, };