]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/Result_SignedRawInvoiceNoneZ.ts
4e309b2a0456fdeb89eda824cb7a3d453383b53a
[ldk-java] / ts / structs / Result_SignedRawInvoiceNoneZ.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class Result_SignedRawInvoiceNoneZ extends CommonBase {
6         private Result_SignedRawInvoiceNoneZ(Object _dummy, long ptr) { super(ptr); }
7         protected void finalize() throws Throwable {
8                 if (ptr != 0) { bindings.CResult_SignedRawInvoiceNoneZ_free(ptr); } super.finalize();
9         }
10
11         static Result_SignedRawInvoiceNoneZ constr_from_ptr(long ptr) {
12                 if (bindings.LDKCResult_SignedRawInvoiceNoneZ_result_ok(ptr)) {
13                         return new Result_SignedRawInvoiceNoneZ_OK(null, ptr);
14                 } else {
15                         return new Result_SignedRawInvoiceNoneZ_Err(null, ptr);
16                 }
17         }
18         public static final class Result_SignedRawInvoiceNoneZ_OK extends Result_SignedRawInvoiceNoneZ {
19                 public final SignedRawInvoice res;
20                 private Result_SignedRawInvoiceNoneZ_OK(Object _dummy, long ptr) {
21                         super(_dummy, ptr);
22                         number res = bindings.LDKCResult_SignedRawInvoiceNoneZ_get_ok(ptr);
23                         const res_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, res);
24                         res_hu_conv.ptrs_to.add(this);
25                         this.res = res_hu_conv;
26                 }
27         }
28
29         public static final class Result_SignedRawInvoiceNoneZ_Err extends Result_SignedRawInvoiceNoneZ {
30                 private Result_SignedRawInvoiceNoneZ_Err(Object _dummy, long ptr) {
31                         super(_dummy, ptr);
32                 }
33         }
34
35         public static Result_SignedRawInvoiceNoneZ constructor_ok(SignedRawInvoice o) {
36                 number ret = bindings.CResult_SignedRawInvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
37                 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
38                 ret_hu_conv.ptrs_to.add(o);
39                 return ret_hu_conv;
40         }
41
42         public static Result_SignedRawInvoiceNoneZ constructor_err() {
43                 number ret = bindings.CResult_SignedRawInvoiceNoneZ_err();
44                 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
45                 return ret_hu_conv;
46         }
47
48         public Result_SignedRawInvoiceNoneZ clone() {
49                 number ret = bindings.CResult_SignedRawInvoiceNoneZ_clone(this.ptr);
50                 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
51                 return ret_hu_conv;
52         }
53
54 }