View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
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          return "RFC9457Payload {" + "type="
72                  + type + ", status="
73                  + status + ", title='"
74                  + title + ", detail='"
75                  + detail + ", instance="
76                  + instance + '}';
77      }
78  }