6fd5fd7a072be097a00606f8657d2e24918919a4
[ldk-java] / src / main / java / org / ldk / structs / StaticPaymentOutputDescriptor.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
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class StaticPaymentOutputDescriptor extends CommonBase {
10         StaticPaymentOutputDescriptor(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.StaticPaymentOutputDescriptor_free(ptr); }
15         }
16
17         public OutPoint get_outpoint() {
18                 long ret = bindings.StaticPaymentOutputDescriptor_get_outpoint(this.ptr);
19                 OutPoint ret_hu_conv = new OutPoint(null, ret);
20                 ret_hu_conv.ptrs_to.add(this);
21                 return ret_hu_conv;
22         }
23
24         public void set_outpoint(OutPoint val) {
25                 bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
26                 this.ptrs_to.add(val);
27         }
28
29         public void set_output(TxOut val) {
30                 bindings.StaticPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
31         }
32
33         public byte[] get_channel_keys_id() {
34                 byte[] ret = bindings.StaticPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
35                 return ret;
36         }
37
38         public void set_channel_keys_id(byte[] val) {
39                 bindings.StaticPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
40         }
41
42         public long get_channel_value_satoshis() {
43                 long ret = bindings.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
44                 return ret;
45         }
46
47         public void set_channel_value_satoshis(long val) {
48                 bindings.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
49         }
50
51         public static StaticPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
52                 long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, output_arg.ptr, channel_keys_id_arg, channel_value_satoshis_arg);
53                 StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
54                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
55                 ret_hu_conv.ptrs_to.add(outpoint_arg);
56                 return ret_hu_conv;
57         }
58
59         public StaticPaymentOutputDescriptor clone() {
60                 long ret = bindings.StaticPaymentOutputDescriptor_clone(this.ptr);
61                 StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
62                 ret_hu_conv.ptrs_to.add(this);
63                 return ret_hu_conv;
64         }
65
66 }