1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
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 {
14 if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
17 public int get_last_update() {
18 int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
22 public void set_last_update(int val) {
23 bindings.DirectionalChannelInfo_set_last_update(this.ptr, val);
26 public boolean get_enabled() {
27 boolean ret = bindings.DirectionalChannelInfo_get_enabled(this.ptr);
31 public void set_enabled(boolean val) {
32 bindings.DirectionalChannelInfo_set_enabled(this.ptr, val);
35 public short get_cltv_expiry_delta() {
36 short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this.ptr);
40 public void set_cltv_expiry_delta(short val) {
41 bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this.ptr, val);
44 public long get_htlc_minimum_msat() {
45 long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this.ptr);
49 public void set_htlc_minimum_msat(long val) {
50 bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
53 public ChannelUpdate get_last_update_message() {
54 long ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
55 ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
59 public void set_last_update_message(ChannelUpdate val) {
60 bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
61 this.ptrs_to.add(val);
64 public byte[] write(DirectionalChannelInfo obj) {
65 byte[] ret = bindings.DirectionalChannelInfo_write(obj == null ? 0 : obj.ptr & ~1);
66 this.ptrs_to.add(obj);
70 public static DirectionalChannelInfo constructor_read(byte[] ser) {
71 long ret = bindings.DirectionalChannelInfo_read(ser);
72 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);