]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/Result_NoneSemanticErrorZ.ts
Merge pull request #20 from TheBlueMatt/main
[ldk-java] / ts / structs / Result_NoneSemanticErrorZ.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class Result_NoneSemanticErrorZ extends CommonBase {
6         private Result_NoneSemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
7         protected void finalize() throws Throwable {
8                 if (ptr != 0) { bindings.CResult_NoneSemanticErrorZ_free(ptr); } super.finalize();
9         }
10
11         static Result_NoneSemanticErrorZ constr_from_ptr(long ptr) {
12                 if (bindings.LDKCResult_NoneSemanticErrorZ_result_ok(ptr)) {
13                         return new Result_NoneSemanticErrorZ_OK(null, ptr);
14                 } else {
15                         return new Result_NoneSemanticErrorZ_Err(null, ptr);
16                 }
17         }
18         public static final class Result_NoneSemanticErrorZ_OK extends Result_NoneSemanticErrorZ {
19                 private Result_NoneSemanticErrorZ_OK(Object _dummy, long ptr) {
20                         super(_dummy, ptr);
21                 }
22         }
23
24         public static final class Result_NoneSemanticErrorZ_Err extends Result_NoneSemanticErrorZ {
25                 public final SemanticError err;
26                 private Result_NoneSemanticErrorZ_Err(Object _dummy, long ptr) {
27                         super(_dummy, ptr);
28                         this.err = bindings.LDKCResult_NoneSemanticErrorZ_get_err(ptr);
29                 }
30         }
31
32         public static Result_NoneSemanticErrorZ constructor__ok() {
33                 number ret = bindings.CResult_NoneSemanticErrorZ_ok();
34                 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
35                 return ret_hu_conv;
36         }
37
38         public static Result_NoneSemanticErrorZ constructor__err(SemanticError e) {
39                 number ret = bindings.CResult_NoneSemanticErrorZ_err(e);
40                 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
41                 return ret_hu_conv;
42         }
43
44         public Result_NoneSemanticErrorZ _clone() {
45                 number ret = bindings.CResult_NoneSemanticErrorZ_clone(this.ptr);
46                 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
47                 return ret_hu_conv;
48         }
49
50 }