6 namespace org { namespace ldk { namespace structs {
10 * Data of the [`RawBolt11Invoice`] that is encoded in the data part
12 public class RawDataPart : CommonBase {
13 internal RawDataPart(object _dummy, long ptr) : base(ptr) { }
15 if (ptr != 0) { bindings.RawDataPart_free(ptr); }
19 * generation time of the invoice
21 public PositiveTimestamp get_timestamp() {
22 long ret = bindings.RawDataPart_get_timestamp(this.ptr);
24 if (ret >= 0 && ret <= 4096) { return null; }
25 org.ldk.structs.PositiveTimestamp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PositiveTimestamp(null, ret); }
26 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
31 * generation time of the invoice
33 public void set_timestamp(org.ldk.structs.PositiveTimestamp val) {
34 bindings.RawDataPart_set_timestamp(this.ptr, val.ptr);
37 if (this != null) { this.ptrs_to.AddLast(val); };
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.
45 public bool eq(org.ldk.structs.RawDataPart b) {
46 bool ret = bindings.RawDataPart_eq(this.ptr, b.ptr);
49 if (this != null) { this.ptrs_to.AddLast(b); };
53 public override bool Equals(object o) {
54 if (!(o is RawDataPart)) return false;
55 return this.eq((RawDataPart)o);
57 internal long clone_ptr() {
58 long ret = bindings.RawDataPart_clone_ptr(this.ptr);
64 * Creates a copy of the RawDataPart
66 public RawDataPart clone() {
67 long ret = bindings.RawDataPart_clone(this.ptr);
69 if (ret >= 0 && ret <= 4096) { return null; }
70 org.ldk.structs.RawDataPart ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RawDataPart(null, ret); }
71 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
76 * Generates a non-cryptographic 64-bit hash of the RawDataPart.
79 long ret = bindings.RawDataPart_hash(this.ptr);
84 public override int GetHashCode() {
85 return (int)this.hash();