b0b494185d503a399bcfd17c729f1d4d09efd314
[ldk-java] / src / main / java / org / ldk / structs / Record.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 Record, unit of logging output with Metadata to enable filtering
13  * Module_path, file, line to inform on log's source
14  */
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class Record extends CommonBase {
17         Record(Object _dummy, long ptr) { super(ptr); }
18         @Override @SuppressWarnings("deprecation")
19         protected void finalize() throws Throwable {
20                 super.finalize();
21                 if (ptr != 0) { bindings.Record_free(ptr); }
22         }
23
24         /**
25          * The verbosity level of the message.
26          */
27         public Level get_level() {
28                 Level ret = bindings.Record_get_level(this.ptr);
29                 Reference.reachabilityFence(this);
30                 return ret;
31         }
32
33         /**
34          * The verbosity level of the message.
35          */
36         public void set_level(org.ldk.enums.Level val) {
37                 bindings.Record_set_level(this.ptr, val);
38                 Reference.reachabilityFence(this);
39                 Reference.reachabilityFence(val);
40         }
41
42         /**
43          * The message body.
44          */
45         public String get_args() {
46                 String ret = bindings.Record_get_args(this.ptr);
47                 Reference.reachabilityFence(this);
48                 return ret;
49         }
50
51         /**
52          * The message body.
53          */
54         public void set_args(java.lang.String val) {
55                 bindings.Record_set_args(this.ptr, val);
56                 Reference.reachabilityFence(this);
57                 Reference.reachabilityFence(val);
58         }
59
60         /**
61          * The module path of the message.
62          */
63         public String get_module_path() {
64                 String ret = bindings.Record_get_module_path(this.ptr);
65                 Reference.reachabilityFence(this);
66                 return ret;
67         }
68
69         /**
70          * The module path of the message.
71          */
72         public void set_module_path(java.lang.String val) {
73                 bindings.Record_set_module_path(this.ptr, val);
74                 Reference.reachabilityFence(this);
75                 Reference.reachabilityFence(val);
76         }
77
78         /**
79          * The source file containing the message.
80          */
81         public String get_file() {
82                 String ret = bindings.Record_get_file(this.ptr);
83                 Reference.reachabilityFence(this);
84                 return ret;
85         }
86
87         /**
88          * The source file containing the message.
89          */
90         public void set_file(java.lang.String val) {
91                 bindings.Record_set_file(this.ptr, val);
92                 Reference.reachabilityFence(this);
93                 Reference.reachabilityFence(val);
94         }
95
96         /**
97          * The line containing the message.
98          */
99         public int get_line() {
100                 int ret = bindings.Record_get_line(this.ptr);
101                 Reference.reachabilityFence(this);
102                 return ret;
103         }
104
105         /**
106          * The line containing the message.
107          */
108         public void set_line(int val) {
109                 bindings.Record_set_line(this.ptr, val);
110                 Reference.reachabilityFence(this);
111                 Reference.reachabilityFence(val);
112         }
113
114         long clone_ptr() {
115                 long ret = bindings.Record_clone_ptr(this.ptr);
116                 Reference.reachabilityFence(this);
117                 return ret;
118         }
119
120         /**
121          * Creates a copy of the Record
122          */
123         public Record clone() {
124                 long ret = bindings.Record_clone(this.ptr);
125                 Reference.reachabilityFence(this);
126                 if (ret >= 0 && ret <= 4096) { return null; }
127                 org.ldk.structs.Record ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Record(null, ret); }
128                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
129                 return ret_hu_conv;
130         }
131
132 }