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 java.util.Objects;
44 import javax.validation.constraints.NotNull;
47 * An optional array of messages associated with the Order
49 @ApiModel(description = "An optional array of messages associated with the Order")
50 @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
51 date = "2018-07-12T11:46:30.345Z")
52 public class OrderMessage {
56 private String code = null;
58 @JsonProperty("field")
59 private String field = null;
61 @JsonProperty("messageInformation")
62 private String messageInformation = null;
64 @JsonProperty("severity")
65 private SeverityMessage severity = null;
67 @JsonProperty("correctionRequired")
68 private boolean correctionRequired;
74 * A code associated to this message
79 @ApiModelProperty(value = "A code associated to this message")
80 public String getCode() {
84 public void setCode(String code) {
88 public OrderMessage code(String code) {
95 * Service Order attribute related to this error message
99 @JsonProperty("field")
100 @ApiModelProperty(value = "Service Order attribute related to this error message")
101 public String getField() {
105 public void setField(String field) {
109 public OrderMessage field(String field) {
116 * Message related to this order
118 * @return messageInformation
120 @JsonProperty("messageInformation")
121 @ApiModelProperty(value = "Message related to this order")
122 public String getMessageInformation() {
123 return messageInformation;
126 public void setMessageInformation(String messageInformation) {
127 this.messageInformation = messageInformation;
130 public OrderMessage messageInformation(String messageInformation) {
131 this.messageInformation = messageInformation;
137 * Gravity of this message
141 @JsonProperty("severity")
142 @ApiModelProperty(required = true,value = "Gravity of this message")
143 @NotNull(message = "OrderMessage severity cannot be null")
144 public SeverityMessage getSeverity() {
148 public void setSeverity(SeverityMessage severity) {
149 this.severity = severity;
152 public OrderMessage severity(SeverityMessage severity) {
153 this.severity = severity;
159 * Indicator that an action is required to allow service order fullfilment to follow up
161 * @return correctionRequired
163 @JsonProperty("correctionRequired")
164 @ApiModelProperty(required = true,value = "Indicator that an action is required to allow service order fullfilment to follow up")
165 @NotNull(message = "OrderMessage correctionRequired cannot be null")
166 public boolean getCorrectionRequired() {
167 return correctionRequired;
170 public void setCorrectionRequired(boolean correctionRequired) {
171 this.correctionRequired = correctionRequired;
174 public OrderMessage severity(boolean correctionRequired) {
175 this.correctionRequired = correctionRequired;
181 public boolean equals(Object o) {
185 if (o == null || getClass() != o.getClass()) {
188 OrderMessage orderMessage = (OrderMessage) o;
189 return Objects.equals(this.code, orderMessage.code)
190 && Objects.equals(this.field, orderMessage.field)
191 && Objects.equals(this.messageInformation, orderMessage.messageInformation)
192 && Objects.equals(this.severity, orderMessage.severity)
193 && Objects.equals(this.correctionRequired, orderMessage.correctionRequired);
198 public int hashCode() {
199 return Objects.hash(code, field, messageInformation,severity);
204 public String toString() {
205 StringBuilder sb = new StringBuilder();
206 sb.append("class OrderMessage {\n");
207 sb.append(" code: ").append(toIndentedString(code)).append("\n");
208 sb.append(" field: ").append(toIndentedString(field)).append("\n");
209 sb.append(" messageInformation: ").append(toIndentedString(messageInformation)).append("\n");
210 sb.append(" severity: ").append(toIndentedString(severity)).append("\n");
211 sb.append(" correctionRequired: ").append(toIndentedString(correctionRequired)).append("\n");
213 return sb.toString();
217 * Convert the given object to string with each line indented by 4 spaces (except the first
220 private String toIndentedString(Object o) {
224 return o.toString().replace("\n", "\n ");