Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / UnsignedNodeAnnouncement.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class UnsignedNodeAnnouncement extends CommonBase {
7         UnsignedNodeAnnouncement(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 super.finalize();
11                 bindings.UnsignedNodeAnnouncement_free(ptr);
12         }
13
14         public UnsignedNodeAnnouncement(UnsignedNodeAnnouncement orig) {
15                 super(bindings.UnsignedNodeAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
16                 this.ptrs_to.add(orig);
17         }
18
19         public NodeFeatures get_features(UnsignedNodeAnnouncement this_ptr) {
20                 NodeFeatures ret = new NodeFeatures(null, bindings.UnsignedNodeAnnouncement_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
21                 this.ptrs_to.add(this_ptr);
22                 return ret;
23         }
24
25         // Skipped UnsignedNodeAnnouncement_set_features
26         public int get_timestamp(UnsignedNodeAnnouncement this_ptr) {
27                 int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1);
28                 this.ptrs_to.add(this_ptr);
29                 return ret;
30         }
31
32         public void set_timestamp(UnsignedNodeAnnouncement this_ptr, int val) {
33                 bindings.UnsignedNodeAnnouncement_set_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
34                 this.ptrs_to.add(this_ptr);
35         }
36
37         public byte[] get_node_id(UnsignedNodeAnnouncement this_ptr) {
38                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
39                 this.ptrs_to.add(this_ptr);
40                 return ret;
41         }
42
43         public void set_node_id(UnsignedNodeAnnouncement this_ptr, byte[] val) {
44                 bindings.UnsignedNodeAnnouncement_set_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
45                 this.ptrs_to.add(this_ptr);
46         }
47
48         public byte[] get_rgb(UnsignedNodeAnnouncement this_ptr) {
49                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1);
50                 this.ptrs_to.add(this_ptr);
51                 return ret;
52         }
53
54         public void set_rgb(UnsignedNodeAnnouncement this_ptr, byte[] val) {
55                 bindings.UnsignedNodeAnnouncement_set_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
56                 this.ptrs_to.add(this_ptr);
57         }
58
59         public byte[] get_alias(UnsignedNodeAnnouncement this_ptr) {
60                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1);
61                 this.ptrs_to.add(this_ptr);
62                 return ret;
63         }
64
65         public void set_alias(UnsignedNodeAnnouncement this_ptr, byte[] val) {
66                 bindings.UnsignedNodeAnnouncement_set_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
67                 this.ptrs_to.add(this_ptr);
68         }
69
70         // Skipped UnsignedNodeAnnouncement_set_addresses
71         // Skipped UnsignedNodeAnnouncement_write
72         public UnsignedNodeAnnouncement(byte[] ser) {
73                 super(bindings.UnsignedNodeAnnouncement_read(ser));
74         }
75
76 }