diff options
Diffstat (limited to 'cmso-ticketmgt/src/main')
2 files changed, 54 insertions, 52 deletions
diff --git a/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/ActiveTicketsResponse.java b/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/ActiveTicketsResponse.java index fe661ca..579f36a 100644 --- a/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/ActiveTicketsResponse.java +++ b/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/ActiveTicketsResponse.java @@ -1,27 +1,27 @@ /* * Copyright © 2017-2019 AT&T Intellectual Property. * Modifications Copyright © 2018 IBM. - * + * * 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. - * - * + * + * * Unless otherwise specified, all documentation contained herein is licensed * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at - * + * * https://creativecommons.org/licenses/by/4.0/ - * + * * Unless required by applicable law or agreed to in writing, documentation * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,7 +48,7 @@ public class ActiveTicketsResponse implements Serializable { private static EELFLogger log = EELFManager.getInstance().getLogger(ActiveTicketsResponse.class); public enum ActiveTicketResponseStatus { - IN_PROGESS, COMPLETED, + IN_PROGESS, COMPLETED, FAILED, } @ApiModelProperty(value = "Unique Id of the request") @@ -65,6 +65,9 @@ public class ActiveTicketsResponse implements Serializable { @ApiModelProperty(value = "If request is asynchronous (IN_PROGRESS), suggested interval to the next poll.") private Integer pollingSeconds; + @ApiModelProperty(value = "Error message for FAILED.") + private String errorMessage; + public String getRequestId() { return requestId; } @@ -97,6 +100,7 @@ public class ActiveTicketsResponse implements Serializable { this.pollingSeconds = pollingSeconds; } + @Override public String toString() { ObjectMapper mapper = new ObjectMapper(); try { diff --git a/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/TicketData.java b/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/TicketData.java index b7014b2..486034f 100644 --- a/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/TicketData.java +++ b/cmso-ticketmgt/src/main/java/org/onap/optf/ticketmgt/service/rs/models/TicketData.java @@ -34,15 +34,12 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; - import org.onap.optf.ticketmgt.common.Availability; import org.springframework.format.annotation.DateTimeFormat; - import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; - import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -55,71 +52,72 @@ public class TicketData implements Serializable { private String id; @ApiModelProperty(value = "Scheduled start time of change.") - @DateTimeFormat(pattern="yyyy-MM-dd'T'hh:mm:ss'Z'") + @DateTimeFormat(pattern = "yyyy-MM-dd'T'hh:mm:ss'Z'") private Date startTime; @ApiModelProperty(value = "Scheduled end time of change.") - @DateTimeFormat(pattern="yyyy-MM-dd'T'hh:mm:ss'Z'") + @DateTimeFormat(pattern = "yyyy-MM-dd'T'hh:mm:ss'Z'") private Date endTime; @ApiModelProperty(value = "Availability of element(s) during change window") private Availability availability; - @ApiModelProperty(value = "List elementIds of elements being changed. At least one maps to elementId in the request") + @ApiModelProperty( + value = "List elementIds of elements being changed. At least one maps to elementId in the request") private List<String> elementIds = new ArrayList<>(); - + @ApiModelProperty(value = "Details of the change.") private String changeDetails; - + public String getId() { - return id; - } + return id; + } - public void setId(String id) { - this.id = id; - } + public void setId(String id) { + this.id = id; + } - public Date getStartTime() { - return startTime; - } + public Date getStartTime() { + return startTime; + } - public void setStartTime(Date startTime) { - this.startTime = startTime; - } + public void setStartTime(Date startTime) { + this.startTime = startTime; + } - public Date getEndTime() { - return endTime; - } + public Date getEndTime() { + return endTime; + } - public void setEndTime(Date endTime) { - this.endTime = endTime; - } + public void setEndTime(Date endTime) { + this.endTime = endTime; + } - public Availability getAvailability() { - return availability; - } + public Availability getAvailability() { + return availability; + } - public void setAvailability(Availability availability) { - this.availability = availability; - } + public void setAvailability(Availability availability) { + this.availability = availability; + } - public List<String> getElementIds() { - return elementIds; - } + public List<String> getElementIds() { + return elementIds; + } - public void setElementIds(List<String> elementIds) { - this.elementIds = elementIds; - } + public void setElementIds(List<String> elementIds) { + this.elementIds = elementIds; + } - public String getChangeDetails() { - return changeDetails; - } + public String getChangeDetails() { + return changeDetails; + } - public void setChangeDetails(String changeDetails) { - this.changeDetails = changeDetails; - } + public void setChangeDetails(String changeDetails) { + this.changeDetails = changeDetails; + } - public String toString() { + public String toString() { ObjectMapper mapper = new ObjectMapper(); try { return mapper.writeValueAsString(this); |