[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_BestBlockOutputSweeperZ.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_BestBlockOutputSweeperZ : CommonBase {
13         internal TwoTuple_BestBlockOutputSweeperZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_BestBlockOutputSweeperZ() {
15                 if (ptr != 0) { bindings.C2Tuple_BestBlockOutputSweeperZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public BestBlock get_a() {
22                 long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr);
23                 GC.KeepAlive(this);
24                 if (ret >= 0 && ret <= 4096) { return null; }
25                 org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(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 OutputSweeper get_b() {
34                 long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr);
35                 GC.KeepAlive(this);
36                 if (ret >= 0 && ret <= 4096) { return null; }
37                 org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); }
38                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
39                 return ret_hu_conv;
40         }
41
42         /**
43          * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements.
44          */
45         public static TwoTuple_BestBlockOutputSweeperZ of(org.ldk.structs.BestBlock a, BestBlock b_best_block, BroadcasterInterface b_broadcaster, FeeEstimator b_fee_estimator, Option_FilterZ b_chain_data_source, OutputSpender b_output_spender, ChangeDestinationSource b_change_destination_source, KVStore b_kv_store, Logger b_logger) {
46                 long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_new(a.ptr, bindings.OutputSweeper_new(b_best_block.ptr, b_broadcaster.ptr, b_fee_estimator.ptr, b_chain_data_source.ptr, b_output_spender.ptr, b_change_destination_source.ptr, b_kv_store.ptr, b_logger.ptr));
47                 GC.KeepAlive(a);
48                 GC.KeepAlive(b_best_block);
49                 GC.KeepAlive(b_broadcaster);
50                 GC.KeepAlive(b_fee_estimator);
51                 GC.KeepAlive(b_chain_data_source);
52                 GC.KeepAlive(b_output_spender);
53                 GC.KeepAlive(b_change_destination_source);
54                 GC.KeepAlive(b_kv_store);
55                 GC.KeepAlive(b_logger);
56                 if (ret >= 0 && ret <= 4096) { return null; }
57                 TwoTuple_BestBlockOutputSweeperZ ret_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, ret);
58                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
59                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); };
60                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_best_block); };
61                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_broadcaster); };
62                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_fee_estimator); };
63                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_chain_data_source); };
64                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_output_spender); };
65                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_change_destination_source); };
66                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_kv_store); };
67                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_logger); };
68                 return ret_hu_conv;
69         }
70
71 }
72 } } }