2 * ============LICENSE_START=======================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.seqgen.objects;
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
30 import java.util.LinkedList;
31 import java.util.List;
34 @JsonInclude(JsonInclude.Include.NON_NULL)
35 @JsonIgnoreProperties(ignoreUnknown = true)
36 public class Transaction {
38 @JsonProperty("transactionId")
39 private Integer transactionId;
41 @JsonProperty("action")
42 private String action;
44 @JsonProperty("action-level")
45 private String actionLevel;
47 @JsonProperty("action-identifier")
48 private ActionIdentifier actionIdentifier;
50 @JsonProperty("payload")
51 private String payload;
53 @JsonProperty("parameters")
54 private Map<String,String> parameters;
56 @JsonProperty("precheck-operator")
57 private String preCheckOperator;
60 @JsonProperty("precheck-options")
61 private List<PreCheckOption> precheckOptions;
63 @JsonProperty("responses")
64 private List<Response> responses;
67 responses = new LinkedList<>();
70 public Integer getTransactionId() {
74 public void setTransactionId(Integer transactionId) {
75 this.transactionId = transactionId;
78 public String getAction() {
82 public void setAction(String action) {
86 public String getActionLevel() {
90 public void setActionLevel(String actionLevel) {
91 this.actionLevel = actionLevel;
94 public ActionIdentifier getActionIdentifier() {
95 return actionIdentifier;
98 public void setActionIdentifier(ActionIdentifier actionIdentifier) {
99 this.actionIdentifier = actionIdentifier;
102 public String getPayload() {
106 public void setPayload(String payload) {
107 this.payload = payload;
110 public Map<String, String> getParameters() {
114 public void setParameters(Map<String, String> parameters) {
115 this.parameters = parameters;
118 public List<Response> getResponses() {
122 public void setResponses(List<Response> responses) {
123 this.responses = responses;
126 public void addResponse(Response response){
127 this.responses.add(response);
130 public String getPreCheckOperator() {
131 return preCheckOperator;
134 public void setPreCheckOperator(String preCheckOperator) {
135 this.preCheckOperator = preCheckOperator;
138 public List<PreCheckOption> getPrecheckOptions() {
139 return precheckOptions;
142 public void setPrecheckOptions(List<PreCheckOption> precheckOptions) {
143 this.precheckOptions = precheckOptions;