0f466fa9e2ea6af3b0e2704e6fb9fddb4afdcad1
[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 short get_ponglen() {
18                 short ret = bindings.Ping_get_ponglen(this.ptr);
19                 return ret;
20         }
21
22         public void set_ponglen(short val) {
23                 bindings.Ping_set_ponglen(this.ptr, val);
24         }
25
26         public short get_byteslen() {
27                 short ret = bindings.Ping_get_byteslen(this.ptr);
28                 return ret;
29         }
30
31         public void set_byteslen(short val) {
32                 bindings.Ping_set_byteslen(this.ptr, val);
33         }
34
35         public static Ping constructor_new(short ponglen_arg, short byteslen_arg) {
36                 long ret = bindings.Ping_new(ponglen_arg, byteslen_arg);
37                 Ping ret_hu_conv = new Ping(null, ret);
38                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
39                 return ret_hu_conv;
40         }
41
42         public Ping clone() {
43                 long ret = bindings.Ping_clone(this.ptr);
44                 Ping ret_hu_conv = new Ping(null, ret);
45                 ret_hu_conv.ptrs_to.add(this);
46                 return ret_hu_conv;
47         }
48
49         public byte[] write() {
50                 byte[] ret = bindings.Ping_write(this.ptr);
51                 return ret;
52         }
53
54         public static Result_PingDecodeErrorZ constructor_read(byte[] ser) {
55                 long ret = bindings.Ping_read(ser);
56                 Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
57                 return ret_hu_conv;
58         }
59
60 }