Map<String, dynamic> toJson() { return <String, dynamic>{ if (href != null) r'href': href, if (iriTemplate != null) r'iriTemplate': iriTemplate, }; }