ea8dd2cbe09fcecb04d84c01ab832bcbe7bb57fa
[ldk-java] / src / main / java / org / ldk / structs / HTLCOutputInCommitment.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 HTLCOutputInCommitment extends CommonBase {
10         HTLCOutputInCommitment(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.HTLCOutputInCommitment_free(ptr); }
15         }
16
17         public boolean get_offered() {
18                 boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
19                 return ret;
20         }
21
22         public void set_offered(boolean val) {
23                 bindings.HTLCOutputInCommitment_set_offered(this.ptr, val);
24         }
25
26         public long get_amount_msat() {
27                 long ret = bindings.HTLCOutputInCommitment_get_amount_msat(this.ptr);
28                 return ret;
29         }
30
31         public void set_amount_msat(long val) {
32                 bindings.HTLCOutputInCommitment_set_amount_msat(this.ptr, val);
33         }
34
35         public int get_cltv_expiry() {
36                 int ret = bindings.HTLCOutputInCommitment_get_cltv_expiry(this.ptr);
37                 return ret;
38         }
39
40         public void set_cltv_expiry(int val) {
41                 bindings.HTLCOutputInCommitment_set_cltv_expiry(this.ptr, val);
42         }
43
44         public byte[] get_payment_hash() {
45                 byte[] ret = bindings.HTLCOutputInCommitment_get_payment_hash(this.ptr);
46                 return ret;
47         }
48
49         public void set_payment_hash(byte[] val) {
50                 bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
51         }
52
53         public HTLCOutputInCommitment clone() {
54                 long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
55                 HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
56                 ret_hu_conv.ptrs_to.add(this);
57                 return ret_hu_conv;
58         }
59
60         public byte[] write() {
61                 byte[] ret = bindings.HTLCOutputInCommitment_write(this.ptr);
62                 return ret;
63         }
64
65         public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(byte[] ser) {
66                 long ret = bindings.HTLCOutputInCommitment_read(ser);
67                 Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
68                 return ret_hu_conv;
69         }
70
71 }