Fix write method generation w/ upstream changes
[ldk-java] / src / main / java / org / ldk / structs / Ping.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class Ping extends CommonBase {
10         Ping(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.Ping_free(ptr); }
15         }
16
17         public static Ping constructor_clone(Ping orig) {
18                 long ret = bindings.Ping_clone(orig == null ? 0 : orig.ptr & ~1);
19                 Ping ret_hu_conv = new Ping(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public short get_ponglen() {
25                 short ret = bindings.Ping_get_ponglen(this.ptr);
26                 return ret;
27         }
28
29         public void set_ponglen(short val) {
30                 bindings.Ping_set_ponglen(this.ptr, val);
31         }
32
33         public short get_byteslen() {
34                 short ret = bindings.Ping_get_byteslen(this.ptr);
35                 return ret;
36         }
37
38         public void set_byteslen(short val) {
39                 bindings.Ping_set_byteslen(this.ptr, val);
40         }
41
42         public static Ping constructor_new(short ponglen_arg, short byteslen_arg) {
43                 long ret = bindings.Ping_new(ponglen_arg, byteslen_arg);
44                 Ping ret_hu_conv = new Ping(null, ret);
45                 return ret_hu_conv;
46         }
47
48         public byte[] write() {
49                 byte[] ret = bindings.Ping_write(this.ptr);
50                 return ret;
51         }
52
53         public static Ping constructor_read(byte[] ser) {
54                 long ret = bindings.Ping_read(ser);
55                 Ping ret_hu_conv = new Ping(null, ret);
56                 return ret_hu_conv;
57         }
58
59 }