Updated bindings
[ldk-java] / src / main / java / org / ldk / structs / Result_ChanKeySignerDecodeErrorZ.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class Result_ChanKeySignerDecodeErrorZ extends CommonBase {
10         private Result_ChanKeySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
11         protected void finalize() throws Throwable {
12                 if (ptr != 0) { bindings.CResult_ChanKeySignerDecodeErrorZ_free(ptr); } super.finalize();
13         }
14
15         static Result_ChanKeySignerDecodeErrorZ constr_from_ptr(long ptr) {
16                 if (bindings.LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(ptr)) {
17                         return new Result_ChanKeySignerDecodeErrorZ_OK(null, ptr);
18                 } else {
19                         return new Result_ChanKeySignerDecodeErrorZ_Err(null, ptr);
20                 }
21         }
22         public static final class Result_ChanKeySignerDecodeErrorZ_OK extends Result_ChanKeySignerDecodeErrorZ {
23                 public final ChannelKeys res;
24                 private Result_ChanKeySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
25                         super(_dummy, ptr);
26                         long res = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(ptr);
27                         ChannelKeys ret_hu_conv = new ChannelKeys(null, res);
28                         ret_hu_conv.ptrs_to.add(this);
29                         this.res = ret_hu_conv;
30                 }
31                 public Result_ChanKeySignerDecodeErrorZ_OK(ChannelKeys res) {
32                         this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr));
33                         this.ptrs_to.add(res);
34                 }
35         }
36
37         public static final class Result_ChanKeySignerDecodeErrorZ_Err extends Result_ChanKeySignerDecodeErrorZ {
38                 public final DecodeError err;
39                 private Result_ChanKeySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
40                         super(_dummy, ptr);
41                         long err = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_err(ptr);
42                         DecodeError err_hu_conv = new DecodeError(null, err);
43                         this.err = err_hu_conv;
44                 }
45                 public Result_ChanKeySignerDecodeErrorZ_Err(DecodeError err) {
46                         this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
47                         this.ptrs_to.add(err);
48                 }
49         }
50 }