71111ea84609e32ee49cbad7e3963973fbe3592f
[externalapi/nbi.git] / src / main / java / org / onap / nbi / exceptions / ApiError.java
1 /**
2  *     Copyright (c) 2018 Orange
3  *
4  *     Licensed under the Apache License, Version 2.0 (the "License");
5  *     you may not use this file except in compliance with the License.
6  *     You may obtain a copy of the License at
7  *
8  *         http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *     Unless required by applicable law or agreed to in writing, software
11  *     distributed under the License is distributed on an "AS IS" BASIS,
12  *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *     See the License for the specific language governing permissions and
14  *     limitations under the License.
15  */
16 package org.onap.nbi.exceptions;
17
18 import javax.xml.bind.annotation.XmlAccessType;
19 import javax.xml.bind.annotation.XmlAccessorType;
20 import javax.xml.bind.annotation.XmlElement;
21 import javax.xml.bind.annotation.XmlType;
22
23 @XmlAccessorType(XmlAccessType.FIELD)
24 @XmlType(name = "Error", propOrder = {"code", "message", "description", "infoURL"})
25 public class ApiError {
26     @XmlElement(required = true)
27     protected String code;
28     @XmlElement(required = true)
29     protected String message;
30     @XmlElement(required = true)
31     private String description;
32     @XmlElement(required = true)
33     protected String infoURL;
34
35     public ApiError() {}
36
37     public ApiError(String code, String message, String description, String infoURL) {
38         this.code = code;
39         this.message = message;
40         this.description = description;
41         this.infoURL = infoURL;
42     }
43
44     public String getCode() {
45         return code;
46     }
47
48     public void setCode(String code) {
49         this.code = code;
50     }
51
52     public String getMessage() {
53         return message;
54     }
55
56     public void setMessage(String message) {
57         this.message = message;
58     }
59
60     public String getDescription() {
61         return description;
62     }
63
64     public void setDescription(String description) {
65         this.description = description;
66     }
67
68     public String getInfoURL() {
69         return infoURL;
70     }
71
72     public void setInfoURL(String infoURL) {
73         this.infoURL = infoURL;
74     }
75 }
76