b5ce27112f1f84702779e6d31da34313a1b783b4
[policy/drools-applications.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * controlloop
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.policy.controlloop;
22
23 import java.time.Instant;
24 import java.util.HashMap;
25 import java.util.Map;
26
27 import com.google.gson.annotations.SerializedName;
28
29 public class VirtualControlLoopEvent extends ControlLoopEvent {
30
31         /**
32          * 
33          */
34         private static final long serialVersionUID = -5752405682246066226L;
35         private Instant closedLoopAlarmStart;
36         private Instant closedLoopAlarmEnd;
37         @SerializedName("AAI")
38         private Map<String, String> aai = new HashMap<>();
39
40         public VirtualControlLoopEvent() {
41         }
42
43         public VirtualControlLoopEvent(VirtualControlLoopEvent event) {
44                 super(event);
45                 if (event == null) {
46                         return;
47                 }
48                 if (event.aai != null) {
49                         this.aai = new HashMap<>(event.aai);
50                 }
51                 this.closedLoopAlarmStart = event.closedLoopAlarmStart;
52                 this.closedLoopAlarmEnd = event.closedLoopAlarmEnd;
53         }
54
55         public Instant getClosedLoopAlarmStart() {
56                 return closedLoopAlarmStart;
57         }
58
59         public void setClosedLoopAlarmStart(Instant closedLoopAlarmStart) {
60                 this.closedLoopAlarmStart = closedLoopAlarmStart;
61         }
62
63         public Instant getClosedLoopAlarmEnd() {
64                 return closedLoopAlarmEnd;
65         }
66
67         public void setClosedLoopAlarmEnd(Instant closedLoopAlarmEnd) {
68                 this.closedLoopAlarmEnd = closedLoopAlarmEnd;
69         }
70
71         public Map<String, String> getAAI() {
72                 return aai;
73         }
74
75         public void setAAI(Map<String, String> aai) {
76                 this.aai = aai;
77         }
78 }