Update auto-generated bindings to latest upstream
[ldk-java] / src / main / java / org / ldk / structs / RawInvoice.java
index a63dc0b349a4a9ec608f7423c512cea5b39ab32a..647bab9d8017472059f1008fa854c8b0095fd4d9 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
 
 /**
@@ -27,6 +28,7 @@ public class RawInvoice extends CommonBase {
         */
        public RawDataPart get_data() {
                long ret = bindings.RawInvoice_get_data(this.ptr);
+               if (ret < 1024) { return null; }
                RawDataPart ret_hu_conv = new RawDataPart(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -56,6 +58,7 @@ public class RawInvoice extends CommonBase {
         */
        public RawInvoice clone() {
                long ret = bindings.RawInvoice_clone(this.ptr);
+               if (ret < 1024) { return null; }
                RawInvoice ret_hu_conv = new RawInvoice(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -69,55 +72,94 @@ public class RawInvoice extends CommonBase {
                return ret;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public Sha256 payment_hash() {
                long ret = bindings.RawInvoice_payment_hash(this.ptr);
+               if (ret < 1024) { return null; }
                Sha256 ret_hu_conv = new Sha256(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public Description description() {
                long ret = bindings.RawInvoice_description(this.ptr);
+               if (ret < 1024) { return null; }
                Description ret_hu_conv = new Description(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public PayeePubKey payee_pub_key() {
                long ret = bindings.RawInvoice_payee_pub_key(this.ptr);
+               if (ret < 1024) { return null; }
                PayeePubKey ret_hu_conv = new PayeePubKey(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public Sha256 description_hash() {
                long ret = bindings.RawInvoice_description_hash(this.ptr);
+               if (ret < 1024) { return null; }
                Sha256 ret_hu_conv = new Sha256(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public ExpiryTime expiry_time() {
                long ret = bindings.RawInvoice_expiry_time(this.ptr);
+               if (ret < 1024) { return null; }
                ExpiryTime ret_hu_conv = new ExpiryTime(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public MinFinalCltvExpiry min_final_cltv_expiry() {
                long ret = bindings.RawInvoice_min_final_cltv_expiry(this.ptr);
+               if (ret < 1024) { return null; }
                MinFinalCltvExpiry ret_hu_conv = new MinFinalCltvExpiry(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public byte[] payment_secret() {
                byte[] ret = bindings.RawInvoice_payment_secret(this.ptr);
                return ret;
        }
 
+       /**
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
        public InvoiceFeatures features() {
                long ret = bindings.RawInvoice_features(this.ptr);
+               if (ret < 1024) { return null; }
                InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -137,6 +179,7 @@ public class RawInvoice extends CommonBase {
 
        public Option_u64Z amount_pico_btc() {
                long ret = bindings.RawInvoice_amount_pico_btc(this.ptr);
+               if (ret < 1024) { return null; }
                Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;