[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_ThirtyTwoBytesChannelMonitorZ.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_ThirtyTwoBytesChannelMonitorZ : CommonBase {
13         internal TwoTuple_ThirtyTwoBytesChannelMonitorZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_ThirtyTwoBytesChannelMonitorZ() {
15                 if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public byte[] get_a() {
22                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_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 ChannelMonitor get_b() {
33                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_get_b(this.ptr);
34                 GC.KeepAlive(this);
35                 if (ret >= 0 && ret <= 4096) { return null; }
36                 org.ldk.structs.ChannelMonitor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelMonitor(null, ret); }
37                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
38                 return ret_hu_conv;
39         }
40
41         internal long clone_ptr() {
42                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone_ptr(this.ptr);
43                 GC.KeepAlive(this);
44                 return ret;
45         }
46
47         /**
48          * Creates a new tuple which has the same data as `orig`
49          * but with all dynamically-allocated buffers duplicated in new buffers.
50          */
51         public TwoTuple_ThirtyTwoBytesChannelMonitorZ clone() {
52                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone(this.ptr);
53                 GC.KeepAlive(this);
54                 if (ret >= 0 && ret <= 4096) { return null; }
55                 TwoTuple_ThirtyTwoBytesChannelMonitorZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesChannelMonitorZ(null, ret);
56                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
57                 return ret_hu_conv;
58         }
59
60         /**
61          * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
62          */
63         public static TwoTuple_ThirtyTwoBytesChannelMonitorZ of(byte[] a, org.ldk.structs.ChannelMonitor b) {
64                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), b == null ? 0 : b.ptr);
65                 GC.KeepAlive(a);
66                 GC.KeepAlive(b);
67                 if (ret >= 0 && ret <= 4096) { return null; }
68                 TwoTuple_ThirtyTwoBytesChannelMonitorZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesChannelMonitorZ(null, ret);
69                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
70                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); };
71                 return ret_hu_conv;
72         }
73
74 }
75 } } }