2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.sdc.tosca.datatypes.model;
23 import java.util.Objects;
25 public class Trigger {
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;
34 public String getDescription() {
38 public void setDescription(String description) {
39 this.description = description;
42 public String getEvent_type() {
46 public void setEvent_type(String eventType) {
47 this.event_type = eventType;
50 public TimeInterval getSchedule() {
54 public void setSchedule(TimeInterval schedule) {
55 this.schedule = schedule;
58 public EventFilter getTarget_filter() {
62 public void setTarget_filter(EventFilter targetFilter) {
63 this.target_filter = targetFilter;
66 public Condition getCondition() {
70 public void setCondition(Condition condition) {
71 this.condition = condition;
74 public Object getAction() {
79 public void setAction(Object action) {
84 public int hashCode() {
85 return Objects.hash(description, event_type, schedule, target_filter, condition, action);
89 public boolean equals(Object o) {
93 if (o == null || getClass() != o.getClass()) {
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);