82ec50918f8eda135cfc04f5237de4d8dfdb11b1
[ldk-java] / src / main / java / org / ldk / structs / DirectionalChannelInfo.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 DirectionalChannelInfo extends CommonBase {
10         DirectionalChannelInfo(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
15         }
16
17         public DirectionalChannelInfo clone() {
18                 long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
19                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
20                 ret_hu_conv.ptrs_to.add(this);
21                 return ret_hu_conv;
22         }
23
24         public int get_last_update() {
25                 int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
26                 return ret;
27         }
28
29         public void set_last_update(int val) {
30                 bindings.DirectionalChannelInfo_set_last_update(this.ptr, val);
31         }
32
33         public boolean get_enabled() {
34                 boolean ret = bindings.DirectionalChannelInfo_get_enabled(this.ptr);
35                 return ret;
36         }
37
38         public void set_enabled(boolean val) {
39                 bindings.DirectionalChannelInfo_set_enabled(this.ptr, val);
40         }
41
42         public short get_cltv_expiry_delta() {
43                 short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this.ptr);
44                 return ret;
45         }
46
47         public void set_cltv_expiry_delta(short val) {
48                 bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this.ptr, val);
49         }
50
51         public long get_htlc_minimum_msat() {
52                 long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this.ptr);
53                 return ret;
54         }
55
56         public void set_htlc_minimum_msat(long val) {
57                 bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
58         }
59
60         public RoutingFees get_fees() {
61                 long ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
62                 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
63                 ret_hu_conv.ptrs_to.add(this);
64                 return ret_hu_conv;
65         }
66
67         public void set_fees(RoutingFees val) {
68                 bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
69                 this.ptrs_to.add(val);
70         }
71
72         public ChannelUpdate get_last_update_message() {
73                 long ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
74                 ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
75                 ret_hu_conv.ptrs_to.add(this);
76                 return ret_hu_conv;
77         }
78
79         public void set_last_update_message(ChannelUpdate val) {
80                 bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
81                 this.ptrs_to.add(val);
82         }
83
84         public byte[] write() {
85                 byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr);
86                 return ret;
87         }
88
89         public static DirectionalChannelInfo constructor_read(byte[] ser) {
90                 long ret = bindings.DirectionalChannelInfo_read(ser);
91                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
92                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
93                 return ret_hu_conv;
94         }
95
96 }