[C#] Run tests against release library in determinism CI run
[ldk-java] / src / main / java / org / ldk / structs / Result_TransactionNoneZ.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 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10 public class Result_TransactionNoneZ extends CommonBase {
11         private Result_TransactionNoneZ(Object _dummy, long ptr) { super(ptr); }
12         protected void finalize() throws Throwable {
13                 if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize();
14         }
15
16         protected void force_free() {
17                 if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); ptr = 0; }
18         }
19
20         static Result_TransactionNoneZ constr_from_ptr(long ptr) {
21                 if (bindings.CResult_TransactionNoneZ_is_ok(ptr)) {
22                         return new Result_TransactionNoneZ_OK(null, ptr);
23                 } else {
24                         return new Result_TransactionNoneZ_Err(null, ptr);
25                 }
26         }
27         public static final class Result_TransactionNoneZ_OK extends Result_TransactionNoneZ {
28                 public final byte[] res;
29                 private Result_TransactionNoneZ_OK(Object _dummy, long ptr) {
30                         super(_dummy, ptr);
31                         this.res = bindings.CResult_TransactionNoneZ_get_ok(ptr);
32                 }
33         }
34
35         public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
36                 private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
37                         super(_dummy, ptr);
38                 }
39         }
40
41         /**
42          * Creates a new CResult_TransactionNoneZ in the success state.
43          */
44         public static Result_TransactionNoneZ ok(byte[] o) {
45                 long ret = bindings.CResult_TransactionNoneZ_ok(o);
46                 Reference.reachabilityFence(o);
47                 if (ret >= 0 && ret <= 4096) { return null; }
48                 Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
49                 return ret_hu_conv;
50         }
51
52         /**
53          * Creates a new CResult_TransactionNoneZ in the error state.
54          */
55         public static Result_TransactionNoneZ err() {
56                 long ret = bindings.CResult_TransactionNoneZ_err();
57                 if (ret >= 0 && ret <= 4096) { return null; }
58                 Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
59                 return ret_hu_conv;
60         }
61
62         /**
63          * Checks if the given object is currently in the success state
64          */
65         public boolean is_ok() {
66                 boolean ret = bindings.CResult_TransactionNoneZ_is_ok(this.ptr);
67                 Reference.reachabilityFence(this);
68                 return ret;
69         }
70
71         long clone_ptr() {
72                 long ret = bindings.CResult_TransactionNoneZ_clone_ptr(this.ptr);
73                 Reference.reachabilityFence(this);
74                 return ret;
75         }
76
77         /**
78          * Creates a new CResult_TransactionNoneZ which has the same data as `orig`
79          * but with all dynamically-allocated buffers duplicated in new buffers.
80          */
81         public Result_TransactionNoneZ clone() {
82                 long ret = bindings.CResult_TransactionNoneZ_clone(this.ptr);
83                 Reference.reachabilityFence(this);
84                 if (ret >= 0 && ret <= 4096) { return null; }
85                 Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
86                 return ret_hu_conv;
87         }
88
89 }