]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/Result_NoneChannelMonitorUpdateErrZ.ts
Merge pull request #56 from TheBlueMatt/main
[ldk-java] / ts / structs / Result_NoneChannelMonitorUpdateErrZ.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
6         private Result_NoneChannelMonitorUpdateErrZ(Object _dummy, long ptr) { super(ptr); }
7         protected void finalize() throws Throwable {
8                 if (ptr != 0) { bindings.CResult_NoneChannelMonitorUpdateErrZ_free(ptr); } super.finalize();
9         }
10
11         static Result_NoneChannelMonitorUpdateErrZ constr_from_ptr(long ptr) {
12                 if (bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(ptr)) {
13                         return new Result_NoneChannelMonitorUpdateErrZ_OK(null, ptr);
14                 } else {
15                         return new Result_NoneChannelMonitorUpdateErrZ_Err(null, ptr);
16                 }
17         }
18         public static final class Result_NoneChannelMonitorUpdateErrZ_OK extends Result_NoneChannelMonitorUpdateErrZ {
19                 private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
20                         super(_dummy, ptr);
21                 }
22         }
23
24         public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
25                 public final ChannelMonitorUpdateErr err;
26                 private Result_NoneChannelMonitorUpdateErrZ_Err(Object _dummy, long ptr) {
27                         super(_dummy, ptr);
28                         this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
29                 }
30         }
31
32         public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() {
33                 number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
34                 Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
35                 return ret_hu_conv;
36         }
37
38         public static Result_NoneChannelMonitorUpdateErrZ constructor_err(ChannelMonitorUpdateErr e) {
39                 number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
40                 Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
41                 return ret_hu_conv;
42         }
43
44         public boolean is_ok() {
45                 boolean ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(this.ptr);
46                 return ret;
47         }
48
49         public number clone_ptr() {
50                 number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(this.ptr);
51                 return ret;
52         }
53
54         public Result_NoneChannelMonitorUpdateErrZ clone() {
55                 number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
56                 Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
57                 return ret_hu_conv;
58         }
59
60 }