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.
18 * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
19 * open API16.5 + applied TMF guideline 3.0
21 * OpenAPI spec version: 0.1.1_inProgress
24 * NOTE: This class is auto generated by the swagger code generator program.
25 * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
27 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
28 * in compliance with the License. You may obtain a copy of the License at
30 * http://www.apache.org/licenses/LICENSE-2.0
32 * Unless required by applicable law or agreed to in writing, software distributed under the License
33 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
34 * or implied. See the License for the specific language governing permissions and limitations under
39 package org.onap.nbi.apis.serviceorder.model;
41 import com.fasterxml.jackson.annotation.JsonProperty;
42 import io.swagger.annotations.ApiModel;
43 import io.swagger.annotations.ApiModelProperty;
44 import javax.validation.constraints.NotNull;
45 import java.util.Objects;
50 @ApiModel(description = "")
51 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
52 date = "2018-02-19T14:00:30.767Z")
53 public class ErrorRepresentation {
55 private Integer code = null;
57 @JsonProperty("reason")
58 private String reason = null;
60 @JsonProperty("message")
61 private String message = null;
63 @JsonProperty("status")
64 private String status = null;
66 @JsonProperty("referenceError")
67 private String referenceError = null;
69 @JsonProperty("@type")
70 private String type = null;
72 @JsonProperty("@schemaLocation")
73 private String schemaLocation = null;
75 public ErrorRepresentation code(Integer code) {
81 * Application related code (as defined in the API or from a common list)
86 @ApiModelProperty(required = true, value = "Application related code (as defined in the API or from a common list)")
88 public Integer getCode() {
92 public void setCode(Integer code) {
96 public ErrorRepresentation reason(String reason) {
102 * Text that explains the reason for error. This can be shown to a client user.
106 @JsonProperty("reason")
107 @ApiModelProperty(required = true,
108 value = "Text that explains the reason for error. This can be shown to a client user.")
110 public String getReason() {
114 public void setReason(String reason) {
115 this.reason = reason;
118 public ErrorRepresentation message(String message) {
119 this.message = message;
124 * Text that provide more details and corrective actions related to the error. This can be shown
129 @JsonProperty("message")
131 value = "Text that provide more details and corrective actions related to the error. This can be shown to a client user")
132 public String getMessage() {
136 public void setMessage(String message) {
137 this.message = message;
140 public ErrorRepresentation status(String status) {
141 this.status = status;
146 * http error code extension like 400-2
150 @JsonProperty("status")
151 @ApiModelProperty(value = "http error code extension like 400-2")
152 public String getStatus() {
156 public void setStatus(String status) {
157 this.status = status;
160 public ErrorRepresentation referenceError(String referenceError) {
161 this.referenceError = referenceError;
166 * url pointing to documentation describing the error
168 * @return referenceError
170 @JsonProperty("referenceError")
171 @ApiModelProperty(value = "url pointing to documentation describing the error")
172 public String getReferenceError() {
173 return referenceError;
176 public void setReferenceError(String referenceError) {
177 this.referenceError = referenceError;
180 public ErrorRepresentation type(String type) {
186 * The class type of a REST resource
190 @JsonProperty("@type")
191 @ApiModelProperty(value = "The class type of a REST resource")
192 public String getType() {
196 public void setType(String type) {
200 public ErrorRepresentation schemaLocation(String schemaLocation) {
201 this.schemaLocation = schemaLocation;
206 * it provides a link to the schema describing a REST resource
208 * @return schemaLocation
210 @JsonProperty("@schemaLocation")
211 @ApiModelProperty(value = "it provides a link to the schema describing a REST resource")
212 public String getSchemaLocation() {
213 return schemaLocation;
216 public void setSchemaLocation(String schemaLocation) {
217 this.schemaLocation = schemaLocation;
222 public boolean equals(java.lang.Object o) {
226 if (o == null || getClass() != o.getClass()) {
229 ErrorRepresentation errorRepresentation = (ErrorRepresentation) o;
230 return Objects.equals(this.code, errorRepresentation.code)
231 && Objects.equals(this.reason, errorRepresentation.reason)
232 && Objects.equals(this.message, errorRepresentation.message)
233 && Objects.equals(this.status, errorRepresentation.status)
234 && Objects.equals(this.referenceError, errorRepresentation.referenceError)
235 && Objects.equals(this.type, errorRepresentation.type)
236 && Objects.equals(this.schemaLocation, errorRepresentation.schemaLocation);
240 public int hashCode() {
241 return Objects.hash(code, reason, message, status, referenceError, type, schemaLocation);
246 public String toString() {
247 StringBuilder sb = new StringBuilder();
248 sb.append("class ErrorRepresentation {\n");
250 sb.append(" code: ").append(toIndentedString(code)).append("\n");
251 sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
252 sb.append(" message: ").append(toIndentedString(message)).append("\n");
253 sb.append(" status: ").append(toIndentedString(status)).append("\n");
254 sb.append(" referenceError: ").append(toIndentedString(referenceError)).append("\n");
255 sb.append(" type: ").append(toIndentedString(type)).append("\n");
256 sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
258 return sb.toString();
262 * Convert the given object to string with each line indented by 4 spaces (except the first
265 private String toIndentedString(java.lang.Object o) {
269 return o.toString().replace("\n", "\n ");