Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / UnsignedChannelUpdate.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  * The unsigned part of a channel_update
11  */
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class UnsignedChannelUpdate extends CommonBase {
14         UnsignedChannelUpdate(Object _dummy, long ptr) { super(ptr); }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 super.finalize();
18                 if (ptr != 0) { bindings.UnsignedChannelUpdate_free(ptr); }
19         }
20
21         /**
22          * The genesis hash of the blockchain where the channel is to be opened
23          */
24         public byte[] get_chain_hash() {
25                 byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
26                 return ret;
27         }
28
29         /**
30          * The genesis hash of the blockchain where the channel is to be opened
31          */
32         public void set_chain_hash(byte[] val) {
33                 bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, val);
34         }
35
36         /**
37          * The short channel ID
38          */
39         public long get_short_channel_id() {
40                 long ret = bindings.UnsignedChannelUpdate_get_short_channel_id(this.ptr);
41                 return ret;
42         }
43
44         /**
45          * The short channel ID
46          */
47         public void set_short_channel_id(long val) {
48                 bindings.UnsignedChannelUpdate_set_short_channel_id(this.ptr, val);
49         }
50
51         /**
52          * A strictly monotonic announcement counter, with gaps allowed, specific to this channel
53          */
54         public int get_timestamp() {
55                 int ret = bindings.UnsignedChannelUpdate_get_timestamp(this.ptr);
56                 return ret;
57         }
58
59         /**
60          * A strictly monotonic announcement counter, with gaps allowed, specific to this channel
61          */
62         public void set_timestamp(int val) {
63                 bindings.UnsignedChannelUpdate_set_timestamp(this.ptr, val);
64         }
65
66         /**
67          * Channel flags
68          */
69         public byte get_flags() {
70                 byte ret = bindings.UnsignedChannelUpdate_get_flags(this.ptr);
71                 return ret;
72         }
73
74         /**
75          * Channel flags
76          */
77         public void set_flags(byte val) {
78                 bindings.UnsignedChannelUpdate_set_flags(this.ptr, val);
79         }
80
81         /**
82          * The number of blocks to subtract from incoming HTLC cltv_expiry values
83          */
84         public short get_cltv_expiry_delta() {
85                 short ret = bindings.UnsignedChannelUpdate_get_cltv_expiry_delta(this.ptr);
86                 return ret;
87         }
88
89         /**
90          * The number of blocks to subtract from incoming HTLC cltv_expiry values
91          */
92         public void set_cltv_expiry_delta(short val) {
93                 bindings.UnsignedChannelUpdate_set_cltv_expiry_delta(this.ptr, val);
94         }
95
96         /**
97          * The minimum HTLC size incoming to sender, in milli-satoshi
98          */
99         public long get_htlc_minimum_msat() {
100                 long ret = bindings.UnsignedChannelUpdate_get_htlc_minimum_msat(this.ptr);
101                 return ret;
102         }
103
104         /**
105          * The minimum HTLC size incoming to sender, in milli-satoshi
106          */
107         public void set_htlc_minimum_msat(long val) {
108                 bindings.UnsignedChannelUpdate_set_htlc_minimum_msat(this.ptr, val);
109         }
110
111         /**
112          * The base HTLC fee charged by sender, in milli-satoshi
113          */
114         public int get_fee_base_msat() {
115                 int ret = bindings.UnsignedChannelUpdate_get_fee_base_msat(this.ptr);
116                 return ret;
117         }
118
119         /**
120          * The base HTLC fee charged by sender, in milli-satoshi
121          */
122         public void set_fee_base_msat(int val) {
123                 bindings.UnsignedChannelUpdate_set_fee_base_msat(this.ptr, val);
124         }
125
126         /**
127          * The amount to fee multiplier, in micro-satoshi
128          */
129         public int get_fee_proportional_millionths() {
130                 int ret = bindings.UnsignedChannelUpdate_get_fee_proportional_millionths(this.ptr);
131                 return ret;
132         }
133
134         /**
135          * The amount to fee multiplier, in micro-satoshi
136          */
137         public void set_fee_proportional_millionths(int val) {
138                 bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
139         }
140
141         /**
142          * Creates a copy of the UnsignedChannelUpdate
143          */
144         public UnsignedChannelUpdate clone() {
145                 long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
146                 UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
147                 ret_hu_conv.ptrs_to.add(this);
148                 return ret_hu_conv;
149         }
150
151         /**
152          * Serialize the UnsignedChannelUpdate object into a byte array which can be read by UnsignedChannelUpdate_read
153          */
154         public byte[] write() {
155                 byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
156                 return ret;
157         }
158
159         /**
160          * Read a UnsignedChannelUpdate from a byte array, created by UnsignedChannelUpdate_write
161          */
162         public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_read(byte[] ser) {
163                 long ret = bindings.UnsignedChannelUpdate_read(ser);
164                 Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
165                 return ret_hu_conv;
166         }
167
168 }