8703b0d75076836580369e0b57f26fde6b1c34d6
[appc.git] / appc-event-listener / appc-event-listener-bundle / src / main / java / org / onap / appc / listener / LCM / model / DmaapMessage.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
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
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
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.
20  * 
21  * ============LICENSE_END=========================================================
22  */
23
24 package org.onap.appc.listener.LCM.model;
25
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.databind.JsonNode;
29 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
30
31
32 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
33 @JsonIgnoreProperties(ignoreUnknown = true)
34 public class DmaapMessage {
35
36     @JsonProperty("version")
37     private String version;
38
39     @JsonProperty("type")
40     private String type;
41
42     @JsonProperty("correlation-id")
43     private String correlationID;
44
45     @JsonProperty("cambria.partition")
46     private String cambriaPartition;
47
48     @JsonProperty("rpc-name")
49     private String rpcName;
50
51     @JsonProperty("body")
52     private JsonNode body;
53
54     public String getVersion() {
55         return version;
56     }
57
58
59     public String getType() {
60         return type;
61     }
62
63     public String getCorrelationID() {
64         return correlationID;
65     }
66
67     public String getCambriaPartition() {
68         return cambriaPartition;
69     }
70
71     public String getRpcName() {
72         return rpcName;
73     }
74
75     public JsonNode getBody() {
76         return body;
77     }
78
79
80     public void setVersion(String version) {
81         this.version = version;
82     }
83
84     public void setType(String type) {
85         this.type = type;
86     }
87
88     public void setCorrelationID(String correlationID) {
89         this.correlationID = correlationID;
90     }
91
92     public void setCambriaPartition(String cambriaPartition) {
93         this.cambriaPartition = cambriaPartition;
94     }
95
96     public void setRpcName(String rpcName) {
97         this.rpcName = rpcName;
98     }
99
100     public void setBody(JsonNode body) {
101         this.body = body;
102     }
103
104     @Override
105     public String toString() {
106         return "DmaapMessage{" +
107             "version='" + version + '\'' +
108             ", type='" + type + '\'' +
109             ", correlationId='" + correlationID + '\'' +
110             ", cambriaPartition='" + cambriaPartition + '\'' +
111             ", rpcName='" + rpcName + '\'' +
112             ", body=" + body +
113             '}';
114     }
115 }
116