fc1e424979e5efe6f4243f5b02c985418250fd1e
[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 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class RouteHint extends CommonBase {
10         RouteHint(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.RouteHint_free(ptr); }
15         }
16
17         public byte[] get_src_node_id() {
18                 byte[] ret = bindings.RouteHint_get_src_node_id(this.ptr);
19                 return ret;
20         }
21
22         public void set_src_node_id(byte[] val) {
23                 bindings.RouteHint_set_src_node_id(this.ptr, val);
24         }
25
26         public long get_short_channel_id() {
27                 long ret = bindings.RouteHint_get_short_channel_id(this.ptr);
28                 return ret;
29         }
30
31         public void set_short_channel_id(long val) {
32                 bindings.RouteHint_set_short_channel_id(this.ptr, val);
33         }
34
35         public RoutingFees get_fees() {
36                 long ret = bindings.RouteHint_get_fees(this.ptr);
37                 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
38                 ret_hu_conv.ptrs_to.add(this);
39                 return ret_hu_conv;
40         }
41
42         public void set_fees(RoutingFees val) {
43                 bindings.RouteHint_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
44                 this.ptrs_to.add(val);
45         }
46
47         public short get_cltv_expiry_delta() {
48                 short ret = bindings.RouteHint_get_cltv_expiry_delta(this.ptr);
49                 return ret;
50         }
51
52         public void set_cltv_expiry_delta(short val) {
53                 bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
54         }
55
56         public RouteHint clone() {
57                 long ret = bindings.RouteHint_clone(this.ptr);
58                 RouteHint ret_hu_conv = new RouteHint(null, ret);
59                 ret_hu_conv.ptrs_to.add(this);
60                 return ret_hu_conv;
61         }
62
63 }