Updated bindings
[ldk-java] / src / main / java / org / ldk / structs / ChannelInfo.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 ChannelInfo extends CommonBase {
10         ChannelInfo(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
15         }
16
17         public ChannelFeatures get_features() {
18                 long ret = bindings.ChannelInfo_get_features(this.ptr);
19                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
20                 return ret_hu_conv;
21         }
22
23         public void set_features(ChannelFeatures val) {
24                 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
25                 this.ptrs_to.add(val);
26         }
27
28         public byte[] get_node_one() {
29                 byte[] ret = bindings.ChannelInfo_get_node_one(this.ptr);
30                 return ret;
31         }
32
33         public void set_node_one(byte[] val) {
34                 bindings.ChannelInfo_set_node_one(this.ptr, val);
35         }
36
37         public DirectionalChannelInfo get_one_to_two() {
38                 long ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
39                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
40                 return ret_hu_conv;
41         }
42
43         public void set_one_to_two(DirectionalChannelInfo val) {
44                 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
45                 this.ptrs_to.add(val);
46         }
47
48         public byte[] get_node_two() {
49                 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
50                 return ret;
51         }
52
53         public void set_node_two(byte[] val) {
54                 bindings.ChannelInfo_set_node_two(this.ptr, val);
55         }
56
57         public DirectionalChannelInfo get_two_to_one() {
58                 long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
59                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
60                 return ret_hu_conv;
61         }
62
63         public void set_two_to_one(DirectionalChannelInfo val) {
64                 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
65                 this.ptrs_to.add(val);
66         }
67
68         public ChannelAnnouncement get_announcement_message() {
69                 long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
70                 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
71                 return ret_hu_conv;
72         }
73
74         public void set_announcement_message(ChannelAnnouncement val) {
75                 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
76                 this.ptrs_to.add(val);
77         }
78
79         public byte[] write() {
80                 byte[] ret = bindings.ChannelInfo_write(this.ptr);
81                 return ret;
82         }
83
84         public static ChannelInfo constructor_read(byte[] ser) {
85                 long ret = bindings.ChannelInfo_read(ser);
86                 ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
87                 return ret_hu_conv;
88         }
89
90 }