[C#] Drop reference to `assert` which makes building on Win hard
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_PublicKeyCOption_NetAddressZZ.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_PublicKeyCOption_NetAddressZZ : CommonBase {
13         internal TwoTuple_PublicKeyCOption_NetAddressZZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_PublicKeyCOption_NetAddressZZ() {
15                 if (ptr != 0) { bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public byte[] get_a() {
22                 byte[] ret = bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_get_a(this.ptr);
23                 GC.KeepAlive(this);
24                 return ret;
25         }
26
27         /**
28          * 
29          */
30         public Option_NetAddressZ get_b() {
31                 long ret = bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_get_b(this.ptr);
32                 GC.KeepAlive(this);
33                 if (ret >= 0 && ret <= 4096) { return null; }
34                 org.ldk.structs.Option_NetAddressZ ret_hu_conv = org.ldk.structs.Option_NetAddressZ.constr_from_ptr(ret);
35                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
36                 return ret_hu_conv;
37         }
38
39         internal long clone_ptr() {
40                 long ret = bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_clone_ptr(this.ptr);
41                 GC.KeepAlive(this);
42                 return ret;
43         }
44
45         /**
46          * Creates a new tuple which has the same data as `orig`
47          * but with all dynamically-allocated buffers duplicated in new buffers.
48          */
49         public TwoTuple_PublicKeyCOption_NetAddressZZ clone() {
50                 long ret = bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_clone(this.ptr);
51                 GC.KeepAlive(this);
52                 if (ret >= 0 && ret <= 4096) { return null; }
53                 TwoTuple_PublicKeyCOption_NetAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_NetAddressZZ(null, ret);
54                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
55                 return ret_hu_conv;
56         }
57
58         /**
59          * Creates a new C2Tuple_PublicKeyCOption_NetAddressZZ from the contained elements.
60          */
61         public static TwoTuple_PublicKeyCOption_NetAddressZZ of(byte[] a, org.ldk.structs.Option_NetAddressZ b) {
62                 long ret = bindings.C2Tuple_PublicKeyCOption_NetAddressZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr);
63                 GC.KeepAlive(a);
64                 GC.KeepAlive(b);
65                 if (ret >= 0 && ret <= 4096) { return null; }
66                 TwoTuple_PublicKeyCOption_NetAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_NetAddressZZ(null, ret);
67                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
68                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); };
69                 return ret_hu_conv;
70         }
71
72 }
73 } } }