Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / ClosingSignedFeeRange.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 javax.annotation.Nullable;
8
9
10 /**
11  * The minimum and maximum fees which the sender is willing to place on the closing transaction.
12  * This is provided in [`ClosingSigned`] by both sides to indicate the fee range they are willing
13  * to use.
14  */
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class ClosingSignedFeeRange extends CommonBase {
17         ClosingSignedFeeRange(Object _dummy, long ptr) { super(ptr); }
18         @Override @SuppressWarnings("deprecation")
19         protected void finalize() throws Throwable {
20                 super.finalize();
21                 if (ptr != 0) { bindings.ClosingSignedFeeRange_free(ptr); }
22         }
23
24         /**
25          * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
26          * transaction.
27          */
28         public long get_min_fee_satoshis() {
29                 long ret = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr);
30                 return ret;
31         }
32
33         /**
34          * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
35          * transaction.
36          */
37         public void set_min_fee_satoshis(long val) {
38                 bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val);
39         }
40
41         /**
42          * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
43          * transaction.
44          */
45         public long get_max_fee_satoshis() {
46                 long ret = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr);
47                 return ret;
48         }
49
50         /**
51          * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
52          * transaction.
53          */
54         public void set_max_fee_satoshis(long val) {
55                 bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val);
56         }
57
58         /**
59          * Constructs a new ClosingSignedFeeRange given each field
60          */
61         public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) {
62                 long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
63                 if (ret >= 0 && ret <= 4096) { return null; }
64                 ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); }
65                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
66                 return ret_hu_conv;
67         }
68
69         long clone_ptr() {
70                 long ret = bindings.ClosingSignedFeeRange_clone_ptr(this.ptr);
71                 return ret;
72         }
73
74         /**
75          * Creates a copy of the ClosingSignedFeeRange
76          */
77         public ClosingSignedFeeRange clone() {
78                 long ret = bindings.ClosingSignedFeeRange_clone(this.ptr);
79                 if (ret >= 0 && ret <= 4096) { return null; }
80                 ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); }
81                 ret_hu_conv.ptrs_to.add(this);
82                 return ret_hu_conv;
83         }
84
85         /**
86          * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
87          */
88         public byte[] write() {
89                 byte[] ret = bindings.ClosingSignedFeeRange_write(this.ptr);
90                 return ret;
91         }
92
93         /**
94          * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write
95          */
96         public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) {
97                 long ret = bindings.ClosingSignedFeeRange_read(ser);
98                 if (ret >= 0 && ret <= 4096) { return null; }
99                 Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
100                 return ret_hu_conv;
101         }
102
103 }