[Java] Update auto-generated bindings to 0.0.117
[ldk-java] / src / main / java / org / ldk / structs / Result_CVec_StrZIOErrorZ.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_CVec_StrZIOErrorZ extends CommonBase {
11         private Result_CVec_StrZIOErrorZ(Object _dummy, long ptr) { super(ptr); }
12         protected void finalize() throws Throwable {
13                 if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); } super.finalize();
14         }
15
16         static Result_CVec_StrZIOErrorZ constr_from_ptr(long ptr) {
17                 if (bindings.CResult_CVec_StrZIOErrorZ_is_ok(ptr)) {
18                         return new Result_CVec_StrZIOErrorZ_OK(null, ptr);
19                 } else {
20                         return new Result_CVec_StrZIOErrorZ_Err(null, ptr);
21                 }
22         }
23         public static final class Result_CVec_StrZIOErrorZ_OK extends Result_CVec_StrZIOErrorZ {
24                 public final String[] res;
25                 private Result_CVec_StrZIOErrorZ_OK(Object _dummy, long ptr) {
26                         super(_dummy, ptr);
27                         this.res = bindings.CResult_CVec_StrZIOErrorZ_get_ok(ptr);
28                 }
29         }
30
31         public static final class Result_CVec_StrZIOErrorZ_Err extends Result_CVec_StrZIOErrorZ {
32                 public final IOError err;
33                 private Result_CVec_StrZIOErrorZ_Err(Object _dummy, long ptr) {
34                         super(_dummy, ptr);
35                         this.err = bindings.CResult_CVec_StrZIOErrorZ_get_err(ptr);
36                 }
37         }
38
39         /**
40          * Creates a new CResult_CVec_StrZIOErrorZ in the success state.
41          */
42         public static Result_CVec_StrZIOErrorZ ok(String[] o) {
43                 long ret = bindings.CResult_CVec_StrZIOErrorZ_ok(o);
44                 Reference.reachabilityFence(o);
45                 if (ret >= 0 && ret <= 4096) { return null; }
46                 Result_CVec_StrZIOErrorZ ret_hu_conv = Result_CVec_StrZIOErrorZ.constr_from_ptr(ret);
47                 return ret_hu_conv;
48         }
49
50         /**
51          * Creates a new CResult_CVec_StrZIOErrorZ in the error state.
52          */
53         public static Result_CVec_StrZIOErrorZ err(org.ldk.enums.IOError e) {
54                 long ret = bindings.CResult_CVec_StrZIOErrorZ_err(e);
55                 Reference.reachabilityFence(e);
56                 if (ret >= 0 && ret <= 4096) { return null; }
57                 Result_CVec_StrZIOErrorZ ret_hu_conv = Result_CVec_StrZIOErrorZ.constr_from_ptr(ret);
58                 return ret_hu_conv;
59         }
60
61         /**
62          * Checks if the given object is currently in the success state
63          */
64         public boolean is_ok() {
65                 boolean ret = bindings.CResult_CVec_StrZIOErrorZ_is_ok(this.ptr);
66                 Reference.reachabilityFence(this);
67                 return ret;
68         }
69
70         long clone_ptr() {
71                 long ret = bindings.CResult_CVec_StrZIOErrorZ_clone_ptr(this.ptr);
72                 Reference.reachabilityFence(this);
73                 return ret;
74         }
75
76         /**
77          * Creates a new CResult_CVec_StrZIOErrorZ which has the same data as `orig`
78          * but with all dynamically-allocated buffers duplicated in new buffers.
79          */
80         public Result_CVec_StrZIOErrorZ clone() {
81                 long ret = bindings.CResult_CVec_StrZIOErrorZ_clone(this.ptr);
82                 Reference.reachabilityFence(this);
83                 if (ret >= 0 && ret <= 4096) { return null; }
84                 Result_CVec_StrZIOErrorZ ret_hu_conv = Result_CVec_StrZIOErrorZ.constr_from_ptr(ret);
85                 return ret_hu_conv;
86         }
87
88 }