4fd9a8d1447fa1bc8837c09bc8e66adf1ce58cff
[ldk-java] / ts / structs / QueryChannelRange.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class QueryChannelRange extends CommonBase {
6         QueryChannelRange(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.QueryChannelRange_free(ptr); }
11         }
12
13         public QueryChannelRange clone() {
14                 uint32_t ret = bindings.QueryChannelRange_clone(this.ptr);
15                 QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public byte[] get_chain_hash() {
20                 byte[] ret = bindings.QueryChannelRange_get_chain_hash(this.ptr);
21                 return ret;
22         }
23
24         public void set_chain_hash(byte[] val) {
25                 bindings.QueryChannelRange_set_chain_hash(this.ptr, val);
26         }
27
28         public int get_first_blocknum() {
29                 int ret = bindings.QueryChannelRange_get_first_blocknum(this.ptr);
30                 return ret;
31         }
32
33         public void set_first_blocknum(int val) {
34                 bindings.QueryChannelRange_set_first_blocknum(this.ptr, val);
35         }
36
37         public int get_number_of_blocks() {
38                 int ret = bindings.QueryChannelRange_get_number_of_blocks(this.ptr);
39                 return ret;
40         }
41
42         public void set_number_of_blocks(int val) {
43                 bindings.QueryChannelRange_set_number_of_blocks(this.ptr, val);
44         }
45
46         public static QueryChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) {
47                 uint32_t ret = bindings.QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
48                 QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
49                 return ret_hu_conv;
50         }
51
52         public static Result_QueryChannelRangeDecodeErrorZ constructor_read(byte[] ser) {
53                 uint32_t ret = bindings.QueryChannelRange_read(ser);
54                 Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
55                 return ret_hu_conv;
56         }
57
58         public byte[] write() {
59                 byte[] ret = bindings.QueryChannelRange_write(this.ptr);
60                 return ret;
61         }
62
63 }