[C#] Check in initial auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / InvalidShutdownScript.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 error occurring when converting from [`Script`] to [`ShutdownScript`].
11  */
12 public class InvalidShutdownScript : CommonBase {
13         internal InvalidShutdownScript(object _dummy, long ptr) : base(ptr) { }
14         ~InvalidShutdownScript() {
15                 if (ptr != 0) { bindings.InvalidShutdownScript_free(ptr); }
16         }
17
18         /**
19          * The script that did not meet the requirements from [BOLT #2].
20          * 
21          * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
22          */
23         public byte[] get_script() {
24                 byte[] ret = bindings.InvalidShutdownScript_get_script(this.ptr);
25                 GC.KeepAlive(this);
26                 return ret;
27         }
28
29         /**
30          * The script that did not meet the requirements from [BOLT #2].
31          * 
32          * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
33          */
34         public void set_script(byte[] val) {
35                 bindings.InvalidShutdownScript_set_script(this.ptr, val);
36                 GC.KeepAlive(this);
37                 GC.KeepAlive(val);
38         }
39
40         /**
41          * Constructs a new InvalidShutdownScript given each field
42          */
43         public static InvalidShutdownScript of(byte[] script_arg) {
44                 long ret = bindings.InvalidShutdownScript_new(script_arg);
45                 GC.KeepAlive(script_arg);
46                 if (ret >= 0 && ret <= 4096) { return null; }
47                 org.ldk.structs.InvalidShutdownScript ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvalidShutdownScript(null, ret); }
48                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
49                 return ret_hu_conv;
50         }
51
52         internal long clone_ptr() {
53                 long ret = bindings.InvalidShutdownScript_clone_ptr(this.ptr);
54                 GC.KeepAlive(this);
55                 return ret;
56         }
57
58         /**
59          * Creates a copy of the InvalidShutdownScript
60          */
61         public InvalidShutdownScript clone() {
62                 long ret = bindings.InvalidShutdownScript_clone(this.ptr);
63                 GC.KeepAlive(this);
64                 if (ret >= 0 && ret <= 4096) { return null; }
65                 org.ldk.structs.InvalidShutdownScript ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvalidShutdownScript(null, ret); }
66                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
67                 return ret_hu_conv;
68         }
69
70 }
71 } } }