[Java] Update auto-generated Java bindings for 0.0.116
[ldk-java] / src / main / java / org / ldk / structs / ClosureReason.java
index cea9cc6bfb20f16667e65c9fab34851eaae02e6a..23e76e9c6ec30b1eac41c67ef18834629c3732e8 100644 (file)
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
 
 
 /**
- * The reason the channel was closed. See individual variants more details.
+ * The reason the channel was closed. See individual variants for more details.
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class ClosureReason extends CommonBase {
@@ -45,6 +45,9 @@ public class ClosureReason extends CommonBase {
                if (raw_val.getClass() == bindings.LDKClosureReason.OutdatedChannelManager.class) {
                        return new OutdatedChannelManager(ptr, (bindings.LDKClosureReason.OutdatedChannelManager)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKClosureReason.CounterpartyCoopClosedUnfundedChannel.class) {
+                       return new CounterpartyCoopClosedUnfundedChannel(ptr, (bindings.LDKClosureReason.CounterpartyCoopClosedUnfundedChannel)raw_val);
+               }
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
@@ -152,6 +155,15 @@ public class ClosureReason extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * The counterparty requested a cooperative close of a channel that had not been funded yet.
+        * The channel has been immediately closed.
+        */
+       public final static class CounterpartyCoopClosedUnfundedChannel extends ClosureReason {
+               private CounterpartyCoopClosedUnfundedChannel(long ptr, bindings.LDKClosureReason.CounterpartyCoopClosedUnfundedChannel obj) {
+                       super(null, ptr);
+               }
+       }
        long clone_ptr() {
                long ret = bindings.ClosureReason_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -261,6 +273,17 @@ public class ClosureReason extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new CounterpartyCoopClosedUnfundedChannel-variant ClosureReason
+        */
+       public static ClosureReason counterparty_coop_closed_unfunded_channel() {
+               long ret = bindings.ClosureReason_counterparty_coop_closed_unfunded_channel();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Checks if two ClosureReasons contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.