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