3 * Copyright (c) 2017 Orange. All rights reserved.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
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;
38 public ApiError(String code, String message, String description, String infoURL) {
40 this.message = message;
41 this.description = description;
42 this.infoURL = infoURL;
45 public String getCode() {
49 public void setCode(String code) {
53 public String getMessage() {
57 public void setMessage(String message) {
58 this.message = message;
61 public String getDescription() {
65 public void setDescription(String description) {
66 this.description = description;
69 public String getInfoURL() {
73 public void setInfoURL(String infoURL) {
74 this.infoURL = infoURL;