Clean up assertions, new Clone impls, ThreeBytes
[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 RouteHint(RouteHint orig) {
14                 super(bindings.RouteHint_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public byte[] get_src_node_id(RouteHint this_ptr) {
19                 byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_src_node_id(RouteHint this_ptr, byte[] val) {
25                 bindings.RouteHint_set_src_node_id(this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public long get_short_channel_id(RouteHint this_ptr) {
30                 long ret = bindings.RouteHint_get_short_channel_id(this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_short_channel_id(RouteHint this_ptr, long val) {
36                 bindings.RouteHint_set_short_channel_id(this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public RoutingFees get_fees(RouteHint this_ptr) {
41                 RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr.ptr & ~1));
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_fees(RouteHint this_ptr, RoutingFees val) {
47                 bindings.RouteHint_set_fees(this_ptr.ptr & ~1, val.ptr & ~1);
48                 this.ptrs_to.add(this_ptr);
49                 this.ptrs_to.add(val);
50         }
51
52         public short get_cltv_expiry_delta(RouteHint this_ptr) {
53                 short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr.ptr & ~1);
54                 this.ptrs_to.add(this_ptr);
55                 return ret;
56         }
57
58         public void set_cltv_expiry_delta(RouteHint this_ptr, short val) {
59                 bindings.RouteHint_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
60                 this.ptrs_to.add(this_ptr);
61         }
62
63         public long get_htlc_minimum_msat(RouteHint this_ptr) {
64                 long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr.ptr & ~1);
65                 this.ptrs_to.add(this_ptr);
66                 return ret;
67         }
68
69         public void set_htlc_minimum_msat(RouteHint this_ptr, long val) {
70                 bindings.RouteHint_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
71                 this.ptrs_to.add(this_ptr);
72         }
73
74         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) {
75                 super(bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg));
76                 this.ptrs_to.add(fees_arg);
77         }
78
79 }