6 namespace org { namespace ldk { namespace structs {
10 * Features used within an `invoice_request`.
12 public class InvoiceRequestFeatures : CommonBase {
13 internal InvoiceRequestFeatures(object _dummy, long ptr) : base(ptr) { }
14 ~InvoiceRequestFeatures() {
15 if (ptr != 0) { bindings.InvoiceRequestFeatures_free(ptr); }
19 * Checks if two InvoiceRequestFeaturess contain equal inner contents.
20 * This ignores pointers and is_owned flags and looks at the values in fields.
21 * Two objects with NULL inner values will be considered "equal" here.
23 public bool eq(org.ldk.structs.InvoiceRequestFeatures b) {
24 bool ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
27 if (this != null) { this.ptrs_to.AddLast(b); };
31 public override bool Equals(object o) {
32 if (!(o is InvoiceRequestFeatures)) return false;
33 return this.eq((InvoiceRequestFeatures)o);
35 internal long clone_ptr() {
36 long ret = bindings.InvoiceRequestFeatures_clone_ptr(this.ptr);
42 * Creates a copy of the InvoiceRequestFeatures
44 public InvoiceRequestFeatures clone() {
45 long ret = bindings.InvoiceRequestFeatures_clone(this.ptr);
47 if (ret >= 0 && ret <= 4096) { return null; }
48 org.ldk.structs.InvoiceRequestFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFeatures(null, ret); }
49 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
54 * Create a blank Features with no features set
56 public static InvoiceRequestFeatures empty() {
57 long ret = bindings.InvoiceRequestFeatures_empty();
58 if (ret >= 0 && ret <= 4096) { return null; }
59 org.ldk.structs.InvoiceRequestFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFeatures(null, ret); }
60 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
65 * Returns true if this `Features` object contains unknown feature flags which are set as
68 public bool requires_unknown_bits() {
69 bool ret = bindings.InvoiceRequestFeatures_requires_unknown_bits(this.ptr);
75 * Serialize the InvoiceRequestFeatures object into a byte array which can be read by InvoiceRequestFeatures_read
77 public byte[] write() {
78 byte[] ret = bindings.InvoiceRequestFeatures_write(this.ptr);
84 * Read a InvoiceRequestFeatures from a byte array, created by InvoiceRequestFeatures_write
86 public static Result_InvoiceRequestFeaturesDecodeErrorZ read(byte[] ser) {
87 long ret = bindings.InvoiceRequestFeatures_read(ser);
89 if (ret >= 0 && ret <= 4096) { return null; }
90 Result_InvoiceRequestFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFeaturesDecodeErrorZ.constr_from_ptr(ret);