Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / Ping.java
index 0f466fa9e2ea6af3b0e2704e6fb9fddb4afdcad1..b852fbaf6ad1f0386ffecc6edd3c4085e4d94915 100644 (file)
@@ -5,6 +5,10 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * A ping message to be sent or received from a peer
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Ping extends CommonBase {
        Ping(Object _dummy, long ptr) { super(ptr); }
@@ -14,24 +18,41 @@ public class Ping extends CommonBase {
                if (ptr != 0) { bindings.Ping_free(ptr); }
        }
 
+       /**
+        * The desired response length
+        */
        public short get_ponglen() {
                short ret = bindings.Ping_get_ponglen(this.ptr);
                return ret;
        }
 
+       /**
+        * The desired response length
+        */
        public void set_ponglen(short val) {
                bindings.Ping_set_ponglen(this.ptr, val);
        }
 
+       /**
+        * The ping packet size.
+        * This field is not sent on the wire. byteslen zeros are sent.
+        */
        public short get_byteslen() {
                short ret = bindings.Ping_get_byteslen(this.ptr);
                return ret;
        }
 
+       /**
+        * The ping packet size.
+        * This field is not sent on the wire. byteslen zeros are sent.
+        */
        public void set_byteslen(short val) {
                bindings.Ping_set_byteslen(this.ptr, val);
        }
 
+       /**
+        * Constructs a new Ping given each field
+        */
        public static Ping constructor_new(short ponglen_arg, short byteslen_arg) {
                long ret = bindings.Ping_new(ponglen_arg, byteslen_arg);
                Ping ret_hu_conv = new Ping(null, ret);
@@ -39,6 +60,9 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Creates a copy of the Ping
+        */
        public Ping clone() {
                long ret = bindings.Ping_clone(this.ptr);
                Ping ret_hu_conv = new Ping(null, ret);
@@ -46,11 +70,17 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Serialize the Ping object into a byte array which can be read by Ping_read
+        */
        public byte[] write() {
                byte[] ret = bindings.Ping_write(this.ptr);
                return ret;
        }
 
+       /**
+        * Read a Ping from a byte array, created by Ping_write
+        */
        public static Result_PingDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.Ping_read(ser);
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);