450aae3b1f043acc50a06db4dd0fc44cd55db5d5
[ldk-java] / ts / structs / UpdateAddHTLC.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class UpdateAddHTLC extends CommonBase {
6         UpdateAddHTLC(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
11         }
12
13         public UpdateAddHTLC clone() {
14                 uint32_t ret = bindings.UpdateAddHTLC_clone(this.ptr);
15                 UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public byte[] get_channel_id() {
20                 byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
21                 return ret;
22         }
23
24         public void set_channel_id(byte[] val) {
25                 bindings.UpdateAddHTLC_set_channel_id(this.ptr, val);
26         }
27
28         public long get_htlc_id() {
29                 long ret = bindings.UpdateAddHTLC_get_htlc_id(this.ptr);
30                 return ret;
31         }
32
33         public void set_htlc_id(long val) {
34                 bindings.UpdateAddHTLC_set_htlc_id(this.ptr, val);
35         }
36
37         public long get_amount_msat() {
38                 long ret = bindings.UpdateAddHTLC_get_amount_msat(this.ptr);
39                 return ret;
40         }
41
42         public void set_amount_msat(long val) {
43                 bindings.UpdateAddHTLC_set_amount_msat(this.ptr, val);
44         }
45
46         public byte[] get_payment_hash() {
47                 byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this.ptr);
48                 return ret;
49         }
50
51         public void set_payment_hash(byte[] val) {
52                 bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val);
53         }
54
55         public int get_cltv_expiry() {
56                 int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this.ptr);
57                 return ret;
58         }
59
60         public void set_cltv_expiry(int val) {
61                 bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
62         }
63
64         public byte[] write() {
65                 byte[] ret = bindings.UpdateAddHTLC_write(this.ptr);
66                 return ret;
67         }
68
69         public static UpdateAddHTLC constructor_read(byte[] ser) {
70                 uint32_t ret = bindings.UpdateAddHTLC_read(ser);
71                 UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
72                 return ret_hu_conv;
73         }
74
75 }