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