/** * Copyright (c) 2018 Orange * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * API ServiceOrder serviceOrder API designed for ONAP Beijing Release. This API is build from TMF * open API16.5 + applied TMF guideline 3.0 * * OpenAPI spec version: 0.1.1_inProgress * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.onap.nbi.apis.serviceorder.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Objects; import javax.validation.constraints.NotNull; /** * An optional array of messages associated with the Order */ @ApiModel(description = "An optional array of messages associated with the Order") @javax.annotation.Generated( value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2018-07-12T11:46:30.345Z") public class OrderMessage { @JsonProperty("code") private String code = null; @JsonProperty("field") private String field = null; @JsonProperty("messageInformation") private String messageInformation = null; @JsonProperty("severity") private SeverityMessage severity = null; @JsonProperty("correctionRequired") private boolean correctionRequired; /** * A code associated to this message * * @return code **/ @JsonProperty("code") @ApiModelProperty(value = "A code associated to this message") public String getCode() { return code; } public void setCode(String code) { this.code = code; } public OrderMessage code(String code) { this.code = code; return this; } /** * Service Order attribute related to this error message * * @return field **/ @JsonProperty("field") @ApiModelProperty(value = "Service Order attribute related to this error message") public String getField() { return field; } public void setField(String field) { this.field = field; } public OrderMessage field(String field) { this.field = field; return this; } /** * Message related to this order * * @return messageInformation **/ @JsonProperty("messageInformation") @ApiModelProperty(value = "Message related to this order") public String getMessageInformation() { return messageInformation; } public void setMessageInformation(String messageInformation) { this.messageInformation = messageInformation; } public OrderMessage messageInformation(String messageInformation) { this.messageInformation = messageInformation; return this; } /** * Gravity of this message * * @return severity **/ @JsonProperty("severity") @ApiModelProperty(required = true, value = "Gravity of this message") @NotNull(message = "OrderMessage severity cannot be null") public SeverityMessage getSeverity() { return severity; } public void setSeverity(SeverityMessage severity) { this.severity = severity; } public OrderMessage severity(SeverityMessage severity) { this.severity = severity; return this; } /** * Indicator that an action is required to allow service order fullfilment to follow up * * @return correctionRequired **/ @JsonProperty("correctionRequired") @ApiModelProperty( required = true, value = "Indicator that an action is required to allow service order fullfilment to follow up") @NotNull(message = "OrderMessage correctionRequired cannot be null") public boolean getCorrectionRequired() { return correctionRequired; } public void setCorrectionRequired(boolean correctionRequired) { this.correctionRequired = correctionRequired; } public OrderMessage severity(boolean correctionRequired) { this.correctionRequired = correctionRequired; return this; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderMessage orderMessage = (OrderMessage) o; return Objects.equals(this.code, orderMessage.code) && Objects.equals(this.field, orderMessage.field) && Objects.equals(this.messageInformation, orderMessage.messageInformation) && Objects.equals(this.severity, orderMessage.severity) && Objects.equals(this.correctionRequired, orderMessage.correctionRequired); } @Override public int hashCode() { return Objects.hash(code, field, messageInformation, severity); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderMessage {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" field: ").append(toIndentedString(field)).append("\n"); sb.append(" messageInformation: ").append(toIndentedString(messageInformation)).append("\n"); sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); sb.append(" correctionRequired: ").append(toIndentedString(correctionRequired)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces (except the first * line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }