2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.appc.seqgen.objects;
23 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
27 import java.util.LinkedList;
28 import java.util.List;
31 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
32 @JsonIgnoreProperties(ignoreUnknown = true)
33 public class Transaction {
35 @JsonProperty("transactionId")
36 private Integer transactionId;
38 @JsonProperty("action")
39 private String action;
41 @JsonProperty("action-level")
42 private String actionLevel;
44 @JsonProperty("action-identifier")
45 private ActionIdentifier actionIdentifier;
47 @JsonProperty("payload")
48 private String payload;
50 @JsonProperty("parameters")
51 private Map<String,String> parameters;
53 @JsonProperty("precheck-operator")
54 private String preCheckOperator;
57 @JsonProperty("precheck-options")
58 private List<PreCheckOption> precheckOptions;
60 @JsonProperty("responses")
61 private List<Response> responses;
64 responses = new LinkedList<>();
67 public Integer getTransactionId() {
71 public void setTransactionId(Integer transactionId) {
72 this.transactionId = transactionId;
75 public String getAction() {
79 public void setAction(String action) {
83 public String getActionLevel() {
87 public void setActionLevel(String actionLevel) {
88 this.actionLevel = actionLevel;
91 public ActionIdentifier getActionIdentifier() {
92 return actionIdentifier;
95 public void setActionIdentifier(ActionIdentifier actionIdentifier) {
96 this.actionIdentifier = actionIdentifier;
99 public String getPayload() {
103 public void setPayload(String payload) {
104 this.payload = payload;
107 public Map<String, String> getParameters() {
111 public void setParameters(Map<String, String> parameters) {
112 this.parameters = parameters;
115 public List<Response> getResponses() {
119 public void setResponses(List<Response> responses) {
120 this.responses = responses;
123 public void addResponse(Response response){
124 this.responses.add(response);
127 public String getPreCheckOperator() {
128 return preCheckOperator;
131 public void setPreCheckOperator(String preCheckOperator) {
132 this.preCheckOperator = preCheckOperator;
135 public List<PreCheckOption> getPrecheckOptions() {
136 return precheckOptions;
139 public void setPrecheckOptions(List<PreCheckOption> precheckOptions) {
140 this.precheckOptions = precheckOptions;