Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / TwoTuple_PublicKeyTypeZ.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_PublicKeyTypeZ extends CommonBase {
15         TwoTuple_PublicKeyTypeZ(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_PublicKeyTypeZ_free(ptr); }
20         }
21
22         /**
23          * 
24          */
25         public byte[] get_a() {
26                 byte[] ret = bindings.C2Tuple_PublicKeyTypeZ_get_a(this.ptr);
27                 return ret;
28         }
29
30         /**
31          * 
32          */
33         public Type get_b() {
34                 long ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr);
35                 if (ret >= 0 && ret <= 4096) { return null; }
36                 Type ret_hu_conv = new Type(null, ret);
37                 ret_hu_conv.ptrs_to.add(this);
38                 return ret_hu_conv;
39         }
40
41         /**
42          * Creates a new tuple which has the same data as `orig`
43          * but with all dynamically-allocated buffers duplicated in new buffers.
44          */
45         public TwoTuple_PublicKeyTypeZ clone() {
46                 long ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr);
47                 if (ret >= 0 && ret <= 4096) { return null; }
48                 TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
49                 ret_hu_conv.ptrs_to.add(this);
50                 return ret_hu_conv;
51         }
52
53         /**
54          * Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
55          */
56         public static TwoTuple_PublicKeyTypeZ of(byte[] a, Type b) {
57                 long ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr);
58                 if (ret >= 0 && ret <= 4096) { return null; }
59                 TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret);
60                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
61                 ret_hu_conv.ptrs_to.add(b);
62                 return ret_hu_conv;
63         }
64
65 }