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