[Java] Update auto-generated bindings to LDK 0.0.118
[ldk-java] / src / main / java / org / ldk / structs / ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.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 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10
11 /**
12  * A Tuple
13  */
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class ThreeTuple_OnionMessageContentsDestinationBlindedPathZ extends CommonBase {
16         ThreeTuple_OnionMessageContentsDestinationBlindedPathZ(Object _dummy, long ptr) { super(ptr); }
17         @Override @SuppressWarnings("deprecation")
18         protected void finalize() throws Throwable {
19                 super.finalize();
20                 if (ptr != 0) { bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(ptr); }
21         }
22
23         /**
24          * 
25          */
26         public OnionMessageContents get_a() {
27                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_a(this.ptr);
28                 Reference.reachabilityFence(this);
29                 if (ret >= 0 && ret <= 4096) { return null; }
30                 OnionMessageContents ret_hu_conv = new OnionMessageContents(null, ret);
31                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
32                 return ret_hu_conv;
33         }
34
35         /**
36          * 
37          */
38         public Destination get_b() {
39                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_b(this.ptr);
40                 Reference.reachabilityFence(this);
41                 if (ret >= 0 && ret <= 4096) { return null; }
42                 org.ldk.structs.Destination ret_hu_conv = org.ldk.structs.Destination.constr_from_ptr(ret);
43                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
44                 return ret_hu_conv;
45         }
46
47         /**
48          * 
49          */
50         public BlindedPath get_c() {
51                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_c(this.ptr);
52                 Reference.reachabilityFence(this);
53                 if (ret >= 0 && ret <= 4096) { return null; }
54                 org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); }
55                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
56                 return ret_hu_conv;
57         }
58
59         long clone_ptr() {
60                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone_ptr(this.ptr);
61                 Reference.reachabilityFence(this);
62                 return ret;
63         }
64
65         /**
66          * Creates a new tuple which has the same data as `orig`
67          * but with all dynamically-allocated buffers duplicated in new buffers.
68          */
69         public ThreeTuple_OnionMessageContentsDestinationBlindedPathZ clone() {
70                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(this.ptr);
71                 Reference.reachabilityFence(this);
72                 if (ret >= 0 && ret <= 4096) { return null; }
73                 ThreeTuple_OnionMessageContentsDestinationBlindedPathZ ret_hu_conv = new ThreeTuple_OnionMessageContentsDestinationBlindedPathZ(null, ret);
74                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
75                 return ret_hu_conv;
76         }
77
78         /**
79          * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
80          */
81         public static ThreeTuple_OnionMessageContentsDestinationBlindedPathZ of(org.ldk.structs.OnionMessageContents a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) {
82                 long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr);
83                 Reference.reachabilityFence(a);
84                 Reference.reachabilityFence(b);
85                 Reference.reachabilityFence(c);
86                 if (ret >= 0 && ret <= 4096) { return null; }
87                 ThreeTuple_OnionMessageContentsDestinationBlindedPathZ ret_hu_conv = new ThreeTuple_OnionMessageContentsDestinationBlindedPathZ(null, ret);
88                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
89                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
90                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
91                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(c); };
92                 return ret_hu_conv;
93         }
94
95 }