Create structs and traits that are (a bit) more human-friendly!
[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
6 public class UpdateAddHTLC extends CommonBase {
7         UpdateAddHTLC(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.UpdateAddHTLC_free(ptr); super.finalize();
11         }
12
13         public UpdateAddHTLC(UpdateAddHTLC orig) {
14                 super(bindings.UpdateAddHTLC_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public byte[] get_channel_id(UpdateAddHTLC this_ptr) {
19                 byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_channel_id(UpdateAddHTLC this_ptr, byte[] val) {
25                 bindings.UpdateAddHTLC_set_channel_id(this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public long get_htlc_id(UpdateAddHTLC this_ptr) {
30                 long ret = bindings.UpdateAddHTLC_get_htlc_id(this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_htlc_id(UpdateAddHTLC this_ptr, long val) {
36                 bindings.UpdateAddHTLC_set_htlc_id(this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public long get_amount_msat(UpdateAddHTLC this_ptr) {
41                 long ret = bindings.UpdateAddHTLC_get_amount_msat(this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_amount_msat(UpdateAddHTLC this_ptr, long val) {
47                 bindings.UpdateAddHTLC_set_amount_msat(this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public byte[] get_payment_hash(UpdateAddHTLC this_ptr) {
52                 byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this_ptr.ptr & ~1);
53                 this.ptrs_to.add(this_ptr);
54                 return ret;
55         }
56
57         public void set_payment_hash(UpdateAddHTLC this_ptr, byte[] val) {
58                 bindings.UpdateAddHTLC_set_payment_hash(this_ptr.ptr & ~1, val);
59                 this.ptrs_to.add(this_ptr);
60         }
61
62         public int get_cltv_expiry(UpdateAddHTLC this_ptr) {
63                 int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this_ptr.ptr & ~1);
64                 this.ptrs_to.add(this_ptr);
65                 return ret;
66         }
67
68         public void set_cltv_expiry(UpdateAddHTLC this_ptr, int val) {
69                 bindings.UpdateAddHTLC_set_cltv_expiry(this_ptr.ptr & ~1, val);
70                 this.ptrs_to.add(this_ptr);
71         }
72
73         // Skipped UpdateAddHTLC_write
74         // Skipped UpdateAddHTLC_read
75 }