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