80530aa7d5342ffc9bd25e2c4b499d588ab17acd
[ldk-java] / src / main / java / org / ldk / structs / Pong.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 Pong extends CommonBase {
10         Pong(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.Pong_free(ptr); }
15         }
16
17         public short get_byteslen() {
18                 short ret = bindings.Pong_get_byteslen(this.ptr);
19                 return ret;
20         }
21
22         public void set_byteslen(short val) {
23                 bindings.Pong_set_byteslen(this.ptr, val);
24         }
25
26         public static Pong constructor_new(short byteslen_arg) {
27                 long ret = bindings.Pong_new(byteslen_arg);
28                 Pong ret_hu_conv = new Pong(null, ret);
29                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
30                 return ret_hu_conv;
31         }
32
33         public Pong clone() {
34                 long ret = bindings.Pong_clone(this.ptr);
35                 Pong ret_hu_conv = new Pong(null, ret);
36                 ret_hu_conv.ptrs_to.add(this);
37                 return ret_hu_conv;
38         }
39
40         public byte[] write() {
41                 byte[] ret = bindings.Pong_write(this.ptr);
42                 return ret;
43         }
44
45         public static Result_PongDecodeErrorZ constructor_read(byte[] ser) {
46                 long ret = bindings.Pong_read(ser);
47                 Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
48                 return ret_hu_conv;
49         }
50
51 }