Merge of new rebased code
[appc.git] / appc-event-listener / appc-event-listener-bundle / src / main / java / org / openecomp / appc / listener / LCM / model / DmaapMessage.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * openECOMP : APP-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                                              reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.openecomp.appc.listener.LCM.model;
23
24 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
27 import com.fasterxml.jackson.databind.JsonNode;
28
29
30 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
31 @JsonIgnoreProperties(ignoreUnknown = true)
32 public class DmaapMessage{
33
34     @JsonProperty("version")
35     private String version;
36
37     @JsonProperty("type")
38     private String type;
39
40     @JsonProperty("correlation-id")
41     private String correlationID;
42
43     @JsonProperty("cambria.partition")
44     private String cambriaPartition;
45
46     @JsonProperty("rpc-name")
47     private String rpcName;
48
49     @JsonProperty("body")
50     private JsonNode body;
51
52     public DmaapMessage() {
53     }
54
55     public String getVersion() {
56         return version;
57     }
58
59     public void setVersion(String version) {
60         this.version = version;
61     }
62
63     public String getType() {
64         return type;
65     }
66
67     public void setType(String type) {
68         this.type = type;
69     }
70
71     public String getCorrelationID() {
72         return correlationID;
73     }
74
75     public void setCorrelationID(String correlationID) {
76         this.correlationID = correlationID;
77     }
78
79     public String getCambriaPartition() {
80         return cambriaPartition;
81     }
82
83     public void setCambriaPartition(String cambriaPartition) {
84         this.cambriaPartition = cambriaPartition;
85     }
86
87     public String getRpcName() {
88         return rpcName;
89     }
90
91     public void setRpcName(String rpcName) {
92         this.rpcName = rpcName;
93     }
94
95     public JsonNode getBody() {
96         return body;
97     }
98
99     public void setBody(JsonNode body) {
100         this.body = body;
101     }
102
103     @Override
104     public String toString() {
105         return "DmaapMessage{" +
106                 "version='" + version + '\'' +
107                 ", type='" + type + '\'' +
108                 ", correlationId='" + correlationID + '\'' +
109                 ", cambriaPartition='" + cambriaPartition + '\'' +
110                 ", rpcName='" + rpcName + '\'' +
111                 ", body=" + body +
112                 '}';
113     }
114
115 }
116