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
37 package org.onap.nbi.apis.serviceorder.model;
39 import com.fasterxml.jackson.annotation.JsonProperty;
40 import io.swagger.annotations.ApiModel;
41 import io.swagger.annotations.ApiModelProperty;
42 import java.util.Objects;
43 import javax.validation.constraints.NotNull;
46 * An optional array of messages associated with the Order
48 @ApiModel(description = "An optional array of messages associated with the Order")
49 @javax.annotation.Generated(
50 value = "io.swagger.codegen.languages.JavaJerseyServerCodegen",
51 date = "2018-07-12T11:46:30.345Z")
52 public class OrderMessage {
55 private String code = null;
57 @JsonProperty("field")
58 private String field = null;
60 @JsonProperty("messageInformation")
61 private String messageInformation = null;
63 @JsonProperty("severity")
64 private SeverityMessage severity = null;
66 @JsonProperty("correctionRequired")
67 private boolean correctionRequired;
70 * A code associated to this message
75 @ApiModelProperty(value = "A code associated to this message")
76 public String getCode() {
80 public void setCode(String code) {
84 public OrderMessage code(String code) {
90 * Service Order attribute related to this error message
94 @JsonProperty("field")
95 @ApiModelProperty(value = "Service Order attribute related to this error message")
96 public String getField() {
100 public void setField(String field) {
104 public OrderMessage field(String field) {
110 * Message related to this order
112 * @return messageInformation
114 @JsonProperty("messageInformation")
115 @ApiModelProperty(value = "Message related to this order")
116 public String getMessageInformation() {
117 return messageInformation;
120 public void setMessageInformation(String messageInformation) {
121 this.messageInformation = messageInformation;
124 public OrderMessage messageInformation(String messageInformation) {
125 this.messageInformation = messageInformation;
130 * Gravity of this message
134 @JsonProperty("severity")
135 @ApiModelProperty(required = true, value = "Gravity of this message")
136 @NotNull(message = "OrderMessage severity cannot be null")
137 public SeverityMessage getSeverity() {
141 public void setSeverity(SeverityMessage severity) {
142 this.severity = severity;
145 public OrderMessage severity(SeverityMessage severity) {
146 this.severity = severity;
151 * Indicator that an action is required to allow service order fullfilment to follow up
153 * @return correctionRequired
155 @JsonProperty("correctionRequired")
158 value = "Indicator that an action is required to allow service order fullfilment to follow up")
159 @NotNull(message = "OrderMessage correctionRequired cannot be null")
160 public boolean getCorrectionRequired() {
161 return correctionRequired;
164 public void setCorrectionRequired(boolean correctionRequired) {
165 this.correctionRequired = correctionRequired;
168 public OrderMessage severity(boolean correctionRequired) {
169 this.correctionRequired = correctionRequired;
174 public boolean equals(Object o) {
178 if (o == null || getClass() != o.getClass()) {
181 OrderMessage orderMessage = (OrderMessage) o;
182 return Objects.equals(this.code, orderMessage.code) && Objects.equals(this.field, orderMessage.field)
183 && Objects.equals(this.messageInformation, orderMessage.messageInformation)
184 && Objects.equals(this.severity, orderMessage.severity)
185 && Objects.equals(this.correctionRequired, orderMessage.correctionRequired);
189 public int hashCode() {
190 return Objects.hash(code, field, messageInformation, severity);
194 public String toString() {
195 StringBuilder sb = new StringBuilder();
196 sb.append("class OrderMessage {\n");
197 sb.append(" code: ").append(toIndentedString(code)).append("\n");
198 sb.append(" field: ").append(toIndentedString(field)).append("\n");
199 sb.append(" messageInformation: ").append(toIndentedString(messageInformation)).append("\n");
200 sb.append(" severity: ").append(toIndentedString(severity)).append("\n");
201 sb.append(" correctionRequired: ").append(toIndentedString(correctionRequired)).append("\n");
203 return sb.toString();
207 * Convert the given object to string with each line indented by 4 spaces (except the first
210 private String toIndentedString(Object o) {
214 return o.toString().replace("\n", "\n ");