Convert slices - requires some machinery to call Release, but otherwise not bad
[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                 bindings.UnsignedNodeAnnouncement_free(ptr); super.finalize();
11         }
12
13         public UnsignedNodeAnnouncement(UnsignedNodeAnnouncement orig) {
14                 super(bindings.UnsignedNodeAnnouncement_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public NodeFeatures get_features(UnsignedNodeAnnouncement this_ptr) {
19                 NodeFeatures ret = new NodeFeatures(null, bindings.UnsignedNodeAnnouncement_get_features(this_ptr.ptr & ~1));
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_features(UnsignedNodeAnnouncement this_ptr, NodeFeatures val) {
25                 bindings.UnsignedNodeAnnouncement_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
26                 this.ptrs_to.add(this_ptr);
27                 this.ptrs_to.add(val);
28         }
29
30         public int get_timestamp(UnsignedNodeAnnouncement this_ptr) {
31                 int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this_ptr.ptr & ~1);
32                 this.ptrs_to.add(this_ptr);
33                 return ret;
34         }
35
36         public void set_timestamp(UnsignedNodeAnnouncement this_ptr, int val) {
37                 bindings.UnsignedNodeAnnouncement_set_timestamp(this_ptr.ptr & ~1, val);
38                 this.ptrs_to.add(this_ptr);
39         }
40
41         public byte[] get_node_id(UnsignedNodeAnnouncement this_ptr) {
42                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this_ptr.ptr & ~1);
43                 this.ptrs_to.add(this_ptr);
44                 return ret;
45         }
46
47         public void set_node_id(UnsignedNodeAnnouncement this_ptr, byte[] val) {
48                 bindings.UnsignedNodeAnnouncement_set_node_id(this_ptr.ptr & ~1, val);
49                 this.ptrs_to.add(this_ptr);
50         }
51
52         public byte[] get_rgb(UnsignedNodeAnnouncement this_ptr) {
53                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this_ptr.ptr & ~1);
54                 this.ptrs_to.add(this_ptr);
55                 return ret;
56         }
57
58         public void set_rgb(UnsignedNodeAnnouncement this_ptr, byte[] val) {
59                 bindings.UnsignedNodeAnnouncement_set_rgb(this_ptr.ptr & ~1, val);
60                 this.ptrs_to.add(this_ptr);
61         }
62
63         public byte[] get_alias(UnsignedNodeAnnouncement this_ptr) {
64                 byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this_ptr.ptr & ~1);
65                 this.ptrs_to.add(this_ptr);
66                 return ret;
67         }
68
69         public void set_alias(UnsignedNodeAnnouncement this_ptr, byte[] val) {
70                 bindings.UnsignedNodeAnnouncement_set_alias(this_ptr.ptr & ~1, val);
71                 this.ptrs_to.add(this_ptr);
72         }
73
74         // Skipped UnsignedNodeAnnouncement_set_addresses
75         // Skipped UnsignedNodeAnnouncement_write
76         public UnsignedNodeAnnouncement(byte[] ser) {
77                 super(bindings.UnsignedNodeAnnouncement_read(ser));
78         }
79
80 }