2 * Copyright © 2017-2019 AT&T Intellectual Property.
3 * Modifications Copyright © 2018 IBM.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * Unless otherwise specified, all documentation contained herein is licensed
19 * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
20 * you may not use this documentation except in compliance with the License.
21 * You may obtain a copy of the License at
23 * https://creativecommons.org/licenses/by/4.0/
25 * Unless required by applicable law or agreed to in writing, documentation
26 * distributed under the License is distributed on an "AS IS" BASIS,
27 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28 * See the License for the specific language governing permissions and
29 * limitations under the License.
32 package org.onap.optf.cmso.optimizer.clients.ticketmgt.models;
34 import com.att.eelf.configuration.EELFLogger;
35 import com.att.eelf.configuration.EELFManager;
36 import com.fasterxml.jackson.core.JsonProcessingException;
37 import com.fasterxml.jackson.databind.ObjectMapper;
38 import io.swagger.annotations.ApiModelProperty;
39 import java.io.Serializable;
40 import java.util.ArrayList;
41 import java.util.List;
42 import org.onap.optf.cmso.optimizer.clients.common.models.ElementCriteria;
43 import org.onap.optf.cmso.optimizer.service.rs.models.ChangeWindow;
44 import org.onap.optf.cmso.optimizer.service.rs.models.NameValue;
46 public class ActiveTicketsRequest implements Serializable {
47 private static final long serialVersionUID = 1L;
48 private static EELFLogger log = EELFManager.getInstance().getLogger(ActiveTicketsRequest.class);
50 @ApiModelProperty(value = "Unique Id of the request")
51 private String requestId;
54 value = "Implementation specific name value pairs provided to be passed to Ticket Management query .")
55 private List<NameValue> commonData;
57 @ApiModelProperty(value = "Lists of desired change windows for which TicketData will be returned.")
58 private List<ChangeWindow> changeWindows = new ArrayList<>();
60 @ApiModelProperty(value = "List of the elements for which TicketData will be returned.")
61 private List<ElementCriteria> elements = new ArrayList<>();
63 public String getRequestId() {
68 public void setRequestId(String requestId) {
69 this.requestId = requestId;
73 public List<NameValue> getCommonData() {
78 public void setCommonData(List<NameValue> commonData) {
79 this.commonData = commonData;
83 public List<ChangeWindow> getChangeWindows() {
88 public void setChangeWindows(List<ChangeWindow> changeWindows) {
89 this.changeWindows = changeWindows;
93 public List<ElementCriteria> getElements() {
98 public void setElements(List<ElementCriteria> elements) {
99 this.elements = elements;
104 public String toString() {
105 ObjectMapper mapper = new ObjectMapper();
107 return mapper.writeValueAsString(this);
108 } catch (JsonProcessingException e) {
109 log.debug("Error in toString()", e);