ed35a63298a5bbdc520d1a7caca03daf1427b386
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / ErrorRepresentation.java
1 /*
2  * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF
3  * open API16.5 + applied TMF guideline 3.0
4  *
5  * OpenAPI spec version: 0.1.1_inProgress
6  * 
7  *
8  * NOTE: This class is auto generated by the swagger code generator program.
9  * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
12  * in compliance with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software distributed under the License
17  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
18  * or implied. See the License for the specific language governing permissions and limitations under
19  * the License.
20  */
21
22
23 package org.onap.nbi.apis.serviceorder.model;
24
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import io.swagger.annotations.ApiModel;
27 import io.swagger.annotations.ApiModelProperty;
28 import javax.validation.constraints.NotNull;
29 import java.util.Objects;
30
31 /**
32  *
33  */
34 @ApiModel(description = "")
35 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
36         date = "2018-02-19T14:00:30.767Z")
37 public class ErrorRepresentation {
38     @JsonProperty("code")
39     private Integer code = null;
40
41     @JsonProperty("reason")
42     private String reason = null;
43
44     @JsonProperty("message")
45     private String message = null;
46
47     @JsonProperty("status")
48     private String status = null;
49
50     @JsonProperty("referenceError")
51     private String referenceError = null;
52
53     @JsonProperty("@type")
54     private String type = null;
55
56     @JsonProperty("@schemaLocation")
57     private String schemaLocation = null;
58
59     public ErrorRepresentation code(Integer code) {
60         this.code = code;
61         return this;
62     }
63
64     /**
65      * Application related code (as defined in the API or from a common list)
66      *
67      * @return code
68      **/
69     @JsonProperty("code")
70     @ApiModelProperty(required = true, value = "Application related code (as defined in the API or from a common list)")
71     @NotNull
72     public Integer getCode() {
73         return code;
74     }
75
76     public void setCode(Integer code) {
77         this.code = code;
78     }
79
80     public ErrorRepresentation reason(String reason) {
81         this.reason = reason;
82         return this;
83     }
84
85     /**
86      * Text that explains the reason for error. This can be shown to a client user.
87      *
88      * @return reason
89      **/
90     @JsonProperty("reason")
91     @ApiModelProperty(required = true,
92             value = "Text that explains the reason for error. This can be shown to a client user.")
93     @NotNull
94     public String getReason() {
95         return reason;
96     }
97
98     public void setReason(String reason) {
99         this.reason = reason;
100     }
101
102     public ErrorRepresentation message(String message) {
103         this.message = message;
104         return this;
105     }
106
107     /**
108      * Text that provide more details and corrective actions related to the error. This can be shown
109      * to a client user
110      *
111      * @return message
112      **/
113     @JsonProperty("message")
114     @ApiModelProperty(
115             value = "Text that provide more details and corrective actions related to the error. This can be shown to a client user")
116     public String getMessage() {
117         return message;
118     }
119
120     public void setMessage(String message) {
121         this.message = message;
122     }
123
124     public ErrorRepresentation status(String status) {
125         this.status = status;
126         return this;
127     }
128
129     /**
130      * http error code extension like 400-2
131      *
132      * @return status
133      **/
134     @JsonProperty("status")
135     @ApiModelProperty(value = "http error code extension like 400-2")
136     public String getStatus() {
137         return status;
138     }
139
140     public void setStatus(String status) {
141         this.status = status;
142     }
143
144     public ErrorRepresentation referenceError(String referenceError) {
145         this.referenceError = referenceError;
146         return this;
147     }
148
149     /**
150      * url pointing to documentation describing the error
151      *
152      * @return referenceError
153      **/
154     @JsonProperty("referenceError")
155     @ApiModelProperty(value = "url pointing to documentation describing the error")
156     public String getReferenceError() {
157         return referenceError;
158     }
159
160     public void setReferenceError(String referenceError) {
161         this.referenceError = referenceError;
162     }
163
164     public ErrorRepresentation type(String type) {
165         this.type = type;
166         return this;
167     }
168
169     /**
170      * The class type of a REST resource
171      *
172      * @return type
173      **/
174     @JsonProperty("@type")
175     @ApiModelProperty(value = "The class type of a REST resource")
176     public String getType() {
177         return type;
178     }
179
180     public void setType(String type) {
181         this.type = type;
182     }
183
184     public ErrorRepresentation schemaLocation(String schemaLocation) {
185         this.schemaLocation = schemaLocation;
186         return this;
187     }
188
189     /**
190      * it provides a link to the schema describing a REST resource
191      *
192      * @return schemaLocation
193      **/
194     @JsonProperty("@schemaLocation")
195     @ApiModelProperty(value = "it provides a link to the schema describing a REST resource")
196     public String getSchemaLocation() {
197         return schemaLocation;
198     }
199
200     public void setSchemaLocation(String schemaLocation) {
201         this.schemaLocation = schemaLocation;
202     }
203
204
205     @Override
206     public boolean equals(java.lang.Object o) {
207         if (this == o) {
208             return true;
209         }
210         if (o == null || getClass() != o.getClass()) {
211             return false;
212         }
213         ErrorRepresentation errorRepresentation = (ErrorRepresentation) o;
214         return Objects.equals(this.code, errorRepresentation.code)
215                 && Objects.equals(this.reason, errorRepresentation.reason)
216                 && Objects.equals(this.message, errorRepresentation.message)
217                 && Objects.equals(this.status, errorRepresentation.status)
218                 && Objects.equals(this.referenceError, errorRepresentation.referenceError)
219                 && Objects.equals(this.type, errorRepresentation.type)
220                 && Objects.equals(this.schemaLocation, errorRepresentation.schemaLocation);
221     }
222
223     @Override
224     public int hashCode() {
225         return Objects.hash(code, reason, message, status, referenceError, type, schemaLocation);
226     }
227
228
229     @Override
230     public String toString() {
231         StringBuilder sb = new StringBuilder();
232         sb.append("class ErrorRepresentation {\n");
233
234         sb.append("    code: ").append(toIndentedString(code)).append("\n");
235         sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
236         sb.append("    message: ").append(toIndentedString(message)).append("\n");
237         sb.append("    status: ").append(toIndentedString(status)).append("\n");
238         sb.append("    referenceError: ").append(toIndentedString(referenceError)).append("\n");
239         sb.append("    type: ").append(toIndentedString(type)).append("\n");
240         sb.append("    schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n");
241         sb.append("}");
242         return sb.toString();
243     }
244
245     /**
246      * Convert the given object to string with each line indented by 4 spaces (except the first
247      * line).
248      */
249     private String toIndentedString(java.lang.Object o) {
250         if (o == null) {
251             return "null";
252         }
253         return o.toString().replace("\n", "\n    ");
254     }
255 }
256