replace deprecated JsonSerialize.Inclusion
[appc.git] / appc-sequence-generator / appc-sequence-generator-bundle / src / main / java / org / onap / appc / seqgen / objects / Transaction.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * ============LICENSE_END=========================================================
22  */
23
24 package org.onap.appc.seqgen.objects;
25
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29
30 import java.util.LinkedList;
31 import java.util.List;
32 import java.util.Map;
33
34 @JsonInclude(JsonInclude.Include.NON_NULL)
35 @JsonIgnoreProperties(ignoreUnknown = true)
36 public class Transaction {
37
38     @JsonProperty("transactionId")
39     private Integer transactionId;
40
41     @JsonProperty("action")
42     private String action;
43
44     @JsonProperty("action-level")
45     private String actionLevel;
46
47     @JsonProperty("action-identifier")
48     private ActionIdentifier actionIdentifier;
49
50     @JsonProperty("payload")
51     private String payload;
52
53     @JsonProperty("parameters")
54     private Map<String,String> parameters;
55
56     @JsonProperty("precheck-operator")
57     private String preCheckOperator;
58
59
60     @JsonProperty("precheck-options")
61     private List<PreCheckOption> precheckOptions;
62
63     @JsonProperty("responses")
64     private List<Response> responses;
65
66     public Transaction(){
67         responses = new LinkedList<>();
68     }
69
70     public Integer getTransactionId() {
71         return transactionId;
72     }
73
74     public void setTransactionId(Integer transactionId) {
75         this.transactionId = transactionId;
76     }
77
78     public String getAction() {
79         return action;
80     }
81
82     public void setAction(String action) {
83         this.action = action;
84     }
85
86     public String getActionLevel() {
87         return actionLevel;
88     }
89
90     public void setActionLevel(String actionLevel) {
91         this.actionLevel = actionLevel;
92     }
93
94     public ActionIdentifier getActionIdentifier() {
95         return actionIdentifier;
96     }
97
98     public void setActionIdentifier(ActionIdentifier actionIdentifier) {
99         this.actionIdentifier = actionIdentifier;
100     }
101
102     public String getPayload() {
103         return payload;
104     }
105
106     public void setPayload(String payload) {
107         this.payload = payload;
108     }
109
110     public Map<String, String> getParameters() {
111         return parameters;
112     }
113
114     public void setParameters(Map<String, String> parameters) {
115         this.parameters = parameters;
116     }
117
118     public List<Response> getResponses() {
119         return responses;
120     }
121
122     public void setResponses(List<Response> responses) {
123         this.responses = responses;
124     }
125
126     public void addResponse(Response response){
127         this.responses.add(response);
128     }
129
130     public String getPreCheckOperator() {
131         return preCheckOperator;
132     }
133
134     public void setPreCheckOperator(String preCheckOperator) {
135         this.preCheckOperator = preCheckOperator;
136     }
137
138     public List<PreCheckOption> getPrecheckOptions() {
139         return precheckOptions;
140     }
141
142     public void setPrecheckOptions(List<PreCheckOption> precheckOptions) {
143         this.precheckOptions = precheckOptions;
144     }
145 }