Remove 'All rights reserved.' on apache 2 license
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / ErrorRepresentation.java
1 /**
2  *     Copyright (c) 2018 Orange
3  *
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
7  *
8  *         http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /*
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
19  *
20  * OpenAPI spec version: 0.1.1_inProgress
21  * 
22  *
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.
25  *
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
28  *
29  * http://www.apache.org/licenses/LICENSE-2.0
30  *
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
34  * the License.
35  */
36
37
38 package org.onap.nbi.apis.serviceorder.model;
39
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;
45
46 /**
47  *
48  */
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 {
53     @JsonProperty("code")
54     private Integer code = null;
55
56     @JsonProperty("reason")
57     private String reason = null;
58
59     @JsonProperty("message")
60     private String message = null;
61
62     @JsonProperty("status")
63     private String status = null;
64
65     @JsonProperty("referenceError")
66     private String referenceError = null;
67
68     @JsonProperty("@type")
69     private String type = null;
70
71     @JsonProperty("@schemaLocation")
72     private String schemaLocation = null;
73
74     public ErrorRepresentation code(Integer code) {
75         this.code = code;
76         return this;
77     }
78
79     /**
80      * Application related code (as defined in the API or from a common list)
81      *
82      * @return code
83      **/
84     @JsonProperty("code")
85     @ApiModelProperty(required = true, value = "Application related code (as defined in the API or from a common list)")
86     @NotNull
87     public Integer getCode() {
88         return code;
89     }
90
91     public void setCode(Integer code) {
92         this.code = code;
93     }
94
95     public ErrorRepresentation reason(String reason) {
96         this.reason = reason;
97         return this;
98     }
99
100     /**
101      * Text that explains the reason for error. This can be shown to a client user.
102      *
103      * @return reason
104      **/
105     @JsonProperty("reason")
106     @ApiModelProperty(required = true,
107             value = "Text that explains the reason for error. This can be shown to a client user.")
108     @NotNull
109     public String getReason() {
110         return reason;
111     }
112
113     public void setReason(String reason) {
114         this.reason = reason;
115     }
116
117     public ErrorRepresentation message(String message) {
118         this.message = message;
119         return this;
120     }
121
122     /**
123      * Text that provide more details and corrective actions related to the error. This can be shown
124      * to a client user
125      *
126      * @return message
127      **/
128     @JsonProperty("message")
129     @ApiModelProperty(
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() {
132         return message;
133     }
134
135     public void setMessage(String message) {
136         this.message = message;
137     }
138
139     public ErrorRepresentation status(String status) {
140         this.status = status;
141         return this;
142     }
143
144     /**
145      * http error code extension like 400-2
146      *
147      * @return status
148      **/
149     @JsonProperty("status")
150     @ApiModelProperty(value = "http error code extension like 400-2")
151     public String getStatus() {
152         return status;
153     }
154
155     public void setStatus(String status) {
156         this.status = status;
157     }
158
159     public ErrorRepresentation referenceError(String referenceError) {
160         this.referenceError = referenceError;
161         return this;
162     }
163
164     /**
165      * url pointing to documentation describing the error
166      *
167      * @return referenceError
168      **/
169     @JsonProperty("referenceError")
170     @ApiModelProperty(value = "url pointing to documentation describing the error")
171     public String getReferenceError() {
172         return referenceError;
173     }
174
175     public void setReferenceError(String referenceError) {
176         this.referenceError = referenceError;
177     }
178
179     public ErrorRepresentation type(String type) {
180         this.type = type;
181         return this;
182     }
183
184     /**
185      * The class type of a REST resource
186      *
187      * @return type
188      **/
189     @JsonProperty("@type")
190     @ApiModelProperty(value = "The class type of a REST resource")
191     public String getType() {
192         return type;
193     }
194
195     public void setType(String type) {
196         this.type = type;
197     }
198
199     public ErrorRepresentation schemaLocation(String schemaLocation) {
200         this.schemaLocation = schemaLocation;
201         return this;
202     }
203
204     /**
205      * it provides a link to the schema describing a REST resource
206      *
207      * @return schemaLocation
208      **/
209     @JsonProperty("@schemaLocation")
210     @ApiModelProperty(value = "it provides a link to the schema describing a REST resource")
211     public String getSchemaLocation() {
212         return schemaLocation;
213     }
214
215     public void setSchemaLocation(String schemaLocation) {
216         this.schemaLocation = schemaLocation;
217     }
218
219
220     @Override
221     public boolean equals(java.lang.Object o) {
222         if (this == o) {
223             return true;
224         }
225         if (o == null || getClass() != o.getClass()) {
226             return false;
227         }
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);
236     }
237
238     @Override
239     public int hashCode() {
240         return Objects.hash(code, reason, message, status, referenceError, type, schemaLocation);
241     }
242
243
244     @Override
245     public String toString() {
246         StringBuilder sb = new StringBuilder();
247         sb.append("class ErrorRepresentation {\n");
248
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");
256         sb.append("}");
257         return sb.toString();
258     }
259
260     /**
261      * Convert the given object to string with each line indented by 4 spaces (except the first
262      * line).
263      */
264     private String toIndentedString(java.lang.Object o) {
265         if (o == null) {
266             return "null";
267         }
268         return o.toString().replace("\n", "\n    ");
269     }
270 }
271