aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain')
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/BaseDynamicPropertiesProvider.java69
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DCAEAnalyticsModel.java32
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DynamicPropertiesProvider.java56
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java32
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java45
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java41
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java34
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java117
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java31
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java63
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java46
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java36
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java57
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java65
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java32
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java161
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicUsageArray.java79
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java33
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java37
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java68
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerFunctionalRole.java102
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java59
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java35
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java114
24 files changed, 1444 insertions, 0 deletions
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/BaseDynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/BaseDynamicPropertiesProvider.java
new file mode 100644
index 0000000..4190587
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/BaseDynamicPropertiesProvider.java
@@ -0,0 +1,69 @@
+/*
+ * ===============================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;
+
+import lombok.Data;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * <p>
+ * Base Dynamic Provider provide functionality so that all the
+ * additional dynamic Properties can be accumalated in a map.
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider {
+
+ /**
+ * All non-required properties should be captured in additional properties
+ *
+ * @param dynamicProperties Dynamic properties
+ * @return dynamic properties
+ */
+ private Map<String, Object> dynamicProperties = new LinkedHashMap<>();
+
+
+ /**
+ * Add a dynamic property to Common Event Format Entity
+ *
+ * @param propertyName property name
+ * @param propertyValue property value
+ */
+ @Override
+ public void addDynamicProperties(String propertyName, Object propertyValue) {
+ dynamicProperties.put(propertyName, propertyValue);
+ }
+
+ /**
+ * Determines if dynamic properties are present for the CEF Entity
+ *
+ * @return return true if Dynamic Properties are present
+ */
+ public boolean isDynamicPropertiesPresent() {
+ return dynamicProperties.size() == 0;
+ }
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DCAEAnalyticsModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DCAEAnalyticsModel.java
new file mode 100644
index 0000000..5bb017e
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DCAEAnalyticsModel.java
@@ -0,0 +1,32 @@
+/*
+ * ===============================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;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * Marker Interface for all DCAE Analytics Model implementations
+ * </p>
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface DCAEAnalyticsModel extends Serializable {
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DynamicPropertiesProvider.java
new file mode 100644
index 0000000..28b607a
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/DynamicPropertiesProvider.java
@@ -0,0 +1,56 @@
+/*
+ * ===============================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;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * Problem: Many Entities have dynamic properties as well as known properties.
+ * Known properites can be binded explicitly with all dynamic properties need
+ * to be captured also ensuring that there must not be any loss in information
+ * during deserialization / serialization process.
+ * </p>
+ * <p>
+ * This contract allows the deserialization mechanism to catch those dynamic properties
+ * in a Map so that deserialization mechanism will not loose any information and
+ * can be serialized back with no loss in dynamic properties information
+ * </p>
+ * @author Rajiv Singla . Creation Date: 10/18/2016.
+ */
+public interface DynamicPropertiesProvider extends DCAEAnalyticsModel {
+
+
+ /**
+ * Adds dynamic properties in a Map object
+ *
+ * @param propertyName property name
+ * @param propertyValue property value
+ */
+ void addDynamicProperties(String propertyName, Object propertyValue);
+
+ /**
+ * Provides dynamic properties map
+ *
+ * @return dynamic properties map object
+ */
+ Map<String, Object> getDynamicProperties();
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java
new file mode 100644
index 0000000..654820b
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java
@@ -0,0 +1,32 @@
+/*
+ * ===============================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.cef;
+
+/**
+ * Common Event Format Alert Action
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public enum AlertAction implements CEFModel {
+
+ CLEAR, CONT, SET;
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java
new file mode 100644
index 0000000..a20c75c
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java
@@ -0,0 +1,45 @@
+/*
+ * ===============================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.cef;
+
+/**
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public enum AlertType implements CEFModel {
+
+ CARD_ANOMALY("CARD-ANOMALY"),
+ ELEMENT_ANOMALY("ELEMENT-ANOMALY"),
+ INTERFACE_ANOMALY("INTERFACE-ANOMALY"),
+ SERVICE_ANOMALY("SERVICE-ANOMALY"),
+ UNKNOWN(null);
+
+ private String name;
+
+ AlertType(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java
new file mode 100644
index 0000000..bdba70f
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java
@@ -0,0 +1,41 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.openecomp.dcae.apod.analytics.model.domain.BaseDynamicPropertiesProvider;
+
+/**
+ * <p>
+ * Base CEF Model should be extended by all CEF Model Entities.
+ * By extending CEF Model all the additional dynamic Properties
+ * can be accumalated in a map.
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 10/18/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel {
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java
new file mode 100644
index 0000000..a98b634
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java
@@ -0,0 +1,34 @@
+/*
+ * ===============================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.cef;
+
+import org.openecomp.dcae.apod.analytics.model.domain.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ * Marker interface for all DCAE Analytics Common Event Format Model implementations
+ * </p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+public interface CEFModel extends DCAEAnalyticsModel {
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java
new file mode 100644
index 0000000..7cc45d7
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java
@@ -0,0 +1,117 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Fields common to all Events
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CommonEventHeader extends BaseCEFModel {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The eventing domain associated with this event
+ *
+ * @param domain New value for domain
+ * @return The eventing domain associated with this event
+ */
+ private String domain;
+
+ /**
+ * Event key that is unique to the event source
+ *
+ * @param eventId New value for event key
+ * @return Event key that is unique to the event source
+ */
+ private String eventId;
+
+ /**
+ * Function of the source e.g. eNodeB, MME, PCRF
+ *
+ * @param functionalRole New value for functional Role
+ * @return Function of the source e.g. eNodeB, MME, PCRF
+ */
+ private String functionalRole;
+
+
+ /**
+ * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since
+ * 1 Jan 1970 not including leap seconds
+ *
+ * @param lastEpochMicrosec New value for last Epoc Microsec
+ * @return The latest unix time associated with the event from any component
+ */
+ private Long lastEpochMicrosec;
+
+
+ /**
+ * Processing Priority
+ *
+ * @param priority New value for processing Priority
+ * @return Processing Priority
+ */
+ private Priority priority;
+
+
+ /**
+ * Name of the entity reporting the event, for example, an OAM VM
+ *
+ * @param reportingEntityName New value for reporting Entity Name
+ * @return Name of the entity reporting the event, for example, an OAM VM
+ */
+ private String reportingEntityName;
+
+
+ /**
+ * Ordering of events communicated by an event source instance or 0 if not needed
+ *
+ * @param sequence New value for Sequence
+ * @return Ordering of events communicated by an event source instance or 0 if not needed
+ */
+ private Integer sequence;
+
+
+ /**
+ * Name of the entity experiencing the event issue
+ *
+ * @param sourceName New value for source name
+ * @return Name of the entity experiencing the event issue
+ */
+ private String sourceName;
+
+
+ /**
+ * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed
+ * since 1 Jan 1970 not including leap seconds
+ *
+ * @param startEpochMicrosec New value for start Epoc Microsec
+ * @return The earliest unix time associated with the event from any component
+ */
+ private Long startEpochMicrosec;
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java
new file mode 100644
index 0000000..48a9411
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java
@@ -0,0 +1,31 @@
+/*
+ * ===============================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.cef;
+
+/**
+ * Performance Criticality
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public enum Criticality implements CEFModel {
+
+ CRIT, MAJ, UNKNOWN;
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java
new file mode 100644
index 0000000..5fe59a4
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java
@@ -0,0 +1,63 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Generic Event Format
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Event extends BaseCEFModel {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Fields common to all Events
+ *
+ * @param commonEventHeader New value for common Event Header
+ * @return Fields common to all Events
+ */
+ private CommonEventHeader commonEventHeader;
+
+ /**
+ * MeasurementsForVfScaling fields
+ *
+ * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling
+ * @return MeasurementsForVfScaling fields
+ */
+ private MeasurementsForVfScalingFields measurementsForVfScalingFields;
+
+ /**
+ * Threshold crossing Fields
+ *
+ * @param thresholdCrossingAlertFields New value for Threshold crossing Fields
+ * @return Threshold crossing Fields
+ */
+ private ThresholdCrossingAlertFields thresholdCrossingAlertFields;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java
new file mode 100644
index 0000000..df97ebe
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java
@@ -0,0 +1,46 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Common Event Format - Base Event Listener
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EventListener extends BaseCEFModel {
+
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * Common Event Format - Event
+ *
+ * @param event New value for Event
+ * @return Common Event Format Event
+ */
+ private Event event;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java
new file mode 100644
index 0000000..1021cfb
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java
@@ -0,0 +1,36 @@
+/*
+ * ===============================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.cef;
+
+/**
+ * CEF Event severity or priority
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+public enum EventSeverity implements CEFModel {
+
+ //NOTE: enum order must not be changed. Events severity is ordered from high to low
+ CRITICAL,
+ MAJOR,
+ MINOR,
+ WARNING,
+ NORMAL;
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java
new file mode 100644
index 0000000..a6bf113
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java
@@ -0,0 +1,57 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * Common Event Format - MeasurementsForVfScaling fields
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MeasurementsForVfScalingFields extends BaseCEFModel {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Interval over which measurements are being reported in seconds
+ *
+ * @param measurementInterval New value for measurement Interval
+ * @return Interval over which measurements are being reported in seconds
+ */
+ private Long measurementInterval;
+
+ /**
+ * Virtual Network Card Usage Array
+ *
+ * @param vNicUsageArray New value for Virtual Network Card Usage Array
+ * @return Virtual Network Card Usage Array
+ */
+ private List<VNicUsageArray> vNicUsageArray;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java
new file mode 100644
index 0000000..e84c852
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java
@@ -0,0 +1,65 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Common Event Format - Performance PerformanceCounter
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PerformanceCounter extends BaseCEFModel {
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * Performance Counter Criticality
+ *
+ * @param criticality New value for Criticality
+ * @return Performance Counter Criticality
+ */
+ private Criticality criticality;
+ /**
+ * Performance Counter Name
+ *
+ * @param name New value for Performance counter name
+ * @return Performance Counter Name
+ */
+ private String name;
+ /**
+ * Performance Counter Threshold Crossed
+ *
+ * @param thresholdCrossed New value for Performance Counter Threshold Crossed
+ * @return Performance Counter Threshold Crossed
+ */
+ private String thresholdCrossed;
+ /**
+ * Performance Counter Value
+ *
+ * @param value New Performance Counter Value
+ * @return Performance Counter Value
+ */
+ private String value;
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java
new file mode 100644
index 0000000..3cfce75
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java
@@ -0,0 +1,32 @@
+/*
+ * ===============================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.cef;
+
+/**
+ * Common Event Format - Event processing priority
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+public enum Priority implements CEFModel {
+
+ High, Medium, Normal, Low;
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java
new file mode 100644
index 0000000..340b788
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java
@@ -0,0 +1,161 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * Common Event Format - Fields Specific to threshold crossing alert events
+ *
+ * @author Rajiv Singla . Creation Date: 11/3/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ThresholdCrossingAlertFields extends BaseCEFModel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Additional Performance counters
+ *
+ * @param additionalParameters New value for Additional Performance counters
+ * @return Additional Performance counters
+ */
+ private List<PerformanceCounter> additionalParameters;
+
+ /**
+ * Event Action
+ *
+ * @param alertAction New Event Action
+ * @return Event Action
+ */
+ private AlertAction alertAction;
+
+ /**
+ * Unique short alert description such as IF-SHUB-ERRDROP
+ *
+ * @param alertDescription New value for Unique short alert description
+ * @return Unique short alert description
+ */
+ private String alertDescription;
+
+ /**
+ * Alert type
+ *
+ * @param alertType New value for Alert Type
+ * @return Alert Type
+ */
+ private AlertType alertType;
+
+ /**
+ * Calculated API value (if applicable)
+ *
+ * @param alertValue New Calculated API value
+ * @return Calculated API value (if applicable)
+ */
+ private String alertValue;
+
+ /**
+ * List of eventIds associated with the event being reported
+ *
+ * @param associatedAlertIdList New value for eventIds associated with the event
+ * @return List of eventIds associated with the event being reported
+ */
+ private List<String> associatedAlertIdList;
+
+ /**
+ * Time when the performance collector picked up the data; with RFC 2822 compliant format:
+ * ‘Sat, 13 Mar 2010 11:29:05 -0800’
+ *
+ * @param collectionTimestamp Set new value for time when the performance collector picked up the data
+ * @return Time when the performance collector picked up the data
+ */
+ private String collectionTimestamp;
+
+ /**
+ * Specific performance collector instance used
+ *
+ * @param dataCollector New value for specific performance collector instance used
+ * @return Specific performance collector instance used
+ */
+ private String dataCollector;
+
+ /**
+ * Type of network element - internal field
+ *
+ * @param elementType New value for type of network element - internal field
+ * @return Type of network element - internal field
+ */
+ private String elementType;
+
+ /**
+ * Event severity or priority
+ *
+ * @param eventSeverity New value for event severity or priority
+ * @return Event severity or priority
+ */
+ private EventSeverity eventSeverity;
+
+ /**
+ * Time closest to when the measurement was made; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’
+ *
+ * @param eventStartTimestamp New value for time closest to when the measurement was made
+ * @return Time closest to when the measurement was made
+ */
+ private String eventStartTimestamp;
+
+ /**
+ * Physical or logical port or card (if applicable)
+ *
+ * @param interfaceName New value for Physical or logical port or card (if applicable)
+ * @return Physical or logical port or card (if applicable)
+ */
+ private String interfaceName;
+
+ /**
+ * Network name - internal field
+ *
+ * @param networkService New value for network name - internal field
+ * @return Network name - internal field
+ */
+ private String networkService;
+
+ /**
+ * Possible Root Cause (reserved for future use)
+ *
+ * @param possibleRootCause New value for possible root cause (reserved for future)
+ * @return Possible Root Cause (reserved for future use)
+ */
+ private String possibleRootCause;
+
+ /**
+ * Version of the thresholdCrossingAlertFields block
+ *
+ * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block
+ * @return Version of the thresholdCrossingAlertFields block
+ */
+ private Integer thresholdCrossingFieldsVersion;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicUsageArray.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicUsageArray.java
new file mode 100644
index 0000000..e364ca0
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicUsageArray.java
@@ -0,0 +1,79 @@
+/*
+ * ===============================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.cef;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Usage of an array of virtual network interface cards
+ * <p>
+ * @author Rajiv Singla . Creation Date: 10/17/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VNicUsageArray extends BaseCEFModel {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Virtual Network Card - Bytes In
+ *
+ * @param bytesIn New value for Virtual Network Card - Bytes In
+ * @return Virtual Network Card - Bytes In
+ */
+ private Long bytesIn;
+
+ /**
+ * Virtual Network Card - Bytes Out
+ *
+ * @param bytesOut New value for Virtual Network Card - Bytes Out
+ * @return Virtual Network Card - Bytes Out
+ */
+ private Long bytesOut;
+
+ /**
+ * Virtual Network Card - Packets In
+ *
+ * @param packetsIn New value for Virtual Network Card - Packets In
+ * @return Virtual Network Card - Packets In
+ */
+ private Long packetsIn;
+
+ /**
+ * Virtual Network Card - Packets Out
+ *
+ * @param packetsOut New value for Virtual Network Card - Packets Out
+ * @return Virtual Network Card - Packets Out
+ */
+ private Long packetsOut;
+
+ /**
+ * Virtual Network Card Identifier
+ *
+ * @param vNicIdentifier New value for Virtual Network Card Identifier
+ * @return Virtual Network Card Identifier
+ */
+ private String vNicIdentifier;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java
new file mode 100644
index 0000000..b20f179
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java
@@ -0,0 +1,33 @@
+/*
+ * ===============================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;
+
+import org.openecomp.dcae.apod.analytics.model.domain.DCAEAnalyticsModel;
+
+/**
+ * <p>
+ * Marker Interface all DCAE Analytics Policy Model implementations
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface PolicyModel extends DCAEAnalyticsModel {
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java
new file mode 100644
index 0000000..117b75e
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java
@@ -0,0 +1,37 @@
+/*
+ * ===============================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.BaseDynamicPropertiesProvider;
+
+/**
+ * <p>
+ * A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel {
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java
new file mode 100644
index 0000000..dc85d97
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java
@@ -0,0 +1,68 @@
+/*
+ * ===============================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 javax.annotation.Nonnull;
+
+/**
+ * <p>
+ * Enum for Threshold Direction
+ * </p>
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public enum Direction implements TCAPolicyModel {
+
+ LESS {
+ @Override
+ public Boolean operate(@Nonnull Long value1, @Nonnull Long value2) {
+ return value1 < value2;
+ }
+ },
+ LESS_OR_EQUAL {
+ @Override
+ public Boolean operate(@Nonnull Long value1, @Nonnull Long value2) {
+ return value1 <= value2;
+ }
+ },
+ GREATER {
+ @Override
+ public Boolean operate(@Nonnull Long value1, @Nonnull Long value2) {
+ return value1 > value2;
+ }
+ },
+ GREATER_OR_EQUAL {
+ @Override
+ public Boolean operate(@Nonnull Long value1, @Nonnull Long value2) {
+ return value1 >= value2;
+ }
+ };
+
+ /**
+ * Configure logic for a particular Direction
+ *
+ * @param value1 left operand for Direction operation
+ * @param value2 right operand for Direction operation
+ *
+ * @return result of operation for the direction logic
+ */
+ public abstract Boolean operate(@Nonnull Long value1, @Nonnull Long value2);
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerFunctionalRole.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerFunctionalRole.java
new file mode 100644
index 0000000..4edbac1
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerFunctionalRole.java
@@ -0,0 +1,102 @@
+/*
+ * ===============================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 java.util.ArrayList;
+import java.util.List;
+
+/**
+ * TCA Metrics that need to applied to each functional Role
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MetricsPerFunctionalRole extends BaseTCAPolicyModel{
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Functional Role to which TCA Policy needs to applied.
+ *
+ * @param functionalRole New value for Functional Role to which TCA Policy needs to applied
+ * @return Functional Role to which TCA Policy needs to applied
+ */
+ private String functionalRole;
+
+ /**
+ * Policy Scope
+ *
+ * @param policyScope New value for Policy Scope
+ * @return Policy Scope
+ */
+ private String policyScope;
+
+ /**
+ * Policy Name
+ *
+ * @param policyName New value for Policy Name
+ * @return Policy Name
+ */
+ private String policyName;
+
+ /**
+ * Policy Version
+ *
+ * @param policyVersion New value for Policy Version
+ * @return Policy Version
+ */
+ private String policyVersion;
+
+ /**
+ * Policy Thresholds
+ *
+ * @param thresholds New value for Policy Thresholds
+ * @return Policy Thresholds
+ */
+ private List<Threshold> thresholds;
+
+
+ /**
+ * Creates a copy of given {@link MetricsPerFunctionalRole}
+ *
+ * @param metricsPerFunctionalRole metrics Per functional role that need to copied
+ *
+ * @return copy of new metrics per function role with values copied from given metrics per functional role
+ */
+ public static MetricsPerFunctionalRole copy(final MetricsPerFunctionalRole metricsPerFunctionalRole) {
+ final MetricsPerFunctionalRole newMetricsPerFunctionalRole = new MetricsPerFunctionalRole();
+ newMetricsPerFunctionalRole.setFunctionalRole(metricsPerFunctionalRole.getFunctionalRole());
+ newMetricsPerFunctionalRole.setPolicyScope(metricsPerFunctionalRole.getPolicyScope());
+ newMetricsPerFunctionalRole.setPolicyName(metricsPerFunctionalRole.getPolicyName());
+ newMetricsPerFunctionalRole.setPolicyVersion(metricsPerFunctionalRole.getPolicyVersion());
+ if (metricsPerFunctionalRole.getThresholds() != null) {
+ newMetricsPerFunctionalRole.setThresholds(new ArrayList<>(metricsPerFunctionalRole.getThresholds()));
+ }
+ return newMetricsPerFunctionalRole;
+ }
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java
new file mode 100644
index 0000000..b62d91d
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java
@@ -0,0 +1,59 @@
+/*
+ * ===============================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.CommonEventHeader;
+
+import java.util.List;
+
+/**
+ * <p>
+ * TCA (Threshold Crossing Alert) Root
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TCAPolicy extends BaseTCAPolicyModel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * TCA Policy domain which is associated with TCA incoming CEF message {@link CommonEventHeader#getDomain()}
+ *
+ * @param domain New value for domain
+ * @return Policy domain which is associated with incoming CEF message
+ */
+ private String domain;
+
+ /**
+ * Contains TCA Policy metrics that needs to be applied to each Functional Role
+ *
+ * @param metricsPerFunctionalRole New value for metrics that needs to be applied to each Functional Role
+ * @return Contains TCA Policy metrics that needs to be applied to each Functional Role
+ */
+ private List<MetricsPerFunctionalRole> metricsPerFunctionalRole;
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java
new file mode 100644
index 0000000..18cd8a5
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java
@@ -0,0 +1,35 @@
+/*
+ * ===============================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 org.openecomp.dcae.apod.analytics.model.domain.policy.PolicyModel;
+
+/**
+ * <p>
+ * Marker interface for all TCA Policy Models
+ * </p>
+ *
+ * @author Rajiv Singla . Creation Date: 11/5/2016.
+ */
+public interface TCAPolicyModel extends PolicyModel {
+
+
+}
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java
new file mode 100644
index 0000000..b23d109
--- /dev/null
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java
@@ -0,0 +1,114 @@
+/*
+ * ===============================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;
+
+ /**
+ * 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. Ignored for deserialization
+ *
+ *
+ * @param actualFieldValue new value value for actual Field value that caused the violation
+ * @return actual field value that caused the violation
+ */
+ private Long actualFieldValue;
+
+ /**
+ * Creates a 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.setFieldPath(threshold.getFieldPath());
+ newThreshold.setThresholdValue(threshold.getThresholdValue());
+ newThreshold.setDirection(threshold.getDirection());
+ newThreshold.setSeverity(threshold.getSeverity());
+ newThreshold.setActualFieldValue(threshold.getActualFieldValue());
+ return newThreshold;
+ }
+
+}