Map<String, dynamic> toJson() { final errorCode = this.errorCode; final message = this.message; return { if (errorCode != null) 'ErrorCode': errorCode, if (message != null) 'Message': message, }; }