[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / MonitorUpdateId.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
7
8
9 /**
10  * An opaque identifier describing a specific [`Persist`] method call.
11  */
12 public class MonitorUpdateId : CommonBase {
13         internal MonitorUpdateId(object _dummy, long ptr) : base(ptr) { }
14         ~MonitorUpdateId() {
15                 if (ptr != 0) { bindings.MonitorUpdateId_free(ptr); }
16         }
17
18         internal long clone_ptr() {
19                 long ret = bindings.MonitorUpdateId_clone_ptr(this.ptr);
20                 GC.KeepAlive(this);
21                 return ret;
22         }
23
24         /**
25          * Creates a copy of the MonitorUpdateId
26          */
27         public MonitorUpdateId clone() {
28                 long ret = bindings.MonitorUpdateId_clone(this.ptr);
29                 GC.KeepAlive(this);
30                 if (ret >= 0 && ret <= 4096) { return null; }
31                 org.ldk.structs.MonitorUpdateId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.MonitorUpdateId(null, ret); }
32                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
33                 return ret_hu_conv;
34         }
35
36         /**
37          * Generates a non-cryptographic 64-bit hash of the MonitorUpdateId.
38          */
39         public long hash() {
40                 long ret = bindings.MonitorUpdateId_hash(this.ptr);
41                 GC.KeepAlive(this);
42                 return ret;
43         }
44
45         public override int GetHashCode() {
46                 return (int)this.hash();
47         }
48         /**
49          * Checks if two MonitorUpdateIds contain equal inner contents.
50          * This ignores pointers and is_owned flags and looks at the values in fields.
51          * Two objects with NULL inner values will be considered "equal" here.
52          */
53         public bool eq(org.ldk.structs.MonitorUpdateId b) {
54                 bool ret = bindings.MonitorUpdateId_eq(this.ptr, b.ptr);
55                 GC.KeepAlive(this);
56                 GC.KeepAlive(b);
57                 if (this != null) { this.ptrs_to.AddLast(b); };
58                 return ret;
59         }
60
61         public override bool Equals(object o) {
62                 if (!(o is MonitorUpdateId)) return false;
63                 return this.eq((MonitorUpdateId)o);
64         }
65 }
66 } } }