1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.aether.spi.connector.transport.http.RFC9457;
20
21 import java.net.URI;
22
23 public class RFC9457Payload {
24 public static final RFC9457Payload INSTANCE = new RFC9457Payload();
25
26 private final URI type;
27
28 private final Integer status;
29
30 private final String title;
31
32 private final String detail;
33
34 private final URI instance;
35
36 private RFC9457Payload() {
37 this(null, null, null, null, null);
38 }
39
40 public RFC9457Payload(
41 final URI type, final Integer status, final String title, final String detail, final URI instance) {
42 this.type = type;
43 this.status = status;
44 this.title = title;
45 this.detail = detail;
46 this.instance = instance;
47 }
48
49 public URI getType() {
50 return type;
51 }
52
53 public Integer getStatus() {
54 return status;
55 }
56
57 public String getTitle() {
58 return title;
59 }
60
61 public String getDetail() {
62 return detail;
63 }
64
65 public URI getInstance() {
66 return instance;
67 }
68
69 @Override
70 public String toString() {
71 StringBuilder builder = new StringBuilder();
72 builder.append("RFC9457Payload [");
73 if (type != null) {
74 builder.append("type=").append(type).append(", ");
75 }
76 if (status != null) {
77 builder.append("status=").append(status).append(", ");
78 }
79 if (title != null) {
80 builder.append("title=").append(title).append(", ");
81 }
82 if (detail != null) {
83 builder.append("detail=").append(detail).append(", ");
84 }
85 if (instance != null) {
86 builder.append("instance=").append(instance);
87 }
88 builder.append("]");
89 return builder.toString();
90 }
91 }