Drop old manual implementations of the `Tx{In,Out}` getters
[ldk-java] / src / main / java / org / ldk / structs / TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ.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 java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10
11 /**
12  * A Tuple
13  */
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ extends CommonBase {
16         TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ(Object _dummy, long ptr) { super(ptr); }
17         @Override @SuppressWarnings("deprecation")
18         protected void finalize() throws Throwable {
19                 super.finalize();
20                 if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_free(ptr); }
21         }
22
23         /**
24          * 
25          */
26         public byte[] get_a() {
27                 byte[] ret = bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_a(this.ptr);
28                 Reference.reachabilityFence(this);
29                 return ret;
30         }
31
32         /**
33          * 
34          */
35         public Option_ThirtyTwoBytesZ get_b() {
36                 long ret = bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_b(this.ptr);
37                 Reference.reachabilityFence(this);
38                 if (ret >= 0 && ret <= 4096) { return null; }
39                 org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret);
40                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
41                 return ret_hu_conv;
42         }
43
44         long clone_ptr() {
45                 long ret = bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone_ptr(this.ptr);
46                 Reference.reachabilityFence(this);
47                 return ret;
48         }
49
50         /**
51          * Creates a new tuple which has the same data as `orig`
52          * but with all dynamically-allocated buffers duplicated in new buffers.
53          */
54         public TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ clone() {
55                 long ret = bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone(this.ptr);
56                 Reference.reachabilityFence(this);
57                 if (ret >= 0 && ret <= 4096) { return null; }
58                 TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ(null, ret);
59                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
60                 return ret_hu_conv;
61         }
62
63         /**
64          * Creates a new C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ from the contained elements.
65          */
66         public static TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ of(byte[] a, org.ldk.structs.Option_ThirtyTwoBytesZ b) {
67                 long ret = bindings.C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_new(InternalUtils.check_arr_len(a, 32), b.ptr);
68                 Reference.reachabilityFence(a);
69                 Reference.reachabilityFence(b);
70                 if (ret >= 0 && ret <= 4096) { return null; }
71                 TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ(null, ret);
72                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
73                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
74                 return ret_hu_conv;
75         }
76
77 }