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                 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
62                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
63                 return ret_hu_conv;
64         }
65
66         /**
67          * Creates a copy of the ReplyShortChannelIdsEnd
68          */
69         public ReplyShortChannelIdsEnd clone() {
70                 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
71                 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
72                 ret_hu_conv.ptrs_to.add(this);
73                 return ret_hu_conv;
74         }
75
76         /**
77          * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
78          */
79         public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) {
80                 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
81                 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
82                 return ret_hu_conv;
83         }
84
85         /**
86          * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
87          */
88         public byte[] write() {
89                 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
90                 return ret;
91         }
92
93 }