483aaacfaff02515e676cf610387011c5d050c82
[policy/drools-applications.git] / controlloop / common / model-impl / events / src / main / java / org / onap / policy / controlloop / ControlLoopResponse.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * controlloop
4  * ================================================================================
5  * Copyright (C) 2019 Wipro Limited 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.policy.controlloop;
22
23 import com.google.gson.annotations.SerializedName;
24
25 import java.io.Serializable;
26 import java.util.UUID;
27
28 public class ControlLoopResponse implements Serializable {
29
30     private static final long serialVersionUID = 2391252138583119195L;
31
32     @SerializedName("closedLoopControlName")
33     private String closedLoopControlName;
34
35     @SerializedName("version")
36     private String version = "1.0.0";
37
38     @SerializedName("requestID")
39     private UUID requestId;
40
41     @SerializedName("target")
42     private String target;
43
44     @SerializedName("from")
45     private String from;
46
47     @SerializedName("policyName")
48     private String policyName;
49
50     @SerializedName("policyVersion")
51     private String policyVersion;
52
53     @SerializedName("payload")
54     private String payload;
55
56     public ControlLoopResponse() {
57
58     }
59
60     /**
61      * Construct an instace from an existing instance.
62      *
63      * @param response
64      *            the existing instance
65      */
66     public ControlLoopResponse(ControlLoopResponse response) {
67         if (response == null) {
68             return;
69         }
70         this.closedLoopControlName = response.closedLoopControlName;
71         this.requestId = response.requestId;
72         this.target = response.target;
73         this.from = response.from;
74         this.policyName = response.policyName;
75         this.policyVersion = response.policyVersion;
76         this.payload = response.payload;
77     }
78
79     public String getClosedLoopControlName() {
80         return closedLoopControlName;
81     }
82
83     public void setClosedLoopControlName(String closedLoopControlName) {
84         this.closedLoopControlName = closedLoopControlName;
85     }
86
87     public String getVersion() {
88         return version;
89     }
90
91     public void setVersion(String version) {
92         this.version = version;
93     }
94
95     public UUID getRequestId() {
96         return requestId;
97     }
98
99     public void setRequestId(UUID requestId) {
100         this.requestId = requestId;
101     }
102
103     public String getTarget() {
104         return target;
105     }
106
107     public void setTarget(String target) {
108         this.target = target;
109     }
110
111     public String getFrom() {
112         return from;
113     }
114
115     public void setFrom(String from) {
116         this.from = from;
117     }
118
119     public String getPolicyName() {
120         return policyName;
121     }
122
123     public void setPolicyName(String policyName) {
124         this.policyName = policyName;
125     }
126
127     public String getPolicyVersion() {
128         return policyVersion;
129     }
130
131     public void setPolicyVersion(String policyVersion) {
132         this.policyVersion = policyVersion;
133     }
134
135     public String getPayload() {
136         return payload;
137     }
138
139     public void setPayload(String payload) {
140         this.payload = payload;
141     }
142 }