dc37eda70479f09f133b543e7d0efa3fc0520671
[ldk-java] / ts / structs / GossipTimestampFilter.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class GossipTimestampFilter extends CommonBase {
6         GossipTimestampFilter(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.GossipTimestampFilter_free(ptr); }
11         }
12
13         public GossipTimestampFilter clone() {
14                 uint32_t ret = bindings.GossipTimestampFilter_clone(this.ptr);
15                 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public byte[] get_chain_hash() {
20                 byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
21                 return ret;
22         }
23
24         public void set_chain_hash(byte[] val) {
25                 bindings.GossipTimestampFilter_set_chain_hash(this.ptr, val);
26         }
27
28         public int get_first_timestamp() {
29                 int ret = bindings.GossipTimestampFilter_get_first_timestamp(this.ptr);
30                 return ret;
31         }
32
33         public void set_first_timestamp(int val) {
34                 bindings.GossipTimestampFilter_set_first_timestamp(this.ptr, val);
35         }
36
37         public int get_timestamp_range() {
38                 int ret = bindings.GossipTimestampFilter_get_timestamp_range(this.ptr);
39                 return ret;
40         }
41
42         public void set_timestamp_range(int val) {
43                 bindings.GossipTimestampFilter_set_timestamp_range(this.ptr, val);
44         }
45
46         public static GossipTimestampFilter constructor_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) {
47                 uint32_t ret = bindings.GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg);
48                 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
49                 return ret_hu_conv;
50         }
51
52         public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(byte[] ser) {
53                 uint32_t ret = bindings.GossipTimestampFilter_read(ser);
54                 Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
55                 return ret_hu_conv;
56         }
57
58         public byte[] write() {
59                 byte[] ret = bindings.GossipTimestampFilter_write(this.ptr);
60                 return ret;
61         }
62
63 }