Convert slices - requires some machinery to call Release, but otherwise not bad
[ldk-java] / src / main / java / org / ldk / structs / NodeAnnouncementInfo.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class NodeAnnouncementInfo extends CommonBase {
7         NodeAnnouncementInfo(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.NodeAnnouncementInfo_free(ptr); super.finalize();
11         }
12
13         public NodeFeatures get_features(NodeAnnouncementInfo this_ptr) {
14                 NodeFeatures ret = new NodeFeatures(null, bindings.NodeAnnouncementInfo_get_features(this_ptr.ptr & ~1));
15                 this.ptrs_to.add(this_ptr);
16                 return ret;
17         }
18
19         public void set_features(NodeAnnouncementInfo this_ptr, NodeFeatures val) {
20                 bindings.NodeAnnouncementInfo_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 int get_last_update(NodeAnnouncementInfo this_ptr) {
26                 int ret = bindings.NodeAnnouncementInfo_get_last_update(this_ptr.ptr & ~1);
27                 this.ptrs_to.add(this_ptr);
28                 return ret;
29         }
30
31         public void set_last_update(NodeAnnouncementInfo this_ptr, int val) {
32                 bindings.NodeAnnouncementInfo_set_last_update(this_ptr.ptr & ~1, val);
33                 this.ptrs_to.add(this_ptr);
34         }
35
36         public byte[] get_rgb(NodeAnnouncementInfo this_ptr) {
37                 byte[] ret = bindings.NodeAnnouncementInfo_get_rgb(this_ptr.ptr & ~1);
38                 this.ptrs_to.add(this_ptr);
39                 return ret;
40         }
41
42         public void set_rgb(NodeAnnouncementInfo this_ptr, byte[] val) {
43                 bindings.NodeAnnouncementInfo_set_rgb(this_ptr.ptr & ~1, val);
44                 this.ptrs_to.add(this_ptr);
45         }
46
47         public byte[] get_alias(NodeAnnouncementInfo this_ptr) {
48                 byte[] ret = bindings.NodeAnnouncementInfo_get_alias(this_ptr.ptr & ~1);
49                 this.ptrs_to.add(this_ptr);
50                 return ret;
51         }
52
53         public void set_alias(NodeAnnouncementInfo this_ptr, byte[] val) {
54                 bindings.NodeAnnouncementInfo_set_alias(this_ptr.ptr & ~1, val);
55                 this.ptrs_to.add(this_ptr);
56         }
57
58         // Skipped NodeAnnouncementInfo_set_addresses
59         public NodeAnnouncement get_announcement_message(NodeAnnouncementInfo this_ptr) {
60                 NodeAnnouncement ret = new NodeAnnouncement(null, bindings.NodeAnnouncementInfo_get_announcement_message(this_ptr.ptr & ~1));
61                 this.ptrs_to.add(this_ptr);
62                 return ret;
63         }
64
65         public void set_announcement_message(NodeAnnouncementInfo this_ptr, NodeAnnouncement val) {
66                 bindings.NodeAnnouncementInfo_set_announcement_message(this_ptr.ptr & ~1, val.ptr & ~1);
67                 this.ptrs_to.add(this_ptr);
68                 this.ptrs_to.add(val);
69         }
70
71         // Skipped NodeAnnouncementInfo_new
72         // Skipped NodeAnnouncementInfo_write
73         public NodeAnnouncementInfo(byte[] ser) {
74                 super(bindings.NodeAnnouncementInfo_read(ser));
75         }
76
77 }