Containerization feature of SO
[so.git] / mso-api-handlers / mso-api-handler-common / src / main / java / org / onap / so / apihandler / camundabeans / CamundaRequest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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.so.apihandler.camundabeans;
22
23
24
25
26
27 import org.onap.so.apihandler.common.CommonConstants;
28
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31 import com.fasterxml.jackson.annotation.JsonRootName;
32
33 /**
34  * JavaBean JSON class for a "variables" which contains the xml payload that
35  * will be passed to the Camunda process
36  * 
37  */
38 @JsonPropertyOrder({ CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.CAMUNDA_HOST, 
39         CommonConstants.SCHEMA_VERSION_HEADER, CommonConstants.REQUEST_ID_HEADER, CommonConstants.SERVICE_INSTANCE_ID_HEADER,
40         CommonConstants. REQUEST_TIMEOUT_HEADER, CommonConstants.CAMUNDA_SERVICE_INPUT})
41 @JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
42 public class CamundaRequest {
43
44         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
45         private CamundaInput serviceInput;
46         
47         @JsonProperty(CommonConstants.CAMUNDA_HOST)
48         private CamundaInput host;
49         
50         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
51         private CamundaInput schema;
52         
53         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
54         private CamundaInput reqid;
55         
56         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
57         private CamundaInput svcid;
58         
59         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
60         private CamundaInput timeout;
61         
62         public CamundaRequest() {
63         }
64         
65         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
66         public CamundaInput getServiceInput() {
67                 return serviceInput;
68         }
69
70         @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
71         public void setServiceInput(CamundaInput serviceInput) {
72                 this.serviceInput = serviceInput;
73         }
74         
75         @JsonProperty(CommonConstants.CAMUNDA_HOST)
76         public CamundaInput getHost() {
77                 return host;
78         }
79
80         @JsonProperty(CommonConstants.CAMUNDA_HOST)
81         public void setHost(CamundaInput host) {
82                 this.host = host;
83         }
84
85         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
86         public CamundaInput getSchema() {
87                 return schema;
88         }
89
90         @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
91         public void setSchema(CamundaInput schema) {
92                 this.schema = schema;
93         }
94
95         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
96         public CamundaInput getReqid() {
97                 return reqid;
98         }
99
100         @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
101         public void setReqid(CamundaInput reqid) {
102                 this.reqid = reqid;
103         }
104
105         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
106         public CamundaInput getSvcid() {
107                 return svcid;
108         }
109
110         @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
111         public void setSvcid(CamundaInput svcid) {
112                 this.svcid = svcid;
113         }
114         
115
116         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
117         public CamundaInput getTimeout() {
118                 return timeout;
119         }
120
121         @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
122         public void setTimeout(CamundaInput timeout) {
123                 this.timeout = timeout;
124         }
125
126                 
127         
128         @Override
129         public String toString() {
130                 return "CamundaRequest [serviceInput=" + serviceInput + ", host="
131                                 + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
132                                 + svcid + ", timeout=" + timeout + "]";
133         }       
134         
135 }