Fix checkstyle violations in sdc-main/common
[sdc.git] / common / onap-tosca-datatype / src / main / java / org / onap / sdc / tosca / datatypes / model / Trigger.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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.sdc.tosca.datatypes.model;
22
23 import java.util.Objects;
24
25 public class Trigger {
26
27     private String description;
28     private String event_type;
29     private TimeInterval schedule;
30     private EventFilter target_filter;
31     private Condition condition;
32     private Object action;
33
34     public String getDescription() {
35         return description;
36     }
37
38     public void setDescription(String description) {
39         this.description = description;
40     }
41
42     public String getEvent_type() {
43         return event_type;
44     }
45
46     public void setEvent_type(String eventType) {
47         this.event_type = eventType;
48     }
49
50     public TimeInterval getSchedule() {
51         return schedule;
52     }
53
54     public void setSchedule(TimeInterval schedule) {
55         this.schedule = schedule;
56     }
57
58     public EventFilter getTarget_filter() {
59         return target_filter;
60     }
61
62     public void setTarget_filter(EventFilter targetFilter) {
63         this.target_filter = targetFilter;
64     }
65
66     public Condition getCondition() {
67         return condition;
68     }
69
70     public void setCondition(Condition condition) {
71         this.condition = condition;
72     }
73
74     public Object getAction() {
75
76         return action;
77     }
78
79     public void setAction(Object action) {
80         this.action = action;
81     }
82
83     @Override
84     public int hashCode() {
85         return Objects.hash(description, event_type, schedule, target_filter, condition, action);
86     }
87
88     @Override
89     public boolean equals(Object o) {
90         if (this == o) {
91             return true;
92         }
93         if (o == null || getClass() != o.getClass()) {
94             return false;
95         }
96         Trigger trigger = (Trigger) o;
97         return Objects.equals(description, trigger.description)
98                 && Objects.equals(event_type, trigger.event_type)
99                 && Objects.equals(schedule, trigger.schedule)
100                 && Objects.equals(target_filter, trigger.target_filter)
101                 && Objects.equals(condition, trigger.condition)
102                 && Objects.equals(action, trigger.action);
103     }
104 }