1 /*******************************************************************************
2 * Copyright (c) 2017 Politecnico di Torino and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Apache License, Version 2.0
6 * which accompanies this distribution, and is available at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *******************************************************************************/
9 package it.polito.verigraph.model;
11 import javax.xml.bind.annotation.XmlRootElement;
12 import io.swagger.annotations.ApiModel;
13 import io.swagger.annotations.ApiModelProperty;
15 @ApiModel(value = "Error")
17 public class ErrorMessage {
19 @ApiModelProperty(example = "Error message")
20 private String errorMessage;
21 @ApiModelProperty(allowableValues = "400,403,404,500", value = "HTTP error code", example = "[400,403,404,500]")
22 private int errorCode;
23 @ApiModelProperty(example = "http://localhost:8080/verigraph/api-docs/")
24 private String documentation;
26 public ErrorMessage() {
30 public ErrorMessage(String errorMessage, int errorCode, String documentation) {
31 this.errorMessage = errorMessage;
32 this.errorCode = errorCode;
33 this.documentation = documentation;
36 public String getErrorMessage() {
40 public void setErrorMessage(String errorMessage) {
41 this.errorMessage = errorMessage;
44 public int getErrorCode() {
48 public void setErrorCode(int errorCode) {
49 this.errorCode = errorCode;
52 public String getDocumentation() {
56 public void setDocumentation(String documentation) {
57 this.documentation = documentation;