[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / Record.cs
index c1cff2fa9d7653ea77036cb8214c2a405537ad0a..3720b7bed2d129c6434715d737802e6f1476ff80 100644 (file)
@@ -69,12 +69,14 @@ public class Record : CommonBase {
        /**
         * The channel id of the channel pertaining to the logged record. May be a temporary id before
         * the channel has been funded.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Option_ThirtyTwoBytesZ get_channel_id() {
+       public ChannelId get_channel_id() {
                long ret = bindings.Record_get_channel_id(this.ptr);
                GC.KeepAlive(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret);
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
                return ret_hu_conv;
        }
@@ -82,9 +84,11 @@ public class Record : CommonBase {
        /**
         * The channel id of the channel pertaining to the logged record. May be a temporary id before
         * the channel has been funded.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public void set_channel_id(org.ldk.structs.Option_ThirtyTwoBytesZ val) {
-               bindings.Record_set_channel_id(this.ptr, val.ptr);
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.Record_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
                if (this != null) { this.ptrs_to.AddLast(val); };
@@ -172,9 +176,10 @@ public class Record : CommonBase {
         * Constructs a new Record given each field
         * 
         * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+        * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Record of(Level level_arg, byte[] peer_id_arg, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_arg, string args_arg, string module_path_arg, string file_arg, int line_arg) {
-               long ret = bindings.Record_new(level_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_id_arg, 33)), channel_id_arg.ptr, InternalUtils.encodeString(args_arg), InternalUtils.encodeString(module_path_arg), InternalUtils.encodeString(file_arg), line_arg);
+       public static Record of(Level level_arg, byte[] peer_id_arg, org.ldk.structs.ChannelId channel_id_arg, string args_arg, string module_path_arg, string file_arg, int line_arg) {
+               long ret = bindings.Record_new(level_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(peer_id_arg, 33)), channel_id_arg == null ? 0 : channel_id_arg.ptr, InternalUtils.encodeString(args_arg), InternalUtils.encodeString(module_path_arg), InternalUtils.encodeString(file_arg), line_arg);
                GC.KeepAlive(level_arg);
                GC.KeepAlive(peer_id_arg);
                GC.KeepAlive(channel_id_arg);