Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / ReplyShortChannelIdsEnd.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8
9 /**
10  * A reply_short_channel_ids_end message is sent as a reply to a
11  * query_short_channel_ids message. The query recipient makes a best
12  * effort to respond based on their local network view which may not be
13  * a perfect view of the network.
14  */
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class ReplyShortChannelIdsEnd extends CommonBase {
17         ReplyShortChannelIdsEnd(Object _dummy, long ptr) { super(ptr); }
18         @Override @SuppressWarnings("deprecation")
19         protected void finalize() throws Throwable {
20                 super.finalize();
21                 if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
22         }
23
24         /**
25          * The genesis hash of the blockchain that was queried
26          */
27         public byte[] get_chain_hash() {
28                 byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
29                 return ret;
30         }
31
32         /**
33          * The genesis hash of the blockchain that was queried
34          */
35         public void set_chain_hash(byte[] val) {
36                 bindings.ReplyShortChannelIdsEnd_set_chain_hash(this.ptr, val);
37         }
38
39         /**
40          * Indicates if the query recipient maintains up-to-date channel
41          * information for the chain_hash
42          */
43         public boolean get_full_information() {
44                 boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this.ptr);
45                 return ret;
46         }
47
48         /**
49          * Indicates if the query recipient maintains up-to-date channel
50          * information for the chain_hash
51          */
52         public void set_full_information(boolean val) {
53                 bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val);
54         }
55
56         /**
57          * Constructs a new ReplyShortChannelIdsEnd given each field
58          */
59         public static ReplyShortChannelIdsEnd of(byte[] chain_hash_arg, boolean full_information_arg) {
60                 long ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg);
61                 if (ret < 1024) { return null; }
62                 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
63                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
64                 return ret_hu_conv;
65         }
66
67         /**
68          * Creates a copy of the ReplyShortChannelIdsEnd
69          */
70         public ReplyShortChannelIdsEnd clone() {
71                 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
72                 if (ret < 1024) { return null; }
73                 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
74                 ret_hu_conv.ptrs_to.add(this);
75                 return ret_hu_conv;
76         }
77
78         /**
79          * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
80          */
81         public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) {
82                 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
83                 if (ret < 1024) { return null; }
84                 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
85                 return ret_hu_conv;
86         }
87
88         /**
89          * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
90          */
91         public byte[] write() {
92                 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
93                 return ret;
94         }
95
96 }