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