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.
17 package org.onap.nbi.exceptions;
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;
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;
39 public ApiError(String code, String message, String description, String infoURL) {
41 this.message = message;
42 this.description = description;
43 this.infoURL = infoURL;
46 public String getCode() {
50 public void setCode(String code) {
54 public String getMessage() {
58 public void setMessage(String message) {
59 this.message = message;
62 public String getDescription() {
66 public void setDescription(String description) {
67 this.description = description;
70 public String getInfoURL() {
74 public void setInfoURL(String infoURL) {
75 this.infoURL = infoURL;