[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.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  * An enum which can either contain a crate::c_types::derived::C2Tuple__u1632_u1632Z or not
10  */
11 public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ : CommonBase {
12         protected Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ(object _dummy, long ptr) : base(ptr) { }
13         ~Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ() {
14                 if (ptr != 0) { bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_free(ptr); }
15         }
16
17         internal static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ constr_from_ptr(long ptr) {
18                 long raw_ty = bindings.LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_ty_from_ptr(ptr);
19                 switch (raw_ty) {
20                         case 0: return new Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some(ptr);
21                         case 1: return new Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_None(ptr);
22                         default:
23                                 throw new ArgumentException("Impossible enum variant");
24                 }
25         }
26
27         /** A Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ of type Some */
28         public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some : Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ {
29                 public TwoTuple__u1632_u1632Z some;
30                 internal Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some(long ptr) : base(null, ptr) {
31                         long some = bindings.LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some_get_some(ptr);
32                         TwoTuple__u1632_u1632Z some_hu_conv = new TwoTuple__u1632_u1632Z(null, some);
33                         if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); };
34                         this.some = some_hu_conv;
35                 }
36         }
37         /** A Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ of type None */
38         public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_None : Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ {
39                 internal Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_None(long ptr) : base(null, ptr) {
40                 }
41         }
42         /**
43          * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z
44          */
45         public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ some(org.ldk.structs.TwoTuple__u1632_u1632Z o) {
46                 long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? o.ptr : 0);
47                 GC.KeepAlive(o);
48                 if (ret >= 0 && ret <= 4096) { return null; }
49                 org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret);
50                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
51                 return ret_hu_conv;
52         }
53
54         /**
55          * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing nothing
56          */
57         public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ none() {
58                 long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_none();
59                 if (ret >= 0 && ret <= 4096) { return null; }
60                 org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret);
61                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
62                 return ret_hu_conv;
63         }
64
65 }
66 } } }