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