@override Object toJson() => { 'endpoint': endpoint, if (httpBody != null) 'httpBody': httpBody!.toJson(), };