[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.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 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ : CommonBase {
13         internal ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(object _dummy, long ptr) : base(ptr) { }
14         ~ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ() {
15                 if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public OutPoint get_a() {
22                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
23                 GC.KeepAlive(this);
24                 if (ret >= 0 && ret <= 4096) { return null; }
25                 org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
26                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
27                 return ret_hu_conv;
28         }
29
30         /**
31          * 
32          */
33         public MonitorEvent[] get_b() {
34                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
35                 GC.KeepAlive(this);
36                 if (ret >= 0 && ret <= 4096) { return null; }
37                 int ret_conv_14_len = InternalUtils.getArrayLength(ret);
38                 MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
39                 for (int o = 0; o < ret_conv_14_len; o++) {
40                         long ret_conv_14 = InternalUtils.getU64ArrayElem(ret, o);
41                         org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
42                         if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.AddLast(this); };
43                         ret_conv_14_arr[o] = ret_conv_14_hu_conv;
44                 }
45                 bindings.free_buffer(ret);
46                 return ret_conv_14_arr;
47         }
48
49         /**
50          * 
51          */
52         public byte[] get_c() {
53                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
54                 GC.KeepAlive(this);
55                 if (ret >= 0 && ret <= 4096) { return null; }
56                 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
57                 return ret_conv;
58         }
59
60         internal long clone_ptr() {
61                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
62                 GC.KeepAlive(this);
63                 return ret;
64         }
65
66         /**
67          * Creates a new tuple which has the same data as `orig`
68          * but with all dynamically-allocated buffers duplicated in new buffers.
69          */
70         public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() {
71                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
72                 GC.KeepAlive(this);
73                 if (ret >= 0 && ret <= 4096) { return null; }
74                 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
75                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
76                 return ret_hu_conv;
77         }
78
79         /**
80          * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
81          */
82         public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, MonitorEvent[] b, byte[] c) {
83                 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_14 => b_conv_14.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(c, 33)));
84                 GC.KeepAlive(a);
85                 GC.KeepAlive(b);
86                 GC.KeepAlive(c);
87                 if (ret >= 0 && ret <= 4096) { return null; }
88                 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
89                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
90                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); };
91                 foreach (MonitorEvent b_conv_14 in b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_conv_14); }; };
92                 return ret_hu_conv;
93         }
94
95 }
96 } } }