[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_ThirtyTwoBytesPublicKeyZ.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
7
8
9 /**
10  * A Tuple
11  */
12 public class TwoTuple_ThirtyTwoBytesPublicKeyZ : CommonBase {
13         internal TwoTuple_ThirtyTwoBytesPublicKeyZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_ThirtyTwoBytesPublicKeyZ() {
15                 if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public byte[] get_a() {
22                 long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr);
23                 GC.KeepAlive(this);
24                 if (ret >= 0 && ret <= 4096) { return null; }
25                 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
26                 return ret_conv;
27         }
28
29         /**
30          * 
31          */
32         public byte[] get_b() {
33                 long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr);
34                 GC.KeepAlive(this);
35                 if (ret >= 0 && ret <= 4096) { return null; }
36                 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
37                 return ret_conv;
38         }
39
40         internal long clone_ptr() {
41                 long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr);
42                 GC.KeepAlive(this);
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_ThirtyTwoBytesPublicKeyZ clone() {
51                 long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr);
52                 GC.KeepAlive(this);
53                 if (ret >= 0 && ret <= 4096) { return null; }
54                 TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
55                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
56                 return ret_hu_conv;
57         }
58
59         /**
60          * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements.
61          */
62         public static TwoTuple_ThirtyTwoBytesPublicKeyZ of(byte[] a, byte[] b) {
63                 long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 33)));
64                 GC.KeepAlive(a);
65                 GC.KeepAlive(b);
66                 if (ret >= 0 && ret <= 4096) { return null; }
67                 TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
68                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
69                 return ret_hu_conv;
70         }
71
72 }
73 } } }