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