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