Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / TwoTuple_BlockHashChannelMonitorZ.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 import javax.annotation.Nullable;
8
9
10 /**
11  * A Tuple
12  */
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase {
15         TwoTuple_BlockHashChannelMonitorZ(Object _dummy, long ptr) { super(ptr); }
16         @Override @SuppressWarnings("deprecation")
17         protected void finalize() throws Throwable {
18                 super.finalize();
19                 if (ptr != 0) { bindings.C2Tuple_BlockHashChannelMonitorZ_free(ptr); }
20         }
21
22         /**
23          * 
24          */
25         public byte[] get_a() {
26                 byte[] ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_a(this.ptr);
27                 return ret;
28         }
29
30         /**
31          * 
32          */
33         public ChannelMonitor get_b() {
34                 long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr);
35                 if (ret >= 0 && ret <= 4096) { return null; }
36                 ChannelMonitor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelMonitor(null, ret); }
37                 ret_hu_conv.ptrs_to.add(this);
38                 return ret_hu_conv;
39         }
40
41         long clone_ptr() {
42                 long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone_ptr(this.ptr);
43                 return ret;
44         }
45
46         /**
47          * Creates a new tuple which has the same data as `orig`
48          * but with all dynamically-allocated buffers duplicated in new buffers.
49          */
50         public TwoTuple_BlockHashChannelMonitorZ clone() {
51                 long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr);
52                 if (ret >= 0 && ret <= 4096) { return null; }
53                 TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
54                 ret_hu_conv.ptrs_to.add(this);
55                 return ret_hu_conv;
56         }
57
58         /**
59          * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements.
60          */
61         public static TwoTuple_BlockHashChannelMonitorZ of(byte[] a, ChannelMonitor b) {
62                 long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr & ~1);
63                 if (ret >= 0 && ret <= 4096) { return null; }
64                 TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret);
65                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
66                 return ret_hu_conv;
67         }
68
69 }