TCA: Support for VES/A&AI enrichment
[dcaegen2/analytics/tca.git] / dcae-analytics-model / src / main / java / org / openecomp / dcae / apod / analytics / model / domain / policy / tca / Threshold.java
index e05cc26..0d6193d 100644 (file)
-/*
- * ===============================LICENSE_START======================================
- *  dcae-analytics
- * ================================================================================
- *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *          http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *  ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class Threshold extends BaseTCAPolicyModel {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Closed Loop Control Name
-     *
-     * @param closedLoopControlName New value for Closed Loop Control Name
-     * @return Closed Loop Control Name
-     */
-    private String closedLoopControlName;
-
-
-    /**
-     * Closed Loop Event Status
-     *
-     * @param closedLoopEventStatus New value for Closed Loop Event Status
-     * @return Closed Loop Event Status
-     */
-    private ControlLoopEventStatus closedLoopEventStatus;
-
-    /**
-     * Threshold Version
-     *
-     * @param version New value for Threshold Version
-     * @return Threshold Version
-     */
-    private String version;
-
-    /**
-     * Path of the field inside Common Event Format which needs to be monitored by TCA App
-     * for threshold crossing
-     *
-     * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA
-     * @return Path of the field inside Common Event Format which needs to be monitored by TCA App
-     */
-    private String fieldPath;
-
-    /**
-     * Threshold Value
-     *
-     * @param thresholdValue New value for Threshold Value
-     * @return Threshold Value
-     */
-    private Long thresholdValue;
-
-    /**
-     * Direction of threshold
-     *
-     * @param direction New value for Direction of threshold
-     * @return Direction of threshold
-     */
-    private Direction direction;
-
-    /**
-     * Severity of Event based on CEF Convention
-     *
-     * @param severity New value for Severity of Event based on CEF Convention
-     * @return Severity of Event based on CEF Convention
-     */
-    private EventSeverity severity;
-
-
-    /**
-     * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization
-     *
-     *
-     * @param actualFieldValue new value for actual Field value that caused the violation
-     * @return actual field value that caused the violation
-     */
-    private Long actualFieldValue;
-
-    /**
-     * Creates a deep copy of give {@link Threshold}
-     *
-     * @param threshold threshold that need to be copied
-     *
-     * @return new instance of threshold with copied value for give threshold
-     */
-    public static Threshold copy(final Threshold threshold) {
-        final Threshold newThreshold = new Threshold();
-        newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName());
-        newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus());
-        newThreshold.setFieldPath(threshold.getFieldPath());
-        newThreshold.setThresholdValue(threshold.getThresholdValue());
-        newThreshold.setDirection(threshold.getDirection());
-        newThreshold.setSeverity(threshold.getSeverity());
-        newThreshold.setActualFieldValue(threshold.getActualFieldValue());
-        return newThreshold;
-    }
-
-}
+/*\r
+ * ===============================LICENSE_START======================================\r
+ *  dcae-analytics\r
+ * ================================================================================\r
+ *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *   You may obtain a copy of the License at\r
+ *\r
+ *          http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ *  ============================LICENSE_END===========================================\r
+ */\r
+\r
+package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;\r
+\r
+import lombok.Data;\r
+import lombok.EqualsAndHashCode;\r
+import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;\r
+\r
+/**\r
+ *\r
+ * @author Rajiv Singla . Creation Date: 11/5/2016.\r
+ */\r
+@Data\r
+@EqualsAndHashCode(callSuper = true)\r
+public class Threshold extends BaseTCAPolicyModel {\r
+\r
+    private static final long serialVersionUID = 1L;\r
+\r
+    /**\r
+     * Closed Loop Control Name\r
+     *\r
+     * @param closedLoopControlName New value for Closed Loop Control Name\r
+     * @return Closed Loop Control Name\r
+     */\r
+    private String closedLoopControlName;\r
+\r
+\r
+    /**\r
+     * Closed Loop Event Status\r
+     *\r
+     * @param closedLoopEventStatus New value for Closed Loop Event Status\r
+     * @return Closed Loop Event Status\r
+     */\r
+    private ClosedLoopEventStatus closedLoopEventStatus;\r
+\r
+    /**\r
+     * Threshold Version\r
+     *\r
+     * @param version New value for Threshold Version\r
+     * @return Threshold Version\r
+     */\r
+    private String version;\r
+\r
+    /**\r
+     * Path of the field inside Common Event Format which needs to be monitored by TCA App\r
+     * for threshold crossing\r
+     *\r
+     * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA\r
+     * @return Path of the field inside Common Event Format which needs to be monitored by TCA App\r
+     */\r
+    private String fieldPath;\r
+\r
+    /**\r
+     * Threshold Value\r
+     *\r
+     * @param thresholdValue New value for Threshold Value\r
+     * @return Threshold Value\r
+     */\r
+    private Long thresholdValue;\r
+\r
+    /**\r
+     * Direction of threshold\r
+     *\r
+     * @param direction New value for Direction of threshold\r
+     * @return Direction of threshold\r
+     */\r
+    private Direction direction;\r
+\r
+    /**\r
+     * Severity of Event based on CEF Convention\r
+     *\r
+     * @param severity New value for Severity of Event based on CEF Convention\r
+     * @return Severity of Event based on CEF Convention\r
+     */\r
+    private EventSeverity severity;\r
+\r
+\r
+    /**\r
+     * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization\r
+     *\r
+     *\r
+     * @param actualFieldValue new value for actual Field value that caused the violation\r
+     * @return actual field value that caused the violation\r
+     */\r
+    private Long actualFieldValue;\r
+\r
+    /**\r
+     * Creates a deep copy of give {@link Threshold}\r
+     *\r
+     * @param threshold threshold that need to be copied\r
+     *\r
+     * @return new instance of threshold with copied value for give threshold\r
+     */\r
+    public static Threshold copy(final Threshold threshold) {\r
+        final Threshold newThreshold = new Threshold();\r
+        newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName());\r
+        newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus());\r
+        newThreshold.setFieldPath(threshold.getFieldPath());\r
+        newThreshold.setThresholdValue(threshold.getThresholdValue());\r
+        newThreshold.setDirection(threshold.getDirection());\r
+        newThreshold.setSeverity(threshold.getSeverity());\r
+        newThreshold.setActualFieldValue(threshold.getActualFieldValue());\r
+        return newThreshold;\r
+    }\r
+\r
+}\r