[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / Result_RecipientOnionFieldsNoneZ.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 public class Result_RecipientOnionFieldsNoneZ : CommonBase {
9         Result_RecipientOnionFieldsNoneZ(object _dummy, long ptr) : base(ptr) { }
10         ~Result_RecipientOnionFieldsNoneZ() {
11                 if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); }
12         }
13
14         internal static Result_RecipientOnionFieldsNoneZ constr_from_ptr(long ptr) {
15                 if (bindings.CResult_RecipientOnionFieldsNoneZ_is_ok(ptr)) {
16                         return new Result_RecipientOnionFieldsNoneZ_OK(null, ptr);
17                 } else {
18                         return new Result_RecipientOnionFieldsNoneZ_Err(null, ptr);
19                 }
20         }
21         public class Result_RecipientOnionFieldsNoneZ_OK : Result_RecipientOnionFieldsNoneZ {
22                 public readonly RecipientOnionFields res;
23                 internal Result_RecipientOnionFieldsNoneZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24                         long res = bindings.CResult_RecipientOnionFieldsNoneZ_get_ok(ptr);
25                         org.ldk.structs.RecipientOnionFields res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.RecipientOnionFields(null, res); }
26                         if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
27                         this.res = res_hu_conv;
28                 }
29         }
30
31         public class Result_RecipientOnionFieldsNoneZ_Err : Result_RecipientOnionFieldsNoneZ {
32                 internal Result_RecipientOnionFieldsNoneZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
33                 }
34         }
35
36         /**
37          * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state.
38          */
39         public static Result_RecipientOnionFieldsNoneZ ok(org.ldk.structs.RecipientOnionFields o) {
40                 long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0 : o.ptr);
41                 GC.KeepAlive(o);
42                 if (ret >= 0 && ret <= 4096) { return null; }
43                 Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret);
44                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); };
45                 return ret_hu_conv;
46         }
47
48         /**
49          * Creates a new CResult_RecipientOnionFieldsNoneZ in the error state.
50          */
51         public static Result_RecipientOnionFieldsNoneZ err() {
52                 long ret = bindings.CResult_RecipientOnionFieldsNoneZ_err();
53                 if (ret >= 0 && ret <= 4096) { return null; }
54                 Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret);
55                 return ret_hu_conv;
56         }
57
58         /**
59          * Checks if the given object is currently in the success state
60          */
61         public bool is_ok() {
62                 bool ret = bindings.CResult_RecipientOnionFieldsNoneZ_is_ok(this.ptr);
63                 GC.KeepAlive(this);
64                 return ret;
65         }
66
67         internal long clone_ptr() {
68                 long ret = bindings.CResult_RecipientOnionFieldsNoneZ_clone_ptr(this.ptr);
69                 GC.KeepAlive(this);
70                 return ret;
71         }
72
73         /**
74          * Creates a new CResult_RecipientOnionFieldsNoneZ which has the same data as `orig`
75          * but with all dynamically-allocated buffers duplicated in new buffers.
76          */
77         public Result_RecipientOnionFieldsNoneZ clone() {
78                 long ret = bindings.CResult_RecipientOnionFieldsNoneZ_clone(this.ptr);
79                 GC.KeepAlive(this);
80                 if (ret >= 0 && ret <= 4096) { return null; }
81                 Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret);
82                 return ret_hu_conv;
83         }
84
85 }
86 } } }