Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / UpdateFailHTLC.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  * An update_fail_htlc message to be sent or received from a peer
11  */
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class UpdateFailHTLC extends CommonBase {
14         UpdateFailHTLC(Object _dummy, long ptr) { super(ptr); }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 super.finalize();
18                 if (ptr != 0) { bindings.UpdateFailHTLC_free(ptr); }
19         }
20
21         /**
22          * The channel ID
23          */
24         public byte[] get_channel_id() {
25                 byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
26                 return ret;
27         }
28
29         /**
30          * The channel ID
31          */
32         public void set_channel_id(byte[] val) {
33                 bindings.UpdateFailHTLC_set_channel_id(this.ptr, val);
34         }
35
36         /**
37          * The HTLC ID
38          */
39         public long get_htlc_id() {
40                 long ret = bindings.UpdateFailHTLC_get_htlc_id(this.ptr);
41                 return ret;
42         }
43
44         /**
45          * The HTLC ID
46          */
47         public void set_htlc_id(long val) {
48                 bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
49         }
50
51         /**
52          * Creates a copy of the UpdateFailHTLC
53          */
54         public UpdateFailHTLC clone() {
55                 long ret = bindings.UpdateFailHTLC_clone(this.ptr);
56                 UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
57                 ret_hu_conv.ptrs_to.add(this);
58                 return ret_hu_conv;
59         }
60
61         /**
62          * Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read
63          */
64         public byte[] write() {
65                 byte[] ret = bindings.UpdateFailHTLC_write(this.ptr);
66                 return ret;
67         }
68
69         /**
70          * Read a UpdateFailHTLC from a byte array, created by UpdateFailHTLC_write
71          */
72         public static Result_UpdateFailHTLCDecodeErrorZ read(byte[] ser) {
73                 long ret = bindings.UpdateFailHTLC_read(ser);
74                 Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
75                 return ret_hu_conv;
76         }
77
78 }