Merge pull request #33 from TheBlueMatt/main
[ldk-java] / src / main / java / org / ldk / structs / MonitorUpdateError.java
index b6589a9feaf8b32ebe938024c88ad18143a82326..63fdecb5056b498025099fac196bb5de50b1b3ef 100644 (file)
@@ -4,7 +4,16 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
+
+/**
+ * General Err type for ChannelMonitor actions. Generally, this implies that the data provided is
+ * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this
+ * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was
+ * corrupted.
+ * Contains a developer-readable error message.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class MonitorUpdateError extends CommonBase {
        MonitorUpdateError(Object _dummy, long ptr) { super(ptr); }
@@ -14,4 +23,15 @@ public class MonitorUpdateError extends CommonBase {
                if (ptr != 0) { bindings.MonitorUpdateError_free(ptr); }
        }
 
+       /**
+        * Creates a copy of the MonitorUpdateError
+        */
+       public MonitorUpdateError clone() {
+               long ret = bindings.MonitorUpdateError_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               MonitorUpdateError ret_hu_conv = new MonitorUpdateError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }