Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / UserConfig.java
index 6023431786e51d8cbedc56245e0a2c3077ec4f57..2037a9f1e7a94980f88c5f99aeda5902e3d87230 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;
 
 
 /**
@@ -26,7 +27,8 @@ public class UserConfig extends CommonBase {
         */
        public ChannelHandshakeConfig get_own_channel_config() {
                long ret = bindings.UserConfig_get_own_channel_config(this.ptr);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -36,7 +38,6 @@ public class UserConfig extends CommonBase {
         */
        public void set_own_channel_config(ChannelHandshakeConfig val) {
                bindings.UserConfig_set_own_channel_config(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -44,7 +45,8 @@ public class UserConfig extends CommonBase {
         */
        public ChannelHandshakeLimits get_peer_channel_config_limits() {
                long ret = bindings.UserConfig_get_peer_channel_config_limits(this.ptr);
-               ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeLimits(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -54,7 +56,6 @@ public class UserConfig extends CommonBase {
         */
        public void set_peer_channel_config_limits(ChannelHandshakeLimits val) {
                bindings.UserConfig_set_peer_channel_config_limits(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -62,7 +63,8 @@ public class UserConfig extends CommonBase {
         */
        public ChannelConfig get_channel_options() {
                long ret = bindings.UserConfig_get_channel_options(this.ptr);
-               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               ChannelConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -72,7 +74,6 @@ public class UserConfig extends CommonBase {
         */
        public void set_channel_options(ChannelConfig val) {
                bindings.UserConfig_set_channel_options(this.ptr, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(val);
        }
 
        /**
@@ -125,11 +126,9 @@ public class UserConfig extends CommonBase {
         */
        public static UserConfig of(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg, boolean accept_forwards_to_priv_channels_arg) {
                long ret = bindings.UserConfig_new(own_channel_config_arg == null ? 0 : own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg == null ? 0 : peer_channel_config_limits_arg.ptr & ~1, channel_options_arg == null ? 0 : channel_options_arg.ptr & ~1, accept_forwards_to_priv_channels_arg);
-               UserConfig ret_hu_conv = new UserConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UserConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(own_channel_config_arg);
-               ret_hu_conv.ptrs_to.add(peer_channel_config_limits_arg);
-               ret_hu_conv.ptrs_to.add(channel_options_arg);
                return ret_hu_conv;
        }
 
@@ -138,7 +137,8 @@ public class UserConfig extends CommonBase {
         */
        public UserConfig clone() {
                long ret = bindings.UserConfig_clone(this.ptr);
-               UserConfig ret_hu_conv = new UserConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UserConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -148,7 +148,8 @@ public class UserConfig extends CommonBase {
         */
        public static UserConfig with_default() {
                long ret = bindings.UserConfig_default();
-               UserConfig ret_hu_conv = new UserConfig(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UserConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }