Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / RawDataPart.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 import javax.annotation.Nullable;
8
9
10 /**
11  * Data of the `RawInvoice` that is encoded in the data part
12  */
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class RawDataPart extends CommonBase {
15         RawDataPart(Object _dummy, long ptr) { super(ptr); }
16         @Override @SuppressWarnings("deprecation")
17         protected void finalize() throws Throwable {
18                 super.finalize();
19                 if (ptr != 0) { bindings.RawDataPart_free(ptr); }
20         }
21
22         /**
23          * generation time of the invoice
24          */
25         public PositiveTimestamp get_timestamp() {
26                 long ret = bindings.RawDataPart_get_timestamp(this.ptr);
27                 if (ret >= 0 && ret <= 4096) { return null; }
28                 PositiveTimestamp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new PositiveTimestamp(null, ret); }
29                 ret_hu_conv.ptrs_to.add(this);
30                 return ret_hu_conv;
31         }
32
33         /**
34          * generation time of the invoice
35          */
36         public void set_timestamp(PositiveTimestamp val) {
37                 bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr & ~1);
38         }
39
40         /**
41          * Checks if two RawDataParts contain equal inner contents.
42          * This ignores pointers and is_owned flags and looks at the values in fields.
43          * Two objects with NULL inner values will be considered "equal" here.
44          */
45         public boolean eq(RawDataPart b) {
46                 boolean ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
47                 this.ptrs_to.add(b);
48                 return ret;
49         }
50
51         long clone_ptr() {
52                 long ret = bindings.RawDataPart_clone_ptr(this.ptr);
53                 return ret;
54         }
55
56         /**
57          * Creates a copy of the RawDataPart
58          */
59         public RawDataPart clone() {
60                 long ret = bindings.RawDataPart_clone(this.ptr);
61                 if (ret >= 0 && ret <= 4096) { return null; }
62                 RawDataPart ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RawDataPart(null, ret); }
63                 ret_hu_conv.ptrs_to.add(this);
64                 return ret_hu_conv;
65         }
66
67 }