[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_ThirtyTwoBytesChannelManagerZ.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_ThirtyTwoBytesChannelManagerZ : CommonBase {
13         internal TwoTuple_ThirtyTwoBytesChannelManagerZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_ThirtyTwoBytesChannelManagerZ() {
15                 if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public byte[] get_a() {
22                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_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 ChannelManager get_b() {
33                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_get_b(this.ptr);
34                 GC.KeepAlive(this);
35                 if (ret >= 0 && ret <= 4096) { return null; }
36                 org.ldk.structs.ChannelManager ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelManager(null, ret); }
37                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
38                 return ret_hu_conv;
39         }
40
41         /**
42          * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
43          */
44         public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, Logger b_logger, EntropySource b_entropy_source, NodeSigner b_node_signer, SignerProvider b_signer_provider, UserConfig b_config, ChainParameters b_params, int b_current_timestamp) {
45                 long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 32)), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr, b_current_timestamp));
46                 GC.KeepAlive(a);
47                 GC.KeepAlive(b_fee_est);
48                 GC.KeepAlive(b_chain_monitor);
49                 GC.KeepAlive(b_tx_broadcaster);
50                 GC.KeepAlive(b_router);
51                 GC.KeepAlive(b_logger);
52                 GC.KeepAlive(b_entropy_source);
53                 GC.KeepAlive(b_node_signer);
54                 GC.KeepAlive(b_signer_provider);
55                 GC.KeepAlive(b_config);
56                 GC.KeepAlive(b_params);
57                 GC.KeepAlive(b_current_timestamp);
58                 if (ret >= 0 && ret <= 4096) { return null; }
59                 TwoTuple_ThirtyTwoBytesChannelManagerZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesChannelManagerZ(null, ret);
60                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
61                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_fee_est); };
62                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_chain_monitor); };
63                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_tx_broadcaster); };
64                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_router); };
65                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_logger); };
66                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_entropy_source); };
67                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_node_signer); };
68                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_signer_provider); };
69                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_config); };
70                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_params); };
71                 return ret_hu_conv;
72         }
73
74 }
75 } } }