TCA: Replace any openecomp reference by onap
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-common / src / main / java / org / onap / dcae / apod / analytics / cdap / common / domain / tca / ThresholdCalculatorOutput.java
1 /*
2  * ===============================LICENSE_START======================================
3  *  dcae-analytics
4  * ================================================================================
5  *    Copyright © 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.dcae.apod.analytics.cdap.common.domain.tca;
22
23 import com.google.common.base.Objects;
24
25 import java.io.Serializable;
26
27 /**
28  * Simple POJO emitted by threshold calculator
29  *
30  * @author Rajiv Singla . Creation Date: 9/11/2017.
31  */
32 public class ThresholdCalculatorOutput implements Serializable {
33
34     private static final long serialVersionUID = 1L;
35
36     protected String cefMessage;
37     protected String tcaPolicy;
38     protected String violatedMetricsPerEventName;
39     protected String alertMessage;
40
41     public ThresholdCalculatorOutput() {
42         // no arg constructor
43     }
44
45     public ThresholdCalculatorOutput(String cefMessage, String tcaPolicy,
46                                      String violatedMetricsPerEventName, String alertMessage) {
47         this.cefMessage = cefMessage;
48         this.tcaPolicy = tcaPolicy;
49         this.violatedMetricsPerEventName = violatedMetricsPerEventName;
50         this.alertMessage = alertMessage;
51     }
52
53     public String getCefMessage() {
54         return cefMessage;
55     }
56
57     public void setCefMessage(String cefMessage) {
58         this.cefMessage = cefMessage;
59     }
60
61     public String getTcaPolicy() {
62         return tcaPolicy;
63     }
64
65     public void setTcaPolicy(String tcaPolicy) {
66         this.tcaPolicy = tcaPolicy;
67     }
68
69     public String getViolatedMetricsPerEventName() {
70         return violatedMetricsPerEventName;
71     }
72
73     public void setViolatedMetricsPerEventName(String violatedMetricsPerEventName) {
74         this.violatedMetricsPerEventName = violatedMetricsPerEventName;
75     }
76
77     public String getAlertMessage() {
78         return alertMessage;
79     }
80
81     public void setAlertMessage(String alertMessage) {
82         this.alertMessage = alertMessage;
83     }
84
85     @Override
86     public String toString() {
87         return Objects.toStringHelper(this)
88                 .add("cefMessage", cefMessage)
89                 .add("tcaPolicy", tcaPolicy)
90                 .add("violatedMetricsPerEventName", violatedMetricsPerEventName)
91                 .add("alertMessage", alertMessage)
92                 .toString();
93     }
94 }