Use AutoCloseable for structs named Locked*
[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                 super.finalize();
11                 bindings.NodeAnnouncementInfo_free(ptr);
12         }
13
14         public NodeFeatures get_features(NodeAnnouncementInfo this_ptr) {
15                 NodeFeatures ret = new NodeFeatures(null, bindings.NodeAnnouncementInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
16                 this.ptrs_to.add(this_ptr);
17                 return ret;
18         }
19
20         // Skipped NodeAnnouncementInfo_set_features
21         public int get_last_update(NodeAnnouncementInfo this_ptr) {
22                 int ret = bindings.NodeAnnouncementInfo_get_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1);
23                 this.ptrs_to.add(this_ptr);
24                 return ret;
25         }
26
27         public void set_last_update(NodeAnnouncementInfo this_ptr, int val) {
28                 bindings.NodeAnnouncementInfo_set_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
29                 this.ptrs_to.add(this_ptr);
30         }
31
32         public byte[] get_rgb(NodeAnnouncementInfo this_ptr) {
33                 byte[] ret = bindings.NodeAnnouncementInfo_get_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1);
34                 this.ptrs_to.add(this_ptr);
35                 return ret;
36         }
37
38         public void set_rgb(NodeAnnouncementInfo this_ptr, byte[] val) {
39                 bindings.NodeAnnouncementInfo_set_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
40                 this.ptrs_to.add(this_ptr);
41         }
42
43         public byte[] get_alias(NodeAnnouncementInfo this_ptr) {
44                 byte[] ret = bindings.NodeAnnouncementInfo_get_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1);
45                 this.ptrs_to.add(this_ptr);
46                 return ret;
47         }
48
49         public void set_alias(NodeAnnouncementInfo this_ptr, byte[] val) {
50                 bindings.NodeAnnouncementInfo_set_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
51                 this.ptrs_to.add(this_ptr);
52         }
53
54         // Skipped NodeAnnouncementInfo_set_addresses
55         public NodeAnnouncement get_announcement_message(NodeAnnouncementInfo this_ptr) {
56                 NodeAnnouncement ret = new NodeAnnouncement(null, bindings.NodeAnnouncementInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
57                 this.ptrs_to.add(this_ptr);
58                 return ret;
59         }
60
61         public void set_announcement_message(NodeAnnouncementInfo this_ptr, NodeAnnouncement val) {
62                 bindings.NodeAnnouncementInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
63                 this.ptrs_to.add(this_ptr);
64                 this.ptrs_to.add(val);
65         }
66
67         // Skipped NodeAnnouncementInfo_new
68         // Skipped NodeAnnouncementInfo_write
69         public NodeAnnouncementInfo(byte[] ser) {
70                 super(bindings.NodeAnnouncementInfo_read(ser));
71         }
72
73 }