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 UpdateAddHTLC extends CommonBase {
10 UpdateAddHTLC(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
17 public byte[] get_channel_id() {
18 byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
22 public void set_channel_id(byte[] val) {
23 bindings.UpdateAddHTLC_set_channel_id(this.ptr, val);
26 public long get_htlc_id() {
27 long ret = bindings.UpdateAddHTLC_get_htlc_id(this.ptr);
31 public void set_htlc_id(long val) {
32 bindings.UpdateAddHTLC_set_htlc_id(this.ptr, val);
35 public long get_amount_msat() {
36 long ret = bindings.UpdateAddHTLC_get_amount_msat(this.ptr);
40 public void set_amount_msat(long val) {
41 bindings.UpdateAddHTLC_set_amount_msat(this.ptr, val);
44 public byte[] get_payment_hash() {
45 byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this.ptr);
49 public void set_payment_hash(byte[] val) {
50 bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val);
53 public int get_cltv_expiry() {
54 int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this.ptr);
58 public void set_cltv_expiry(int val) {
59 bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
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);
69 public byte[] write() {
70 byte[] ret = bindings.UpdateAddHTLC_write(this.ptr);
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);