2 * Copyright (c) 2018 Orange
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.nbi.exceptions;
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;
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;
37 public ApiError(String code, String message, String description, String infoURL) {
39 this.message = message;
40 this.description = description;
41 this.infoURL = infoURL;
44 public String getCode() {
48 public void setCode(String code) {
52 public String getMessage() {
56 public void setMessage(String message) {
57 this.message = message;
60 public String getDescription() {
64 public void setDescription(String description) {
65 this.description = description;
68 public String getInfoURL() {
72 public void setInfoURL(String infoURL) {
73 this.infoURL = infoURL;