Map<String, Object?> toJson() { final format = this.format; final url = this.url; return { ...additionalProperties, if (format != null) 'format': format, if (url != null) 'url': url.toString(), }; }