[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_OutPointCVec_MonitorUpdateIdZZ.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_OutPointCVec_MonitorUpdateIdZZ : CommonBase {
13         internal TwoTuple_OutPointCVec_MonitorUpdateIdZZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_OutPointCVec_MonitorUpdateIdZZ() {
15                 if (ptr != 0) { bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public OutPoint get_a() {
22                 long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_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 MonitorUpdateId[] get_b() {
34                 long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(this.ptr);
35                 GC.KeepAlive(this);
36                 if (ret >= 0 && ret <= 4096) { return null; }
37                 int ret_conv_17_len = InternalUtils.getArrayLength(ret);
38                 MonitorUpdateId[] ret_conv_17_arr = new MonitorUpdateId[ret_conv_17_len];
39                 for (int r = 0; r < ret_conv_17_len; r++) {
40                         long ret_conv_17 = InternalUtils.getU64ArrayElem(ret, r);
41                         org.ldk.structs.MonitorUpdateId ret_conv_17_hu_conv = null; if (ret_conv_17 < 0 || ret_conv_17 > 4096) { ret_conv_17_hu_conv = new org.ldk.structs.MonitorUpdateId(null, ret_conv_17); }
42                         if (ret_conv_17_hu_conv != null) { ret_conv_17_hu_conv.ptrs_to.AddLast(this); };
43                         ret_conv_17_arr[r] = ret_conv_17_hu_conv;
44                 }
45                 bindings.free_buffer(ret);
46                 return ret_conv_17_arr;
47         }
48
49         internal long clone_ptr() {
50                 long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone_ptr(this.ptr);
51                 GC.KeepAlive(this);
52                 return ret;
53         }
54
55         /**
56          * Creates a new tuple which has the same data as `orig`
57          * but with all dynamically-allocated buffers duplicated in new buffers.
58          */
59         public TwoTuple_OutPointCVec_MonitorUpdateIdZZ clone() {
60                 long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(this.ptr);
61                 GC.KeepAlive(this);
62                 if (ret >= 0 && ret <= 4096) { return null; }
63                 TwoTuple_OutPointCVec_MonitorUpdateIdZZ ret_hu_conv = new TwoTuple_OutPointCVec_MonitorUpdateIdZZ(null, ret);
64                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
65                 return ret_hu_conv;
66         }
67
68         /**
69          * Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements.
70          */
71         public static TwoTuple_OutPointCVec_MonitorUpdateIdZZ of(org.ldk.structs.OutPoint a, MonitorUpdateId[] b) {
72                 long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0 : a.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(b, b_conv_17 => b_conv_17 == null ? 0 : b_conv_17.ptr)));
73                 GC.KeepAlive(a);
74                 GC.KeepAlive(b);
75                 if (ret >= 0 && ret <= 4096) { return null; }
76                 TwoTuple_OutPointCVec_MonitorUpdateIdZZ ret_hu_conv = new TwoTuple_OutPointCVec_MonitorUpdateIdZZ(null, ret);
77                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
78                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); };
79                 foreach (MonitorUpdateId b_conv_17 in b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_conv_17); }; };
80                 return ret_hu_conv;
81         }
82
83 }
84 } } }