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