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