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 * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
18 * open API16.5 + applied TMF guideline 3.0
20 * OpenAPI spec version: 0.1.1_inProgress
23 * NOTE: This class is auto generated by the swagger code generator program.
24 * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
26 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
27 * in compliance with the License. You may obtain a copy of the License at
29 * http://www.apache.org/licenses/LICENSE-2.0
31 * Unless required by applicable law or agreed to in writing, software distributed under the License
32 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
33 * or implied. See the License for the specific language governing permissions and limitations under
38 package org.onap.nbi.apis.serviceorder.model;
40 import com.fasterxml.jackson.annotation.JsonProperty;
41 import io.swagger.annotations.ApiModel;
42 import io.swagger.annotations.ApiModelProperty;
43 import javax.validation.constraints.NotNull;
44 import java.util.Objects;
49 @ApiModel(description = "")
50 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
51 date = "2018-02-19T14:00:30.767Z")
52 public class ErrorRepresentation {
54 private Integer code = null;
56 @JsonProperty("reason")
57 private String reason = null;
59 @JsonProperty("message")
60 private String message = null;
62 @JsonProperty("status")
63 private String status = null;
65 @JsonProperty("referenceError")
66 private String referenceError = null;
68 @JsonProperty("@type")
69 private String type = null;
71 @JsonProperty("@schemaLocation")
72 private String schemaLocation = null;
74 public ErrorRepresentation code(Integer code) {
80 * Application related code (as defined in the API or from a common list)
85 @ApiModelProperty(required = true, value = "Application related code (as defined in the API or from a common list)")
87 public Integer getCode() {
91 public void setCode(Integer code) {
95 public ErrorRepresentation reason(String reason) {
101 * Text that explains the reason for error. This can be shown to a client user.
105 @JsonProperty("reason")
106 @ApiModelProperty(required = true,
107 value = "Text that explains the reason for error. This can be shown to a client user.")
109 public String getReason() {
113 public void setReason(String reason) {
114 this.reason = reason;
117 public ErrorRepresentation message(String message) {
118 this.message = message;
123 * Text that provide more details and corrective actions related to the error. This can be shown
128 @JsonProperty("message")
130 value = "Text that provide more details and corrective actions related to the error. This can be shown to a client user")
131 public String getMessage() {
135 public void setMessage(String message) {
136 this.message = message;
139 public ErrorRepresentation status(String status) {
140 this.status = status;
145 * http error code extension like 400-2
149 @JsonProperty("status")
150 @ApiModelProperty(value = "http error code extension like 400-2")
151 public String getStatus() {
155 public void setStatus(String status) {
156 this.status = status;
159 public ErrorRepresentation referenceError(String referenceError) {
160 this.referenceError = referenceError;
165 * url pointing to documentation describing the error
167 * @return referenceError
169 @JsonProperty("referenceError")
170 @ApiModelProperty(value = "url pointing to documentation describing the error")
171 public String getReferenceError() {
172 return referenceError;
175 public void setReferenceError(String referenceError) {
176 this.referenceError = referenceError;
179 public ErrorRepresentation type(String type) {
185 * The class type of a REST resource
189 @JsonProperty("@type")
190 @ApiModelProperty(value = "The class type of a REST resource")
191 public String getType() {
195 public void setType(String type) {
199 public ErrorRepresentation schemaLocation(String schemaLocation) {
200 this.schemaLocation = schemaLocation;
205 * it provides a link to the schema describing a REST resource
207 * @return schemaLocation
209 @JsonProperty("@schemaLocation")
210 @ApiModelProperty(value = "it provides a link to the schema describing a REST resource")
211 public String getSchemaLocation() {
212 return schemaLocation;
215 public void setSchemaLocation(String schemaLocation) {
216 this.schemaLocation = schemaLocation;
221 public boolean equals(java.lang.Object o) {
225 if (o == null || getClass() != o.getClass()) {
228 ErrorRepresentation errorRepresentation = (ErrorRepresentation) o;
229 return Objects.equals(this.code, errorRepresentation.code)
230 && Objects.equals(this.reason, errorRepresentation.reason)
231 && Objects.equals(this.message, errorRepresentation.message)
232 && Objects.equals(this.status, errorRepresentation.status)
233 && Objects.equals(this.referenceError, errorRepresentation.referenceError)
234 && Objects.equals(this.type, errorRepresentation.type)
235 && Objects.equals(this.schemaLocation, errorRepresentation.schemaLocation);
239 public int hashCode() {
240 return Objects.hash(code, reason, message, status, referenceError, type, schemaLocation);
245 public String toString() {
246 StringBuilder sb = new StringBuilder();
247 sb.append("class ErrorRepresentation {\n");
249 sb.append(" code: ").append(toIndentedString(code)).append("\n");
250 sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
251 sb.append(" message: ").append(toIndentedString(message)).append("\n");
252 sb.append(" status: ").append(toIndentedString(status)).append("\n");
253 sb.append(" referenceError: ").append(toIndentedString(referenceError)).append("\n");
254 sb.append(" type: ").append(toIndentedString(type)).append("\n");
255 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
257 return sb.toString();
261 * Convert the given object to string with each line indented by 4 spaces (except the first
264 private String toIndentedString(java.lang.Object o) {
268 return o.toString().replace("\n", "\n ");