Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NodeAnnouncementInfo.java
index a44826ab9db858928e0238f22bf0bd838ca5d615..e66841856011c1d41e6d5e849d70bc1eddf835d4 100644 (file)
@@ -23,6 +23,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         */
        public NodeFeatures get_features() {
                long ret = bindings.NodeAnnouncementInfo_get_features(this.ptr);
+               if (ret < 1024) { return null; }
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -100,9 +101,13 @@ public class NodeAnnouncementInfo extends CommonBase {
         * Mostly redundant with the data we store in fields explicitly.
         * Everything else is useful only for sending out for initial routing sync.
         * Not stored if contains excess data to prevent DoS.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
+       @Nullable
        public NodeAnnouncement get_announcement_message() {
                long ret = bindings.NodeAnnouncementInfo_get_announcement_message(this.ptr);
+               if (ret < 1024) { return null; }
                NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -113,8 +118,10 @@ public class NodeAnnouncementInfo extends CommonBase {
         * Mostly redundant with the data we store in fields explicitly.
         * Everything else is useful only for sending out for initial routing sync.
         * Not stored if contains excess data to prevent DoS.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public void set_announcement_message(NodeAnnouncement val) {
+       public void set_announcement_message(@Nullable NodeAnnouncement val) {
                bindings.NodeAnnouncementInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
        }
@@ -124,6 +131,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         */
        public static NodeAnnouncementInfo of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) {
                long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_12 -> addresses_arg_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               if (ret < 1024) { return null; }
                NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(features_arg);
@@ -137,6 +145,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         */
        public NodeAnnouncementInfo clone() {
                long ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
+               if (ret < 1024) { return null; }
                NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -155,6 +164,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         */
        public static Result_NodeAnnouncementInfoDecodeErrorZ read(byte[] ser) {
                long ret = bindings.NodeAnnouncementInfo_read(ser);
+               if (ret < 1024) { return null; }
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }