Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / InvoiceFeatures.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  * Features used within an invoice.
11  */
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class InvoiceFeatures extends CommonBase {
14         InvoiceFeatures(Object _dummy, long ptr) { super(ptr); }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 super.finalize();
18                 if (ptr != 0) { bindings.InvoiceFeatures_free(ptr); }
19         }
20
21         /**
22          * Creates a copy of the InvoiceFeatures
23          */
24         public InvoiceFeatures clone() {
25                 long ret = bindings.InvoiceFeatures_clone(this.ptr);
26                 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
27                 ret_hu_conv.ptrs_to.add(this);
28                 return ret_hu_conv;
29         }
30
31         /**
32          * Create a blank Features with no features set
33          */
34         public static InvoiceFeatures constructor_empty() {
35                 long ret = bindings.InvoiceFeatures_empty();
36                 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
37                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
38                 return ret_hu_conv;
39         }
40
41         /**
42          * Creates a Features with the bits set which are known by the implementation
43          */
44         public static InvoiceFeatures constructor_known() {
45                 long ret = bindings.InvoiceFeatures_known();
46                 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
47                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
48                 return ret_hu_conv;
49         }
50
51         /**
52          * Serialize the InvoiceFeatures object into a byte array which can be read by InvoiceFeatures_read
53          */
54         public byte[] write() {
55                 byte[] ret = bindings.InvoiceFeatures_write(this.ptr);
56                 return ret;
57         }
58
59         /**
60          * Read a InvoiceFeatures from a byte array, created by InvoiceFeatures_write
61          */
62         public static Result_InvoiceFeaturesDecodeErrorZ constructor_read(byte[] ser) {
63                 long ret = bindings.InvoiceFeatures_read(ser);
64                 Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
65                 return ret_hu_conv;
66         }
67
68 }