6e4afd246d46e7f3b7ac5b11900ea19b1ab486d4
[ldk-java] / src / main / java / org / ldk / structs / UpdateAddHTLC.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 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class UpdateAddHTLC extends CommonBase {
10         UpdateAddHTLC(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
15         }
16
17         public byte[] get_channel_id() {
18                 byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
19                 return ret;
20         }
21
22         public void set_channel_id(byte[] val) {
23                 bindings.UpdateAddHTLC_set_channel_id(this.ptr, val);
24         }
25
26         public long get_htlc_id() {
27                 long ret = bindings.UpdateAddHTLC_get_htlc_id(this.ptr);
28                 return ret;
29         }
30
31         public void set_htlc_id(long val) {
32                 bindings.UpdateAddHTLC_set_htlc_id(this.ptr, val);
33         }
34
35         public long get_amount_msat() {
36                 long ret = bindings.UpdateAddHTLC_get_amount_msat(this.ptr);
37                 return ret;
38         }
39
40         public void set_amount_msat(long val) {
41                 bindings.UpdateAddHTLC_set_amount_msat(this.ptr, val);
42         }
43
44         public byte[] get_payment_hash() {
45                 byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this.ptr);
46                 return ret;
47         }
48
49         public void set_payment_hash(byte[] val) {
50                 bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val);
51         }
52
53         public int get_cltv_expiry() {
54                 int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this.ptr);
55                 return ret;
56         }
57
58         public void set_cltv_expiry(int val) {
59                 bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
60         }
61
62         public UpdateAddHTLC clone() {
63                 long ret = bindings.UpdateAddHTLC_clone(this.ptr);
64                 UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
65                 ret_hu_conv.ptrs_to.add(this);
66                 return ret_hu_conv;
67         }
68
69         public byte[] write() {
70                 byte[] ret = bindings.UpdateAddHTLC_write(this.ptr);
71                 return ret;
72         }
73
74         public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(byte[] ser) {
75                 long ret = bindings.UpdateAddHTLC_read(ser);
76                 Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
77                 return ret_hu_conv;
78         }
79
80 }