[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / FourTuple_OutPointChannelIdCVec_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 FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ : CommonBase {
13         internal FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(object _dummy, long ptr) : base(ptr) { }
14         ~FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ() {
15                 if (ptr != 0) { bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public OutPoint get_a() {
22                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_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 ChannelId get_b() {
34                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
35                 GC.KeepAlive(this);
36                 if (ret >= 0 && ret <= 4096) { return null; }
37                 org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
38                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
39                 return ret_hu_conv;
40         }
41
42         /**
43          * 
44          */
45         public MonitorEvent[] get_c() {
46                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
47                 GC.KeepAlive(this);
48                 if (ret >= 0 && ret <= 4096) { return null; }
49                 int ret_conv_14_len = InternalUtils.getArrayLength(ret);
50                 MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
51                 for (int o = 0; o < ret_conv_14_len; o++) {
52                         long ret_conv_14 = InternalUtils.getU64ArrayElem(ret, o);
53                         org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
54                         if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.AddLast(this); };
55                         ret_conv_14_arr[o] = ret_conv_14_hu_conv;
56                 }
57                 bindings.free_buffer(ret);
58                 return ret_conv_14_arr;
59         }
60
61         /**
62          * 
63          */
64         public byte[] get_d() {
65                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr);
66                 GC.KeepAlive(this);
67                 if (ret >= 0 && ret <= 4096) { return null; }
68                 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
69                 return ret_conv;
70         }
71
72         internal long clone_ptr() {
73                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
74                 GC.KeepAlive(this);
75                 return ret;
76         }
77
78         /**
79          * Creates a new tuple which has the same data as `orig`
80          * but with all dynamically-allocated buffers duplicated in new buffers.
81          */
82         public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ clone() {
83                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
84                 GC.KeepAlive(this);
85                 if (ret >= 0 && ret <= 4096) { return null; }
86                 FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
87                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
88                 return ret_hu_conv;
89         }
90
91         /**
92          * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements.
93          */
94         public static FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b, MonitorEvent[] c, byte[] d) {
95                 long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a.ptr, b.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(c, c_conv_14 => c_conv_14.ptr)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(d, 33)));
96                 GC.KeepAlive(a);
97                 GC.KeepAlive(b);
98                 GC.KeepAlive(c);
99                 GC.KeepAlive(d);
100                 if (ret >= 0 && ret <= 4096) { return null; }
101                 FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
102                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
103                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); };
104                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); };
105                 foreach (MonitorEvent c_conv_14 in c) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(c_conv_14); }; };
106                 return ret_hu_conv;
107         }
108
109 }
110 } } }