+ public final static class ParameterError extends PaymentSendFailure {
+ public final APIError parameter_error;
+ private ParameterError(long ptr, bindings.LDKPaymentSendFailure.ParameterError obj) {
+ super(null, ptr);
+ long parameter_error = obj.parameter_error;
+ APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error);
+ parameter_error_hu_conv.ptrs_to.add(this);
+ this.parameter_error = parameter_error_hu_conv;
+ }
+ }
+ public final static class PathParameterError extends PaymentSendFailure {
+ public final Result_NoneAPIErrorZ[] path_parameter_error;
+ private PathParameterError(long ptr, bindings.LDKPaymentSendFailure.PathParameterError obj) {
+ super(null, ptr);
+ long[] path_parameter_error = obj.path_parameter_error;
+ Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error.length];
+ for (int w = 0; w < path_parameter_error.length; w++) {
+ long path_parameter_error_conv_22 = path_parameter_error[w];
+ Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
+ path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
+ }
+ this.path_parameter_error = path_parameter_error_conv_22_arr;
+ }
+ }
+ public final static class AllFailedRetrySafe extends PaymentSendFailure {
+ public final APIError[] all_failed_retry_safe;
+ private AllFailedRetrySafe(long ptr, bindings.LDKPaymentSendFailure.AllFailedRetrySafe obj) {
+ super(null, ptr);
+ long[] all_failed_retry_safe = obj.all_failed_retry_safe;
+ APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe.length];
+ for (int k = 0; k < all_failed_retry_safe.length; k++) {
+ long all_failed_retry_safe_conv_10 = all_failed_retry_safe[k];
+ APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10);
+ all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this);
+ all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv;
+ }
+ this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr;
+ }
+ }
+ public final static class PartialFailure extends PaymentSendFailure {
+ /**
+ * The errors themselves, in the same order as the route hops.
+ */
+ public final Result_NoneAPIErrorZ[] results;
+ /**
+ * If some paths failed without irrevocably committing to the new HTLC(s), this will
+ * contain a [`RouteParameters`] object which can be used to calculate a new route that
+ * will pay all remaining unpaid balance.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable public final RouteParameters failed_paths_retry;
+ /**
+ * The payment id for the payment, which is now at least partially pending.
+ */
+ public final byte[] payment_id;
+ private PartialFailure(long ptr, bindings.LDKPaymentSendFailure.PartialFailure obj) {
+ super(null, ptr);
+ long[] results = obj.results;
+ Result_NoneAPIErrorZ[] results_conv_22_arr = new Result_NoneAPIErrorZ[results.length];
+ for (int w = 0; w < results.length; w++) {
+ long results_conv_22 = results[w];
+ Result_NoneAPIErrorZ results_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(results_conv_22);
+ results_conv_22_arr[w] = results_conv_22_hu_conv;
+ }
+ this.results = results_conv_22_arr;
+ long failed_paths_retry = obj.failed_paths_retry;
+ RouteParameters failed_paths_retry_hu_conv = null; if (failed_paths_retry < 0 || failed_paths_retry > 4096) { failed_paths_retry_hu_conv = new RouteParameters(null, failed_paths_retry); }
+ failed_paths_retry_hu_conv.ptrs_to.add(this);
+ this.failed_paths_retry = failed_paths_retry_hu_conv;
+ this.payment_id = obj.payment_id;
+ }
+ }
+ /**
+ * Creates a copy of the PaymentSendFailure
+ */