1916d9ec1e7e3464f38e77b44505c18bf5c33f8d
[ldk-java] / src / main / java / org / ldk / structs / NodeInfo.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 NodeInfo extends CommonBase {
10         NodeInfo(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.NodeInfo_free(ptr); }
15         }
16
17         public void set_channels(long[] val) {
18                 bindings.NodeInfo_set_channels(this.ptr, val);
19         }
20
21         public RoutingFees get_lowest_inbound_channel_fees() {
22                 long ret = bindings.NodeInfo_get_lowest_inbound_channel_fees(this.ptr);
23                 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
24                 return ret_hu_conv;
25         }
26
27         public void set_lowest_inbound_channel_fees(RoutingFees val) {
28                 bindings.NodeInfo_set_lowest_inbound_channel_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
29                 this.ptrs_to.add(val);
30         }
31
32         public NodeAnnouncementInfo get_announcement_info() {
33                 long ret = bindings.NodeInfo_get_announcement_info(this.ptr);
34                 NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
35                 return ret_hu_conv;
36         }
37
38         // Skipped NodeInfo_set_announcement_info
39         // Skipped NodeInfo_new
40         public byte[] write(NodeInfo obj) {
41                 byte[] ret = bindings.NodeInfo_write(obj == null ? 0 : obj.ptr & ~1);
42                 this.ptrs_to.add(obj);
43                 return ret;
44         }
45
46         public static NodeInfo constructor_read(byte[] ser) {
47                 long ret = bindings.NodeInfo_read(ser);
48                 NodeInfo ret_hu_conv = new NodeInfo(null, ret);
49                 return ret_hu_conv;
50         }
51
52 }