[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / UnsignedBolt12Invoice.java
index c9e476580434e026f6433f3b9284036f73a7b5e1..0fcbbe03edcf3a95363d147ee25bafd6900b5281 100644 (file)
@@ -25,6 +25,24 @@ public class UnsignedBolt12Invoice extends CommonBase {
                if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); }
        }
 
+       long clone_ptr() {
+               long ret = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the UnsignedBolt12Invoice
+        */
+       public UnsignedBolt12Invoice clone() {
+               long ret = bindings.UnsignedBolt12Invoice_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UnsignedBolt12Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Returns the [`TaggedHash`] of the invoice to sign.
         */
@@ -94,15 +112,12 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * 
         * [`Offer`]: crate::offers::offer::Offer
         * [`Offer::amount`]: crate::offers::offer::Offer::amount
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.UnsignedBolt12Invoice_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -134,7 +149,10 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * From [`Offer::description`] or [`Refund::description`].
         * 
         * [`Offer::description`]: crate::offers::offer::Offer::description
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.UnsignedBolt12Invoice_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -207,15 +225,12 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * [`Refund`].
         * 
         * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Quantity supported_quantity() {
+       public Option_QuantityZ supported_quantity() {
                long ret = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }