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