Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / RetryAttempts.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
8
9
10 /**
11  * Number of attempts to retry payment path failures for an [`Invoice`].
12  * 
13  * Note that this is the number of *path* failures, not full payment retries. For multi-path
14  * payments, if this is less than the total number of paths, we will never even retry all of the
15  * payment's paths.
16  */
17 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
18 public class RetryAttempts extends CommonBase {
19         RetryAttempts(Object _dummy, long ptr) { super(ptr); }
20         @Override @SuppressWarnings("deprecation")
21         protected void finalize() throws Throwable {
22                 super.finalize();
23                 if (ptr != 0) { bindings.RetryAttempts_free(ptr); }
24         }
25
26         public long get_a() {
27                 long ret = bindings.RetryAttempts_get_a(this.ptr);
28                 return ret;
29         }
30
31         public void set_a(long val) {
32                 bindings.RetryAttempts_set_a(this.ptr, val);
33         }
34
35         /**
36          * Constructs a new RetryAttempts given each field
37          */
38         public static RetryAttempts of(long a_arg) {
39                 long ret = bindings.RetryAttempts_new(a_arg);
40                 if (ret >= 0 && ret <= 4096) { return null; }
41                 RetryAttempts ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RetryAttempts(null, ret); }
42                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
43                 return ret_hu_conv;
44         }
45
46         long clone_ptr() {
47                 long ret = bindings.RetryAttempts_clone_ptr(this.ptr);
48                 return ret;
49         }
50
51         /**
52          * Creates a copy of the RetryAttempts
53          */
54         public RetryAttempts clone() {
55                 long ret = bindings.RetryAttempts_clone(this.ptr);
56                 if (ret >= 0 && ret <= 4096) { return null; }
57                 RetryAttempts ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RetryAttempts(null, ret); }
58                 ret_hu_conv.ptrs_to.add(this);
59                 return ret_hu_conv;
60         }
61
62         /**
63          * Checks if two RetryAttemptss contain equal inner contents.
64          * This ignores pointers and is_owned flags and looks at the values in fields.
65          * Two objects with NULL inner values will be considered "equal" here.
66          */
67         public boolean eq(RetryAttempts b) {
68                 boolean ret = bindings.RetryAttempts_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
69                 this.ptrs_to.add(b);
70                 return ret;
71         }
72
73         /**
74          * Checks if two RetryAttemptss contain equal inner contents.
75          */
76         public long hash() {
77                 long ret = bindings.RetryAttempts_hash(this.ptr);
78                 return ret;
79         }
80
81 }