77import org .jetbrains .annotations .ApiStatus ;
88import org .jetbrains .annotations .Nullable ;
99
10+ import java .time .Instant ;
1011import java .util .HashSet ;
1112import java .util .Objects ;
1213import java .util .Set ;
@@ -19,6 +20,13 @@ public class CommonLogResponse implements Initializable {
1920
2021 private String id ;
2122 private @ Nullable String source ;
23+ private Instant created ;
24+ private Instant expires ;
25+ private long size ;
26+ private int lines ;
27+ private int errors ;
28+ private String url ;
29+ private String raw ;
2230 private Set <Metadata <?>> metadata = new HashSet <>();
2331
2432 /**
@@ -40,12 +48,48 @@ public String getId() {
4048 }
4149
4250 /**
43- * Get the metadata associated with this log
51+ * Get the creation time of the log
4452 *
45- * @return the metadata associated with this log
53+ * @return the creation time of the log
4654 */
47- public Set <Metadata <?>> getMetadata () {
48- return metadata ;
55+ public Instant getCreated () {
56+ return created ;
57+ }
58+
59+ /**
60+ * Get the expiration time of the log
61+ *
62+ * @return the expiration time of the log
63+ */
64+ public Instant getExpires () {
65+ return expires ;
66+ }
67+
68+ /**
69+ * Get the size of the log in bytes
70+ *
71+ * @return the size of the log in bytes
72+ */
73+ public long getSize () {
74+ return size ;
75+ }
76+
77+ /**
78+ * Get the number of lines in the log
79+ *
80+ * @return the number of lines in the log
81+ */
82+ public int getLines () {
83+ return lines ;
84+ }
85+
86+ /**
87+ * Get the number of error lines detected in the log
88+ *
89+ * @return the number of error lines detected in the log
90+ */
91+ public int getErrors () {
92+ return errors ;
4993 }
5094
5195 /**
@@ -54,7 +98,7 @@ public Set<Metadata<?>> getMetadata() {
5498 * @return the url to view this log (e.g. <a href="https://mclo.gs/HpAwPry">https://mclo.gs/HpAwPry</a>)
5599 */
56100 public String getUrl () {
57- return client (). getInstance (). getViewLogUrl ( id ) ;
101+ return url ;
58102 }
59103
60104 /**
@@ -63,7 +107,16 @@ public String getUrl() {
63107 * @return the url to view this log raw (e.g. <a href="https://mclo.gs/raw/HpAwPry">https://mclo.gs/raw/HpAwPry</a>)
64108 */
65109 public String getRawUrl () {
66- return client ().getInstance ().getRawLogUrl (id );
110+ return raw ;
111+ }
112+
113+ /**
114+ * Get the metadata associated with this log
115+ *
116+ * @return the metadata associated with this log
117+ */
118+ public Set <Metadata <?>> getMetadata () {
119+ return metadata ;
67120 }
68121
69122 /**
0 commit comments