Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / Result_CVec_SignatureZNoneZ.java
index b1bc15c9c766fba18d4ae0f26b3c1d6efcd9cadb..335a2d7376aacb39f8041d7f830b41f7273fb62d 100644 (file)
@@ -4,8 +4,8 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Result_CVec_SignatureZNoneZ extends CommonBase {
        private Result_CVec_SignatureZNoneZ(Object _dummy, long ptr) { super(ptr); }
        protected void finalize() throws Throwable {
@@ -25,19 +25,43 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase {
                        super(_dummy, ptr);
                        this.res = bindings.LDKCResult_CVec_SignatureZNoneZ_get_ok(ptr);
                }
-               public Result_CVec_SignatureZNoneZ_OK(byte[][] res) {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_ok(res));
-               }
        }
 
        public static final class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
-               public final byte err;
                private Result_CVec_SignatureZNoneZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_CVec_SignatureZNoneZ_get_err(ptr);
-               }
-               public Result_CVec_SignatureZNoneZ_Err() {
-                       this(null, bindings.CResult_CVec_SignatureZNoneZ_err());
                }
        }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ in the success state.
+        */
+       public static Result_CVec_SignatureZNoneZ ok(byte[][] o) {
+               long ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ in the error state.
+        */
+       public static Result_CVec_SignatureZNoneZ err() {
+               long ret = bindings.CResult_CVec_SignatureZNoneZ_err();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_CVec_SignatureZNoneZ clone() {
+               long ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }