]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java
Merge pull request #5 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / Result_ErrorMessageDecodeErrorZ.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 public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
9         private Result_ErrorMessageDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
10         protected void finalize() throws Throwable {
11                 if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); } super.finalize();
12         }
13
14         static Result_ErrorMessageDecodeErrorZ constr_from_ptr(long ptr) {
15                 if (bindings.LDKCResult_ErrorMessageDecodeErrorZ_result_ok(ptr)) {
16                         return new Result_ErrorMessageDecodeErrorZ_OK(null, ptr);
17                 } else {
18                         return new Result_ErrorMessageDecodeErrorZ_Err(null, ptr);
19                 }
20         }
21         public static final class Result_ErrorMessageDecodeErrorZ_OK extends Result_ErrorMessageDecodeErrorZ {
22                 public final ErrorMessage res;
23                 private Result_ErrorMessageDecodeErrorZ_OK(Object _dummy, long ptr) {
24                         super(_dummy, ptr);
25                         long res = bindings.LDKCResult_ErrorMessageDecodeErrorZ_get_ok(ptr);
26                         ErrorMessage res_hu_conv = new ErrorMessage(null, res);
27                         res_hu_conv.ptrs_to.add(this);
28                         this.res = res_hu_conv;
29                 }
30                 public Result_ErrorMessageDecodeErrorZ_OK(ErrorMessage res) {
31                         this(null, bindings.CResult_ErrorMessageDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
32                         this.ptrs_to.add(res);
33                 }
34         }
35
36         public static final class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDecodeErrorZ {
37                 public final DecodeError err;
38                 private Result_ErrorMessageDecodeErrorZ_Err(Object _dummy, long ptr) {
39                         super(_dummy, ptr);
40                         long err = bindings.LDKCResult_ErrorMessageDecodeErrorZ_get_err(ptr);
41                         DecodeError err_hu_conv = new DecodeError(null, err);
42                         err_hu_conv.ptrs_to.add(this);
43                         this.err = err_hu_conv;
44                 }
45                 public Result_ErrorMessageDecodeErrorZ_Err(DecodeError err) {
46                         this(null, bindings.CResult_ErrorMessageDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
47                         this.ptrs_to.add(err);
48                 }
49         }
50 }