Create structs and traits that are (a bit) more human-friendly!
[ldk-java] / src / main / java / org / ldk / structs / RouteHint.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class RouteHint extends CommonBase {
7         RouteHint(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.RouteHint_free(ptr); super.finalize();
11         }
12
13         public byte[] get_src_node_id(RouteHint this_ptr) {
14                 byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr.ptr & ~1);
15                 this.ptrs_to.add(this_ptr);
16                 return ret;
17         }
18
19         public void set_src_node_id(RouteHint this_ptr, byte[] val) {
20                 bindings.RouteHint_set_src_node_id(this_ptr.ptr & ~1, val);
21                 this.ptrs_to.add(this_ptr);
22         }
23
24         public long get_short_channel_id(RouteHint this_ptr) {
25                 long ret = bindings.RouteHint_get_short_channel_id(this_ptr.ptr & ~1);
26                 this.ptrs_to.add(this_ptr);
27                 return ret;
28         }
29
30         public void set_short_channel_id(RouteHint this_ptr, long val) {
31                 bindings.RouteHint_set_short_channel_id(this_ptr.ptr & ~1, val);
32                 this.ptrs_to.add(this_ptr);
33         }
34
35         public RoutingFees get_fees(RouteHint this_ptr) {
36                 RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr.ptr & ~1));
37                 this.ptrs_to.add(this_ptr);
38                 return ret;
39         }
40
41         public void set_fees(RouteHint this_ptr, RoutingFees val) {
42                 bindings.RouteHint_set_fees(this_ptr.ptr & ~1, val.ptr & ~1);
43                 this.ptrs_to.add(this_ptr);
44                 this.ptrs_to.add(val);
45         }
46
47         public short get_cltv_expiry_delta(RouteHint this_ptr) {
48                 short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr.ptr & ~1);
49                 this.ptrs_to.add(this_ptr);
50                 return ret;
51         }
52
53         public void set_cltv_expiry_delta(RouteHint this_ptr, short val) {
54                 bindings.RouteHint_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
55                 this.ptrs_to.add(this_ptr);
56         }
57
58         public long get_htlc_minimum_msat(RouteHint this_ptr) {
59                 long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr.ptr & ~1);
60                 this.ptrs_to.add(this_ptr);
61                 return ret;
62         }
63
64         public void set_htlc_minimum_msat(RouteHint this_ptr, long val) {
65                 bindings.RouteHint_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
66                 this.ptrs_to.add(this_ptr);
67         }
68
69         public RouteHint(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
70                 super(bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg));
71                 this.ptrs_to.add(fees_arg);
72         }
73
74 }