diff --git a/models-interactions/model-impl/aai/pom.xml b/models-interactions/model-impl/aai/pom.xml
new file mode 100644
index 0000000..b086d22
--- /dev/null
+++ b/models-interactions/model-impl/aai/pom.xml
@@ -0,0 +1,68 @@
+<!--
+  ============LICENSE_START=======================================================
+  aai
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+    <artifactId>model-impl</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>aai</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>rest</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <version>2.13.0</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.powermock</groupId>
+      <artifactId>powermock-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java
new file mode 100644
index 0000000..89b15b9
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetResponse.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+
+public class AaiGetResponse implements Serializable {
+    private static final long serialVersionUID = 7311418432051756162L;
+
+    @SerializedName("requestError")
+    private AaiNqRequestError requestError;
+
+    public AaiNqRequestError getRequestError() {
+        return requestError;
+    }
+
+    public void setRequestError(AaiNqRequestError requestError) {
+        this.requestError = requestError;
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
new file mode 100644
index 0000000..666f68d
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVnfResponse.java
@@ -0,0 +1,151 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file excthe License at
+ * ept in compliance with the License.
+ * You may obtain a copy of
+ *      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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+
+public class AaiGetVnfResponse extends AaiGetResponse implements Serializable {
+
+    private static final long serialVersionUID = -6247505944905898871L;
+
+    @SerializedName("vnf-id")
+    private String vnfId;
+
+    @SerializedName("vnf-name")
+    private String vnfName;
+
+    @SerializedName("vnf-type")
+    private String vnfType;
+
+    @SerializedName("service-id")
+    private String serviceId;
+
+    @SerializedName("orchestration-status")
+    private String orchestrationStatus;
+
+    @SerializedName("in-maint")
+    private boolean inMaint;
+
+    @SerializedName("is-closed-loop-disabled")
+    private boolean isClosedLoopDisabled;
+
+    @SerializedName("model-invariant-id")
+    private String modelInvariantId;
+
+    @SerializedName("prov-status")
+    private String provStatus;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    @SerializedName("relationship-list")
+    private RelationshipList relationshipList;
+
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    public String getOrchestrationStatus() {
+        return orchestrationStatus;
+    }
+
+    public boolean getInMaint() {
+        return inMaint;
+    }
+
+    public boolean getIsClosedLoopDisabled() {
+        return isClosedLoopDisabled;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    public void setVnfId(String vnfId) {
+        this.vnfId = vnfId;
+    }
+
+    public void setVnfName(String vnfName) {
+        this.vnfName = vnfName;
+    }
+
+    public void setVnfType(String vnfType) {
+        this.vnfType = vnfType;
+    }
+
+    public void setServiceId(String serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    public void setOrchestrationStatus(String orchestrationStatus) {
+        this.orchestrationStatus = orchestrationStatus;
+    }
+
+    public void setInMaint(boolean inMaint) {
+        this.inMaint = inMaint;
+    }
+
+    public void setIsClosedLoopDisabled(boolean isClosedLoopDisabled) {
+        this.isClosedLoopDisabled = isClosedLoopDisabled;
+    }
+
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    public void setProvStatus(String provStatus) {
+        this.provStatus = provStatus;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java
new file mode 100644
index 0000000..72adb9d
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiGetVserverResponse.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class AaiGetVserverResponse extends AaiGetResponse implements Serializable {
+
+    private static final long serialVersionUID = -6247505944905898871L;
+
+    @SerializedName("vserver")
+    private List<AaiNqVServer> vserver = new LinkedList<>();
+
+    public List<AaiNqVServer> getVserver() {
+        return vserver;
+    }
+
+    public void setVserver(List<AaiNqVServer> vserver) {
+        this.vserver = vserver;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
new file mode 100644
index 0000000..bb772e6
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
@@ -0,0 +1,235 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.JsonSyntaxException;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.onap.policy.aai.util.Serialization;
+import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class handles communication towards and responses from A&AI for this module.
+ */
+public final class AaiManager {
+
+    /** The Constant logger. */
+    private static final Logger logger = LoggerFactory.getLogger(AaiManager.class);
+
+    /** The rest manager. */
+    // The REST manager used for processing REST calls for this AAI manager
+    private final RestManager restManager;
+
+    /**
+     * Constructor, create the AAI manager with the specified REST manager.
+     *
+     * @param restManager the rest manager to use for REST calls
+     */
+    public AaiManager(final RestManager restManager) {
+        this.restManager = restManager;
+    }
+
+    /**
+     * Post a query to A&AI.
+     *
+     * @param url the A&AI URL
+     * @param username the user name for authentication
+     * @param password the password for authentication
+     * @param request the request to issue towards A&AI
+     * @param requestId the UUID of the request
+     * @return the response from A&AI
+     */
+    public AaiNqResponse postQuery(String url, String username, String password, AaiNqRequest request, UUID requestId) {
+
+        final Map<String, String> headers = createHeaders(requestId);
+
+        url = url + "/aai/search/named-query";
+
+        logger.debug("RestManager.post before");
+        String requestJson = Serialization.gsonPretty.toJson(request);
+        NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, url, requestJson);
+        Pair<Integer, String> httpDetails =
+                restManager.post(url, username, password, headers, "application/json", requestJson);
+        logger.debug("RestManager.post after");
+
+        if (httpDetails == null) {
+            logger.info("AAI POST Null Response to {}", url);
+            return null;
+        }
+
+        int httpResponseCode = httpDetails.first;
+
+        logger.info(url);
+        logger.info("{}", httpResponseCode);
+        logger.info(httpDetails.second);
+
+        if (httpDetails.second != null) {
+            return composeResponse(httpDetails, url, AaiNqResponse.class);
+        }
+        return null;
+    }
+
+    /**
+     * Perform a GET request for a particular virtual server towards A&AI.
+     *
+     * @param urlGet the A&AI URL
+     * @param username the user name for authentication
+     * @param password the password for authentication
+     * @param requestId the UUID of the request
+     * @param key the key of the virtual server
+     * @return the response for the virtual server from A&AI
+     */
+    public AaiGetVserverResponse getQueryByVserverName(String urlGet, String username, String password, UUID requestId,
+            String key) {
+        return getQuery(urlGet, username, password, requestId, key, AaiGetVserverResponse.class);
+    }
+
+    /**
+     * Perform a GET request for a particular VNF by VNF ID towards A&AI.
+     *
+     * @param urlGet the A&AI URL
+     * @param username the user name for authentication
+     * @param password the password for authentication
+     * @param requestId the UUID of the request
+     * @param key the ID of the VNF
+     * @return the response for the virtual server from A&AI
+     */
+    public AaiGetVnfResponse getQueryByVnfId(String urlGet, String username, String password, UUID requestId,
+            String key) {
+        return getQuery(urlGet, username, password, requestId, key, AaiGetVnfResponse.class);
+    }
+
+    /**
+     * Perform a GET request for a particular VNF by VNF name towards A&AI.
+     *
+     * @param urlGet the A&AI URL
+     * @param username the user name for authentication
+     * @param password the password for authentication
+     * @param requestId the UUID of the request
+     * @param key the name of the VNF
+     * @return the response for the virtual server from A&AI
+     */
+    public AaiGetVnfResponse getQueryByVnfName(String urlGet, String username, String password, UUID requestId,
+            String key) {
+        return getQuery(urlGet, username, password, requestId, key, AaiGetVnfResponse.class);
+    }
+
+    /**
+     * Perform a GET query for a particular entity towards A&AI.
+     *
+     * @param <T> the generic type for the response
+     * @param urlGet the A&AI URL
+     * @param username the user name for authentication
+     * @param password the password for authentication
+     * @param requestId the UUID of the request
+     * @param key the name of the VNF
+     * @param classOfT the class of the response to return
+     * @return the response for the virtual server from A&AI
+     */
+    private <T> T getQuery(final String url, final String username, final String password, final UUID requestId,
+            final String key, final Class<T> classOfResponse) {
+
+        Map<String, String> headers = createHeaders(requestId);
+
+        String urlGet = url + key;
+
+        int attemptsLeft = 3;
+
+        while (attemptsLeft-- > 0) {
+            NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|]", CommInfrastructure.REST, urlGet);
+            Pair<Integer, String> httpDetailsGet = restManager.get(urlGet, username, password, headers);
+            if (httpDetailsGet == null) {
+                logger.info("AAI GET Null Response to {}", urlGet);
+                return null;
+            }
+
+            int httpResponseCode = httpDetailsGet.first;
+
+            logger.info(urlGet);
+            logger.info("{}", httpResponseCode);
+            logger.info(httpDetailsGet.second);
+
+            if (httpResponseCode == 200) {
+                T responseGet = composeResponse(httpDetailsGet, urlGet, classOfResponse);
+                if (responseGet != null) {
+                    return responseGet;
+                }
+            }
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException e) {
+                Thread.currentThread().interrupt();
+            }
+
+        }
+
+        return null;
+    }
+
+    /**
+     * Create the headers for the HTTP request.
+     *
+     * @param requestId the request ID to insert in the headers
+     * @return the HTTP headers
+     */
+    private Map<String, String> createHeaders(final UUID requestId) {
+        Map<String, String> headers = new HashMap<>();
+
+        headers.put("X-FromAppId", "POLICY");
+        headers.put("X-TransactionId", requestId.toString());
+        headers.put("Accept", "application/json");
+
+        return headers;
+    }
+
+    /**
+     * This method uses Google's GSON to create a response object from a JSON string.
+     *
+     * @param <T> the generic type
+     * @param httpDetails the HTTP response
+     * @param url the URL from which the response came
+     * @param classOfResponse The response class
+     * @return an instance of the response class
+     * @throws JsonSyntaxException on GSON errors instantiating the response
+     */
+    private <T> T composeResponse(final Pair<Integer, String> httpDetails, final String url,
+            final Class<T> classOfResponse) {
+        try {
+            T response = Serialization.gsonPretty.fromJson(httpDetails.second, classOfResponse);
+            NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, url, httpDetails.second);
+            return response;
+        } catch (JsonSyntaxException e) {
+            logger.error("postQuery threw: ", e);
+            return null;
+        }
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java
new file mode 100644
index 0000000..ad910dc
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqCloudRegion.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqCloudRegion implements Serializable {
+
+    private static final long serialVersionUID = -897231529157222683L;
+
+    @SerializedName("cloud-owner")
+    private String cloudOwner;
+
+    @SerializedName("cloud-region-id")
+    private String cloudRegionId;
+
+    @SerializedName("cloud-region-version")
+    private String cloudRegionVersion;
+
+    @SerializedName("complex-name")
+    private String complexName;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    public String getCloudOwner() {
+        return cloudOwner;
+    }
+
+    public String getCloudRegionId() {
+        return cloudRegionId;
+    }
+
+    public String getCloudRegionVersion() {
+        return cloudRegionVersion;
+    }
+
+    public String getComplexName() {
+        return complexName;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setCloudOwner(String cloudOwner) {
+        this.cloudOwner = cloudOwner;
+    }
+
+    public void setCloudRegionId(String cloudRegionId) {
+        this.cloudRegionId = cloudRegionId;
+    }
+
+    public void setCloudRegionVersion(String cloudRegionVersion) {
+        this.cloudRegionVersion = cloudRegionVersion;
+    }
+
+    public void setComplexName(String complexName) {
+        this.complexName = complexName;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java
new file mode 100644
index 0000000..c3139a3
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperties.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class AaiNqExtraProperties implements Serializable {
+    private static final long serialVersionUID = 4109625574744702319L;
+
+    @SerializedName("extra-property")
+    private List<AaiNqExtraProperty> extraProperty = new LinkedList<>();
+
+    public List<AaiNqExtraProperty> getExtraProperty() {
+        return extraProperty;
+    }
+
+    public void setExtraProperty(List<AaiNqExtraProperty> extraProperty) {
+        this.extraProperty = extraProperty;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java
new file mode 100644
index 0000000..045e8fa
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqExtraProperty.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqExtraProperty implements Serializable {
+
+    private static final long serialVersionUID = -3861240617222397736L;
+
+    @SerializedName("property-name")
+    private String propertyName;
+
+    @SerializedName("property-value")
+    private String propertyValue;
+
+    public AaiNqExtraProperty() {}
+
+    public AaiNqExtraProperty(String propertyName, String propertyValue) {
+        this.propertyName = propertyName;
+        this.propertyValue = propertyValue;
+    }
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+    public String getPropertyValue() {
+        return propertyValue;
+    }
+
+    public void setPropertyName(String propertyName) {
+        this.propertyName = propertyName;
+    }
+
+    public void setPropertyValue(String propertyValue) {
+        this.propertyValue = propertyValue;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java
new file mode 100644
index 0000000..d67d024
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqGenericVnf.java
@@ -0,0 +1,228 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+
+public class AaiNqGenericVnf implements Serializable {
+
+    private static final long serialVersionUID = 834322706248060560L;
+
+    @SerializedName("vnf-id")
+    private String vnfId;
+
+    @SerializedName("vnf-name")
+    private String vnfName;
+
+    @SerializedName("vnf-name2")
+    private String vnfName2;
+
+    @SerializedName("vnf-type")
+    private String vnfType;
+
+    @SerializedName("service-id")
+    private String serviceId;
+
+    @SerializedName("prov-status")
+    private String provStatus;
+
+    @SerializedName("operational-state")
+    private String operationalState;
+
+    @SerializedName("ipv4-oam-address")
+    private String ipv4OamAddress;
+
+    @SerializedName("ipv4-loopback0-address")
+    private String ipv4Loopback0Address;
+
+    @SerializedName("in-maint")
+    private Boolean inMaint;
+
+    @SerializedName("is-closed-loop-disabled")
+    private Boolean isClosedLoopDisabled;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    @SerializedName("encrypted-access-flag")
+    private Boolean encrypedAccessFlag;
+
+    @SerializedName("persona-model-id")
+    private String personaModelId;
+
+    @SerializedName("persona-model-version")
+    private String personaModelVersion;
+
+    @SerializedName("model-invariant-id")
+    private String modelInvariantId;
+
+    @SerializedName("model-version-id")
+    private String modelVersionId;
+
+    @SerializedName("model-customization-id")
+    private String modelCustomizationId = null;
+
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    public String getVnfName2() {
+        return vnfName2;
+    }
+
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    public String getOperationalState() {
+        return operationalState;
+    }
+
+    public String getIpv4OamAddress() {
+        return ipv4OamAddress;
+    }
+
+    public String getIpv4Loopback0Address() {
+        return ipv4Loopback0Address;
+    }
+
+    public Boolean getInMaint() {
+        return inMaint;
+    }
+
+    public Boolean getIsClosedLoopDisabled() {
+        return isClosedLoopDisabled;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public Boolean getEncrypedAccessFlag() {
+        return encrypedAccessFlag;
+    }
+
+    public String getPersonaModelId() {
+        return personaModelId;
+    }
+
+    public String getPersonaModelVersion() {
+        return personaModelVersion;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    public String getModelCustomizationId() {
+        return modelCustomizationId;
+    }
+
+    public void setVnfId(String vnfId) {
+        this.vnfId = vnfId;
+    }
+
+    public void setVnfName(String vnfName) {
+        this.vnfName = vnfName;
+    }
+
+    public void setVnfName2(String vnfName2) {
+        this.vnfName2 = vnfName2;
+    }
+
+    public void setVnfType(String vnfType) {
+        this.vnfType = vnfType;
+    }
+
+    public void setServiceId(String serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    public void setProvStatus(String provStatus) {
+        this.provStatus = provStatus;
+    }
+
+    public void setOperationalState(String operationalState) {
+        this.operationalState = operationalState;
+    }
+
+    public void setIpv4OamAddress(String ipv4OamAddress) {
+        this.ipv4OamAddress = ipv4OamAddress;
+    }
+
+    public void setIpv4Loopback0Address(String ipv4Loopback0Address) {
+        this.ipv4Loopback0Address = ipv4Loopback0Address;
+    }
+
+    public void setInMaint(Boolean inMaint) {
+        this.inMaint = inMaint;
+    }
+
+    public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
+        this.isClosedLoopDisabled = isClosedLoopDisabled;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public void setEncrypedAccessFlag(Boolean encrypedAccessFlag) {
+        this.encrypedAccessFlag = encrypedAccessFlag;
+    }
+
+    public void setPersonaModelId(String personaModelId) {
+        this.personaModelId = personaModelId;
+    }
+
+    public void setPersonaModelVersion(String personaModelVersion) {
+        this.personaModelVersion = personaModelVersion;
+    }
+
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+    public void setModelCustomizationId(String modelCustomizationId) {
+        this.modelCustomizationId = modelCustomizationId;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java
new file mode 100644
index 0000000..8719f6f
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInstanceFilters.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+public class AaiNqInstanceFilters implements Serializable {
+
+    private static final long serialVersionUID = 8993824591338121185L;
+
+    @SerializedName("instance-filter")
+    private List<Map<String, Map<String, String>>> instanceFilter = new LinkedList<>();
+
+    public List<Map<String, Map<String, String>>> getInstanceFilter() {
+        return instanceFilter;
+    }
+
+    public void setInstanceFilter(List<Map<String, Map<String, String>>> instanceFilter) {
+        this.instanceFilter = instanceFilter;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java
new file mode 100644
index 0000000..4ba9091
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItem.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqInventoryResponseItem implements Serializable {
+
+    private static final long serialVersionUID = 7142072567154675183L;
+
+    @SerializedName("model-name")
+    private String modelName;
+
+    @SerializedName("vf-module")
+    private AaiNqVfModule vfModule;
+
+    @SerializedName("service-instance")
+    private AaiNqServiceInstance serviceInstance;
+
+    @SerializedName("vserver")
+    private AaiNqVServer vserver;
+
+    @SerializedName("tenant")
+    private AaiNqTenant tenant;
+
+    @SerializedName("cloud-region")
+    private AaiNqCloudRegion cloudRegion;
+
+    @SerializedName("generic-vnf")
+    private AaiNqGenericVnf genericVnf;
+
+    @SerializedName("extra-properties")
+    private AaiNqExtraProperties extraProperties;
+
+    @SerializedName("inventory-response-items")
+    private AaiNqInventoryResponseItems items;
+
+    public String getModelName() {
+        return modelName;
+    }
+
+    public AaiNqVfModule getVfModule() {
+        return vfModule;
+    }
+
+    public AaiNqServiceInstance getServiceInstance() {
+        return serviceInstance;
+    }
+
+    public AaiNqVServer getVserver() {
+        return vserver;
+    }
+
+    public AaiNqTenant getTenant() {
+        return tenant;
+    }
+
+    public AaiNqCloudRegion getCloudRegion() {
+        return cloudRegion;
+    }
+
+    public AaiNqGenericVnf getGenericVnf() {
+        return genericVnf;
+    }
+
+    public AaiNqExtraProperties getExtraProperties() {
+        return extraProperties;
+    }
+
+    public AaiNqInventoryResponseItems getItems() {
+        return items;
+    }
+
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+
+    public void setVfModule(AaiNqVfModule vfModule) {
+        this.vfModule = vfModule;
+    }
+
+    public void setServiceInstance(AaiNqServiceInstance serviceInstance) {
+        this.serviceInstance = serviceInstance;
+    }
+
+    public void setVserver(AaiNqVServer vserver) {
+        this.vserver = vserver;
+    }
+
+    public void setTenant(AaiNqTenant tenant) {
+        this.tenant = tenant;
+    }
+
+    public void setCloudRegion(AaiNqCloudRegion cloudRegion) {
+        this.cloudRegion = cloudRegion;
+    }
+
+    public void setGenericVnf(AaiNqGenericVnf genericVnf) {
+        this.genericVnf = genericVnf;
+    }
+
+    public void setExtraProperties(AaiNqExtraProperties extraProperties) {
+        this.extraProperties = extraProperties;
+    }
+
+    public void setItems(AaiNqInventoryResponseItems items) {
+        this.items = items;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java
new file mode 100644
index 0000000..7d2a077
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqInventoryResponseItems.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class AaiNqInventoryResponseItems implements Serializable {
+    private static final long serialVersionUID = 7602807659381179004L;
+
+    @SerializedName("inventory-response-item")
+    private List<AaiNqInventoryResponseItem> inventoryResponseItems = new LinkedList<>();
+
+    public List<AaiNqInventoryResponseItem> getInventoryResponseItems() {
+        return inventoryResponseItems;
+    }
+
+    public void setInventoryResponseItems(List<AaiNqInventoryResponseItem> inventoryResponseItems) {
+        this.inventoryResponseItems = inventoryResponseItems;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java
new file mode 100644
index 0000000..fc64428
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqNamedQuery.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class AaiNqNamedQuery implements Serializable {
+    private static final long serialVersionUID = -3277980060302645333L;
+
+    @SerializedName("named-query-uuid")
+    private UUID namedQueryUuid;
+
+    public UUID getNamedQueryUuid() {
+        return namedQueryUuid;
+    }
+
+    public void setNamedQueryUuid(UUID namedQueryUuid) {
+        this.namedQueryUuid = namedQueryUuid;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java
new file mode 100644
index 0000000..9173fcd
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqQueryParameters.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqQueryParameters implements Serializable {
+    private static final long serialVersionUID = -4291227193197126982L;
+
+    @SerializedName("named-query")
+    private AaiNqNamedQuery namedQuery;
+
+    public AaiNqNamedQuery getNamedQuery() {
+        return namedQuery;
+    }
+
+    public void setNamedQuery(AaiNqNamedQuery namedQuery) {
+        this.namedQuery = namedQuery;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java
new file mode 100644
index 0000000..643754f
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqRequest implements Serializable {
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("query-parameters")
+    private AaiNqQueryParameters queryParameters;
+
+    @SerializedName("instance-filters")
+    private AaiNqInstanceFilters instanceFilters;
+
+    public AaiNqQueryParameters getQueryParameters() {
+        return queryParameters;
+    }
+
+    public AaiNqInstanceFilters getInstanceFilters() {
+        return instanceFilters;
+    }
+
+    public void setQueryParameters(AaiNqQueryParameters queryParameters) {
+        this.queryParameters = queryParameters;
+    }
+
+    public void setInstanceFilters(AaiNqInstanceFilters instanceFilters) {
+        this.instanceFilters = instanceFilters;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java
new file mode 100644
index 0000000..6ae4372
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqRequestError.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqRequestError implements Serializable {
+    private static final long serialVersionUID = -7742674155387022932L;
+
+    @SerializedName("serviceException")
+    private AaiNqServiceExcept serviceExcept;
+
+    public AaiNqServiceExcept getServiceExcept() {
+        return serviceExcept;
+    }
+
+    public void setServiceExcept(AaiNqServiceExcept serviceExcept) {
+        this.serviceExcept = serviceExcept;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java
new file mode 100644
index 0000000..b823cea
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponse.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class AaiNqResponse implements Serializable {
+    private static final long serialVersionUID = 8411407444051746101L;
+
+    @SerializedName("inventory-response-item")
+    private List<AaiNqInventoryResponseItem> inventoryResponseItems = new LinkedList<>();
+
+    @SerializedName("requestError")
+    private AaiNqRequestError requestError;
+
+    public List<AaiNqInventoryResponseItem> getInventoryResponseItems() {
+        return inventoryResponseItems;
+    }
+
+    public AaiNqRequestError getRequestError() {
+        return requestError;
+    }
+
+    public void setRequestError(AaiNqRequestError requestError) {
+        this.requestError = requestError;
+    }
+
+    public void setInventoryResponseItems(List<AaiNqInventoryResponseItem> inventoryResponseItems) {
+        this.inventoryResponseItems = inventoryResponseItems;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java
new file mode 100644
index 0000000..68d0727
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqResponseWrapper.java
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqResponseWrapper implements Serializable {
+    private static final long serialVersionUID = 8411407444051746101L;
+    
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseWrapper.class);
+
+    private static final Pattern VF_MODULE_NAME_PAT = Pattern.compile("(.*_)(\\d+)");
+
+    private UUID requestId;
+    private AaiNqResponse aaiNqResponse;
+
+    public AaiNqResponseWrapper() {}
+
+    public AaiNqResponseWrapper(UUID requestId, AaiNqResponse aaiNqResponse) {
+        this.requestId = requestId;
+        this.aaiNqResponse = aaiNqResponse;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public AaiNqResponse getAaiNqResponse() {
+        return aaiNqResponse;
+    }
+
+    public void setAaiNqResponse(AaiNqResponse aaiNqResponse) {
+        this.aaiNqResponse = aaiNqResponse;
+    }
+
+    /**
+     * Counts the number of VF modules, if any, in the response.
+     *
+     * @return the number of VF modules, or {@code 0} if there are none
+     */
+    public int countVfModules() {
+        return getVfModuleItems(false).size();
+    }
+
+    /**
+     * Generates the name for the next VF module.
+     *
+     * @return the name of the next VF module, or {@code null} if the name could not be
+     *         generated (i.e., because the response has no matching VF module names on
+     *         which to model it)
+     */
+    public String genVfModuleName() {
+        /*
+         * Loop through the VF modules, extracting the name prefix and the largest number
+         * suffix
+         */
+        String prefix = null;
+        int maxSuffix = -1;
+
+        for (AaiNqInventoryResponseItem item : getVfModuleItems(false)) {
+            String name = item.getVfModule().getVfModuleName();
+            Matcher matcher = VF_MODULE_NAME_PAT.matcher(name);
+            if (matcher.matches()) {
+                int suffix = Integer.parseInt(matcher.group(2));
+                if (suffix > maxSuffix) {
+                    maxSuffix = suffix;
+                    prefix = matcher.group(1);
+                }
+            }
+        }
+
+        ++maxSuffix;
+
+        return (prefix == null ? null : prefix + maxSuffix);
+    }
+
+    /**
+     * Gets a list of VF modules. If the non-base VF modules are requested, then only
+     * those whose names match the name pattern, {@link #VF_MODULE_NAME_PAT}, are
+     * returned.
+     *
+     * @param wantBaseModule {@code true} if the the base VF module(s) is desired,
+     *        {@code false} otherwise
+     * @return the list of VF module items
+     */
+    public List<AaiNqInventoryResponseItem> getVfModuleItems(boolean wantBaseModule) {
+        // get the list of items
+        List<AaiNqInventoryResponseItem> itemList;
+        try {
+            itemList = aaiNqResponse.getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0)
+                            .getItems().getInventoryResponseItems();
+
+        } catch (NullPointerException | IndexOutOfBoundsException e) {
+            logger.debug("no VF modules in AAI response", e);
+            return Collections.emptyList();
+        }
+
+        if (itemList == null) {
+            return Collections.emptyList();
+        }
+
+        /*
+         * Walk the items looking for VF modules, allocating the list only when an item is
+         * found.
+         */
+        List<AaiNqInventoryResponseItem> vfModuleItems = new ArrayList<>(itemList.size());
+
+        for (AaiNqInventoryResponseItem inventoryResponseItem : itemList) {
+            AaiNqVfModule vfmod = inventoryResponseItem.getVfModule();
+            if (vfmod == null) {
+                continue;
+            }
+
+            if (vfmod.getIsBaseVfModule() == wantBaseModule
+                            && (wantBaseModule || VF_MODULE_NAME_PAT.matcher(vfmod.getVfModuleName()).matches())) {
+                vfModuleItems.add(inventoryResponseItem);
+            }
+        }
+
+        return vfModuleItems;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java
new file mode 100644
index 0000000..7b6c502
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceExcept.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqServiceExcept implements Serializable {
+    private static final long serialVersionUID = 2858343404484338546L;
+
+    @SerializedName("messageId")
+    private String messageId;
+
+    @SerializedName("text")
+    private String text;
+
+    @SerializedName("variables")
+    private String[] variables;
+
+    public String getMessageId() {
+        return messageId;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public String[] getVariables() {
+        return variables;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java
new file mode 100644
index 0000000..2f48ad8
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqServiceInstance.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqServiceInstance implements Serializable {
+    private static final long serialVersionUID = -8000944396593889586L;
+
+    @SerializedName("service-instance-id")
+    private String serviceInstanceId;
+
+    @SerializedName("service-instance-name")
+    private String serviceInstanceName;
+
+    @SerializedName("persona-model-id")
+    private String personaModelId;
+
+    @SerializedName("persona-model-version")
+    private String personaModelVersion;
+
+    @SerializedName("service-instance-location-id")
+    private String serviceInstanceLocationId;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    @SerializedName("model-invariant-id")
+    private String modelInvariantId;
+
+    @SerializedName("model-version-id")
+    private String modelVersionId;
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public String getServiceInstanceName() {
+        return serviceInstanceName;
+    }
+
+    public String getPersonaModelId() {
+        return personaModelId;
+    }
+
+    public String getPersonaModelVersion() {
+        return personaModelVersion;
+    }
+
+    public String getServiceInstanceLocationId() {
+        return serviceInstanceLocationId;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    public void setServiceInstanceId(String serviceInstanceId) {
+        this.serviceInstanceId = serviceInstanceId;
+    }
+
+    public void setServiceInstanceName(String serviceInstanceName) {
+        this.serviceInstanceName = serviceInstanceName;
+    }
+
+    public void setPersonaModelId(String personaModelId) {
+        this.personaModelId = personaModelId;
+    }
+
+    public void setPersonaModelVersion(String personaModelVersion) {
+        this.personaModelVersion = personaModelVersion;
+    }
+
+    public void setServiceInstanceLocationId(String serviceInstanceLocationId) {
+        this.serviceInstanceLocationId = serviceInstanceLocationId;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java
new file mode 100644
index 0000000..129c059
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqTenant.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqTenant implements Serializable {
+    private static final long serialVersionUID = 4702784101671984364L;
+
+    @SerializedName("tenant-id")
+    private String tenantId;
+
+    @SerializedName("tenant-name")
+    private String tenantName;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java
new file mode 100644
index 0000000..a7286ce
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVServer.java
@@ -0,0 +1,130 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class AaiNqVServer implements Serializable {
+    private static final long serialVersionUID = -6718526692734215643L;
+
+    @SerializedName("vserver-id")
+    private String vserverId;
+
+    @SerializedName("vserver-name")
+    private String vserverName;
+
+    @SerializedName("vserver-name2")
+    private String vserverName2;
+
+    @SerializedName("prov-status")
+    private String provStatus;
+
+    @SerializedName("vserver-selflink")
+    private String vserverSelflink;
+
+    @SerializedName("in-maint")
+    private Boolean inMaint;
+
+    @SerializedName("is-closed-loop-disabled")
+    private Boolean isClosedLoopDisabled;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    @SerializedName("relationship-list")
+    private RelationshipList relationshipList;
+
+    public String getVserverId() {
+        return vserverId;
+    }
+
+    public String getVserverName() {
+        return vserverName;
+    }
+
+    public String getVserverName2() {
+        return vserverName2;
+    }
+
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    public String getVserverSelflink() {
+        return vserverSelflink;
+    }
+
+    public Boolean getInMaint() {
+        return inMaint;
+    }
+
+    public Boolean getIsClosedLoopDisabled() {
+        return isClosedLoopDisabled;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    public void setVserverId(String vserverId) {
+        this.vserverId = vserverId;
+    }
+
+    public void setVserverName(String vserverName) {
+        this.vserverName = vserverName;
+    }
+
+    public void setVserverName2(String vserverName2) {
+        this.vserverName2 = vserverName2;
+    }
+
+    public void setProvStatus(String provStatus) {
+        this.provStatus = provStatus;
+    }
+
+    public void setVserverSelflink(String vserverSelflink) {
+        this.vserverSelflink = vserverSelflink;
+    }
+
+    public void setInMaint(Boolean inMaint) {
+        this.inMaint = inMaint;
+    }
+
+    public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
+        this.isClosedLoopDisabled = isClosedLoopDisabled;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java
new file mode 100644
index 0000000..9080c48
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiNqVfModule.java
@@ -0,0 +1,183 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+
+public class AaiNqVfModule implements Serializable {
+    private static final long serialVersionUID = 8019133081429638232L;
+
+    @SerializedName("vf-module-id")
+    private String vfModuleId;
+
+    @SerializedName("vf-module-name")
+    private String vfModuleName;
+
+    @SerializedName("heat-stack-id")
+    private String heatStackId;
+
+    @SerializedName("orchestration-status")
+    private String orchestrationStatus;
+
+    @SerializedName("is-base-vf-module")
+    private Boolean isBaseVfModule;
+
+    @SerializedName("resource-version")
+    private String resourceVersion;
+
+    @SerializedName("persona-model-id")
+    private String personaModelId;
+
+    @SerializedName("persona-model-version")
+    private String personaModelVersion;
+
+    @SerializedName("widget-model-id")
+    private String widgetModelId;
+
+    @SerializedName("widget-model-version")
+    private String widgetModelVersion;
+
+    @SerializedName("contrail-service-instance-fqdn")
+    private String contrailServiceInstanceFqdn;
+
+    @SerializedName("model-invariant-id")
+    private String modelInvariantId;
+
+    @SerializedName("model-version-id")
+    private String modelVersionId;
+
+    @SerializedName("model-customization-id")
+    private String modelCustomizationId = null;
+
+    public String getVfModuleId() {
+        return vfModuleId;
+    }
+
+    public String getVfModuleName() {
+        return vfModuleName;
+    }
+
+    public String getHeatStackId() {
+        return heatStackId;
+    }
+
+    public String getOrchestrationStatus() {
+        return orchestrationStatus;
+    }
+
+    public Boolean getIsBaseVfModule() {
+        return isBaseVfModule;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public String getPersonaModelId() {
+        return personaModelId;
+    }
+
+    public String getPersonaModelVersion() {
+        return personaModelVersion;
+    }
+
+    public String getWidgetModelId() {
+        return widgetModelId;
+    }
+
+    public String getWidgetModelVersion() {
+        return widgetModelVersion;
+    }
+
+    public String getContrailServiceInstanceFqdn() {
+        return contrailServiceInstanceFqdn;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    public String getModelCustomizationId() {
+        return modelCustomizationId;
+    }
+
+    public void setVfModuleId(String vfModuleId) {
+        this.vfModuleId = vfModuleId;
+    }
+
+    public void setVfModuleName(String vfModuleName) {
+        this.vfModuleName = vfModuleName;
+    }
+
+    public void setHeatStackId(String heatStackId) {
+        this.heatStackId = heatStackId;
+    }
+
+    public void setOrchestrationStatus(String orchestrationStatus) {
+        this.orchestrationStatus = orchestrationStatus;
+    }
+
+    public void setIsBaseVfModule(Boolean isBaseVfModule) {
+        this.isBaseVfModule = isBaseVfModule;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public void setPersonaModelId(String personaModelId) {
+        this.personaModelId = personaModelId;
+    }
+
+    public void setPersonaModelVersion(String personaModelVersion) {
+        this.personaModelVersion = personaModelVersion;
+    }
+
+    public void setWidgetModelId(String widgetModelId) {
+        this.widgetModelId = widgetModelId;
+    }
+
+    public void setWidgetModelVersion(String widgetModelVersion) {
+        this.widgetModelVersion = widgetModelVersion;
+    }
+
+    public void setContrailServiceInstanceFqdn(String contrailServiceInstanceFqdn) {
+        this.contrailServiceInstanceFqdn = contrailServiceInstanceFqdn;
+    }
+
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+    public void setModelCustomizationId(String modelCustomizationId) {
+        this.modelCustomizationId = modelCustomizationId;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java
new file mode 100644
index 0000000..f992d88
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Pnf.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import java.io.Serializable;
+
+public class Pnf implements Serializable {
+    private static final long serialVersionUID = -3535108358668248501L;
+
+    private String pnfName;
+    private PnfType pnfType;
+
+    public Pnf() {
+
+    }
+
+    public Pnf(Pnf pnf) {
+        this.pnfName = pnf.pnfName;
+        this.pnfType = pnf.pnfType;
+    }
+
+    public String getPnfName() {
+        return pnfName;
+    }
+
+    public void setPnfName(String pnfName) {
+        this.pnfName = pnfName;
+    }
+
+    public PnfType getPnfType() {
+        return pnfType;
+    }
+
+    public void setPnfType(PnfType pnfType) {
+        this.pnfType = pnfType;
+    }
+
+    @Override
+    public String toString() {
+        return "PNF [PNFName=" + pnfName + ", PNFType=" + pnfType + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
+        result = prime * result + ((pnfType == null) ? 0 : pnfType.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Pnf other = (Pnf) obj;
+        if (pnfName == null) {
+            if (other.pnfName != null) {
+                return false;
+            }
+        } else if (!pnfName.equals(other.pnfName)) {
+            return false;
+        }
+        return pnfType == other.pnfType;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java
new file mode 100644
index 0000000..1a9d75e
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfInstance.java
@@ -0,0 +1,138 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import java.io.Serializable;
+
+public class PnfInstance implements Serializable {
+
+    private static final long serialVersionUID = -3694152433472165034L;
+
+    private String pnfName;
+    private String pnfInstanceName;
+    private PnfType pnfType;
+    private String pnfSerial;
+
+    public PnfInstance() {
+
+    }
+
+    /**
+     * Create an instance from a given instance.
+     * 
+     * @param instance the instance
+     */
+    public PnfInstance(PnfInstance instance) {
+        if (instance == null) {
+            return;
+        }
+        this.pnfName = instance.pnfName;
+        this.pnfInstanceName = instance.pnfInstanceName;
+        this.pnfType = instance.pnfType;
+        this.pnfSerial = instance.pnfSerial;
+    }
+
+    public String getPnfName() {
+        return pnfName;
+    }
+
+    public void setPnfName(String pnfName) {
+        this.pnfName = pnfName;
+    }
+
+    public String getPnfInstanceName() {
+        return pnfInstanceName;
+    }
+
+    public void setPnfInstanceName(String pnfInstanceName) {
+        this.pnfInstanceName = pnfInstanceName;
+    }
+
+    public PnfType getPnfType() {
+        return pnfType;
+    }
+
+    public void setPnfType(PnfType pnfType) {
+        this.pnfType = pnfType;
+    }
+
+    public String getPnfSerial() {
+        return pnfSerial;
+    }
+
+    public void setPnfSerial(String pnfSerial) {
+        this.pnfSerial = pnfSerial;
+    }
+
+    @Override
+    public String toString() {
+        return "PNFInstance [PNFName=" + pnfName + ", PNFInstanceName=" + pnfInstanceName + ", PNFType=" + pnfType
+                + ", PNFSerial=" + pnfSerial + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((pnfInstanceName == null) ? 0 : pnfInstanceName.hashCode());
+        result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
+        result = prime * result + ((pnfSerial == null) ? 0 : pnfSerial.hashCode());
+        result = prime * result + ((pnfType == null) ? 0 : pnfType.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PnfInstance other = (PnfInstance) obj;
+        if (pnfInstanceName == null) {
+            if (other.pnfInstanceName != null) {
+                return false;
+            }
+        } else if (!pnfInstanceName.equals(other.pnfInstanceName)) {
+            return false;
+        }
+        if (pnfName == null) {
+            if (other.pnfName != null) {
+                return false;
+            }
+        } else if (!pnfName.equals(other.pnfName)) {
+            return false;
+        }
+        if (pnfSerial == null) {
+            if (other.pnfSerial != null) {
+                return false;
+            }
+        } else if (!pnfSerial.equals(other.pnfSerial)) {
+            return false;
+        }
+        return pnfType == other.pnfType;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java
new file mode 100644
index 0000000..1e24844
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/PnfType.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+public enum PnfType {
+    ENODEB("eNodeB"), PSERVER("pserver");
+
+    private String type;
+
+    private PnfType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return this.type;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
new file mode 100644
index 0000000..34f82e8
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
@@ -0,0 +1,51 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class RelatedToProperty implements Serializable {
+    private static final long serialVersionUID = 5644372985092588638L;
+
+    @SerializedName("property-key")
+    private String propertyKey;
+    @SerializedName("property-value")
+    private String propertyValue;
+
+    public String getPropertyKey() {
+        return propertyKey;
+    }
+
+    public String getPropertyValue() {
+        return propertyValue;
+    }
+
+    public void setPropertyKey(String propertyKey) {
+        this.propertyKey = propertyKey;
+    }
+
+    public void setPropertyValue(String propertyValue) {
+        this.propertyValue = propertyValue;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
new file mode 100644
index 0000000..d9c55cc
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
@@ -0,0 +1,76 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class Relationship implements Serializable {
+    private static final long serialVersionUID = -68508443869003055L;
+
+    @SerializedName("related-to")
+    private String relatedTo;
+
+    @SerializedName("related-link")
+    private String relatedLink;
+
+    @SerializedName("relationship-data")
+    private List<RelationshipData> relationshipData = new LinkedList<>();
+
+    @SerializedName("related-to-property")
+    private List<RelatedToProperty> relatedToProperty = new LinkedList<>();
+
+    public String getRelatedTo() {
+        return relatedTo;
+    }
+
+    public String getRelatedLink() {
+        return relatedLink;
+    }
+
+    public List<RelationshipData> getRelationshipData() {
+        return relationshipData;
+    }
+
+    public List<RelatedToProperty> getRelatedToProperty() {
+        return relatedToProperty;
+    }
+
+    public void setRelatedTo(String relatedTo) {
+        this.relatedTo = relatedTo;
+    }
+
+    public void setRelatedLink(String relatedLink) {
+        this.relatedLink = relatedLink;
+    }
+
+    public void setRelationshipData(List<RelationshipData> relationshipData) {
+        this.relationshipData = relationshipData;
+    }
+
+    public void setRelatedToProperty(List<RelatedToProperty> relatedToProperty) {
+        this.relatedToProperty = relatedToProperty;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
new file mode 100644
index 0000000..fc6b65f
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
@@ -0,0 +1,51 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class RelationshipData implements Serializable {
+    private static final long serialVersionUID = 550450041634939768L;
+
+    @SerializedName("relationship-key")
+    private String relationshipKey;
+    @SerializedName("relationship-value")
+    private String relationshipValue;
+
+    public String getRelationshipKey() {
+        return relationshipKey;
+    }
+
+    public String getRelationshipValue() {
+        return relationshipValue;
+    }
+
+    public void setRelationshipKey(String relationshipKey) {
+        this.relationshipKey = relationshipKey;
+    }
+
+    public void setRelationshipValue(String relationshipValue) {
+        this.relationshipValue = relationshipValue;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java
new file mode 100644
index 0000000..0215e16
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipList.java
@@ -0,0 +1,45 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class RelationshipList implements Serializable {
+    private static final long serialVersionUID = 6115655704973981990L;
+
+    @SerializedName("relationship")
+    private List<Relationship> relationships = new LinkedList<>();
+
+    public List<Relationship> getRelationships() {
+        return relationships;
+    }
+
+    public void setRelationships(List<Relationship> relationships) {
+        this.relationships = relationships;
+    }
+
+
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java
new file mode 100644
index 0000000..ef7c017
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/AaiException.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai.util;
+
+public class AaiException extends Exception {
+
+    private static final long serialVersionUID = 9220983727706207465L;
+
+    public AaiException() {
+        super();
+    }
+
+    public AaiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+        super(message, cause, enableSuppression, writableStackTrace);
+    }
+
+    public AaiException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public AaiException(String message) {
+        super(message);
+    }
+
+    public AaiException(Throwable cause) {
+        super(cause);
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java
new file mode 100644
index 0000000..0ca0bb0
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/util/Serialization.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public final class Serialization {
+
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .create();
+
+    private Serialization() {}
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java
new file mode 100644
index 0000000..ab31f5c
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetResponseTest.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiGetResponseTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiGetResponseTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
+
+        AaiGetResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetResponse.class);
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        assertNotNull(resp.getRequestError());
+        assertNotNull(resp.getRequestError().getServiceExcept());
+        assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
+
+        logger.info(Serialization.gsonPretty.toJson(resp));
+
+        // verify that setXxx methods work
+        resp.setRequestError(null);
+        assertNull(resp.getRequestError());
+
+        AaiNqRequestError err = new AaiNqRequestError();
+        resp.setRequestError(err);
+        assertEquals(err, resp.getRequestError());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
new file mode 100644
index 0000000..eb05be3
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVnfResponseTest.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.List;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiGetVnfResponseTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiGetVnfResponseTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json").toPath()));
+
+        AaiGetVnfResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetVnfResponse.class);
+
+        assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", resp.getVnfId());
+        assertEquals("vLoadBalancerMS-Vnf-0809-2", resp.getVnfName());
+        assertEquals("vLoadBalancerMS/vLoadBalancerMS 0", resp.getVnfType());
+        assertEquals("1533850960381", resp.getResourceVersion());
+        assertEquals(false, resp.getInMaint());
+        assertEquals(true, resp.getIsClosedLoopDisabled());
+        assertEquals("53638a85-361a-437d-8830-4b0d5329225e", resp.getModelInvariantId());
+        assertEquals("PROV", resp.getProvStatus());
+        assertEquals("Active", resp.getOrchestrationStatus());
+        assertEquals("50e1b0be-e0c9-48e2-9f42-15279a783ee8", resp.getServiceId());
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        RelationshipList relationshipList = resp.getRelationshipList();
+        assertNotNull(relationshipList);
+
+        List<Relationship> lst = relationshipList.getRelationships();
+        assertNotNull(lst);
+
+        assertEquals(5, lst.size());
+        assertEquals("service-instance", lst.get(0).getRelatedTo());
+        assertEquals("line-of-business", lst.get(1).getRelatedTo());
+
+        logger.info(Serialization.gsonPretty.toJson(resp));
+
+        // verify that setXxx methods work
+        relationshipList = new RelationshipList();
+
+        resp.setInMaint(true);
+        resp.setIsClosedLoopDisabled(false);
+        resp.setModelInvariantId("modiv");
+        resp.setOrchestrationStatus("orch");
+        resp.setProvStatus("mystatus");
+        resp.setRelationshipList(relationshipList);
+        resp.setResourceVersion("vers");
+        resp.setServiceId("svc");
+        resp.setVnfId("vnfid");
+        resp.setVnfName("vnfname");
+        resp.setVnfType("vnftype");
+
+        assertEquals("vnfid", resp.getVnfId());
+        assertEquals("vnfname", resp.getVnfName());
+        assertEquals("vnftype", resp.getVnfType());
+        assertEquals("vers", resp.getResourceVersion());
+        assertEquals(true, resp.getInMaint());
+        assertEquals(false, resp.getIsClosedLoopDisabled());
+        assertEquals("modiv", resp.getModelInvariantId());
+        assertEquals("mystatus", resp.getProvStatus());
+        assertEquals("orch", resp.getOrchestrationStatus());
+        assertEquals("svc", resp.getServiceId());
+        assertEquals(relationshipList, resp.getRelationshipList());
+
+
+        // test error case
+        json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
+        resp = Serialization.gsonPretty.fromJson(json, AaiGetVnfResponse.class);
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        assertNotNull(resp.getRequestError());
+        assertNotNull(resp.getRequestError().getServiceExcept());
+        assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java
new file mode 100644
index 0000000..ed68aeb
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiGetVserverResponseTest.java
@@ -0,0 +1,78 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.LinkedList;
+import java.util.List;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiGetVserverResponseTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiGetVserverResponseTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json").toPath()));
+
+        AaiGetVserverResponse resp = Serialization.gsonPretty.fromJson(json, AaiGetVserverResponse.class);
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        List<AaiNqVServer> lst = resp.getVserver();
+        assertEquals(1, lst.size());
+
+        AaiNqVServer svr = lst.get(0);
+        assertNotNull(svr);
+        assertEquals("1c94da3f-16f1-4fc7-9ed1-e018dfa62774", svr.getVserverId());
+
+        logger.info(Serialization.gsonPretty.toJson(resp));
+
+        // verify that setXxx methods work
+        lst = new LinkedList<>();
+        lst.add(new AaiNqVServer());
+        lst.add(new AaiNqVServer());
+
+        resp.setVserver(lst);
+
+        assertEquals(lst, resp.getVserver());
+
+
+        // test error case
+        json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/AaiGetResponseError.json").toPath()));
+        resp = Serialization.gsonPretty.fromJson(json, AaiGetVserverResponse.class);
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        assertNotNull(resp.getRequestError());
+        assertNotNull(resp.getRequestError().getServiceExcept());
+        assertEquals("SVC3001", resp.getRequestError().getServiceExcept().getMessageId());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java
new file mode 100644
index 0000000..20aac23
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.ArgumentMatchers.anyMap;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.ArgumentMatchers.startsWith;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+
+public class AaiManagerTest {
+    RestManager restManagerMock;
+    UUID aaiNqRequestUuid = UUID.randomUUID();
+    Pair<Integer, String> httpResponseOk;
+    Pair<Integer, String> httpResponseErr0;
+    Pair<Integer, String> httpResponseErr1;
+    Pair<Integer, String> httpResponseWait;
+
+    /**
+     * Set up test cases.
+     */
+    @Before
+    public void beforeTestAaiManager() {
+        restManagerMock = mock(RestManager.class);
+
+        Map<String, String> expectedHeaders = new HashMap<>();
+        expectedHeaders.put("X-FromAppId", "POLICY");
+        expectedHeaders.put("X-TransactionId", aaiNqRequestUuid.toString());
+        expectedHeaders.put("Accept", "application/json");
+
+        AaiNqResponse aaiNqResponse = new AaiNqResponseTest().getAaiNqResponse();
+        httpResponseOk = restManagerMock.new Pair<>(200, Serialization.gsonPretty.toJson(aaiNqResponse));
+        httpResponseErr0 = restManagerMock.new Pair<>(200, null);
+        httpResponseErr1 = restManagerMock.new Pair<>(200, "{");
+        httpResponseWait = restManagerMock.new Pair<>(503, null);
+    }
+
+    @Test
+    public void testAaiManagerAaiNqRequest() {
+
+        AaiManager aaiManager = new AaiManager(restManagerMock);
+        assertNotNull(aaiManager);
+
+        UUID aaiNqUuid = UUID.randomUUID();
+
+        AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
+        AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
+        aaiNqNamedQuery.setNamedQueryUuid(aaiNqUuid);
+        aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
+
+        AaiNqRequest aaiNqRequest = new AaiNqRequest();
+        aaiNqRequest.setQueryParameters(aaiNqQueryParameters);
+
+        when(restManagerMock.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap(),
+                anyString(), anyString())).thenReturn(httpResponseOk);
+
+        AaiNqResponse aaiNqOkResponse = aaiManager.postQuery("http://somewhere.over.the.rainbow", "Dorothy", "Gale",
+                aaiNqRequest, aaiNqRequestUuid);
+        assertNotNull(aaiNqOkResponse);
+
+        when(restManagerMock.post(isNull(), eq("Dorothy"), anyString(), anyMap(), anyString(), anyString()))
+                .thenReturn(null);
+
+        AaiNqResponse aaiNqNullResponse = aaiManager.postQuery(null, "Dorothy", "Gale", null, aaiNqRequestUuid);
+        assertNull(aaiNqNullResponse);
+
+        when(restManagerMock.post(startsWith("http://somewhere.over.the.rainbow"), eq("Witch"), eq("West"), anyMap(),
+                anyString(), anyString())).thenReturn(httpResponseErr0);
+
+        AaiNqResponse aaiNqNotOkResponse0 = aaiManager.postQuery("http://somewhere.over.the.rainbow", "Witch", "West",
+                aaiNqRequest, aaiNqRequestUuid);
+        assertNull(aaiNqNotOkResponse0);
+
+        when(restManagerMock.post(startsWith("http://somewhere.under.the.rainbow"), eq("Witch"), eq("West"), anyMap(),
+                anyString(), anyString())).thenReturn(httpResponseErr1);
+
+        AaiNqResponse aaiNqNotOkResponse1 = aaiManager.postQuery("http://somewhere.under.the.rainbow", "Witch", "West",
+                aaiNqRequest, aaiNqRequestUuid);
+        assertNull(aaiNqNotOkResponse1);
+    }
+
+    @Test
+    public void testAaiManagerQueryByVserverName() {
+        AaiManager aaiManager = new AaiManager(restManagerMock);
+        assertNotNull(aaiManager);
+
+        UUID vserverNameRequestId = UUID.randomUUID();
+
+        when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
+                .thenReturn(httpResponseOk);
+
+        AaiGetVserverResponse vserverResponse = aaiManager.getQueryByVserverName("http://somewhere.over.the.rainbow",
+                "Dorothy", "Gale", vserverNameRequestId, "vserverName");
+        assertNotNull(vserverResponse);
+
+        AaiGetVserverResponse vserverNullResponse =
+                aaiManager.getQueryByVserverName(null, "Dorothy", "Gale", vserverNameRequestId, "vserverName");
+        assertNull(vserverNullResponse);
+
+        when(restManagerMock.get(startsWith("http://somewhere.under.the.rainbow"), eq("Witch"), eq("West"), anyMap()))
+                .thenReturn(httpResponseErr0);
+
+        AaiGetVserverResponse vserverNotOkResponse0 = aaiManager.getQueryByVserverName(
+                "http://somewhere.under.the.rainbow", "Witch", "West", vserverNameRequestId, "vserverName");
+        assertNull(vserverNotOkResponse0);
+    }
+
+    @Test
+    public void testAaiManagerQueryByVnfId() {
+        AaiManager aaiManager = new AaiManager(restManagerMock);
+        assertNotNull(aaiManager);
+
+        UUID vserverNameRequestId = UUID.randomUUID();
+
+        when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
+                .thenReturn(httpResponseOk);
+
+        AaiGetVnfResponse vnfResponse = aaiManager.getQueryByVnfId("http://somewhere.over.the.rainbow", "Dorothy",
+                "Gale", vserverNameRequestId, "vnfID");
+        assertNotNull(vnfResponse);
+    }
+
+    @Test
+    public void testAaiManagerQueryByVnfName() {
+        AaiManager aaiManager = new AaiManager(restManagerMock);
+        assertNotNull(aaiManager);
+
+        UUID vserverNameRequestId = UUID.randomUUID();
+
+        when(restManagerMock.get(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Gale"), anyMap()))
+                .thenReturn(httpResponseOk);
+
+        AaiGetVnfResponse vnfResponse = aaiManager.getQueryByVnfId("http://somewhere.over.the.rainbow", "Dorothy",
+                "Gale", vserverNameRequestId, "vnfName");
+        assertNotNull(vnfResponse);
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java
new file mode 100644
index 0000000..70f04df
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqCloudRegionTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqCloudRegionTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqCloudRegion aaiNqCloudRegion = new AaiNqCloudRegion();
+        aaiNqCloudRegion.setCloudOwner("Rackspace");
+        aaiNqCloudRegion.setCloudRegionId("DFW");
+        aaiNqCloudRegion.setCloudRegionVersion("v1");
+        aaiNqCloudRegion.setComplexName("SharedNode");
+        aaiNqCloudRegion.setResourceVersion("1504789196021");
+        assertNotNull(aaiNqCloudRegion);
+        assertEquals("Rackspace", aaiNqCloudRegion.getCloudOwner());
+        assertEquals("DFW", aaiNqCloudRegion.getCloudRegionId());
+        assertEquals("v1", aaiNqCloudRegion.getCloudRegionVersion());
+        assertEquals("SharedNode", aaiNqCloudRegion.getComplexName());
+        assertEquals("1504789196021", aaiNqCloudRegion.getResourceVersion());
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java
new file mode 100644
index 0000000..a4410c9
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertiesTest.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqExtraPropertiesTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqExtraProperties aaiNqExtraProperties = new AaiNqExtraProperties();
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-name", "service-instance"));
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        aaiNqExtraProperties.getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
+        aaiNqExtraProperties.getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
+        assertNotNull(aaiNqExtraProperties);
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java
new file mode 100644
index 0000000..09c8cc3
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqExtraPropertyTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqExtraPropertyTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqExtraProperty aaiNqExtraProperty = new AaiNqExtraProperty();
+        aaiNqExtraProperty.setPropertyName("model.model-name");
+        aaiNqExtraProperty.setPropertyValue("service-instance");
+        assertNotNull(aaiNqExtraProperty);
+
+        assertEquals("model.model-name", aaiNqExtraProperty.getPropertyName());
+        assertEquals("service-instance", aaiNqExtraProperty.getPropertyValue());
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java
new file mode 100644
index 0000000..e30bcaf
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqGenericVnfTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqGenericVnfTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqGenericVnf aaiNqGenericVnf = new AaiNqGenericVnf();
+        aaiNqGenericVnf.setEncrypedAccessFlag(true);
+        aaiNqGenericVnf.setInMaint(false);
+        aaiNqGenericVnf.setIpv4Loopback0Address("aa");
+        aaiNqGenericVnf.setIpv4OamAddress("oamAddress");
+        aaiNqGenericVnf.setIsClosedLoopDisabled(false);
+        aaiNqGenericVnf.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8");
+        aaiNqGenericVnf.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0");
+        aaiNqGenericVnf.setModelCustomizationId("SomeCustomizationId");
+        aaiNqGenericVnf.setOperationalState("active");
+        aaiNqGenericVnf.setPersonaModelId("653d2caa-7e47-4614-95b3-26c8d82755b8");
+        aaiNqGenericVnf.setPersonaModelVersion("98f410f6-4c63-447b-97d2-42508437cec0");
+        aaiNqGenericVnf.setProvStatus("complete");
+        aaiNqGenericVnf.setResourceVersion("1505056714553");
+        aaiNqGenericVnf.setServiceId("e8cb8968-5411-478b-906a-f28747de72cd");
+        aaiNqGenericVnf.setVnfId("ed8b2bce-6b27-4089-992c-4a2c66024bcd");
+        aaiNqGenericVnf.setVnfName("vCPEInfraVNF14a");
+        aaiNqGenericVnf.setVnfName2("malumabb12");
+        aaiNqGenericVnf.setVnfType("vCPEInfraService10/vCPEInfraService10 0");
+        assertNotNull(aaiNqGenericVnf);
+
+        assertEquals(true, aaiNqGenericVnf.getEncrypedAccessFlag());
+        assertEquals(false, aaiNqGenericVnf.getInMaint());
+        assertEquals("aa", aaiNqGenericVnf.getIpv4Loopback0Address());
+        assertEquals("oamAddress", aaiNqGenericVnf.getIpv4OamAddress());
+        assertEquals(false, aaiNqGenericVnf.getIsClosedLoopDisabled());
+        assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getModelInvariantId());
+        assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getModelVersionId());
+        assertEquals("SomeCustomizationId", aaiNqGenericVnf.getModelCustomizationId());
+        assertEquals("active", aaiNqGenericVnf.getOperationalState());
+        assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getPersonaModelId());
+        assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getPersonaModelVersion());
+        assertEquals("complete", aaiNqGenericVnf.getProvStatus());
+        assertEquals("1505056714553", aaiNqGenericVnf.getResourceVersion());
+        assertEquals("e8cb8968-5411-478b-906a-f28747de72cd", aaiNqGenericVnf.getServiceId());
+        assertEquals("ed8b2bce-6b27-4089-992c-4a2c66024bcd", aaiNqGenericVnf.getVnfId());
+        assertEquals("vCPEInfraVNF14a", aaiNqGenericVnf.getVnfName());
+        assertEquals("malumabb12", aaiNqGenericVnf.getVnfName2());
+        assertEquals("vCPEInfraService10/vCPEInfraService10 0", aaiNqGenericVnf.getVnfType());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java
new file mode 100644
index 0000000..adafa1b
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInstanceFiltersTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqInstanceFiltersTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqInstanceFilters aaiNqInstanceFilters = new AaiNqInstanceFilters();
+        assertNotNull(aaiNqInstanceFilters);
+
+        aaiNqInstanceFilters.setInstanceFilter(aaiNqInstanceFilters.getInstanceFilter());;
+        assertNotNull(aaiNqInstanceFilters);
+        assertNotNull(aaiNqInstanceFilters.getInstanceFilter());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java
new file mode 100644
index 0000000..eefe807
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemTest.java
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.util.LinkedList;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqInventoryResponseItemTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqInventoryResponseItemTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqInventoryResponseItem aaiNqInventoryResponseItem = new AaiNqInventoryResponseItem();
+        aaiNqInventoryResponseItem.setModelName("service-instance");
+        AaiNqCloudRegion aaiNqCloudRegion = new AaiNqCloudRegion();
+        aaiNqCloudRegion.setCloudOwner("OWNER");
+        aaiNqCloudRegion.setCloudRegionId("REGIONID");
+        aaiNqCloudRegion.setCloudRegionVersion("2.5");
+        aaiNqCloudRegion.setComplexName("COMPLEXNAME");
+        aaiNqCloudRegion.setResourceVersion("1485365988");
+        aaiNqInventoryResponseItem.setCloudRegion(aaiNqCloudRegion);
+        AaiNqExtraProperties aaiNqExtraProperties = new AaiNqExtraProperties();
+        aaiNqExtraProperties.setExtraProperty(new LinkedList<>());
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        aaiNqExtraProperties.getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        aaiNqExtraProperties.getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
+        aaiNqExtraProperties.getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
+        aaiNqInventoryResponseItem.setExtraProperties(aaiNqExtraProperties);
+        AaiNqGenericVnf aaiNqGenericVnf = new AaiNqGenericVnf();
+        aaiNqGenericVnf.setVnfId("dhv-test-gvnf");
+        aaiNqGenericVnf.setVnfName("dhv-test-gvnf-name");
+        aaiNqGenericVnf.setVnfName2("dhv-test-gvnf-name2");
+        aaiNqGenericVnf.setVnfType("SW");
+        aaiNqGenericVnf.setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
+        aaiNqGenericVnf.setProvStatus("PREPROV");
+        aaiNqGenericVnf.setOperationalState("dhv-test-operational-state");
+        aaiNqGenericVnf.setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
+        aaiNqGenericVnf.setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
+        aaiNqGenericVnf.setInMaint(false);
+        aaiNqGenericVnf.setIsClosedLoopDisabled(false);
+        aaiNqGenericVnf.setResourceVersion("1485366450");
+        aaiNqGenericVnf.setEncrypedAccessFlag(true);
+        aaiNqGenericVnf.setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
+        aaiNqGenericVnf.setPersonaModelVersion("1.0");
+        aaiNqInventoryResponseItem.setGenericVnf(aaiNqGenericVnf);
+        AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
+        serviceItem.setModelName("service-instance");
+        serviceItem.setServiceInstance(new AaiNqServiceInstance());
+        serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
+        serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
+        serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        serviceItem.getServiceInstance().setResourceVersion("1485366092");
+        serviceItem.setExtraProperties(new AaiNqExtraProperties());
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
+
+        AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
+        vfModuleItem.setModelName("vf-module");
+        vfModuleItem.setVfModule(new AaiNqVfModule());
+        vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
+        vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
+        vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
+        vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
+        vfModuleItem.getVfModule().setIsBaseVfModule(true);
+        vfModuleItem.getVfModule().setResourceVersion("1485366450");
+        vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
+        vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
+        vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
+        vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
+
+        AaiNqInventoryResponseItems aaiNqInventoryResponseItems = new AaiNqInventoryResponseItems();
+        aaiNqInventoryResponseItems.getInventoryResponseItems().add(serviceItem);
+        aaiNqInventoryResponseItems.getInventoryResponseItems().add(vfModuleItem);
+        aaiNqInventoryResponseItem.setItems(aaiNqInventoryResponseItems);
+        aaiNqInventoryResponseItem.setModelName("model-name");
+        AaiNqServiceInstance serviceInstance = new AaiNqServiceInstance();
+        serviceInstance.setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        serviceInstance.setServiceInstanceName("dhv-test-service-instance-name1");
+        serviceInstance.setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        serviceInstance.setPersonaModelVersion("1.0");
+        serviceInstance.setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        serviceInstance.setResourceVersion("1485366092");
+        aaiNqInventoryResponseItem.setServiceInstance(serviceInstance);
+        AaiNqTenant aaiNqTenant = new AaiNqTenant();
+        aaiNqTenant.setTenantId("dhv-test-tenant");
+        aaiNqTenant.setTenantName("dhv-test-tenant-name");
+        aaiNqTenant.setResourceVersion("1485366334");
+        aaiNqInventoryResponseItem.setTenant(aaiNqTenant);
+        AaiNqVfModule aaiNqVfModule = new AaiNqVfModule();
+        aaiNqVfModule.setVfModuleId("example-vf-module-id-val-49261");
+        aaiNqVfModule.setVfModuleName("example-vf-module-name-val-73074");
+        aaiNqVfModule.setHeatStackId("example-heat-stack-id-val-86300");
+        aaiNqVfModule.setOrchestrationStatus("example-orchestration-status-val-56523");
+        aaiNqVfModule.setIsBaseVfModule(true);
+        aaiNqVfModule.setResourceVersion("1485366450");
+        aaiNqVfModule.setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        aaiNqVfModule.setPersonaModelVersion("1.0");
+        aaiNqVfModule.setWidgetModelId("example-widget-model-id-val-92571");
+        aaiNqVfModule.setWidgetModelVersion("example-widget-model-version-val-83317");
+        aaiNqVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        aaiNqInventoryResponseItem.setVfModule(aaiNqVfModule);
+        AaiNqVServer aaiNqVServer = new AaiNqVServer();
+        aaiNqVServer.setVserverId("dhv-test-vserver");
+        aaiNqVServer.setVserverName("dhv-test-vserver-name");
+        aaiNqVServer.setVserverName2("dhv-test-vserver-name2");
+        aaiNqVServer.setProvStatus("PREPROV");
+        aaiNqVServer.setVserverSelflink("dhv-test-vserver-selflink");
+        aaiNqVServer.setInMaint(false);
+        aaiNqVServer.setIsClosedLoopDisabled(false);
+        aaiNqVServer.setResourceVersion("1485366417");
+        aaiNqInventoryResponseItem.setVserver(aaiNqVServer);
+        assertNotNull(aaiNqInventoryResponseItem);
+
+        logger.info(Serialization.gsonPretty.toJson(aaiNqInventoryResponseItem));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java
new file mode 100644
index 0000000..796e692
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqInventoryResponseItemsTest.java
@@ -0,0 +1,164 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.LinkedList;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqInventoryResponseItemsTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqInventoryResponseItemsTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
+        serviceItem.setModelName("service-instance");
+        assertEquals("service-instance", serviceItem.getModelName());
+
+        serviceItem.setServiceInstance(new AaiNqServiceInstance());
+        serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
+        serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
+        serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        serviceItem.getServiceInstance().setResourceVersion("1485366092");
+        serviceItem.setExtraProperties(new AaiNqExtraProperties());
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
+
+        AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
+        vfModuleItem.setModelName("vf-module");
+        vfModuleItem.setVfModule(new AaiNqVfModule());
+        vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
+        vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
+        vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
+        vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
+        vfModuleItem.getVfModule().setIsBaseVfModule(true);
+        vfModuleItem.getVfModule().setResourceVersion("1485366450");
+        vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
+        vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
+        vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
+        vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
+
+        AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
+        genericVnfItem.setModelName("generic-vnf");
+        genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
+        genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
+        genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
+        genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
+        genericVnfItem.getGenericVnf().setVnfType("SW");
+        genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
+        genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
+        genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
+        genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
+        genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
+        genericVnfItem.getGenericVnf().setInMaint(false);
+        genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
+        genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
+        genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
+        genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
+        genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
+        genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
+        genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-type", "widget"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
+        genericVnfItem.setItems(new AaiNqInventoryResponseItems());
+        genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
+        genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
+
+        AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
+        cloudItem.setCloudRegion(new AaiNqCloudRegion());
+        cloudItem.getCloudRegion().setCloudOwner("OWNER");
+        cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
+        cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
+        cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
+        cloudItem.getCloudRegion().setResourceVersion("1485365988");
+
+        AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
+        tenantItem.setTenant(new AaiNqTenant());
+        tenantItem.getTenant().setTenantId("dhv-test-tenant");
+        tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
+        tenantItem.getTenant().setResourceVersion("1485366334");
+        tenantItem.setItems(new AaiNqInventoryResponseItems());
+        tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
+        AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
+        vserverItem.setVserver(new AaiNqVServer());
+        vserverItem.getVserver().setVserverId("dhv-test-vserver");
+        vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
+        vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
+        vserverItem.getVserver().setProvStatus("PREPROV");
+        vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
+        vserverItem.getVserver().setInMaint(false);
+        vserverItem.getVserver().setIsClosedLoopDisabled(false);
+        vserverItem.getVserver().setResourceVersion("1485366417");
+        vserverItem.setItems(new AaiNqInventoryResponseItems());
+        vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
+        vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
+
+        AaiNqInventoryResponseItems aaiNqInventoryResponseItems = new AaiNqInventoryResponseItems();
+        aaiNqInventoryResponseItems.getInventoryResponseItems().add(vserverItem);
+        assertNotNull(aaiNqInventoryResponseItems);
+        logger.info(Serialization.gsonPretty.toJson(aaiNqInventoryResponseItems));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java
new file mode 100644
index 0000000..a620466
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqNamedQueryTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqNamedQueryTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
+        UUID uuid = UUID.randomUUID();
+        aaiNqNamedQuery.setNamedQueryUuid(uuid);
+        assertNotNull(aaiNqNamedQuery);
+        assertEquals(aaiNqNamedQuery.getNamedQueryUuid(), uuid);
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java
new file mode 100644
index 0000000..2c1c0bf
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqQueryParametersTest.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AaiNqQueryParametersTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
+        AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
+        aaiNqNamedQuery.setNamedQueryUuid(UUID.randomUUID());
+        aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
+        assertNotNull(aaiNqNamedQuery);
+        assertEquals(aaiNqQueryParameters.getNamedQuery(), aaiNqNamedQuery);
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java
new file mode 100644
index 0000000..6aff8bc
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestErrorTest.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class AaiNqRequestErrorTest {
+
+    @Test
+    public void test() {
+        AaiNqRequestError aainqRequestError = new AaiNqRequestError();
+        AaiNqServiceExcept serviceExcept = new AaiNqServiceExcept();
+        aainqRequestError.setServiceExcept(serviceExcept);
+        assertEquals(aainqRequestError.getServiceExcept(), serviceExcept);
+
+        assertNull(serviceExcept.getMessageId());
+        assertNull(serviceExcept.getText());
+        assertNull(serviceExcept.getVariables());
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java
new file mode 100644
index 0000000..982258a
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqRequestTest.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqRequestTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqRequestTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqRequest aaiNqRequest = new AaiNqRequest();
+        AaiNqInstanceFilters aaiNqInstanceFilters = new AaiNqInstanceFilters();
+
+        aaiNqRequest.setInstanceFilters(aaiNqInstanceFilters);
+        assertNotNull(aaiNqRequest.getInstanceFilters());
+        AaiNqNamedQuery aaiNqNamedQuery = new AaiNqNamedQuery();
+        UUID uuid = UUID.randomUUID();
+        aaiNqNamedQuery.setNamedQueryUuid(uuid);
+
+        AaiNqQueryParameters aaiNqQueryParameters = new AaiNqQueryParameters();
+        aaiNqQueryParameters.setNamedQuery(aaiNqNamedQuery);
+        aaiNqRequest.setQueryParameters(aaiNqQueryParameters);
+
+        assertNotNull(aaiNqRequest);
+
+        assertEquals(aaiNqNamedQuery.getNamedQueryUuid(), uuid);
+        assertEquals(aaiNqQueryParameters.getNamedQuery(), aaiNqNamedQuery);
+        assertEquals(aaiNqRequest.getQueryParameters(), aaiNqQueryParameters);
+
+        logger.info(Serialization.gsonPretty.toJson(aaiNqRequest));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java
new file mode 100644
index 0000000..42979a4
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseTest.java
@@ -0,0 +1,161 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import java.util.LinkedList;
+
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqResponseTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseTest.class);
+
+    @Test
+    public void test() {
+        getAaiNqResponse();
+    }
+
+    /**
+     * Get A&AI NQ response.
+     * 
+     * @return the A&AI NG response
+     */
+    public AaiNqResponse getAaiNqResponse() {
+        AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
+        serviceItem.setModelName("service-instance");
+        serviceItem.setServiceInstance(new AaiNqServiceInstance());
+        serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
+        serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
+        serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        serviceItem.getServiceInstance().setResourceVersion("1485366092");
+        serviceItem.setExtraProperties(new AaiNqExtraProperties());
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
+
+        AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
+        vfModuleItem.setModelName("vf-module");
+        vfModuleItem.setVfModule(new AaiNqVfModule());
+        vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
+        vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
+        vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
+        vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
+        vfModuleItem.getVfModule().setIsBaseVfModule(true);
+        vfModuleItem.getVfModule().setResourceVersion("1485366450");
+        vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
+        vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
+        vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
+        vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
+
+        AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
+        genericVnfItem.setModelName("generic-vnf");
+        genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
+        genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
+        genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
+        genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
+        genericVnfItem.getGenericVnf().setVnfType("SW");
+        genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
+        genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
+        genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
+        genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
+        genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
+        genericVnfItem.getGenericVnf().setInMaint(false);
+        genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
+        genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
+        genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
+        genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
+        genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
+        genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
+        genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-type", "widget"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
+        genericVnfItem.setItems(new AaiNqInventoryResponseItems());
+        genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
+        genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
+
+        AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
+        cloudItem.setCloudRegion(new AaiNqCloudRegion());
+        cloudItem.getCloudRegion().setCloudOwner("OWNER");
+        cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
+        cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
+        cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
+        cloudItem.getCloudRegion().setResourceVersion("1485365988");
+
+        AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
+        tenantItem.setTenant(new AaiNqTenant());
+        tenantItem.getTenant().setTenantId("dhv-test-tenant");
+        tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
+        tenantItem.getTenant().setResourceVersion("1485366334");
+        tenantItem.setItems(new AaiNqInventoryResponseItems());
+        tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
+
+        AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
+        vserverItem.setVserver(new AaiNqVServer());
+        vserverItem.getVserver().setVserverId("dhv-test-vserver");
+        vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
+        vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
+        vserverItem.getVserver().setProvStatus("PREPROV");
+        vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
+        vserverItem.getVserver().setInMaint(false);
+        vserverItem.getVserver().setIsClosedLoopDisabled(false);
+        vserverItem.getVserver().setResourceVersion("1485366417");
+        vserverItem.setItems(new AaiNqInventoryResponseItems());
+        vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
+        vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
+
+        AaiNqResponse aaiResponse = new AaiNqResponse();
+        aaiResponse.getInventoryResponseItems().add(vserverItem);
+        logger.info(Serialization.gsonPretty.toJson(aaiResponse));
+
+        return aaiResponse;
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java
new file mode 100644
index 0000000..574ee86
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqResponseWrapperTest.java
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqResponseWrapperTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqResponseWrapperTest.class);
+
+    @Test
+    public void test() {
+        AaiNqInventoryResponseItem serviceItem = new AaiNqInventoryResponseItem();
+        serviceItem.setModelName("service-instance");
+        serviceItem.setServiceInstance(new AaiNqServiceInstance());
+        serviceItem.getServiceInstance().setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        serviceItem.getServiceInstance().setServiceInstanceName("dhv-test-service-instance-name1");
+        serviceItem.getServiceInstance().setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        serviceItem.getServiceInstance().setPersonaModelVersion("1.0");
+        serviceItem.getServiceInstance().setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        serviceItem.getServiceInstance().setResourceVersion("1485366092");
+        serviceItem.setExtraProperties(new AaiNqExtraProperties());
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "service-instance"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        serviceItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "82194af1-3c2c-485a-8f44-420e22a9eaa4"));
+        serviceItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "46b92144-923a-4d20-b85a-3cbd847668a9"));
+
+        AaiNqInventoryResponseItem vfModuleItem = new AaiNqInventoryResponseItem();
+        vfModuleItem.setModelName("vf-module");
+        vfModuleItem.setVfModule(new AaiNqVfModule());
+        vfModuleItem.getVfModule().setVfModuleId("example-vf-module-id-val-49261");
+        vfModuleItem.getVfModule().setVfModuleName("example-vf-module-name-val-73074");
+        vfModuleItem.getVfModule().setHeatStackId("example-heat-stack-id-val-86300");
+        vfModuleItem.getVfModule().setOrchestrationStatus("example-orchestration-status-val-56523");
+        vfModuleItem.getVfModule().setIsBaseVfModule(true);
+        vfModuleItem.getVfModule().setResourceVersion("1485366450");
+        vfModuleItem.getVfModule().setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        vfModuleItem.getVfModule().setPersonaModelVersion("1.0");
+        vfModuleItem.getVfModule().setWidgetModelId("example-widget-model-id-val-92571");
+        vfModuleItem.getVfModule().setWidgetModelVersion("example-widget-model-version-val-83317");
+        vfModuleItem.getVfModule().setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        vfModuleItem.setExtraProperties(new AaiNqExtraProperties());
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "vf-module"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-type", "widget"));
+        vfModuleItem.getExtraProperties().getExtraProperty().add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "ef86f9c5-2165-44f3-8fc3-96018b609ea5"));
+        vfModuleItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "c00563ae-812b-4e62-8330-7c4d0f47088a"));
+
+        AaiNqInventoryResponseItem genericVnfItem = new AaiNqInventoryResponseItem();
+        genericVnfItem.setModelName("generic-vnf");
+        genericVnfItem.setGenericVnf(new AaiNqGenericVnf());
+        genericVnfItem.getGenericVnf().setVnfId("dhv-test-gvnf");
+        genericVnfItem.getGenericVnf().setVnfName("dhv-test-gvnf-name");
+        genericVnfItem.getGenericVnf().setVnfName2("dhv-test-gvnf-name2");
+        genericVnfItem.getGenericVnf().setVnfType("SW");
+        genericVnfItem.getGenericVnf().setServiceId("d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4");
+        genericVnfItem.getGenericVnf().setProvStatus("PREPROV");
+        genericVnfItem.getGenericVnf().setOperationalState("dhv-test-operational-state");
+        genericVnfItem.getGenericVnf().setIpv4OamAddress("dhv-test-gvnf-ipv4-oam-address");
+        genericVnfItem.getGenericVnf().setIpv4Loopback0Address("dhv-test-gvnfipv4-loopback0-address");
+        genericVnfItem.getGenericVnf().setInMaint(false);
+        genericVnfItem.getGenericVnf().setIsClosedLoopDisabled(false);
+        genericVnfItem.getGenericVnf().setResourceVersion("1485366450");
+        genericVnfItem.getGenericVnf().setEncrypedAccessFlag(true);
+        genericVnfItem.getGenericVnf().setPersonaModelId("acc6edd8-a8d4-4b93-afaa-0994068be14c");
+        genericVnfItem.getGenericVnf().setPersonaModelVersion("1.0");
+        genericVnfItem.setExtraProperties(new AaiNqExtraProperties());
+        genericVnfItem.getExtraProperties().setExtraProperty(new LinkedList<>());
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name", "generic-vnf"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-type", "widget"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-version", "1.0"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-id", "acc6edd8-a8d4-4b93-afaa-0994068be14c"));
+        genericVnfItem.getExtraProperties().getExtraProperty()
+                .add(new AaiNqExtraProperty("model.model-name-version-id", "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"));
+        genericVnfItem.setItems(new AaiNqInventoryResponseItems());
+        genericVnfItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        genericVnfItem.getItems().getInventoryResponseItems().add(serviceItem);
+        genericVnfItem.getItems().getInventoryResponseItems().add(vfModuleItem);
+
+        AaiNqInventoryResponseItem cloudItem = new AaiNqInventoryResponseItem();
+        cloudItem.setCloudRegion(new AaiNqCloudRegion());
+        cloudItem.getCloudRegion().setCloudOwner("OWNER");
+        cloudItem.getCloudRegion().setCloudRegionId("REGIONID");
+        cloudItem.getCloudRegion().setCloudRegionVersion("2.5");
+        cloudItem.getCloudRegion().setComplexName("COMPLEXNAME");
+        cloudItem.getCloudRegion().setResourceVersion("1485365988");
+
+        AaiNqInventoryResponseItem tenantItem = new AaiNqInventoryResponseItem();
+        tenantItem.setTenant(new AaiNqTenant());
+        tenantItem.getTenant().setTenantId("dhv-test-tenant");
+        tenantItem.getTenant().setTenantName("dhv-test-tenant-name");
+        tenantItem.getTenant().setResourceVersion("1485366334");
+        tenantItem.setItems(new AaiNqInventoryResponseItems());
+        tenantItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        tenantItem.getItems().getInventoryResponseItems().add(cloudItem);
+
+        AaiNqInventoryResponseItem vserverItem = new AaiNqInventoryResponseItem();
+        vserverItem.setVserver(new AaiNqVServer());
+        vserverItem.getVserver().setVserverId("dhv-test-vserver");
+        vserverItem.getVserver().setVserverName("dhv-test-vserver-name");
+        vserverItem.getVserver().setVserverName2("dhv-test-vserver-name2");
+        vserverItem.getVserver().setProvStatus("PREPROV");
+        vserverItem.getVserver().setVserverSelflink("dhv-test-vserver-selflink");
+        vserverItem.getVserver().setInMaint(false);
+        vserverItem.getVserver().setIsClosedLoopDisabled(false);
+        vserverItem.getVserver().setResourceVersion("1485366417");
+        vserverItem.setItems(new AaiNqInventoryResponseItems());
+        vserverItem.getItems().setInventoryResponseItems(new LinkedList<>());
+        vserverItem.getItems().getInventoryResponseItems().add(genericVnfItem);
+        vserverItem.getItems().getInventoryResponseItems().add(tenantItem);
+
+        AaiNqResponse aaiResponse = new AaiNqResponse();
+        aaiResponse.getInventoryResponseItems().add(vserverItem);
+        AaiNqResponseWrapper aaiNqResponseWarapper = new AaiNqResponseWrapper();
+        aaiNqResponseWarapper.setAaiNqResponse(aaiResponse);
+        aaiNqResponseWarapper.setRequestId(UUID.randomUUID());
+        assertNotNull(aaiNqResponseWarapper);
+        logger.info(Serialization.gsonPretty.toJson(aaiNqResponseWarapper));
+
+        AaiNqResponse aaiResponse2 = new AaiNqResponse();
+        aaiResponse2.getInventoryResponseItems().add(vserverItem);
+        AaiNqResponseWrapper aaiNqResponseWarapper2 = new AaiNqResponseWrapper(UUID.randomUUID(), aaiResponse);
+        assertNotNull(aaiNqResponseWarapper2);
+        assertNotNull(aaiNqResponseWarapper2.getRequestId());
+        assertNotNull(aaiNqResponseWarapper2.getAaiNqResponse());
+        logger.info(Serialization.gsonPretty.toJson(aaiNqResponseWarapper2));
+    }
+
+    @Test
+    public void testCountVfModules() throws Exception {
+        AaiNqResponseWrapper resp;
+
+        // null item
+        resp = new AaiNqResponseWrapper();
+        assertEquals(0, resp.countVfModules());
+        
+        // no names
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
+        assertEquals(0, resp.countVfModules());
+
+        // has VF modules
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
+        assertEquals(3, resp.countVfModules());
+    }
+
+    @Test
+    public void testGenVfModuleName() throws Exception {
+        AaiNqResponseWrapper resp;
+
+        // null item
+        resp = new AaiNqResponseWrapper();
+        assertEquals(null, resp.genVfModuleName());
+        
+        // no names
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
+        assertEquals(null, resp.genVfModuleName());
+
+        // has VF modules
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
+        assertEquals("my-module-abc_124", resp.genVfModuleName());
+    }
+
+    @Test
+    public void testGetVfModules() throws Exception {
+        AaiNqResponseWrapper resp;
+
+        // null item
+        resp = new AaiNqResponseWrapper();
+        assertTrue(resp.getVfModuleItems(true).isEmpty());
+
+        // missing item
+        resp = new AaiNqResponseWrapper();
+        resp.setAaiNqResponse(new AaiNqResponse());
+        assertTrue(resp.getVfModuleItems(false).isEmpty());
+
+        // null item list
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoItems.json"));
+        resp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0)
+                        .getItems().setInventoryResponseItems(null);
+        assertTrue(resp.getVfModuleItems(false).isEmpty());
+        
+        // no modules
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoModules.json"));
+        assertTrue(resp.getVfModuleItems(false).isEmpty());
+        
+        // no names
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-NoNames.json"));
+        List<AaiNqInventoryResponseItem> lst;
+        lst = resp.getVfModuleItems(false);
+        assertEquals(0, lst.size());
+
+        // base VF modules
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
+        lst = resp.getVfModuleItems(true);
+        assertEquals(1, lst.size());
+        assertEquals("Vfmodule_vLBMS-0809-1", lst.get(0).getVfModule().getVfModuleName());
+        
+        // non base VF modules
+        resp.setAaiNqResponse(load("AaiNqResponseWrapper-Vserver.json"));
+        lst = resp.getVfModuleItems(false);
+        assertEquals(3, lst.size());
+        int index;
+        index = 0;
+        assertEquals("my-module-abc_1", lst.get(index++).getVfModule().getVfModuleName());
+        assertEquals("my-module-abc_123", lst.get(index++).getVfModule().getVfModuleName());
+        assertEquals("my-module-abc_34", lst.get(index++).getVfModule().getVfModuleName());
+    }
+
+    /**
+     * Loads a response from a JSON file.
+     * 
+     * @param fileName name of the file containing the JSON response
+     * @return the response
+     * @throws IOException if the file cannot be read
+     */
+    private AaiNqResponse load(String fileName) throws IOException {
+        String json = IOUtils.toString(getClass().getResource(fileName), StandardCharsets.UTF_8);
+        return Serialization.gsonPretty.fromJson(json, AaiNqResponse.class);
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java
new file mode 100644
index 0000000..946372c
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqServiceInstanceTest.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqServiceInstanceTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqServiceInstanceTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqServiceInstance aaiNqServiceInstance = new AaiNqServiceInstance();
+        aaiNqServiceInstance.setServiceInstanceId("dhv-test-vhnfportal-service-instance-id");
+        aaiNqServiceInstance.setServiceInstanceName("dhv-test-service-instance-name1");
+        aaiNqServiceInstance.setPersonaModelId("82194af1-3c2c-485a-8f44-420e22a9eaa4");
+        aaiNqServiceInstance.setPersonaModelVersion("1.0");
+        aaiNqServiceInstance.setServiceInstanceLocationId("dhv-test-service-instance-location-id1");
+        aaiNqServiceInstance.setResourceVersion("1485366092");
+        aaiNqServiceInstance.setModelInvariantId("SomeID");
+        aaiNqServiceInstance.setModelVersionId("SomeVersion");
+        assertNotNull(aaiNqServiceInstance);
+        assertEquals("dhv-test-vhnfportal-service-instance-id", aaiNqServiceInstance.getServiceInstanceId());
+        assertEquals("dhv-test-service-instance-name1", aaiNqServiceInstance.getServiceInstanceName());
+        assertEquals("82194af1-3c2c-485a-8f44-420e22a9eaa4", aaiNqServiceInstance.getPersonaModelId());
+        assertEquals("1.0", aaiNqServiceInstance.getPersonaModelVersion());
+        assertEquals("dhv-test-service-instance-location-id1", aaiNqServiceInstance.getServiceInstanceLocationId());
+        assertEquals("1485366092", aaiNqServiceInstance.getResourceVersion());
+        assertEquals("SomeID", aaiNqServiceInstance.getModelInvariantId());
+        assertEquals("SomeVersion", aaiNqServiceInstance.getModelVersionId());
+        logger.info(Serialization.gsonPretty.toJson(aaiNqServiceInstance));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java
new file mode 100644
index 0000000..18e2de4
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqTenantTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqTenantTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqTenantTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqTenant aaiNqTenant = new AaiNqTenant();
+        aaiNqTenant.setTenantId("dhv-test-tenant");
+        aaiNqTenant.setTenantName("dhv-test-tenant-name");
+        aaiNqTenant.setResourceVersion("1485366334");
+        assertNotNull(aaiNqTenant);
+        assertEquals("dhv-test-tenant", aaiNqTenant.getTenantId());
+        assertEquals("dhv-test-tenant-name", aaiNqTenant.getTenantName());
+        assertEquals("1485366334", aaiNqTenant.getResourceVersion());
+
+        logger.info(Serialization.gsonPretty.toJson(aaiNqTenant));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java
new file mode 100644
index 0000000..e1b6123
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVServerTest.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.List;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqVServerTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqVServerTest.class);
+
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files
+                        .readAllBytes(new File("src/test/resources/org/onap/policy/aai/AaiNqVServer.json").toPath()));
+
+        AaiNqVServer resp = Serialization.gsonPretty.fromJson(json, AaiNqVServer.class);
+
+        assertEquals(false, resp.getInMaint());
+        assertEquals(true, resp.getIsClosedLoopDisabled());
+        assertEquals("ACTIVE", resp.getProvStatus());
+        assertEquals("1533850964910", resp.getResourceVersion());
+        assertEquals("1c94da3f-16f1-4fc7-9ed1-e018dfa62774", resp.getVserverId());
+        assertEquals("vlb-ms-0809-1", resp.getVserverName());
+        assertEquals("vlb-ms-0809-7", resp.getVserverName2());
+        assertEquals("http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                        resp.getVserverSelflink());
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        RelationshipList relationshipList = resp.getRelationshipList();
+        assertNotNull(relationshipList);
+
+        List<Relationship> lst = relationshipList.getRelationships();
+        assertNotNull(lst);
+
+        assertEquals(3, lst.size());
+        assertEquals("generic-vnf", lst.get(0).getRelatedTo());
+        assertEquals("image", lst.get(1).getRelatedTo());
+
+        logger.info(Serialization.gsonPretty.toJson(resp));
+
+        // verify that setXxx methods work
+        relationshipList = new RelationshipList();
+
+        resp.setInMaint(true);
+        resp.setIsClosedLoopDisabled(false);
+        resp.setProvStatus("inactive");
+        resp.setRelationshipList(relationshipList);
+        resp.setResourceVersion("vers");
+        resp.setVserverId("vid");
+        resp.setVserverName("vname");
+        resp.setVserverName2("vname2");
+        resp.setVserverSelflink("link");
+
+        assertEquals(true, resp.getInMaint());
+        assertEquals(false, resp.getIsClosedLoopDisabled());
+        assertEquals("inactive", resp.getProvStatus());
+        assertEquals("vers", resp.getResourceVersion());
+        assertEquals("vid", resp.getVserverId());
+        assertEquals("vname", resp.getVserverName());
+        assertEquals("vname2", resp.getVserverName2());
+        assertEquals("link", resp.getVserverSelflink());
+        assertEquals(relationshipList, resp.getRelationshipList());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java
new file mode 100644
index 0000000..da169d5
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiNqVfModuleTest.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AaiNqVfModuleTest {
+    private static final Logger logger = LoggerFactory.getLogger(AaiNqVfModuleTest.class);
+
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        AaiNqVfModule aaiNqVfModule = new AaiNqVfModule();
+        aaiNqVfModule.setVfModuleId("example-vf-module-id-val-49261");
+        aaiNqVfModule.setVfModuleName("example-vf-module-name-val-73074");
+        aaiNqVfModule.setHeatStackId("example-heat-stack-id-val-86300");
+        aaiNqVfModule.setOrchestrationStatus("example-orchestration-status-val-56523");
+        aaiNqVfModule.setIsBaseVfModule(true);
+        aaiNqVfModule.setResourceVersion("1485366450");
+        aaiNqVfModule.setPersonaModelId("ef86f9c5-2165-44f3-8fc3-96018b609ea5");
+        aaiNqVfModule.setPersonaModelVersion("1.0");
+        aaiNqVfModule.setWidgetModelId("example-widget-model-id-val-92571");
+        aaiNqVfModule.setWidgetModelVersion("example-widget-model-version-val-83317");
+        aaiNqVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
+        aaiNqVfModule.setModelInvariantId("SomeId");
+        aaiNqVfModule.setModelVersionId("SomeVersion");
+        aaiNqVfModule.setModelCustomizationId("SomeCustomizationId");
+        assertNotNull(aaiNqVfModule);
+        assertEquals("example-vf-module-id-val-49261", aaiNqVfModule.getVfModuleId());
+        assertEquals("example-vf-module-name-val-73074", aaiNqVfModule.getVfModuleName());
+        assertEquals("example-heat-stack-id-val-86300", aaiNqVfModule.getHeatStackId());
+        assertEquals("example-orchestration-status-val-56523", aaiNqVfModule.getOrchestrationStatus());
+        assertEquals(true, aaiNqVfModule.getIsBaseVfModule());
+        assertEquals("1485366450", aaiNqVfModule.getResourceVersion());
+        assertEquals("ef86f9c5-2165-44f3-8fc3-96018b609ea5", aaiNqVfModule.getPersonaModelId());
+        assertEquals("1.0", aaiNqVfModule.getPersonaModelVersion());
+        assertEquals("example-widget-model-id-val-92571", aaiNqVfModule.getWidgetModelId());
+        assertEquals("example-widget-model-version-val-83317", aaiNqVfModule.getWidgetModelVersion());
+        assertEquals("example-contrail-service-instance-fqdn-val-86796",
+                        aaiNqVfModule.getContrailServiceInstanceFqdn());
+        assertEquals("SomeId", aaiNqVfModule.getModelInvariantId());
+        assertEquals("SomeVersion", aaiNqVfModule.getModelVersionId());
+        assertEquals("SomeCustomizationId", aaiNqVfModule.getModelCustomizationId());
+        logger.info(Serialization.gsonPretty.toJson(aaiNqVfModule));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java
new file mode 100644
index 0000000..9771d47
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfInstanceTest.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PnfInstanceTest {
+    private static final Logger logger = LoggerFactory.getLogger(PnfInstanceTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        PnfInstance pnfInstance = new PnfInstance();
+        pnfInstance.setPnfInstanceName("pnf-instance-name-test");
+        pnfInstance.setPnfName("pnf-name-test");
+        pnfInstance.setPnfType(PnfType.ENODEB);
+        pnfInstance.setPnfSerial("pnf-serial-test");
+        assertNotNull(pnfInstance);
+        assertEquals("pnf-instance-name-test", pnfInstance.getPnfInstanceName());
+
+        PnfInstance pnfInstanceNull = new PnfInstance(null);
+        assertNotNull(pnfInstanceNull);
+
+        PnfInstance pnfInstanceClone = new PnfInstance(pnfInstance);
+        assertNotNull(pnfInstanceClone);
+
+        assertEquals("pnf-name-test", pnfInstanceClone.getPnfName());
+        assertEquals(PnfType.ENODEB, pnfInstanceClone.getPnfType());
+        assertEquals("pnf-serial-test", pnfInstanceClone.getPnfSerial());
+
+        assertEquals("PNFInstance [PNFName=pnf-name-test, PNFInstanceName=pnf-instance-name-test, PNFType=eNodeB, "
+                + "PNFSerial=pnf-serial-test]", pnfInstanceClone.toString());
+        assertNotEquals(0, pnfInstanceClone.hashCode());
+        assertNotEquals(0, new Pnf().hashCode());
+
+        PnfInstance pnfInstanceOther0 = new PnfInstance();
+        pnfInstanceOther0.setPnfName("pnf-name-test");
+
+        PnfInstance pnfInstanceOther1 = new PnfInstance(pnfInstance);
+        pnfInstanceOther1.setPnfName("pnf-name-test-diff");
+
+        PnfInstance pnfInstanceOther2 = new PnfInstance(pnfInstance);
+        pnfInstanceOther2.setPnfInstanceName("pnf-instance-name-test-diff");
+
+        PnfInstance pnfInstanceOther3 = new PnfInstance(pnfInstance);
+        pnfInstanceOther3.setPnfName(null);
+
+        PnfInstance pnfInstanceOther4 = new PnfInstance(pnfInstance);
+        pnfInstanceOther4.setPnfSerial(null);
+
+        PnfInstance pnfInstanceOther5 = new PnfInstance(pnfInstance);
+        pnfInstanceOther5.setPnfSerial("pnf-serial-test-diff");
+
+        assertTrue(pnfInstance.equals(pnfInstance));
+        assertFalse(pnfInstance.equals(null));
+        assertFalse(pnfInstance.equals("hello"));
+        assertTrue(pnfInstance.equals(pnfInstanceClone));
+        assertFalse(pnfInstance.equals(new Pnf()));
+        assertFalse(new Pnf().equals(pnfInstance));
+        assertFalse(new Pnf().equals(pnfInstanceOther0));
+        assertFalse(pnfInstanceOther0.equals(pnfInstance));
+        assertFalse(pnfInstanceOther1.equals(pnfInstance));
+        assertFalse(pnfInstanceOther2.equals(pnfInstance));
+        assertFalse(pnfInstanceOther3.equals(pnfInstance));
+        assertFalse(pnfInstanceOther4.equals(pnfInstance));
+        assertFalse(pnfInstanceOther5.equals(pnfInstance));
+
+        logger.info(Serialization.gsonPretty.toJson(pnfInstance));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java
new file mode 100644
index 0000000..6efbb76
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTest.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PnfTest {
+    private static final Logger logger = LoggerFactory.getLogger(PnfTest.class);
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        Pnf pnf = new Pnf();
+        pnf.setPnfName("pnf-name-test");
+        pnf.setPnfType(PnfType.ENODEB);
+        assertNotNull(pnf);
+
+        Pnf pnfClone = new Pnf(pnf);
+        assertNotNull(pnfClone);
+
+        assertEquals("pnf-name-test", pnfClone.getPnfName());
+        assertEquals(PnfType.ENODEB, pnfClone.getPnfType());
+
+        assertEquals("PNF [PNFName=pnf-name-test, PNFType=eNodeB]", pnfClone.toString());
+        assertNotEquals(0, pnfClone.hashCode());
+        assertNotEquals(0, new Pnf().hashCode());
+
+        Pnf pnfOther = new Pnf();
+        pnfOther.setPnfName("pnf-name-test");
+
+        assertTrue(pnf.equals(pnf));
+        assertFalse(pnf.equals(null));
+        assertFalse(pnf.equals("hello"));
+        assertTrue(pnf.equals(pnfClone));
+        assertFalse(pnf.equals(new Pnf()));
+        assertFalse(new Pnf().equals(pnf));
+        assertFalse(new Pnf().equals(pnfOther));
+        assertFalse(pnfOther.equals(pnf));
+
+        logger.info(Serialization.gsonPretty.toJson(pnf));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java
new file mode 100644
index 0000000..e34c0e1
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/PnfTypeTest.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PnfTypeTest {
+    private static final Logger logger = LoggerFactory.getLogger(PnfTypeTest.class);
+
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {}
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {}
+
+    @Test
+    public void test() {
+        PnfType pnfType = PnfType.ENODEB;
+        assertNotNull(pnfType);
+        assertNotNull(pnfType.toString());
+        logger.info(Serialization.gsonPretty.toJson(pnfType));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java
new file mode 100644
index 0000000..20697d8
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelatedToPropertyTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.nio.file.Files;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RelatedToPropertyTest {
+    private static final Logger logger = LoggerFactory.getLogger(RelatedToPropertyTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/RelatedToProperty.json").toPath()));
+
+        RelatedToProperty relatedToProperty = Serialization.gsonPretty.fromJson(json, RelatedToProperty.class);
+
+        assertEquals("generic-vnf.vnf-name", relatedToProperty.getPropertyKey());
+        assertEquals("vLoadBalancerMS-Vnf-0809-1", relatedToProperty.getPropertyValue());
+
+        logger.info(Serialization.gsonPretty.toJson(relatedToProperty));
+
+        // verify that setXxx methods work
+        relatedToProperty.setPropertyKey("a key");
+        relatedToProperty.setPropertyValue("a value");
+
+        assertEquals("a key", relatedToProperty.getPropertyKey());
+        assertEquals("a value", relatedToProperty.getPropertyValue());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
new file mode 100644
index 0000000..def353f
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.nio.file.Files;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RelationshipDataTest {
+    private static final Logger logger = LoggerFactory.getLogger(RelationshipDataTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/RelationshipData.json").toPath()));
+
+        RelationshipData relationshipData = Serialization.gsonPretty.fromJson(json, RelationshipData.class);
+
+        assertEquals("generic-vnf.vnf-id", relationshipData.getRelationshipKey());
+        assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", relationshipData.getRelationshipValue());
+
+        logger.info(Serialization.gsonPretty.toJson(relationshipData));
+
+        // verify that setXxx methods work
+        relationshipData.setRelationshipKey("a key");
+        relationshipData.setRelationshipValue("a value");
+
+        assertEquals("a key", relationshipData.getRelationshipKey());
+        assertEquals("a value", relationshipData.getRelationshipValue());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
new file mode 100644
index 0000000..2c55380
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.LinkedList;
+import java.util.List;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RelationshipListTest {
+    private static final Logger logger = LoggerFactory.getLogger(RelationshipListTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files.readAllBytes(
+                        new File("src/test/resources/org/onap/policy/aai/RelationshipList.json").toPath()));
+
+        RelationshipList relationshipList = Serialization.gsonPretty.fromJson(json, RelationshipList.class);
+
+        List<Relationship> lst = relationshipList.getRelationships();
+        assertNotNull(lst);
+        assertEquals(3, lst.size());
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        assertEquals("generic-vnf", lst.get(0).getRelatedTo());
+        assertEquals("image", lst.get(1).getRelatedTo());
+        assertEquals("flavor", lst.get(2).getRelatedTo());
+
+        logger.info(Serialization.gsonPretty.toJson(relationshipList));
+
+        // verify that setXxx methods work
+        lst = new LinkedList<>();
+        lst.add(new Relationship());
+        lst.add(new Relationship());
+
+        relationshipList.setRelationships(lst);
+        assertEquals(lst, relationshipList.getRelationships());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
new file mode 100644
index 0000000..ee40d1f
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.LinkedList;
+import java.util.List;
+import org.junit.Test;
+import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RelationshipTest {
+    private static final Logger logger = LoggerFactory.getLogger(RelationshipTest.class);
+
+    @Test
+    public void test() throws Exception {
+        // deserialize json and verify fields are populated properly
+        String json = new String(Files
+                        .readAllBytes(new File("src/test/resources/org/onap/policy/aai/Relationship.json").toPath()));
+
+        Relationship relationship = Serialization.gsonPretty.fromJson(json, Relationship.class);
+
+        assertEquals("/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
+                        relationship.getRelatedLink());
+        assertEquals("generic-vnf", relationship.getRelatedTo());
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        List<RelatedToProperty> relatedToProperty = relationship.getRelatedToProperty();
+        assertNotNull(relatedToProperty);
+        assertEquals(2, relatedToProperty.size());
+        assertEquals("vLoadBalancerMS-Vnf-0809-1", relatedToProperty.get(0).getPropertyValue());
+        assertEquals("vLoadBalancerMS-Vnf-0809-2", relatedToProperty.get(1).getPropertyValue());
+
+        // don't need to verify this in depth, as it has its own tests that do that
+        List<RelationshipData> relationshipData = relationship.getRelationshipData();
+        assertNotNull(relationshipData);
+        assertEquals(2, relationshipData.size());
+        assertEquals("807a3f02-f878-436b-870c-f0e91e81570d", relationshipData.get(0).getRelationshipValue());
+        assertEquals("907a3f02-f878-436b-870c-f0e91e81570e", relationshipData.get(1).getRelationshipValue());
+
+        logger.info(Serialization.gsonPretty.toJson(relationship));
+
+        // verify that setXxx methods work
+        relatedToProperty = new LinkedList<>();
+        relatedToProperty.add(new RelatedToProperty());
+        relatedToProperty.add(new RelatedToProperty());
+        relatedToProperty.add(new RelatedToProperty());
+
+        relationshipData = new LinkedList<>();
+        relationshipData.add(new RelationshipData());
+        relationshipData.add(new RelationshipData());
+        relationshipData.add(new RelationshipData());
+
+        relationship.setRelatedLink("related-link");
+        relationship.setRelatedTo("related-to");
+        relationship.setRelatedToProperty(relatedToProperty);
+        relationship.setRelationshipData(relationshipData);
+
+        assertEquals("related-link", relationship.getRelatedLink());
+        assertEquals("related-to", relationship.getRelatedTo());
+        assertEquals(relatedToProperty, relationship.getRelatedToProperty());
+        assertEquals(relationshipData, relationship.getRelationshipData());
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java
new file mode 100644
index 0000000..f424385
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/util/AaiExceptionTest.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * aai
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.aai.util;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class AaiExceptionTest {
+
+    @Test
+    public void test() {
+        assertNotNull(new AaiException());
+        assertNotNull(new AaiException("message"));
+        assertNotNull(new AaiException("message", new IOException()));
+        assertNotNull(new AaiException("message", new IOException(), true, false));
+        assertNotNull(new AaiException(new IOException()));
+    }
+
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json
new file mode 100644
index 0000000..6751fef
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetResponseError.json
@@ -0,0 +1,14 @@
+{
+    "requestError": {
+        "serviceException": {
+            "messageId": "SVC3001",
+            "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
+            "variables": [
+                "GET",
+                "network/generic-vnfs/generic-vnf/3f02-f878-436b-870c-f0e91e81570d",
+                "Node Not Found:No Node of type generic-vnf found at: network/generic-vnfs/generic-vnf/3f02-f878-436b-870c-f0e91e81570d",
+                "ERR.5.4.6114"
+            ]
+        }
+    }
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json
new file mode 100644
index 0000000..faa0e0e
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVnfResponse.json
@@ -0,0 +1,123 @@
+{
+    "in-maint": false,
+    "ipv4-oam-address": "10.0.150.1",
+    "is-closed-loop-disabled": true,
+    "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
+    "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
+    "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
+    "nf-function": "",
+    "nf-naming-code": "",
+    "nf-role": "vLB",
+    "nf-type": "",
+    "orchestration-status": "Active",
+    "prov-status": "PROV",
+    "relationship-list": {
+        "relationship": [
+            {
+                "related-link": "/aai/v11/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB/service-instances/service-instance/b66d24cc-feca-4fdc-8090-2e9539a8bbac",
+                "related-to": "service-instance",
+                "related-to-property": [
+                    {
+                        "property-key": "service-instance.service-instance-name",
+                        "property-value": "vLoadBalancerMS-Service-0809-1"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "customer.global-customer-id",
+                        "relationship-value": "Demonstration"
+                    },
+                    {
+                        "relationship-key": "service-subscription.service-type",
+                        "relationship-value": "vLB"
+                    },
+                    {
+                        "relationship-key": "service-instance.service-instance-id",
+                        "relationship-value": "b66d24cc-feca-4fdc-8090-2e9539a8bbac"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/business/lines-of-business/line-of-business/Test-Business",
+                "related-to": "line-of-business",
+                "relationship-data": [
+                    {
+                        "relationship-key": "line-of-business.line-of-business-name",
+                        "relationship-value": "Test-Business"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/business/platforms/platform/Test-Platform",
+                "related-to": "platform",
+                "relationship-data": [
+                    {
+                        "relationship-key": "platform.platform-name",
+                        "relationship-value": "Test-Platform"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/4086f396c5e04caf9502c5fdeca575c4/vservers/vserver/191729bd-cb1d-485d-aa06-b20c888272a8",
+                "related-to": "vserver",
+                "related-to-property": [
+                    {
+                        "property-key": "vserver.vserver-name",
+                        "property-value": "vdns-ms01-0809-1"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "cloud-region.cloud-owner",
+                        "relationship-value": "CloudOwner"
+                    },
+                    {
+                        "relationship-key": "cloud-region.cloud-region-id",
+                        "relationship-value": "RegionOne"
+                    },
+                    {
+                        "relationship-key": "tenant.tenant-id",
+                        "relationship-value": "4086f396c5e04caf9502c5fdeca575c4"
+                    },
+                    {
+                        "relationship-key": "vserver.vserver-id",
+                        "relationship-value": "191729bd-cb1d-485d-aa06-b20c888272a8"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/4086f396c5e04caf9502c5fdeca575c4/vservers/vserver/1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                "related-to": "vserver",
+                "related-to-property": [
+                    {
+                        "property-key": "vserver.vserver-name",
+                        "property-value": "vlb-ms-0809-1"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "cloud-region.cloud-owner",
+                        "relationship-value": "CloudOwner"
+                    },
+                    {
+                        "relationship-key": "cloud-region.cloud-region-id",
+                        "relationship-value": "RegionOne"
+                    },
+                    {
+                        "relationship-key": "tenant.tenant-id",
+                        "relationship-value": "4086f396c5e04caf9502c5fdeca575c4"
+                    },
+                    {
+                        "relationship-key": "vserver.vserver-id",
+                        "relationship-value": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+                    }
+                ]
+            }
+        ]
+    },
+    "resource-version": "1533850960381",
+    "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
+    "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
+    "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
+    "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json
new file mode 100644
index 0000000..1988594
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiGetVserverResponse.json
@@ -0,0 +1,82 @@
+{
+    "vserver": [
+        {
+            "in-maint": false,
+            "is-closed-loop-disabled": true,
+            "prov-status": "ACTIVE",
+            "relationship-list": {
+                "relationship": [
+                    {
+                        "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
+                        "related-to": "generic-vnf",
+                        "related-to-property": [
+                            {
+                                "property-key": "generic-vnf.vnf-name",
+                                "property-value": "vLoadBalancerMS-Vnf-0809-2"
+                            }
+                        ],
+                        "relationship-data": [
+                            {
+                                "relationship-key": "generic-vnf.vnf-id",
+                                "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
+                            }
+                        ]
+                    },
+                    {
+                        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
+                        "related-to": "image",
+                        "related-to-property": [
+                            {
+                                "property-key": "image.image-name",
+                                "property-value": "unknown"
+                            }
+                        ],
+                        "relationship-data": [
+                            {
+                                "relationship-key": "cloud-region.cloud-owner",
+                                "relationship-value": "CloudOwner"
+                            },
+                            {
+                                "relationship-key": "cloud-region.cloud-region-id",
+                                "relationship-value": "RegionOne"
+                            },
+                            {
+                                "relationship-key": "image.image-id",
+                                "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
+                            }
+                        ]
+                    },
+                    {
+                        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+                        "related-to": "flavor",
+                        "related-to-property": [
+                            {
+                                "property-key": "flavor.flavor-name",
+                                "property-value": "m1.medium"
+                            }
+                        ],
+                        "relationship-data": [
+                            {
+                                "relationship-key": "cloud-region.cloud-owner",
+                                "relationship-value": "CloudOwner"
+                            },
+                            {
+                                "relationship-key": "cloud-region.cloud-region-id",
+                                "relationship-value": "RegionOne"
+                            },
+                            {
+                                "relationship-key": "flavor.flavor-id",
+                                "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
+                            }
+                        ]
+                    }
+                ]
+            },
+            "resource-version": "1533850964910",
+            "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+            "vserver-name": "vlb-ms-0809-1",
+            "vserver-name2": "vlb-ms-0809-7",
+            "vserver-selflink": "http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json
new file mode 100644
index 0000000..9966924
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoItems.json
@@ -0,0 +1,96 @@
+{
+    "inventory-response-item": [
+        {
+            "extra-properties": {},
+            "inventory-response-items": {
+                "inventory-response-item": [
+                    {
+                        "extra-properties": {
+                            "extra-property": [
+                                {
+                                    "property-name": "model-ver.model-version-id",
+                                    "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
+                                },
+                                {
+                                    "property-name": "model-ver.model-name",
+                                    "property-value": "vLoadBalancerMS"
+                                },
+                                {
+                                    "property-name": "model.model-type",
+                                    "property-value": "resource"
+                                },
+                                {
+                                    "property-name": "model.model-invariant-id",
+                                    "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
+                                },
+                                {
+                                    "property-name": "model-ver.model-version",
+                                    "property-value": "1.0"
+                                }
+                            ]
+                        },
+                        "generic-vnf": {
+                            "in-maint": false,
+                            "ipv4-oam-address": "10.0.150.1",
+                            "is-closed-loop-disabled": false,
+                            "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
+                            "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
+                            "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
+                            "nf-function": "",
+                            "nf-naming-code": "",
+                            "nf-role": "vLB",
+                            "nf-type": "",
+                            "orchestration-status": "Active",
+                            "prov-status": "PROV",
+                            "resource-version": "1533850960381",
+                            "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
+                            "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
+                            "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
+                            "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
+                        },
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                            ]
+                        },
+                        "model-name": "vLoadBalancerMS"
+                    },
+                    {
+                        "extra-properties": {},
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "cloud-region": {
+                                        "cloud-owner": "CloudOwner",
+                                        "cloud-region-id": "RegionOne",
+                                        "cloud-region-version": "v2.5",
+                                        "cloud-type": "openstack",
+                                        "cloud-zone": "zone-1",
+                                        "owner-defined-type": "owner type",
+                                        "resource-version": "1533652058185",
+                                        "sriov-automation": false
+                                    },
+                                    "extra-properties": {}
+                                }
+                            ]
+                        },
+                        "tenant": {
+                            "resource-version": "1533652058206",
+                            "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
+                            "tenant-name": "PFPP"
+                        }
+                    }
+                ]
+            },
+            "vserver": {
+                "in-maint": false,
+                "is-closed-loop-disabled": false,
+                "prov-status": "ACTIVE",
+                "resource-version": "1533850964910",
+                "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                "vserver-name": "vlb-ms-0809-1",
+                "vserver-name2": "vlb-ms-0809-1",
+                "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+            }
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json
new file mode 100644
index 0000000..2dd6090
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoModules.json
@@ -0,0 +1,133 @@
+{
+    "inventory-response-item": [
+        {
+            "extra-properties": {},
+            "inventory-response-items": {
+                "inventory-response-item": [
+                    {
+                        "extra-properties": {
+                            "extra-property": [
+                                {
+                                    "property-name": "model-ver.model-version-id",
+                                    "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
+                                },
+                                {
+                                    "property-name": "model-ver.model-name",
+                                    "property-value": "vLoadBalancerMS"
+                                },
+                                {
+                                    "property-name": "model.model-type",
+                                    "property-value": "resource"
+                                },
+                                {
+                                    "property-name": "model.model-invariant-id",
+                                    "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
+                                },
+                                {
+                                    "property-name": "model-ver.model-version",
+                                    "property-value": "1.0"
+                                }
+                            ]
+                        },
+                        "generic-vnf": {
+                            "in-maint": false,
+                            "ipv4-oam-address": "10.0.150.1",
+                            "is-closed-loop-disabled": false,
+                            "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
+                            "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
+                            "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
+                            "nf-function": "",
+                            "nf-naming-code": "",
+                            "nf-role": "vLB",
+                            "nf-type": "",
+                            "orchestration-status": "Active",
+                            "prov-status": "PROV",
+                            "resource-version": "1533850960381",
+                            "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
+                            "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
+                            "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
+                            "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
+                        },
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "extra-properties": {
+                                        "extra-property": [
+                                            {
+                                                "property-name": "model-ver.model-version-id",
+                                                "property-value": "4feb459d-d8ef-4cde-a714-235c79787962"
+                                            },
+                                            {
+                                                "property-name": "model-ver.model-name",
+                                                "property-value": "vLoadBalancerMS"
+                                            },
+                                            {
+                                                "property-name": "model.model-type",
+                                                "property-value": "service"
+                                            },
+                                            {
+                                                "property-name": "model.model-invariant-id",
+                                                "property-value": "b5477216-9b7d-4e75-8777-5b632d406759"
+                                            },
+                                            {
+                                                "property-name": "model-ver.model-version",
+                                                "property-value": "1.0"
+                                            }
+                                        ]
+                                    },
+                                    "model-name": "vLoadBalancerMS",
+                                    "service-instance": {
+                                        "environment-context": "General_Revenue-Bearing",
+                                        "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
+                                        "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
+                                        "orchestration-status": "Active",
+                                        "resource-version": "1533848425145",
+                                        "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
+                                        "service-instance-name": "vLoadBalancerMS-Service-0809-1",
+                                        "workload-context": "Production"
+                                    }
+                                }
+                            ]
+                        },
+                        "model-name": "vLoadBalancerMS"
+                    },
+                    {
+                        "extra-properties": {},
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "cloud-region": {
+                                        "cloud-owner": "CloudOwner",
+                                        "cloud-region-id": "RegionOne",
+                                        "cloud-region-version": "v2.5",
+                                        "cloud-type": "openstack",
+                                        "cloud-zone": "zone-1",
+                                        "owner-defined-type": "owner type",
+                                        "resource-version": "1533652058185",
+                                        "sriov-automation": false
+                                    },
+                                    "extra-properties": {}
+                                }
+                            ]
+                        },
+                        "tenant": {
+                            "resource-version": "1533652058206",
+                            "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
+                            "tenant-name": "PFPP"
+                        }
+                    }
+                ]
+            },
+            "vserver": {
+                "in-maint": false,
+                "is-closed-loop-disabled": false,
+                "prov-status": "ACTIVE",
+                "resource-version": "1533850964910",
+                "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                "vserver-name": "vlb-ms-0809-1",
+                "vserver-name2": "vlb-ms-0809-1",
+                "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+            }
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json
new file mode 100644
index 0000000..9c1a9bc
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-NoNames.json
@@ -0,0 +1,133 @@
+{
+    "inventory-response-item": [
+        {
+            "extra-properties": {},
+            "inventory-response-items": {
+                "inventory-response-item": [
+                    {
+                        "extra-properties": {
+                            "extra-property": [
+                                {
+                                    "property-name": "model-ver.model-version-id",
+                                    "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
+                                },
+                                {
+                                    "property-name": "model-ver.model-name",
+                                    "property-value": "vLoadBalancerMS"
+                                },
+                                {
+                                    "property-name": "model.model-type",
+                                    "property-value": "resource"
+                                },
+                                {
+                                    "property-name": "model.model-invariant-id",
+                                    "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
+                                },
+                                {
+                                    "property-name": "model-ver.model-version",
+                                    "property-value": "1.0"
+                                }
+                            ]
+                        },
+                        "generic-vnf": {
+                            "in-maint": false,
+                            "ipv4-oam-address": "10.0.150.1",
+                            "is-closed-loop-disabled": false,
+                            "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
+                            "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
+                            "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
+                            "nf-function": "",
+                            "nf-naming-code": "",
+                            "nf-role": "vLB",
+                            "nf-type": "",
+                            "orchestration-status": "Active",
+                            "prov-status": "PROV",
+                            "resource-version": "1533850960381",
+                            "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
+                            "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
+                            "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
+                            "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
+                        },
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "model-name": "vLoadBalancerMS",
+                                    "service-instance": {
+                                        "environment-context": "General_Revenue-Bearing",
+                                        "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
+                                        "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
+                                        "orchestration-status": "Active",
+                                        "resource-version": "1533848425145",
+                                        "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
+                                        "service-instance-name": "vLoadBalancerMS-Service-0809-1",
+                                        "workload-context": "Production"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "model-invariant-id": "6d01b7f1-769a-4080-b8ea-57fd03ef1572",
+                                        "model-version-id": "3302088a-457e-496c-9282-2eb3d5b8dd24",
+                                        "resource-version": "1534270663202",
+                                        "vf-module-id": "dummy_807a3f02-f878-436b-870c-f0e91e81570d",
+                                        "vf-module-name": "dummy_807a3f02-f878-436b-870c-f0e91e81570d"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "heat-stack-id": "Vfmodule_vLBMS-0809-1/83ab2394-2b22-40f9-8ba2-383698dd2958",
+                                        "is-base-vf-module": true,
+                                        "model-customization-id": "5198f732-8f22-48f9-98f8-d6b8b50118be",
+                                        "model-invariant-id": "1f566a81-58ba-4762-81f9-d2259509429a",
+                                        "model-version-id": "94827d25-4ac3-4850-abfc-7b6e3c531db4",
+                                        "module-index": 0,
+                                        "orchestration-status": "active",
+                                        "resource-version": "1533850416834",
+                                        "vf-module-id": "b861467d-d3a7-4b21-81b3-94d928a7e8b7",
+                                        "vf-module-name": "Vfmodule_vLBMS-0809-1"
+                                    }
+                                }
+                            ]
+                        },
+                        "model-name": "vLoadBalancerMS"
+                    },
+                    {
+                        "extra-properties": {},
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "cloud-region": {
+                                        "cloud-owner": "CloudOwner",
+                                        "cloud-region-id": "RegionOne",
+                                        "cloud-region-version": "v2.5",
+                                        "cloud-type": "openstack",
+                                        "cloud-zone": "zone-1",
+                                        "owner-defined-type": "owner type",
+                                        "resource-version": "1533652058185",
+                                        "sriov-automation": false
+                                    },
+                                    "extra-properties": {}
+                                }
+                            ]
+                        },
+                        "tenant": {
+                            "resource-version": "1533652058206",
+                            "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
+                            "tenant-name": "PFPP"
+                        }
+                    }
+                ]
+            },
+            "vserver": {
+                "in-maint": false,
+                "is-closed-loop-disabled": false,
+                "prov-status": "ACTIVE",
+                "resource-version": "1533850964910",
+                "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                "vserver-name": "vlb-ms-0809-1",
+                "vserver-name2": "vlb-ms-0809-1",
+                "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+            }
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json
new file mode 100644
index 0000000..fb341dc
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqResponseWrapper-Vserver.json
@@ -0,0 +1,157 @@
+{
+    "inventory-response-item": [
+        {
+            "extra-properties": {},
+            "inventory-response-items": {
+                "inventory-response-item": [
+                    {
+                        "extra-properties": {
+                            "extra-property": [
+                                {
+                                    "property-name": "model-ver.model-version-id",
+                                    "property-value": "a82cd55f-1452-4c36-941a-c9f970a3e67c"
+                                },
+                                {
+                                    "property-name": "model-ver.model-name",
+                                    "property-value": "vLoadBalancerMS"
+                                },
+                                {
+                                    "property-name": "model.model-type",
+                                    "property-value": "resource"
+                                },
+                                {
+                                    "property-name": "model.model-invariant-id",
+                                    "property-value": "53638a85-361a-437d-8830-4b0d5329225e"
+                                },
+                                {
+                                    "property-name": "model-ver.model-version",
+                                    "property-value": "1.0"
+                                }
+                            ]
+                        },
+                        "generic-vnf": {
+                            "in-maint": false,
+                            "ipv4-oam-address": "10.0.150.1",
+                            "is-closed-loop-disabled": false,
+                            "model-customization-id": "6c1a5439-3b77-4d8a-bb2b-9fe7006ad671",
+                            "model-invariant-id": "53638a85-361a-437d-8830-4b0d5329225e",
+                            "model-version-id": "a82cd55f-1452-4c36-941a-c9f970a3e67c",
+                            "nf-function": "",
+                            "nf-naming-code": "",
+                            "nf-role": "vLB",
+                            "nf-type": "",
+                            "orchestration-status": "Active",
+                            "prov-status": "PROV",
+                            "resource-version": "1533850960381",
+                            "service-id": "50e1b0be-e0c9-48e2-9f42-15279a783ee8",
+                            "vnf-id": "807a3f02-f878-436b-870c-f0e91e81570d",
+                            "vnf-name": "vLoadBalancerMS-Vnf-0809-2",
+                            "vnf-type": "vLoadBalancerMS/vLoadBalancerMS 0"
+                        },
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "model-name": "vLoadBalancerMS",
+                                    "service-instance": {
+                                        "environment-context": "General_Revenue-Bearing",
+                                        "model-invariant-id": "b5477216-9b7d-4e75-8777-5b632d406759",
+                                        "model-version-id": "4feb459d-d8ef-4cde-a714-235c79787962",
+                                        "orchestration-status": "Active",
+                                        "resource-version": "1533848425145",
+                                        "service-instance-id": "b66d24cc-feca-4fdc-8090-2e9539a8bbac",
+                                        "service-instance-name": "vLoadBalancerMS-Service-0809-1",
+                                        "workload-context": "Production"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "model-invariant-id": "6d01b7f1-769a-4080-b8ea-57fd03ef1572",
+                                        "model-version-id": "3302088a-457e-496c-9282-2eb3d5b8dd24",
+                                        "resource-version": "1534270663202",
+                                        "vf-module-id": "dummy_807a3f02-f878-436b-870c-f0e91e81570d",
+                                        "vf-module-name": "dummy_807a3f02-f878-436b-870c-f0e91e81570d"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "vf-module-name": "my-module-abc_1"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "heat-stack-id": "Vfmodule_vLBMS-0809-1/83ab2394-2b22-40f9-8ba2-383698dd2958",
+                                        "is-base-vf-module": true,
+                                        "model-customization-id": "5198f732-8f22-48f9-98f8-d6b8b50118be",
+                                        "model-invariant-id": "1f566a81-58ba-4762-81f9-d2259509429a",
+                                        "model-version-id": "94827d25-4ac3-4850-abfc-7b6e3c531db4",
+                                        "module-index": 0,
+                                        "orchestration-status": "active",
+                                        "resource-version": "1533850416834",
+                                        "vf-module-id": "b861467d-d3a7-4b21-81b3-94d928a7e8b7",
+                                        "vf-module-name": "Vfmodule_vLBMS-0809-1"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "vf-module-name": "my-module-abc_123"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "vf-module-name": "no-underscore-number-9999"
+                                    }
+                                },
+                                {
+                                    "vf-module": {
+                                        "is-base-vf-module": false,
+                                        "vf-module-name": "my-module-abc_34"
+                                    }
+                                }
+                            ]
+                        },
+                        "model-name": "vLoadBalancerMS"
+                    },
+                    {
+                        "extra-properties": {},
+                        "inventory-response-items": {
+                            "inventory-response-item": [
+                                {
+                                    "cloud-region": {
+                                        "cloud-owner": "CloudOwner",
+                                        "cloud-region-id": "RegionOne",
+                                        "cloud-region-version": "v2.5",
+                                        "cloud-type": "openstack",
+                                        "cloud-zone": "zone-1",
+                                        "owner-defined-type": "owner type",
+                                        "resource-version": "1533652058185",
+                                        "sriov-automation": false
+                                    },
+                                    "extra-properties": {}
+                                }
+                            ]
+                        },
+                        "tenant": {
+                            "resource-version": "1533652058206",
+                            "tenant-id": "4086f396c5e04caf9502c5fdeca575c4",
+                            "tenant-name": "PFPP"
+                        }
+                    }
+                ]
+            },
+            "vserver": {
+                "in-maint": false,
+                "is-closed-loop-disabled": false,
+                "prov-status": "ACTIVE",
+                "resource-version": "1533850964910",
+                "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+                "vserver-name": "vlb-ms-0809-1",
+                "vserver-name2": "vlb-ms-0809-1",
+                "vserver-selflink": "http://10.12.25.2:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+            }
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json
new file mode 100644
index 0000000..0a59d8a
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/AaiNqVServer.json
@@ -0,0 +1,78 @@
+{
+    "in-maint": false,
+    "is-closed-loop-disabled": true,
+    "prov-status": "ACTIVE",
+    "relationship-list": {
+        "relationship": [
+            {
+                "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
+                "related-to": "generic-vnf",
+                "related-to-property": [
+                    {
+                        "property-key": "generic-vnf.vnf-name",
+                        "property-value": "vLoadBalancerMS-Vnf-0809-2"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "generic-vnf.vnf-id",
+                        "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
+                "related-to": "image",
+                "related-to-property": [
+                    {
+                        "property-key": "image.image-name",
+                        "property-value": "unknown"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "cloud-region.cloud-owner",
+                        "relationship-value": "CloudOwner"
+                    },
+                    {
+                        "relationship-key": "cloud-region.cloud-region-id",
+                        "relationship-value": "RegionOne"
+                    },
+                    {
+                        "relationship-key": "image.image-id",
+                        "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
+                    }
+                ]
+            },
+            {
+                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+                "related-to": "flavor",
+                "related-to-property": [
+                    {
+                        "property-key": "flavor.flavor-name",
+                        "property-value": "m1.medium"
+                    }
+                ],
+                "relationship-data": [
+                    {
+                        "relationship-key": "cloud-region.cloud-owner",
+                        "relationship-value": "CloudOwner"
+                    },
+                    {
+                        "relationship-key": "cloud-region.cloud-region-id",
+                        "relationship-value": "RegionOne"
+                    },
+                    {
+                        "relationship-key": "flavor.flavor-id",
+                        "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
+                    }
+                ]
+            }
+        ]
+    },
+    "resource-version": "1533850964910",
+    "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
+    "vserver-name": "vlb-ms-0809-1",
+    "vserver-name2": "vlb-ms-0809-7",
+    "vserver-selflink": "http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json
new file mode 100644
index 0000000..2211b37
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelatedToProperty.json
@@ -0,0 +1,4 @@
+{
+    "property-key": "generic-vnf.vnf-name",
+    "property-value": "vLoadBalancerMS-Vnf-0809-1"
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json
new file mode 100644
index 0000000..39d9ce1
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/Relationship.json
@@ -0,0 +1,25 @@
+
+{
+    "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
+    "related-to": "generic-vnf",
+    "related-to-property": [
+        {
+            "property-key": "generic-vnf.vnf-name",
+            "property-value": "vLoadBalancerMS-Vnf-0809-1"
+        },
+        {
+            "property-key": "generic-vnf.vnf-name",
+            "property-value": "vLoadBalancerMS-Vnf-0809-2"
+        }
+    ],
+    "relationship-data": [
+        {
+            "relationship-key": "generic-vnf.vnf-id",
+            "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
+        },
+        {
+            "relationship-key": "generic-vnf.vnf-id",
+            "relationship-value": "907a3f02-f878-436b-870c-f0e91e81570e"
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json
new file mode 100644
index 0000000..4bbb39e
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipData.json
@@ -0,0 +1,4 @@
+{
+    "relationship-key": "generic-vnf.vnf-id",
+    "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
+}
diff --git a/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json
new file mode 100644
index 0000000..ae180f0
--- /dev/null
+++ b/models-interactions/model-impl/aai/src/test/resources/org/onap/policy/aai/RelationshipList.json
@@ -0,0 +1,68 @@
+{
+    "relationship": [
+        {
+            "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
+            "related-to": "generic-vnf",
+            "related-to-property": [
+                {
+                    "property-key": "generic-vnf.vnf-name",
+                    "property-value": "vLoadBalancerMS-Vnf-0809-2"
+                }
+            ],
+            "relationship-data": [
+                {
+                    "relationship-key": "generic-vnf.vnf-id",
+                    "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570d"
+                }
+            ]
+        },
+        {
+            "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
+            "related-to": "image",
+            "related-to-property": [
+                {
+                    "property-key": "image.image-name",
+                    "property-value": "unknown"
+                }
+            ],
+            "relationship-data": [
+                {
+                    "relationship-key": "cloud-region.cloud-owner",
+                    "relationship-value": "CloudOwner"
+                },
+                {
+                    "relationship-key": "cloud-region.cloud-region-id",
+                    "relationship-value": "RegionOne"
+                },
+                {
+                    "relationship-key": "image.image-id",
+                    "relationship-value": "6e219e86-cd94-4989-9119-def29aa10b12"
+                }
+            ]
+        },
+        {
+            "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
+            "related-to": "flavor",
+            "related-to-property": [
+                {
+                    "property-key": "flavor.flavor-name",
+                    "property-value": "m1.medium"
+                }
+            ],
+            "relationship-data": [
+                {
+                    "relationship-key": "cloud-region.cloud-owner",
+                    "relationship-value": "CloudOwner"
+                },
+                {
+                    "relationship-key": "cloud-region.cloud-region-id",
+                    "relationship-value": "RegionOne"
+                },
+                {
+                    "relationship-key": "flavor.flavor-id",
+                    "relationship-value": "764efb04-5a46-4806-a766-2bdd24559f39"
+                }
+            ]
+        }
+    ]
+}
diff --git a/models-interactions/model-impl/appc/pom.xml b/models-interactions/model-impl/appc/pom.xml
new file mode 100644
index 0000000..7b01902
--- /dev/null
+++ b/models-interactions/model-impl/appc/pom.xml
@@ -0,0 +1,47 @@
+<!--
+  ============LICENSE_START=======================================================
+  appc
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+    <artifactId>model-impl</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>appc</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  
+</project>
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/CommonHeader.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/CommonHeader.java
new file mode 100644
index 0000000..964af37
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/CommonHeader.java
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.UUID;
+
+public class CommonHeader implements Serializable {
+    private static final long serialVersionUID = -3581658269910980336L;
+
+    @SerializedName("TimeStamp")
+    private Instant timeStamp = Instant.now();
+
+    @SerializedName("APIver")
+    private String apiVer = "1.01";
+
+    @SerializedName("OriginatorID")
+    private String originatorId;
+
+    @SerializedName("RequestID")
+    private UUID requestId;
+
+    @SerializedName("SubRequestID")
+    private String subRequestId;
+
+    @SerializedName("RequestTrack")
+    private Collection<String> requestTrack = new ArrayList<>();
+
+    @SerializedName("Flags")
+    private Collection<Map<String, String>> flags = new ArrayList<>();
+
+    public CommonHeader() {}
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param commonHeader the existing instance
+     */
+    public CommonHeader(CommonHeader commonHeader) {
+        this.originatorId = commonHeader.originatorId;
+        this.requestId = commonHeader.requestId;
+        this.subRequestId = commonHeader.subRequestId;
+        if (commonHeader.requestTrack != null) {
+            this.requestTrack.addAll(commonHeader.requestTrack);
+        }
+        if (commonHeader.flags != null) {
+            this.flags.addAll(commonHeader.flags);
+        }
+    }
+
+    public Instant getTimeStamp() {
+        return timeStamp;
+    }
+
+    public void setTimeStamp(Instant timeStamp) {
+        this.timeStamp = timeStamp;
+    }
+
+    public String getApiVer() {
+        return apiVer;
+    }
+
+    public void setApiVer(String apiVer) {
+        this.apiVer = apiVer;
+    }
+
+    public String getOriginatorId() {
+        return originatorId;
+    }
+
+    public void setOriginatorId(String originatorId) {
+        this.originatorId = originatorId;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getSubRequestId() {
+        return subRequestId;
+    }
+
+    public void setSubRequestId(String subRequestId) {
+        this.subRequestId = subRequestId;
+    }
+
+    public Collection<String> getRequestTrack() {
+        return requestTrack;
+    }
+
+    public void setRequestTrack(Collection<String> requestTrack) {
+        this.requestTrack = requestTrack;
+    }
+
+    public Collection<Map<String, String>> getFlags() {
+        return flags;
+    }
+
+    public void setFlags(Collection<Map<String, String>> flags) {
+        this.flags = flags;
+    }
+
+    @Override
+    public String toString() {
+        return "CommonHeader [TimeStamp=" + timeStamp + ", APIver=" + apiVer + ", OriginatorId=" + originatorId
+                + ", RequestId=" + requestId + ", SubrequestId=" + subRequestId + ", RequestTrack=" + requestTrack
+                + ", Flags=" + flags + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((apiVer == null) ? 0 : apiVer.hashCode());
+        result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+        result = prime * result + ((originatorId == null) ? 0 : originatorId.hashCode());
+        result = prime * result + ((requestId == null) ? 0 : requestId.hashCode());
+        result = prime * result + ((requestTrack == null) ? 0 : requestTrack.hashCode());
+        result = prime * result + ((subRequestId == null) ? 0 : subRequestId.hashCode());
+        result = prime * result + ((timeStamp == null) ? 0 : timeStamp.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        CommonHeader other = (CommonHeader) obj;
+        if (apiVer == null) {
+            if (other.apiVer != null) {
+                return false;
+            }
+        } else if (!apiVer.equals(other.apiVer)) {
+            return false;
+        }
+        if (flags == null) {
+            if (other.flags != null) {
+                return false;
+            }
+        } else if (!flags.equals(other.flags)) {
+            return false;
+        }
+        if (originatorId == null) {
+            if (other.originatorId != null) {
+                return false;
+            }
+        } else if (!originatorId.equals(other.originatorId)) {
+            return false;
+        }
+        if (requestId == null) {
+            if (other.requestId != null) {
+                return false;
+            }
+        } else if (!requestId.equals(other.requestId)) {
+            return false;
+        }
+        if (requestTrack == null) {
+            if (other.requestTrack != null) {
+                return false;
+            }
+        } else if (!requestTrack.equals(other.requestTrack)) {
+            return false;
+        }
+        if (subRequestId == null) {
+            if (other.subRequestId != null) {
+                return false;
+            }
+        } else if (!subRequestId.equals(other.subRequestId)) {
+            return false;
+        }
+        if (timeStamp == null) {
+            if (other.timeStamp != null) {
+                return false;
+            }
+        } else if (!timeStamp.equals(other.timeStamp)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Request.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Request.java
new file mode 100644
index 0000000..7f15746
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Request.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Request implements Serializable {
+    private static final long serialVersionUID = -3912323643990646431L;
+
+    @SerializedName("CommonHeader")
+    private CommonHeader commonHeader;
+
+    @SerializedName("Action")
+    private String action;
+
+    @SerializedName("TargetID")
+    private String targetId;
+
+    @SerializedName("ObjectID")
+    private String objectId;
+
+    @SerializedName("Payload")
+    private HashMap<String, Object> payload = new HashMap<>();
+
+    public Request() {
+        // Initiate an empty Request instance
+    }
+
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    public Map<String, Object> getPayload() {
+        return payload;
+    }
+
+    public String getAction() {
+        return action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public String getTargetId() {
+        return targetId;
+    }
+
+    public void setTargetId(String targetId) {
+        this.targetId = targetId;
+    }
+
+    public String getObjectId() {
+        return objectId;
+    }
+
+    public void setObjectId(String objectId) {
+        this.objectId = objectId;
+    }
+
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    public void setPayload(Map<String, Object> payload) {
+        this.payload = new HashMap<>(payload);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((action == null) ? 0 : action.hashCode());
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((objectId == null) ? 0 : objectId.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        result = prime * result + ((targetId == null) ? 0 : targetId.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        Request other = (Request) obj;
+        if (action == null) {
+            if (other.action != null) {
+                return false;
+            }
+        } else if (!action.equals(other.action)) {
+            return false;
+        }
+
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+
+        if (objectId == null) {
+            if (other.objectId != null) {
+                return false;
+            }
+        } else if (!objectId.equals(other.objectId)) {
+            return false;
+        }
+
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+
+        if (targetId == null) {
+            if (other.targetId != null) {
+                return false;
+            }
+        } else if (!targetId.equals(other.targetId)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "Request [CommonHeader=" + commonHeader + ", Action=" + action + ", TargetId=" + targetId + ", ObjectId="
+                + objectId + ", Payload=" + payload + "]";
+    }
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java
new file mode 100644
index 0000000..f24c840
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Response implements Serializable {
+    private static final long serialVersionUID = 434953706339865151L;
+
+    @SerializedName("CommonHeader")
+    private CommonHeader commonHeader;
+
+    @SerializedName("Status")
+    private ResponseStatus status = new ResponseStatus();
+
+    @SerializedName("Payload")
+    private HashMap<String, Object> payload = new HashMap<>();
+
+    public Response() {
+
+    }
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param request the existing instance
+     */
+    public Response(Request request) {
+        if (request.getCommonHeader() != null) {
+            this.commonHeader = new CommonHeader(request.getCommonHeader());
+        }
+        if (request.getPayload() != null) {
+            this.payload.putAll(request.getPayload());
+        }
+    }
+
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    public ResponseStatus getStatus() {
+        return status;
+    }
+
+    public void setStatus(ResponseStatus status) {
+        this.status = status;
+    }
+
+    public Map<String, Object> getPayload() {
+        return payload;
+    }
+
+    public void setPayload(Map<String, Object> payload) {
+        this.payload = new HashMap<>(payload);
+    }
+
+    @Override
+    public String toString() {
+        return "Response [CommonHeader=" + commonHeader + ", Status=" + status + ", Payload=" + payload + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        result = prime * result + ((status == null) ? 0 : status.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Response other = (Response) obj;
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+        if (status == null) {
+            if (other.status != null) {
+                return false;
+            }
+        } else if (!status.equals(other.status)) {
+            return false;
+        }
+        return true;
+    }
+
+
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseCode.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseCode.java
new file mode 100644
index 0000000..48f5182
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseCode.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+public enum ResponseCode {
+    ACCEPT(100), ERROR(200), REJECT(300), SUCCESS(400), FAILURE(500);
+
+    @SerializedName("Code")
+    private Integer code;
+
+    private ResponseCode(int code) {
+        this.code = code;
+    }
+
+    public int getValue() {
+        return this.code;
+    }
+
+    @Override
+    public String toString() {
+        return Integer.toString(this.code);
+    }
+
+    /**
+     * Convert an integer code to a ResponseCode.
+     * 
+     * @param code the integer code
+     * @return the ResponseCode
+     */
+    public static ResponseCode toResponseCode(int code) {
+        if (code == ACCEPT.code) {
+            return ACCEPT;
+        }
+        if (code == ERROR.code) {
+            return ERROR;
+        }
+        if (code == REJECT.code) {
+            return REJECT;
+        }
+        if (code == SUCCESS.code) {
+            return SUCCESS;
+        }
+        if (code == FAILURE.code) {
+            return FAILURE;
+        }
+        return null;
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseStatus.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseStatus.java
new file mode 100644
index 0000000..5661150
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseStatus.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class ResponseStatus implements Serializable {
+    private static final long serialVersionUID = 2421770469587860452L;
+
+    @SerializedName("Code")
+    private int code;
+
+    @SerializedName("Value")
+    private String value;
+
+    @SerializedName("Description")
+    private String description;
+
+    @Override
+    public String toString() {
+        return "ResponseStatus [Code=" + code + ", Value=" + value + ", Description=" + description + "]";
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + code;
+        result = prime * result + ((description == null) ? 0 : description.hashCode());
+        result = prime * result + ((value == null) ? 0 : value.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        ResponseStatus other = (ResponseStatus) obj;
+        if (code != other.code) {
+            return false;
+        }
+        if (description == null) {
+            if (other.description != null) {
+                return false;
+            }
+        } else if (!description.equals(other.description)) {
+            return false;
+        }
+        if (value == null) {
+            if (other.value != null) {
+                return false;
+            }
+        } else if (!value.equals(other.value)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java
new file mode 100644
index 0000000..ef93fd2
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import com.google.gson.annotations.SerializedName;
+
+public enum ResponseValue {
+    ACCEPT("ACCEPT"), ERROR("ERROR"), REJECT("REJECT"), SUCCESS("SUCCESS"), FAILURE("FAILURE");
+
+    @SerializedName("Value")
+    private String value;
+
+    private ResponseValue(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return this.value;
+    }
+
+    /**
+     * Convert a String value to a ResponseValue.
+     * 
+     * @param value the String value
+     * @return the ResponseValue
+     */
+    public static ResponseValue toResponseValue(String value) {
+        if (value == null) {
+            return null;
+        }
+
+        if (value.equals(ACCEPT.toString())) {
+            return ACCEPT;
+        }
+        if (value.equals(ERROR.toString())) {
+            return ERROR;
+        }
+        if (value.equals(REJECT.toString())) {
+            return REJECT;
+        }
+        if (value.equals(SUCCESS.toString())) {
+            return SUCCESS;
+        }
+        if (value.equals(FAILURE.toString())) {
+            return FAILURE;
+        }
+
+        return null;
+    }
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/util/Serialization.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/util/Serialization.java
new file mode 100644
index 0000000..473c5df
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/util/Serialization.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
+import java.lang.reflect.Type;
+import java.time.Instant;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class Serialization {
+    public static final DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSxxx");
+
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+            .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+            // .registerTypeAdapter(CommonHeader1607.class, new gsonCommonHeaderInstance())
+            // .registerTypeAdapter(ResponseStatus1607.class, new gsonResponseStatus())
+            .create();
+
+    private Serialization() {}
+
+    public static class GsonUtcAdapter implements JsonSerializer<ZonedDateTime>, JsonDeserializer<ZonedDateTime> {
+        private static final Logger logger = LoggerFactory.getLogger(GsonUtcAdapter.class);
+
+        @Override
+        public ZonedDateTime deserialize(JsonElement element, Type type, JsonDeserializationContext context) {
+            try {
+                return ZonedDateTime.parse(element.getAsString(), format);
+            } catch (Exception e) {
+                logger.error("deserialize threw: ", e);
+            }
+            return null;
+        }
+
+        @Override
+        public JsonElement serialize(ZonedDateTime datetime, Type type, JsonSerializationContext context) {
+            return new JsonPrimitive(datetime.format(format));
+        }
+    }
+
+    public static class GsonInstantAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.ofEpochMilli(json.getAsLong());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toEpochMilli());
+        }
+
+    }
+
+}
diff --git a/models-interactions/model-impl/appc/src/main/resources/definitions.yaml b/models-interactions/model-impl/appc/src/main/resources/definitions.yaml
new file mode 100644
index 0000000..d015f33
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/main/resources/definitions.yaml
@@ -0,0 +1,119 @@
+###
+# ============LICENSE_START=======================================================
+# appc
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+###
+
+Request:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+          value: '1.01'
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+          pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Action:
+      type: string
+      enum:
+        - Audit
+        - ActionStatus
+        - BlockAudits
+        - Configure
+        - HealthCheck
+        - Install
+        - LiveUpgrade
+        - Migrate
+        - ModifyConfig
+        - Query
+        - Rebuild
+        - Reconfigure
+        - Restart
+        - Rollback
+        - Scale
+        - Start
+        - Stop
+        - Sync
+        - Terminate
+        - Test
+        - Upgrade
+    TargetID:
+      type: string
+    ObjectID:
+      type: string
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Action
+    - TargetID
+Response:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Status:
+      type: object
+      properties:
+        Code:
+          type: integer
+        Value:
+          type: string
+      required:
+        - Code
+        - Value
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Status
+      
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
new file mode 100644
index 0000000..c76a46e
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
@@ -0,0 +1,180 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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=========================================================
+ */
+
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class CommonHeaderTest {
+
+    @Test
+    public void testCommonHeader() {
+        CommonHeader commonHeader = new CommonHeader();
+        assertNotNull(commonHeader);
+        assertNotNull(new CommonHeader(commonHeader));
+        assertNotEquals(0, commonHeader.hashCode());
+
+        commonHeader.setApiVer("Kansas");
+        assertEquals("Kansas", commonHeader.getApiVer());
+
+        List<Map<String, String>> flagSet = new ArrayList<>();
+        commonHeader.setFlags(flagSet);
+        assertEquals(flagSet, commonHeader.getFlags());
+
+        commonHeader.setOriginatorId("Dorothy");
+        assertEquals("Dorothy", commonHeader.getOriginatorId());
+
+        UUID requestId = UUID.randomUUID();
+        commonHeader.setRequestId(requestId);
+        assertEquals(requestId, commonHeader.getRequestId());
+
+        List<String> requestTrackSet = new ArrayList<>();
+        commonHeader.setRequestTrack(requestTrackSet);
+        assertEquals(requestTrackSet, commonHeader.getRequestTrack());
+
+        commonHeader.setSubRequestId("Can I go home?");
+        assertEquals("Can I go home?", commonHeader.getSubRequestId());
+
+        Instant timestamp = Instant.now();
+        commonHeader.setTimeStamp(timestamp);
+        assertEquals(timestamp, commonHeader.getTimeStamp());
+
+        assertNotEquals(0, commonHeader.hashCode());
+
+        assertEquals("CommonHeader [TimeStamp=", commonHeader.toString().substring(0, 24));
+
+        CommonHeader copiedCommonHeader = new CommonHeader();
+        copiedCommonHeader.setApiVer(commonHeader.getApiVer());
+        copiedCommonHeader.setFlags(commonHeader.getFlags());
+        copiedCommonHeader.setOriginatorId(commonHeader.getOriginatorId());
+        copiedCommonHeader.setRequestId(commonHeader.getRequestId());
+        copiedCommonHeader.setRequestTrack(commonHeader.getRequestTrack());
+        copiedCommonHeader.setSubRequestId(commonHeader.getSubRequestId());
+        copiedCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(commonHeader));
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        assertFalse(commonHeader.equals(null));
+        assertFalse(commonHeader.equals("Hello"));
+
+        CommonHeader clonedCommonHeader = new CommonHeader(commonHeader);
+        clonedCommonHeader.setApiVer(commonHeader.getApiVer());
+        clonedCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(clonedCommonHeader));
+
+        commonHeader.setApiVer(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setApiVer(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setApiVer("Kansas");
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setApiVer("Kansas");
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setFlags(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setFlags(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setFlags(flagSet);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setFlags(flagSet);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setOriginatorId(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setOriginatorId(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setOriginatorId("Dorothy");
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setOriginatorId("Dorothy");
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setRequestId(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setRequestId(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setRequestId(requestId);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setRequestId(requestId);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setRequestTrack(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setRequestTrack(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setRequestTrack(requestTrackSet);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setRequestTrack(requestTrackSet);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setSubRequestId(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setSubRequestId(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setSubRequestId("Can I go home?");
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setSubRequestId("Can I go home?");
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+
+        commonHeader.setTimeStamp(null);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setTimeStamp(null);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+        commonHeader.setTimeStamp(timestamp);
+        assertFalse(commonHeader.equals(copiedCommonHeader));
+        copiedCommonHeader.setTimeStamp(timestamp);
+        assertTrue(commonHeader.equals(copiedCommonHeader));
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
new file mode 100644
index 0000000..6d9ea52
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class EnumsTest {
+
+    @Test
+    public void testResponseCode() {
+        assertEquals(5, ResponseCode.values().length);
+
+        assertNull(ResponseCode.toResponseCode(0));
+
+        assertEquals(ResponseCode.ACCEPT, ResponseCode.toResponseCode(100));
+        assertEquals(ResponseCode.ERROR, ResponseCode.toResponseCode(200));
+        assertEquals(ResponseCode.REJECT, ResponseCode.toResponseCode(300));
+        assertEquals(ResponseCode.SUCCESS, ResponseCode.toResponseCode(400));
+        assertEquals(ResponseCode.FAILURE, ResponseCode.toResponseCode(500));
+
+        assertEquals(100, ResponseCode.ACCEPT.getValue());
+        assertEquals(200, ResponseCode.ERROR.getValue());
+        assertEquals(300, ResponseCode.REJECT.getValue());
+        assertEquals(400, ResponseCode.SUCCESS.getValue());
+        assertEquals(500, ResponseCode.FAILURE.getValue());
+
+        assertEquals("100", ResponseCode.ACCEPT.toString());
+        assertEquals("200", ResponseCode.ERROR.toString());
+        assertEquals("300", ResponseCode.REJECT.toString());
+        assertEquals("400", ResponseCode.SUCCESS.toString());
+        assertEquals("500", ResponseCode.FAILURE.toString());
+    }
+
+    @Test
+    public void testResponseValue() {
+        assertEquals(5, ResponseValue.values().length);
+
+        assertNull(ResponseValue.toResponseValue("Dorothy"));
+        assertNull(ResponseValue.toResponseValue(null));
+
+        assertEquals(ResponseValue.ACCEPT, ResponseValue.toResponseValue("ACCEPT"));
+        assertEquals(ResponseValue.ERROR, ResponseValue.toResponseValue("ERROR"));
+        assertEquals(ResponseValue.REJECT, ResponseValue.toResponseValue("REJECT"));
+        assertEquals(ResponseValue.SUCCESS, ResponseValue.toResponseValue("SUCCESS"));
+        assertEquals(ResponseValue.FAILURE, ResponseValue.toResponseValue("FAILURE"));
+
+        assertEquals("ACCEPT", ResponseValue.ACCEPT.toString());
+        assertEquals("ERROR", ResponseValue.ERROR.toString());
+        assertEquals("REJECT", ResponseValue.REJECT.toString());
+        assertEquals("SUCCESS", ResponseValue.SUCCESS.toString());
+        assertEquals("FAILURE", ResponseValue.FAILURE.toString());
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
new file mode 100644
index 0000000..a6ef4a1
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class RequestTest {
+
+    @Test
+    public void testRequest() {
+        Request request = new Request();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+
+        CommonHeader commonHeader = new CommonHeader();
+
+        request.setCommonHeader(commonHeader);
+        assertEquals(commonHeader, request.getCommonHeader());
+
+        request.setAction("Go to Oz");
+        assertEquals("Go to Oz", request.getAction());
+
+        request.setObjectId("Wizard");
+        assertEquals("Wizard", request.getObjectId());
+
+        request.setTargetId("Oz");
+        assertEquals("Oz", request.getTargetId());
+
+        Map<String, Object> payload = new HashMap<>();
+        payload.put("North", "Good Witch");
+        payload.put("West", "Bad Witch");
+
+        request.setPayload(payload);
+        assertEquals(payload, request.getPayload());
+
+        assertNotEquals(0, request.hashCode());
+
+        assertEquals("Request [CommonHeader=CommonHeader [TimeStamp=", request.toString().substring(0, 46));
+
+        Request copiedRequest = new Request();
+        copiedRequest.setCommonHeader(request.getCommonHeader());
+        copiedRequest.setAction(request.getAction());
+        copiedRequest.setObjectId(request.getObjectId());
+        copiedRequest.setPayload(request.getPayload());
+        copiedRequest.setTargetId(request.getTargetId());
+
+        assertTrue(request.equals(request));
+        assertTrue(request.equals(copiedRequest));
+        assertFalse(request.equals(null));
+        assertFalse(request.equals("Hello"));
+
+        request.setCommonHeader(null);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setCommonHeader(null);
+        assertTrue(request.equals(copiedRequest));
+        request.setCommonHeader(commonHeader);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setCommonHeader(commonHeader);
+        assertTrue(request.equals(copiedRequest));
+
+        request.setAction(null);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setAction(null);
+        assertTrue(request.equals(copiedRequest));
+        request.setAction("Go to Oz");
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setAction("Go to Oz");
+        assertTrue(request.equals(copiedRequest));
+
+        request.setObjectId(null);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setObjectId(null);
+        assertTrue(request.equals(copiedRequest));
+        request.setObjectId("Wizard");
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setObjectId("Wizard");
+        assertTrue(request.equals(copiedRequest));
+
+        request.setTargetId(null);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setTargetId(null);
+        assertTrue(request.equals(copiedRequest));
+        request.setTargetId("Oz");
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setTargetId("Oz");
+        assertTrue(request.equals(copiedRequest));
+
+        request.setPayload(new HashMap<String, Object>());
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setPayload(new HashMap<String, Object>());
+        assertTrue(request.equals(copiedRequest));
+        request.setPayload(payload);
+        assertFalse(request.equals(copiedRequest));
+        copiedRequest.setPayload(payload);
+        assertTrue(request.equals(copiedRequest));
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
new file mode 100644
index 0000000..b317677
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ResponseStatusTest {
+
+    @Test
+    public void testResonseStatus() {
+        ResponseStatus status = new ResponseStatus();
+        assertNotNull(status);
+        assertNotEquals(0, status.hashCode());
+
+        status.setCode(1234);
+        assertEquals(1234, status.getCode());
+
+        status.setDescription("The wonderful land of Oz");
+        assertEquals("The wonderful land of Oz", status.getDescription());
+
+        status.setValue("There's no place like home");
+        assertEquals("There's no place like home", status.getValue());
+        assertNotEquals(0, status.hashCode());
+
+        assertEquals("ResponseStatus [Code=1234, Value=There's no pla", status.toString().substring(0, 47));
+
+        ResponseStatus copiedStatus = new ResponseStatus();
+        copiedStatus.setCode(status.getCode());
+        copiedStatus.setDescription(status.getDescription());
+        copiedStatus.setValue(status.getValue());
+
+        assertTrue(status.equals(status));
+        assertTrue(status.equals(copiedStatus));
+        assertFalse(status.equals(null));
+        assertFalse(status.equals("Hello"));
+
+        status.setCode(-1);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(-1);
+        assertTrue(status.equals(copiedStatus));
+        status.setCode(1234);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(1234);
+        assertTrue(status.equals(copiedStatus));
+
+        status.setDescription(null);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setDescription(null);
+        assertTrue(status.equals(copiedStatus));
+        status.setDescription("The wonderful land of Oz");
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setDescription("The wonderful land of Oz");
+        assertTrue(status.equals(copiedStatus));
+
+        status.setValue(null);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setValue(null);
+        assertTrue(status.equals(copiedStatus));
+        status.setValue("There's no place like home");
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setValue("There's no place like home");
+        assertTrue(status.equals(copiedStatus));
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
new file mode 100644
index 0000000..b0806fa
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ResponseTest {
+
+    @Test
+    public void testResonse() {
+        Response response = new Response();
+        assertNotNull(response);
+        assertNotNull(new Response(new Request()));
+        assertNotEquals(0, response.hashCode());
+
+        CommonHeader commonHeader = new CommonHeader();
+
+        Request request = new Request();
+        request.setCommonHeader(commonHeader);
+        assertNotNull(new Response(request));
+
+        response.setCommonHeader(commonHeader);
+        assertEquals(commonHeader, response.getCommonHeader());
+
+        ResponseStatus status = new ResponseStatus();
+        response.setStatus(status);
+        assertEquals(status, response.getStatus());
+
+        Map<String, Object> payload = new HashMap<>();
+        payload.put("North", "Good Witch");
+        payload.put("West", "Bad Witch");
+
+        response.setPayload(payload);
+        assertEquals(payload, response.getPayload());
+
+        assertNotEquals(0, response.hashCode());
+
+        assertEquals("Response [CommonHeader=CommonHeader [TimeStamp=", response.toString().substring(0, 47));
+
+        Response copiedResponse = new Response();
+        copiedResponse.setCommonHeader(response.getCommonHeader());
+        copiedResponse.setStatus(response.getStatus());
+        copiedResponse.setPayload(response.getPayload());
+
+        assertTrue(response.equals(response));
+        assertTrue(response.equals(copiedResponse));
+        assertFalse(response.equals(null));
+        assertFalse(response.equals("Hello"));
+
+        response.setCommonHeader(null);
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setCommonHeader(null);
+        assertTrue(response.equals(copiedResponse));
+        response.setCommonHeader(commonHeader);
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setCommonHeader(commonHeader);
+        assertTrue(response.equals(copiedResponse));
+
+        response.setStatus(null);
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setStatus(null);
+        assertTrue(response.equals(copiedResponse));
+        response.setStatus(status);
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setStatus(status);
+        assertTrue(response.equals(copiedResponse));
+
+        response.setPayload(new HashMap<String, Object>());
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setPayload(new HashMap<String, Object>());
+        assertTrue(response.equals(copiedResponse));
+        response.setPayload(payload);
+        assertFalse(response.equals(copiedResponse));
+        copiedResponse.setPayload(payload);
+        assertTrue(response.equals(copiedResponse));
+    }
+}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
new file mode 100644
index 0000000..e47df42
--- /dev/null
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appc.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import org.junit.Test;
+
+public class SerializationTest {
+
+    @Test
+    public void test() {
+        String nameString = "Dorothy";
+        String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
+        assertEquals("\"Dorothy\"", jsonName);
+        String jsonInOutName = Serialization.gsonPretty.fromJson(jsonName, String.class);
+        assertEquals("Dorothy", jsonInOutName);
+
+        Instant instant = Instant.ofEpochMilli(1516127215000L);
+        String instantString = Serialization.gsonPretty.toJson(instant, Instant.class);
+        assertEquals("1516127215000", instantString);
+        Instant outInstant = Serialization.gsonPretty.fromJson(instantString, Instant.class);
+        assertEquals(instant, outInstant);
+
+        ZonedDateTime zdt = ZonedDateTime.ofInstant(instant, ZoneId.of("UTC"));
+        String zdtString = Serialization.gsonPretty.toJson(zdt, ZonedDateTime.class);
+        assertEquals("\"2018-01-16 18:26:55.000000+00:00\"", zdtString);
+        ZonedDateTime outZdt = Serialization.gsonPretty.fromJson(zdtString, ZonedDateTime.class);
+        assertEquals(zdt.getDayOfWeek(), outZdt.getDayOfWeek());
+
+        assertNull(Serialization.gsonPretty.fromJson("oz time is weird", ZonedDateTime.class));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/pom.xml b/models-interactions/model-impl/appclcm/pom.xml
new file mode 100644
index 0000000..51ebbd7
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/pom.xml
@@ -0,0 +1,47 @@
+<!--
+  ============LICENSE_START=======================================================
+  appclcm
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+    <artifactId>model-impl</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>appclcm</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  
+</project>
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmCommonHeader.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmCommonHeader.java
new file mode 100644
index 0000000..c812627
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmCommonHeader.java
@@ -0,0 +1,257 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class LcmCommonHeader implements Serializable {
+
+    private static final long serialVersionUID = 6581963539127062114L;
+
+    @SerializedName(value = "timestamp")
+    private Instant timeStamp = Instant.now();
+
+    @SerializedName(value = "api-ver")
+    private String apiVer = "2.00";
+
+    @SerializedName(value = "originator-id")
+    private String originatorId;
+
+    @SerializedName(value = "request-id")
+    private UUID requestId;
+
+    @SerializedName(value = "sub-request-id")
+    private String subRequestId;
+
+    @SerializedName(value = "flags")
+    private Map<String, String> flags = new HashMap<>();
+
+    public LcmCommonHeader() {
+
+    }
+
+    /**
+     * Used to copy a common header.
+     * 
+     * @param commonHeader a header that is defined by the lcm api guide that contains information
+     *        about the request (requestId, flags, etc.)
+     */
+    public LcmCommonHeader(LcmCommonHeader commonHeader) {
+        this.originatorId = commonHeader.originatorId;
+        this.requestId = commonHeader.requestId;
+        this.subRequestId = commonHeader.subRequestId;
+        if (commonHeader.flags != null) {
+            this.flags.putAll(commonHeader.flags);
+        }
+    }
+
+    /**
+     * Get the timestamp.
+     * 
+     * @return the timeStamp
+     */
+    public Instant getTimeStamp() {
+        return timeStamp;
+    }
+
+    /**
+     * Set the timestamp.
+     * 
+     * @param timeStamp the timeStamp to set
+     */
+    public void setTimeStamp(Instant timeStamp) {
+        this.timeStamp = timeStamp;
+    }
+
+    /**
+     * Get the API version.
+     * 
+     * @return the apiVer
+     */
+    public String getApiVer() {
+        return apiVer;
+    }
+
+    /**
+     * Set the API version.
+     * 
+     * @param apiVer the apiVer to set
+     */
+    public void setApiVer(String apiVer) {
+        this.apiVer = apiVer;
+    }
+
+    /**
+     * Get the originator Id.
+     * 
+     * @return the originatorId
+     */
+    public String getOriginatorId() {
+        return originatorId;
+    }
+
+    /**
+     * Set the originator Id.
+     * 
+     * @param originatorId the originatorId to set
+     */
+    public void setOriginatorId(String originatorId) {
+        this.originatorId = originatorId;
+    }
+
+    /**
+     * Get the request Id.
+     * 
+     * @return the requestId
+     */
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Set the request Id.
+     * 
+     * @param requestId the requestId to set
+     */
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    /**
+     * Get the sub request Id.
+     * 
+     * @return the subRequestId
+     */
+    public String getSubRequestId() {
+        return subRequestId;
+    }
+
+    /**
+     * Set the sub request Id.
+     * 
+     * @param subRequestId the subRequestId to set
+     */
+    public void setSubRequestId(String subRequestId) {
+        this.subRequestId = subRequestId;
+    }
+
+    /**
+     * Get the flags.
+     * 
+     * @return the flags
+     */
+    public Map<String, String> getFlags() {
+        return flags;
+    }
+
+    /**
+     * Set the flags.
+     * 
+     * @param flags the flags to set
+     */
+    public void setFlags(Map<String, String> flags) {
+        this.flags = flags;
+    }
+
+    @Override
+    public String toString() {
+        return "CommonHeader [timeStamp=" + timeStamp + ", apiVer=" + apiVer + ", originatorId=" + originatorId
+                + ", requestId=" + requestId + ", subRequestId=" + subRequestId + ", flags=" + flags + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((apiVer == null) ? 0 : apiVer.hashCode());
+        result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+        result = prime * result + ((originatorId == null) ? 0 : originatorId.hashCode());
+        result = prime * result + ((requestId == null) ? 0 : requestId.hashCode());
+        result = prime * result + ((subRequestId == null) ? 0 : subRequestId.hashCode());
+        result = prime * result + ((timeStamp == null) ? 0 : timeStamp.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmCommonHeader other = (LcmCommonHeader) obj;
+        if (apiVer == null) {
+            if (other.apiVer != null) {
+                return false;
+            }
+        } else if (!apiVer.equals(other.apiVer)) {
+            return false;
+        }
+        if (flags == null) {
+            if (other.flags != null) {
+                return false;
+            }
+        } else if (!flags.equals(other.flags)) {
+            return false;
+        }
+        if (originatorId == null) {
+            if (other.originatorId != null) {
+                return false;
+            }
+        } else if (!originatorId.equals(other.originatorId)) {
+            return false;
+        }
+        if (requestId == null) {
+            if (other.requestId != null) {
+                return false;
+            }
+        } else if (!requestId.equals(other.requestId)) {
+            return false;
+        }
+        if (subRequestId == null) {
+            if (other.subRequestId != null) {
+                return false;
+            }
+        } else if (!subRequestId.equals(other.subRequestId)) {
+            return false;
+        }
+        if (timeStamp == null) {
+            if (other.timeStamp != null) {
+                return false;
+            }
+        } else if (!timeStamp.equals(other.timeStamp)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequest.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequest.java
new file mode 100644
index 0000000..3e8f717
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequest.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public class LcmRequest implements Serializable {
+
+    private static final long serialVersionUID = 219375564922846624L;
+
+    @SerializedName(value = "common-header")
+    private LcmCommonHeader commonHeader;
+
+    @SerializedName(value = "action")
+    private String action;
+
+    @SerializedName(value = "action-identifiers")
+    private Map<String, String> actionIdentifiers;
+
+    @SerializedName(value = "payload")
+    private String payload;
+
+    public LcmRequest() {
+        // Create a default LCM request
+    }
+
+    public LcmCommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * Get the action.
+     * 
+     * @return the action
+     */
+    public String getAction() {
+        return action;
+    }
+
+    /**
+     * Set the action.
+     * 
+     * @param action the action to set
+     */
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    /**
+     * Get the action identifiers.
+     * 
+     * @return the actionIdentifiers
+     */
+    public Map<String, String> getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * Set the action identifiers.
+     * 
+     * @param actionIdentifiers the actionIdentifiers to set
+     */
+    public void setActionIdentifiers(Map<String, String> actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * Get the payload.
+     * 
+     * @return the payload
+     */
+    public String getPayload() {
+        return payload;
+    }
+
+    /**
+     * Set the payload.
+     * 
+     * @param payload the payload to set
+     */
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+
+    /**
+     * Get the common header.
+     * 
+     * @param commonHeader the commonHeader to set
+     */
+    public void setCommonHeader(LcmCommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    @Override
+    public String toString() {
+        return "Request [commonHeader=" + commonHeader + ", action=" + action + ", actionIdentifiers="
+                + actionIdentifiers + ", payload=" + payload + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((action == null) ? 0 : action.hashCode());
+        result = prime * result + ((actionIdentifiers == null) ? 0 : actionIdentifiers.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmRequest other = (LcmRequest) obj;
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+        if (action == null) {
+            if (other.action != null) {
+                return false;
+            }
+        } else if (!action.equals(other.action)) {
+            return false;
+        }
+        if (actionIdentifiers == null) {
+            if (other.actionIdentifiers != null) {
+                return false;
+            }
+        } else if (!actionIdentifiers.equals(other.actionIdentifiers)) {
+            return false;
+        }
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequestWrapper.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequestWrapper.java
new file mode 100644
index 0000000..7b9bcda
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmRequestWrapper.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class LcmRequestWrapper extends LcmWrapper implements Serializable {
+
+    private static final long serialVersionUID = 424866914715980798L;
+
+    @SerializedName(value = "body")
+    private LcmRequest body;
+
+    public LcmRequestWrapper() {
+        super();
+    }
+
+    public LcmRequestWrapper(LcmRequest request) {
+        body = request;
+    }
+
+    /**
+     * Get the body.
+     * 
+     * @return the body
+     */
+    public LcmRequest getBody() {
+        return body;
+    }
+
+    /**
+     * Set the body.
+     * 
+     * @param body the body to set
+     */
+    public void setBody(LcmRequest body) {
+        this.body = body;
+    }
+
+    @Override
+    public String toString() {
+        return "RequestWrapper [body=" + body + ", toString()=" + super.toString() + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((body == null) ? 0 : body.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmRequestWrapper other = (LcmRequestWrapper) obj;
+        if (body == null) {
+            if (other.body != null) {
+                return false;
+            }
+        } else if (!body.equals(other.body)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponse.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponse.java
new file mode 100644
index 0000000..e40e5e4
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponse.java
@@ -0,0 +1,162 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class LcmResponse implements Serializable {
+
+    private static final long serialVersionUID = 6332508597287669750L;
+
+    @SerializedName(value = "common-header")
+    private LcmCommonHeader commonHeader;
+
+    @SerializedName(value = "status")
+    private LcmResponseStatus status = new LcmResponseStatus();
+
+    @SerializedName(value = "payload")
+    private String payload;
+
+    public LcmResponse() {
+        // EMPTY
+    }
+
+    /**
+     * Constructs a response using the common header of the request since they will be the same.
+     * 
+     * @param request an appc lcm request object specified by the lcm api guide
+     */
+    public LcmResponse(LcmRequest request) {
+        this.commonHeader = new LcmCommonHeader(request.getCommonHeader());
+        String requestPayload = request.getPayload();
+        if (requestPayload != null) {
+            this.payload = requestPayload;
+        }
+    }
+
+    /**
+     * Get the common header.
+     * 
+     * @return the commonHeader
+     */
+    public LcmCommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * Set the common header.
+     * 
+     * @param commonHeader the commonHeader to set
+     */
+    public void setCommonHeader(LcmCommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * Get the status.
+     * 
+     * @return the status
+     */
+    public LcmResponseStatus getStatus() {
+        return status;
+    }
+
+    /**
+     * Set the status.
+     * 
+     * @param status the status to set
+     */
+    public void setStatus(LcmResponseStatus status) {
+        this.status = status;
+    }
+
+    /**
+     * Get the payload.
+     * 
+     * @return the payload
+     */
+    public String getPayload() {
+        return payload;
+    }
+
+    /**
+     * Set the payload.
+     * 
+     * @param payload the payload to set
+     */
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+
+    @Override
+    public String toString() {
+        return "Response [commonHeader=" + commonHeader + ", status=" + status + ", payload=" + payload + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        result = prime * result + ((status == null) ? 0 : status.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmResponse other = (LcmResponse) obj;
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+        if (status == null) {
+            if (other.status != null) {
+                return false;
+            }
+        } else if (!status.equals(other.status)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseCode.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseCode.java
new file mode 100644
index 0000000..5fe0440
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseCode.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import java.io.Serializable;
+import org.onap.policy.appclcm.util.StatusCodeEnum;
+
+public class LcmResponseCode implements Serializable {
+
+    /* These fields define the key to the response code value. */
+    public static final String ACCEPTED = "ACCEPTED";
+    public static final String ERROR = "ERROR";
+    public static final String REJECT = "REJECT";
+    public static final String SUCCESS = "SUCCESS";
+    public static final String FAILURE = "FAILURE";
+    public static final String PARTIAL_SUCCESS = "PARTIAL SUCCESS";
+    public static final String PARTIAL_FAILURE = "PARTIAL FAILURE";
+    private static final long serialVersionUID = 8189456447227022582L;
+
+    private final Integer code;
+
+    protected LcmResponseCode(final int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+
+    @Override
+    public String toString() {
+        return Integer.toString(this.code);
+    }
+
+    /**
+     * Translates the code to a string value that represents the meaning of the code.
+     *
+     * @param code the numeric value that is returned by APPC based on success, failure, etc. of the action requested
+     * @return the string value equivalent of the APPC response code
+     */
+    public static String toResponseValue(int code) {
+        StatusCodeEnum statusCodeEnum = StatusCodeEnum.fromStatusCode(code);
+        return (statusCodeEnum != null) ? statusCodeEnum.toString() : null;
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseStatus.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseStatus.java
new file mode 100644
index 0000000..64fcc8f
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseStatus.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class LcmResponseStatus implements Serializable {
+
+    private static final long serialVersionUID = 974891505135467199L;
+
+    @SerializedName(value = "code")
+    private int code;
+
+    @SerializedName(value = "message")
+    private String message;
+
+    public LcmResponseStatus() {
+        // Create a default LCMResponseStatus instance
+    }
+
+    /**
+     * Get the code.
+     * 
+     * @return the code
+     */
+    public int getCode() {
+        return code;
+    }
+
+    /**
+     * Set the code.
+     * 
+     * @param code the code to set
+     */
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    /**
+     * Get the message.
+     * 
+     * @return the message
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * Set the message.
+     * 
+     * @param message the message to set
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    @Override
+    public String toString() {
+        return "ResponseStatus [code=" + code + ", message=" + message + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + code;
+        result = prime * result + ((message == null) ? 0 : message.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmResponseStatus other = (LcmResponseStatus) obj;
+        if (code != other.code) {
+            return false;
+        }
+        if (message == null) {
+            if (other.message != null) {
+                return false;
+            }
+        } else if (!message.equals(other.message)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseWrapper.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseWrapper.java
new file mode 100644
index 0000000..cc1672a
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmResponseWrapper.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class LcmResponseWrapper extends LcmWrapper implements Serializable {
+
+    private static final long serialVersionUID = 463937813781086802L;
+
+    @SerializedName(value = "body")
+    private LcmResponse body;
+
+    public LcmResponseWrapper() {
+        super();
+    }
+
+    /**
+     * Get the body.
+     * 
+     * @return the body
+     */
+    public LcmResponse getBody() {
+        return body;
+    }
+
+    /**
+     * Set the body.
+     * 
+     * @param body the body to set
+     */
+    public void setBody(LcmResponse body) {
+        this.body = body;
+    }
+
+    @Override
+    public String toString() {
+        return "ResponseWrapper [body=" + body + ", toString()=" + super.toString() + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((body == null) ? 0 : body.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmResponseWrapper other = (LcmResponseWrapper) obj;
+        if (body == null) {
+            if (other.body != null) {
+                return false;
+            }
+        } else if (!body.equals(other.body)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmWrapper.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmWrapper.java
new file mode 100644
index 0000000..244c6ab
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/LcmWrapper.java
@@ -0,0 +1,209 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class LcmWrapper implements Serializable {
+
+    private static final long serialVersionUID = 753005805432396532L;
+
+    @SerializedName(value = "version")
+    private String version;
+
+    @SerializedName(value = "cambria-partition")
+    private String cambriaPartition;
+
+    @SerializedName(value = "rpc-name")
+    private String rpcName;
+
+    @SerializedName(value = "correlation-id")
+    private String correlationId;
+
+    @SerializedName(value = "type")
+    private String type;
+
+    public LcmWrapper() {
+        // Create a default LCMWrapper instance
+    }
+
+    /**
+     * Get the version.
+     * 
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Set the version.
+     * 
+     * @param version the version to set
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    /**
+     * Get the cambria partition.
+     * 
+     * @return the cambriaPartition
+     */
+    public String getCambriaPartition() {
+        return cambriaPartition;
+    }
+
+    /**
+     * Set the cambria partition.
+     * 
+     * @param cambriaPartition the cambriaPartition to set
+     */
+    public void setCambriaPartition(String cambriaPartition) {
+        this.cambriaPartition = cambriaPartition;
+    }
+
+    /**
+     * Get the RPN name.
+     * 
+     * @return the rpcName
+     */
+    public String getRpcName() {
+        return rpcName;
+    }
+
+    /**
+     * Set the RPC name.
+     * 
+     * @param rpcName the rpcName to set
+     */
+    public void setRpcName(String rpcName) {
+        this.rpcName = rpcName;
+    }
+
+    /**
+     * Get the correlation Id.
+     * 
+     * @return the correlationId
+     */
+    public String getCorrelationId() {
+        return correlationId;
+    }
+
+    /**
+     * Set the correclation Id.
+     * 
+     * @param correlationId the correlationId to set
+     */
+    public void setCorrelationId(String correlationId) {
+        this.correlationId = correlationId;
+    }
+
+    /**
+     * Get the type.
+     * 
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Set the type.
+     * 
+     * @param type the type to set
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
+                + ", correlationId=" + correlationId + ", type=" + type + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((cambriaPartition == null) ? 0 : cambriaPartition.hashCode());
+        result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode());
+        result = prime * result + ((rpcName == null) ? 0 : rpcName.hashCode());
+        result = prime * result + ((type == null) ? 0 : type.hashCode());
+        result = prime * result + ((version == null) ? 0 : version.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        LcmWrapper other = (LcmWrapper) obj;
+        if (cambriaPartition == null) {
+            if (other.cambriaPartition != null) {
+                return false;
+            }
+        } else if (!cambriaPartition.equals(other.cambriaPartition)) {
+            return false;
+        }
+        if (correlationId == null) {
+            if (other.correlationId != null) {
+                return false;
+            }
+        } else if (!correlationId.equals(other.correlationId)) {
+            return false;
+        }
+        if (rpcName == null) {
+            if (other.rpcName != null) {
+                return false;
+            }
+        } else if (!rpcName.equals(other.rpcName)) {
+            return false;
+        }
+        if (type == null) {
+            if (other.type != null) {
+                return false;
+            }
+        } else if (!type.equals(other.type)) {
+            return false;
+        }
+        if (version == null) {
+            if (other.version != null) {
+                return false;
+            }
+        } else if (!version.equals(other.version)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java
new file mode 100644
index 0000000..d261c44
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
+import java.lang.reflect.Type;
+import java.time.Instant;
+
+import org.onap.policy.appclcm.LcmRequest;
+import org.onap.policy.appclcm.LcmResponse;
+
+public final class Serialization {
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(Instant.class, new InstantAdapter()).create();
+
+    public static final Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(LcmRequest.class, new RequestAdapter())
+            .registerTypeAdapter(LcmResponse.class, new ResponseAdapter()).create();
+
+    public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(Instant.class, new InstantJunitAdapter()).create();
+
+    private Serialization() {}
+
+    public static class RequestAdapter implements JsonSerializer<LcmRequest>, JsonDeserializer<LcmRequest> {
+
+        @Override
+        public JsonElement serialize(LcmRequest src, Type typeOfSrc, JsonSerializationContext context) {
+            JsonElement requestJson = gsonPretty.toJsonTree(src, LcmRequest.class);
+            JsonObject input = new JsonObject();
+            input.add("input", requestJson);
+
+            return input;
+        }
+
+        @Override
+        public LcmRequest deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return gsonPretty.fromJson(json.getAsJsonObject().get("input"), LcmRequest.class);
+        }
+    }
+
+    public static class ResponseAdapter implements JsonSerializer<LcmResponse>, JsonDeserializer<LcmResponse> {
+
+        @Override
+        public JsonElement serialize(LcmResponse src, Type typeOfSrc, JsonSerializationContext context) {
+            JsonElement responseJson = gsonPretty.toJsonTree(src, LcmResponse.class);
+            JsonObject output = new JsonObject();
+            output.add("output", responseJson);
+            return output;
+        }
+
+        @Override
+        public LcmResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return gsonPretty.fromJson(json.getAsJsonObject().get("output"), LcmResponse.class);
+        }
+    }
+
+    public static class InstantAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.parse(json.getAsString());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toString());
+        }
+
+    }
+
+    public static class InstantJunitAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.ofEpochMilli(json.getAsLong());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toEpochMilli());
+        }
+
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/StatusCodeEnum.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/StatusCodeEnum.java
new file mode 100644
index 0000000..8e3beb3
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/StatusCodeEnum.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
+ *  Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.appclcm.util;
+
+public enum StatusCodeEnum {
+    ACCEPTED("ACCEPTED"), ERROR("ERROR"), REJECT("REJECT"), SUCCESS("SUCCESS"), FAILURE("FAILURE"),
+    PARTIAL_SUCCESS("PARTIAL SUCCESS"), PARTIAL_FAILURE("PARTIAL FAILURE");
+
+    private String name;
+
+    StatusCodeEnum(final String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return this.name;
+    }
+
+    /**
+     * Determine status enum from the code.
+     *
+     * @param statusCode integer code indicating the status
+     * @return enum representation of status code
+     */
+    public static StatusCodeEnum fromStatusCode(final int statusCode) {
+        if (statusCode == 100) {
+            return ACCEPTED;
+        }
+
+        if (statusCode == 200) {
+            return ERROR;
+        }
+
+        if (isRejectStatusCode(statusCode)) {
+            return REJECT;
+        }
+
+        if (statusCode == 400) {
+            return SUCCESS;
+        }
+
+        if (isFailureStatusCode(statusCode)) {
+            return FAILURE;
+        }
+
+        if (statusCode == 500) {
+            return PARTIAL_SUCCESS;
+        }
+
+        if (isPartialFailureStatusCode(statusCode)) {
+            return PARTIAL_FAILURE;
+        }
+
+        return null;
+    }
+
+    private static boolean isRejectStatusCode(final int statusCode) {
+        return statusCode >= 300 && statusCode <= 313;
+    }
+
+    private static boolean isFailureStatusCode(final int statusCode) {
+        return statusCode == 450 || (statusCode >= 401 && statusCode <= 406);
+    }
+
+    private static boolean isPartialFailureStatusCode(final int statusCode) {
+        return statusCode >= 501 && statusCode <= 599;
+    }
+}
\ No newline at end of file
diff --git a/models-interactions/model-impl/appclcm/src/main/resources/definitions.yaml b/models-interactions/model-impl/appclcm/src/main/resources/definitions.yaml
new file mode 100644
index 0000000..d015f33
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/main/resources/definitions.yaml
@@ -0,0 +1,119 @@
+###
+# ============LICENSE_START=======================================================
+# appc
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+###
+
+Request:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+          value: '1.01'
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+          pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Action:
+      type: string
+      enum:
+        - Audit
+        - ActionStatus
+        - BlockAudits
+        - Configure
+        - HealthCheck
+        - Install
+        - LiveUpgrade
+        - Migrate
+        - ModifyConfig
+        - Query
+        - Rebuild
+        - Reconfigure
+        - Restart
+        - Rollback
+        - Scale
+        - Start
+        - Stop
+        - Sync
+        - Terminate
+        - Test
+        - Upgrade
+    TargetID:
+      type: string
+    ObjectID:
+      type: string
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Action
+    - TargetID
+Response:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Status:
+      type: object
+      properties:
+        Code:
+          type: integer
+        Value:
+          type: string
+      required:
+        - Code
+        - Value
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Status
+      
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmTest.java
new file mode 100644
index 0000000..88b8a3c
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmTest.java
@@ -0,0 +1,233 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.onap.policy.appclcm.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AppcLcmTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(AppcLcmTest.class);
+
+    private static LcmRequestWrapper dmaapRequest;
+    private static LcmResponseWrapper dmaapResponse;
+
+    static {
+        /*
+         * Construct an APPCLCM Request to be Serialized
+         */
+        dmaapRequest = new LcmRequestWrapper();
+        dmaapRequest.setCorrelationId("664be3d2-6c12-4f4b-a3e7-c349acced200" + "-" + "1");
+        dmaapRequest.setRpcName("restart");
+        dmaapRequest.setType("request");
+
+        dmaapResponse = new LcmResponseWrapper();
+        dmaapResponse.setCorrelationId("664be3d2-6c12-4f4b-a3e7-c349acced200" + "-" + "1");
+        dmaapResponse.setRpcName("restart");
+        dmaapResponse.setType("response");
+
+        LcmRequest appcRequest = new LcmRequest();
+
+        appcRequest.setAction("restart");
+
+        HashMap<String, String> actionIdentifiers = new HashMap<>();
+        actionIdentifiers.put("vnf-id", "trial-vnf-003");
+        actionIdentifiers.put("vserver-id", "08f6c1f9-99e7-49f3-a662-c62b9f200d79");
+
+        appcRequest.setActionIdentifiers(actionIdentifiers);
+
+        LcmCommonHeader commonHeader = new LcmCommonHeader();
+        commonHeader.setRequestId(UUID.fromString("664be3d2-6c12-4f4b-a3e7-c349acced200"));
+        commonHeader.setSubRequestId("1");
+        commonHeader.setOriginatorId("664be3d2-6c12-4f4b-a3e7-c349acced200");
+
+        appcRequest.setCommonHeader(commonHeader);
+
+        appcRequest.setPayload(null);
+
+        dmaapRequest.setBody(appcRequest);
+
+        /*
+         * Construct an APPCLCM Response to be Serialized
+         */
+        LcmResponse appcResponse = new LcmResponse(appcRequest);
+        appcResponse.getStatus().setCode(400);
+        appcResponse.getStatus().setMessage("Restart Successful");
+        appcResponse.setPayload(null);
+
+        dmaapResponse.setBody(appcResponse);
+    }
+
+    @Test
+    public void testRequestSerialization() {
+
+        /*
+         * Use the gson serializer to obtain json
+         */
+        String jsonRequest = Serialization.gson.toJson(dmaapRequest, LcmRequestWrapper.class);
+        assertNotNull(jsonRequest);
+
+        /*
+         * The serializer should have added an extra sub-tag called "input" that wraps the request
+         */
+        assertTrue(jsonRequest.contains("input"));
+
+        /*
+         * The common-header, request-id, and sub-request-id should exist
+         */
+        assertTrue(jsonRequest.contains("common-header"));
+        assertTrue(jsonRequest.contains("request-id"));
+        assertTrue(jsonRequest.contains("sub-request-id"));
+
+        /*
+         * action-identifiers should exist and contain a vnf-id
+         */
+        assertTrue(jsonRequest.contains("action-identifiers"));
+        assertTrue(jsonRequest.contains("vnf-id"));
+
+        /*
+         * The action sub-tag should exist
+         */
+        assertTrue(jsonRequest.contains("action"));
+
+        logger.debug("Request as JSON: " + jsonRequest + "\n\n");
+    }
+
+    @Test
+    public void testRequestDeserialization() {
+
+        /*
+         * Convert the LCM request object into json so we have a string of json to use for testing
+         */
+        String jsonRequest = Serialization.gson.toJson(dmaapRequest, LcmRequestWrapper.class);
+
+        /*
+         * Use the serializer to convert the json string into a java object
+         */
+        LcmRequestWrapper dmaapRequest = Serialization.gson.fromJson(jsonRequest, LcmRequestWrapper.class);
+        assertNotNull(dmaapRequest);
+
+        /*
+         * The type of the DMAAP wrapper should be request
+         */
+        assertEquals("request", dmaapRequest.getType());
+
+        /*
+         * The DMAAP wrapper must have a body as that is the true APPC request
+         */
+        assertNotNull(dmaapRequest.getBody());
+        LcmRequest appcRequest = dmaapRequest.getBody();
+        assertNotNull(appcRequest);
+
+        /*
+         * The common header should not be null
+         */
+        assertNotNull(appcRequest.getCommonHeader());
+
+        /*
+         * The action should not be null and should be set to restart
+         */
+        assertNotNull(appcRequest.getAction());
+        assertEquals("restart", appcRequest.getAction());
+
+        /*
+         * The action-identifiers should not be null and should contain a vnf-id
+         */
+        assertNotNull(appcRequest.getActionIdentifiers());
+        assertNotNull(appcRequest.getActionIdentifiers().get("vnf-id"));
+
+        logger.debug("Request as a Java Object: \n" + appcRequest.toString() + "\n\n");
+    }
+
+    @Test
+    public void testResponseSerialization() {
+
+        /*
+         * Use the serializer to convert the object into json
+         */
+        String jsonResponse = Serialization.gson.toJson(dmaapResponse, LcmResponseWrapper.class);
+        assertNotNull(jsonResponse);
+
+        /*
+         * The serializer should have added an extra sub-tag called "input" that wraps the request
+         */
+        assertTrue(jsonResponse.contains("output"));
+
+        /*
+         * The response should contain a common-header, request-id, sub-request-id, and status
+         */
+        assertTrue(jsonResponse.contains("common-header"));
+        assertTrue(jsonResponse.contains("request-id"));
+        assertTrue(jsonResponse.contains("sub-request-id"));
+        assertTrue(jsonResponse.contains("status"));
+
+        logger.debug("Response as JSON: " + jsonResponse + "\n\n");
+    }
+
+    @Test
+    public void testResponseDeserialization() {
+        /*
+         * Convert the LCM response object into json so we have a string of json to use for testing
+         */
+        String jsonResponse = Serialization.gson.toJson(dmaapResponse, LcmResponseWrapper.class);
+
+        /*
+         * Use the serializer to convert the json string into a java object
+         */
+        LcmResponseWrapper dmaapResponse = Serialization.gson.fromJson(jsonResponse, LcmResponseWrapper.class);
+        assertNotNull(dmaapResponse);
+
+        /*
+         * The type of the DMAAP wrapper should be response
+         */
+        assertEquals("response", dmaapResponse.getType());
+
+        /*
+         * The DMAAP wrapper must have a body as that is the true APPC response
+         */
+        assertNotNull(dmaapResponse.getBody());
+        LcmResponse appcResponse = dmaapResponse.getBody();
+        assertNotNull(appcResponse);
+
+        /*
+         * The common header should not be null
+         */
+        assertNotNull(appcResponse.getCommonHeader());
+
+        /*
+         * The status should not be null and the status code should be 400
+         */
+        assertNotNull(appcResponse.getStatus());
+        assertEquals(400, appcResponse.getStatus().getCode());
+
+        logger.debug("Response as a Java Object: \n" + appcResponse.toString() + "\n\n");
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmCommonHeaderTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmCommonHeaderTest.java
new file mode 100644
index 0000000..82a292e
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmCommonHeaderTest.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class LcmCommonHeaderTest {
+
+    @Test
+    public void testLcmCommonHeader() {
+        LcmCommonHeader commonHeader = new LcmCommonHeader();
+        assertNotNull(commonHeader);
+        assertNotNull(new LcmCommonHeader(commonHeader));
+        assertNotEquals(0, commonHeader.hashCode());
+
+        commonHeader.setApiVer("Kansas");
+        assertEquals("Kansas", commonHeader.getApiVer());
+
+        Map<String, String> flagMap = new HashMap<>();
+        commonHeader.setFlags(flagMap);
+        assertEquals(flagMap, commonHeader.getFlags());
+
+        commonHeader.setOriginatorId("Dorothy");
+        assertEquals("Dorothy", commonHeader.getOriginatorId());
+
+        UUID requestId = UUID.randomUUID();
+        commonHeader.setRequestId(requestId);
+        assertEquals(requestId, commonHeader.getRequestId());
+
+        commonHeader.setSubRequestId("Can I go home?");
+        assertEquals("Can I go home?", commonHeader.getSubRequestId());
+
+        Instant timestamp = Instant.now();
+        commonHeader.setTimeStamp(timestamp);
+        assertEquals(timestamp, commonHeader.getTimeStamp());
+
+        assertNotEquals(0, commonHeader.hashCode());
+
+        assertEquals("CommonHeader [timeStamp=", commonHeader.toString().substring(0, 24));
+
+        LcmCommonHeader copiedLcmCommonHeader = new LcmCommonHeader();
+        copiedLcmCommonHeader.setApiVer(commonHeader.getApiVer());
+        copiedLcmCommonHeader.setFlags(commonHeader.getFlags());
+        copiedLcmCommonHeader.setOriginatorId(commonHeader.getOriginatorId());
+        copiedLcmCommonHeader.setRequestId(commonHeader.getRequestId());
+        copiedLcmCommonHeader.setSubRequestId(commonHeader.getSubRequestId());
+        copiedLcmCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(commonHeader));
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        assertFalse(commonHeader.equals(null));
+        assertFalse(commonHeader.equals("Hello"));
+
+        LcmCommonHeader clonedLcmCommonHeader = new LcmCommonHeader(commonHeader);
+        clonedLcmCommonHeader.setApiVer(commonHeader.getApiVer());
+        clonedLcmCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(clonedLcmCommonHeader));
+
+        commonHeader.setApiVer(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setApiVer(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setApiVer("Kansas");
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setApiVer("Kansas");
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+
+        commonHeader.setFlags(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setFlags(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setFlags(flagMap);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setFlags(flagMap);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+
+        commonHeader.setOriginatorId(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setOriginatorId(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setOriginatorId("Dorothy");
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setOriginatorId("Dorothy");
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+
+        commonHeader.setRequestId(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setRequestId(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setRequestId(requestId);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setRequestId(requestId);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+
+        commonHeader.setSubRequestId(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setSubRequestId(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setSubRequestId("Can I go home?");
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setSubRequestId("Can I go home?");
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+
+        commonHeader.setTimeStamp(null);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setTimeStamp(null);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+        commonHeader.setTimeStamp(timestamp);
+        assertFalse(commonHeader.equals(copiedLcmCommonHeader));
+        copiedLcmCommonHeader.setTimeStamp(timestamp);
+        assertTrue(commonHeader.equals(copiedLcmCommonHeader));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestTest.java
new file mode 100644
index 0000000..e89976c
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestTest.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class LcmRequestTest {
+
+    @Test
+    public void testLcmRequest() {
+        LcmRequest request = new LcmRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+
+        LcmCommonHeader commonHeader = new LcmCommonHeader();
+
+        request.setCommonHeader(commonHeader);
+        assertEquals(commonHeader, request.getCommonHeader());
+
+        request.setAction("Go to Oz");
+        assertEquals("Go to Oz", request.getAction());
+
+        Map<String, String> actionIdentifiers = new HashMap<>();
+        actionIdentifiers.put("North", "Good Witch");
+        actionIdentifiers.put("West", "Bad Witch");
+
+        request.setActionIdentifiers(actionIdentifiers);
+        assertEquals(actionIdentifiers, request.getActionIdentifiers());
+
+        request.setPayload("The Emerald City");
+        assertEquals("The Emerald City", request.getPayload());
+
+        assertNotEquals(0, request.hashCode());
+
+        assertEquals("Request [commonHeader=CommonHeader [timeStamp=", request.toString().substring(0, 46));
+
+        LcmRequest copiedLcmRequest = new LcmRequest();
+        copiedLcmRequest.setCommonHeader(request.getCommonHeader());
+        copiedLcmRequest.setAction(request.getAction());
+        copiedLcmRequest.setActionIdentifiers(request.getActionIdentifiers());
+        copiedLcmRequest.setPayload(request.getPayload());
+
+        assertTrue(request.equals(request));
+        assertTrue(request.equals(copiedLcmRequest));
+        assertFalse(request.equals(null));
+        assertFalse(request.equals("Hello"));
+
+        request.setCommonHeader(null);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setCommonHeader(null);
+        assertTrue(request.equals(copiedLcmRequest));
+        request.setCommonHeader(commonHeader);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setCommonHeader(commonHeader);
+        assertTrue(request.equals(copiedLcmRequest));
+
+        request.setAction(null);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setAction(null);
+        assertTrue(request.equals(copiedLcmRequest));
+        request.setAction("Go to Oz");
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setAction("Go to Oz");
+        assertTrue(request.equals(copiedLcmRequest));
+
+        request.setActionIdentifiers(null);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setActionIdentifiers(null);
+        assertTrue(request.equals(copiedLcmRequest));
+        request.setActionIdentifiers(actionIdentifiers);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setActionIdentifiers(actionIdentifiers);
+        assertTrue(request.equals(copiedLcmRequest));
+
+        request.setPayload(null);
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setPayload(null);
+        assertTrue(request.equals(copiedLcmRequest));
+        request.setPayload("The Emerald City");
+        assertFalse(request.equals(copiedLcmRequest));
+        copiedLcmRequest.setPayload("The Emerald City");
+        assertTrue(request.equals(copiedLcmRequest));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestWrapperTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestWrapperTest.java
new file mode 100644
index 0000000..e2c7f62
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmRequestWrapperTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class LcmRequestWrapperTest {
+
+    @Test
+    public void testLcmRequestWrapperWrapper() {
+        assertNotNull(new LcmRequestWrapper(new LcmRequest()));
+        LcmRequestWrapper requestWrapper = new LcmRequestWrapper();
+        assertNotNull(requestWrapper);
+        assertNotEquals(0, requestWrapper.hashCode());
+
+        LcmRequest request = new LcmRequest();
+
+        requestWrapper.setBody(request);
+        assertEquals(request, requestWrapper.getBody());
+
+        assertNotEquals(0, requestWrapper.hashCode());
+
+        assertEquals("RequestWrapper [body=Request [commonHeader=nul", requestWrapper.toString().substring(0, 46));
+
+        LcmRequestWrapper copiedLcmRequestWrapper = new LcmRequestWrapper();
+        copiedLcmRequestWrapper.setBody(requestWrapper.getBody());
+
+        assertTrue(requestWrapper.equals(requestWrapper));
+        assertTrue(requestWrapper.equals(copiedLcmRequestWrapper));
+        assertFalse(requestWrapper.equals(null));
+        assertFalse(requestWrapper.equals("Hello"));
+
+        requestWrapper.setBody(null);
+        assertFalse(requestWrapper.equals(copiedLcmRequestWrapper));
+        copiedLcmRequestWrapper.setBody(null);
+        assertTrue(requestWrapper.equals(copiedLcmRequestWrapper));
+        requestWrapper.setBody(request);
+        assertFalse(requestWrapper.equals(copiedLcmRequestWrapper));
+        copiedLcmRequestWrapper.setBody(request);
+        assertTrue(requestWrapper.equals(copiedLcmRequestWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResonseCodeTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResonseCodeTest.java
new file mode 100644
index 0000000..d5a6a16
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResonseCodeTest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class LcmResonseCodeTest {
+
+    @Test
+    public void testLcmResponseCode() {
+        assertNull(LcmResponseCode.toResponseValue(0));
+
+        assertEquals(LcmResponseCode.ACCEPTED, LcmResponseCode.toResponseValue(100));
+        assertEquals(LcmResponseCode.ERROR, LcmResponseCode.toResponseValue(200));
+        assertEquals(LcmResponseCode.REJECT, LcmResponseCode.toResponseValue(300));
+        assertEquals(LcmResponseCode.SUCCESS, LcmResponseCode.toResponseValue(400));
+        assertEquals(LcmResponseCode.FAILURE, LcmResponseCode.toResponseValue(450));
+        assertEquals(LcmResponseCode.FAILURE, LcmResponseCode.toResponseValue(401));
+        assertEquals(LcmResponseCode.FAILURE, LcmResponseCode.toResponseValue(406));
+        assertEquals(LcmResponseCode.PARTIAL_SUCCESS, LcmResponseCode.toResponseValue(500));
+        assertEquals(LcmResponseCode.PARTIAL_FAILURE, LcmResponseCode.toResponseValue(501));
+        assertEquals(LcmResponseCode.PARTIAL_FAILURE, LcmResponseCode.toResponseValue(599));
+
+        assertEquals("100", new LcmResponseCode(100).toString());
+        assertEquals("200", new LcmResponseCode(200).toString());
+        assertEquals("300", new LcmResponseCode(300).toString());
+        assertEquals("400", new LcmResponseCode(400).toString());
+        assertEquals("450", new LcmResponseCode(450).toString());
+        assertEquals("500", new LcmResponseCode(500).toString());
+        assertEquals("510", new LcmResponseCode(510).toString());
+
+        assertEquals(300, new LcmResponseCode(300).getCode());
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseStatusTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseStatusTest.java
new file mode 100644
index 0000000..4bd7ba4
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseStatusTest.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class LcmResponseStatusTest {
+
+    @Test
+    public void testResonseStatus() {
+        LcmResponseStatus status = new LcmResponseStatus();
+        assertNotNull(status);
+        assertNotEquals(0, status.hashCode());
+
+        status.setCode(1234);
+        assertEquals(1234, status.getCode());
+
+        status.setMessage("The wonderful land of Oz");
+        assertEquals("The wonderful land of Oz", status.getMessage());
+
+        assertEquals("ResponseStatus [code=1234, message=The wonderfu", status.toString().substring(0, 47));
+
+        LcmResponseStatus copiedStatus = new LcmResponseStatus();
+        copiedStatus.setCode(status.getCode());
+        copiedStatus.setMessage(status.getMessage());
+
+        assertTrue(status.equals(status));
+        assertTrue(status.equals(copiedStatus));
+        assertFalse(status.equals(null));
+        assertFalse(status.equals("Hello"));
+
+        status.setCode(-1);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(-1);
+        assertTrue(status.equals(copiedStatus));
+        status.setCode(1234);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(1234);
+        assertTrue(status.equals(copiedStatus));
+
+        status.setMessage(null);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setMessage(null);
+        assertTrue(status.equals(copiedStatus));
+        status.setMessage("The wonderful land of Oz");
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setMessage("The wonderful land of Oz");
+        assertTrue(status.equals(copiedStatus));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseTest.java
new file mode 100644
index 0000000..06b64f7
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseTest.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appclcm
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class LcmResponseTest {
+
+    private static final String PAYLOAD = "payload";
+
+    @Test
+    public void testHashCode() {
+        LcmResponse response = new LcmResponse();
+        assertTrue(response.hashCode() != 0);
+        response.setCommonHeader(new LcmCommonHeader());
+        assertTrue(response.hashCode() != 0);
+        response.setPayload(PAYLOAD);
+        assertTrue(response.hashCode() != 0);
+        response.setStatus(null);
+        assertTrue(response.hashCode() != 0);
+    }
+
+    @Test
+    public void testLcmResponse() {
+        LcmResponse response = new LcmResponse();
+        assertNull(response.getCommonHeader());
+        assertNull(response.getPayload());
+        assertNotNull(response.getStatus());
+    }
+
+    @Test
+    public void testToString() {
+        LcmResponse response = new LcmResponse();
+        assertFalse(response.toString().isEmpty());
+    }
+
+    @Test
+    public void testEqualsObject() {
+        LcmResponse response = new LcmResponse();
+        assertTrue(response.equals(response));
+        assertFalse(response.equals(null));
+        assertFalse(response.equals(new Object()));
+
+        LcmResponse response2 = new LcmResponse();
+        assertTrue(response.equals(response2));
+
+        response.setCommonHeader(new LcmCommonHeader());
+        assertFalse(response.equals(response2));
+        response2.setCommonHeader(response.getCommonHeader());
+        assertTrue(response.equals(response2));
+
+        response.setPayload(PAYLOAD);
+        assertFalse(response.equals(response2));
+        response2.setPayload(response.getPayload());
+        assertTrue(response.equals(response2));
+
+        response.setCommonHeader(null);
+        assertFalse(response.equals(response2));
+        response2.setCommonHeader(null);
+        assertTrue(response.equals(response2));
+
+        response.setPayload(null);
+        assertFalse(response.equals(response2));
+        response2.setPayload(response.getPayload());
+        assertTrue(response.equals(response2));
+
+        response.setStatus(null);
+        assertFalse(response.equals(response2));
+        response2.setStatus(response.getStatus());
+        assertTrue(response.equals(response2));
+
+        LcmResponseStatus status = new LcmResponseStatus();
+        status.setCode(5);
+        response.setStatus(status);
+        response2.setStatus(new LcmResponseStatus());
+        assertFalse(response.equals(response2));
+    }
+
+    @Test
+    public void testResponseRequest() {
+        LcmRequest request = new LcmRequest();
+        request.setCommonHeader(new LcmCommonHeader());
+        request.setPayload(PAYLOAD);
+
+        LcmResponse response = new LcmResponse(request);
+
+        assertTrue(response.getPayload().equals(PAYLOAD));
+    }
+
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseWrapperTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseWrapperTest.java
new file mode 100644
index 0000000..0b2b576
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmResponseWrapperTest.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class LcmResponseWrapperTest {
+
+    @Test
+    public void testLcmResponseWrapperWrapper() {
+        LcmResponseWrapper responseWrapper = new LcmResponseWrapper();
+        assertNotNull(responseWrapper);
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        LcmResponse response = new LcmResponse();
+
+        responseWrapper.setBody(response);
+        assertEquals(response, responseWrapper.getBody());
+
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        assertEquals("ResponseWrapper [body=Response [commonHeader=n", responseWrapper.toString().substring(0, 46));
+
+        LcmResponseWrapper copiedLcmResponseWrapper = new LcmResponseWrapper();
+        copiedLcmResponseWrapper.setBody(responseWrapper.getBody());
+
+        assertTrue(responseWrapper.equals(responseWrapper));
+        assertTrue(responseWrapper.equals(copiedLcmResponseWrapper));
+        assertFalse(responseWrapper.equals(null));
+        assertFalse(responseWrapper.equals("Hello"));
+
+        responseWrapper.setBody(null);
+        assertFalse(responseWrapper.equals(copiedLcmResponseWrapper));
+        copiedLcmResponseWrapper.setBody(null);
+        assertTrue(responseWrapper.equals(copiedLcmResponseWrapper));
+        responseWrapper.setBody(response);
+        assertFalse(responseWrapper.equals(copiedLcmResponseWrapper));
+        copiedLcmResponseWrapper.setBody(response);
+        assertTrue(responseWrapper.equals(copiedLcmResponseWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmWrapperTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmWrapperTest.java
new file mode 100644
index 0000000..40c7fc6
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/LcmWrapperTest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class LcmWrapperTest {
+
+    @Test
+    public void testLcmWrapper() {
+        LcmWrapper wrapper = new LcmWrapper();
+        assertNotNull(wrapper);
+        assertNotEquals(0, wrapper.hashCode());
+
+        wrapper.setVersion("19.3.9");
+        assertEquals("19.3.9", wrapper.getVersion());
+
+        wrapper.setCambriaPartition("The Emerald City");
+        assertEquals("The Emerald City", wrapper.getCambriaPartition());
+
+        wrapper.setRpcName("Tornado");
+        assertEquals("Tornado", wrapper.getRpcName());
+
+        wrapper.setCorrelationId("YellowBrickRoad");
+        assertEquals("YellowBrickRoad", wrapper.getCorrelationId());
+
+        wrapper.setType("Munchkin");
+        assertEquals("Munchkin", wrapper.getType());
+
+        assertNotEquals(0, wrapper.hashCode());
+
+        assertEquals("Wrapper [version=19.3.9, cambriaPartition=The ", wrapper.toString().substring(0, 46));
+
+        LcmWrapper copiedLcmWrapper = new LcmWrapper();
+        copiedLcmWrapper.setVersion(wrapper.getVersion());
+        copiedLcmWrapper.setCambriaPartition(wrapper.getCambriaPartition());
+        copiedLcmWrapper.setRpcName(wrapper.getRpcName());
+        copiedLcmWrapper.setCorrelationId(wrapper.getCorrelationId());
+        copiedLcmWrapper.setType(wrapper.getType());
+
+        assertTrue(wrapper.equals(wrapper));
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        assertFalse(wrapper.equals(null));
+        assertFalse(wrapper.equals("Hello"));
+
+        wrapper.setVersion(null);
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setVersion(null);
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        wrapper.setVersion("19.3.9");
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setVersion("19.3.9");
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+
+        wrapper.setCambriaPartition(null);
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setCambriaPartition(null);
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        wrapper.setCambriaPartition("The Emerald City");
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setCambriaPartition("The Emerald City");
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+
+        wrapper.setRpcName(null);
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setRpcName(null);
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        wrapper.setRpcName("Tornado");
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setRpcName("Tornado");
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+
+        wrapper.setCorrelationId(null);
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setCorrelationId(null);
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        wrapper.setCorrelationId("YellowBrickRoad");
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setCorrelationId("YellowBrickRoad");
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+
+        wrapper.setType(null);
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setType(null);
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+        wrapper.setType("Munchkin");
+        assertFalse(wrapper.equals(copiedLcmWrapper));
+        copiedLcmWrapper.setType("Munchkin");
+        assertTrue(wrapper.equals(copiedLcmWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java
new file mode 100644
index 0000000..c855bc5
--- /dev/null
+++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * appc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.appclcm.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import org.junit.Test;
+
+public class SerializationTest {
+
+    @Test
+    public void test() {
+        String nameString = "Dorothy";
+        String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
+        assertEquals("\"Dorothy\"", jsonName);
+        String jsonInOutName = Serialization.gsonPretty.fromJson(jsonName, String.class);
+        assertEquals("Dorothy", jsonInOutName);
+
+        Instant instant0 = Instant.ofEpochMilli(1516127215000L);
+        String instantString0 = Serialization.gsonPretty.toJson(instant0, Instant.class);
+        assertEquals("\"2018-01-16T18:26:55Z\"", instantString0);
+        Instant outInstant0 = Serialization.gsonPretty.fromJson(instantString0, Instant.class);
+        assertEquals(instant0, outInstant0);
+
+        Instant instant1 = Instant.ofEpochMilli(1516127215000L);
+        String instantString1 = Serialization.gsonJunit.toJson(instant1, Instant.class);
+        assertEquals("1516127215000", instantString1);
+        Instant outInstant1 = Serialization.gsonJunit.fromJson(instantString1, Instant.class);
+        assertEquals(instant1, outInstant1);
+
+        ZonedDateTime zdt = ZonedDateTime.ofInstant(instant0, ZoneId.of("UTC"));
+        String zdtString = Serialization.gsonPretty.toJson(zdt, ZonedDateTime.class);
+        assertEquals("{\n  \"dateTime\": {\n    \"date\":", zdtString.substring(0, 29));
+    }
+}
diff --git a/models-interactions/model-impl/events/README.md b/models-interactions/model-impl/events/README.md
new file mode 100644
index 0000000..6ebd725
--- /dev/null
+++ b/models-interactions/model-impl/events/README.md
@@ -0,0 +1,11 @@
+Copyright 2018 AT&T Intellectual Property. All rights reserved.
+This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
+Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
+
+Policy Control Loop
+
+This is the implementation of the Policy's Control Loop messages. This includes the Events consumed and Notifications produced by the ONAP Policy Platform.
+
+
+
+
diff --git a/models-interactions/model-impl/events/pom.xml b/models-interactions/model-impl/events/pom.xml
new file mode 100644
index 0000000..ca079e0
--- /dev/null
+++ b/models-interactions/model-impl/events/pom.xml
@@ -0,0 +1,46 @@
+<!--
+  ============LICENSE_START=======================================================
+  events in model-impl
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+    <artifactId>model-impl</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>events</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java
new file mode 100644
index 0000000..37d7538
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java
@@ -0,0 +1,193 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+import java.util.UUID;
+
+public abstract class ControlLoopEvent implements Serializable {
+
+    private static final long serialVersionUID = 2391252138583119195L;
+    
+    @SerializedName("closedLoopControlName")
+    private String closedLoopControlName;
+    
+    @SerializedName("version")
+    private String version = "1.0.2";
+    
+    @SerializedName("requestID")
+    private UUID requestId;
+    
+    @SerializedName("closedLoopEventClient")
+    private String closedLoopEventClient;
+    
+    @SerializedName("target_type")
+    private ControlLoopTargetType targetType;
+    
+    @SerializedName("target")
+    private String target;
+    
+    @SerializedName("from")
+    private String from;
+    
+    @SerializedName("policyScope")
+    private String policyScope;
+    
+    @SerializedName("policyName")
+    private String policyName;
+    
+    @SerializedName("policyVersion")
+    private String policyVersion;
+    
+    @SerializedName("closedLoopEventStatus")
+    private ControlLoopEventStatus closedLoopEventStatus;
+
+    @SerializedName("payload")
+    private String payload;
+    
+    public ControlLoopEvent() {
+
+    }
+
+    /**
+     * Construct an instace from an existing instance.
+     * 
+     * @param event the existing instance
+     */
+    public ControlLoopEvent(ControlLoopEvent event) {
+        if (event == null) {
+            return;
+        }
+        this.closedLoopControlName = event.closedLoopControlName;
+        this.requestId = event.requestId;
+        this.closedLoopEventClient = event.closedLoopEventClient;
+        this.targetType = event.targetType;
+        this.target = event.target;
+        this.from = event.from;
+        this.policyScope = event.policyScope;
+        this.policyName = event.policyName;
+        this.policyVersion = event.policyVersion;
+        this.closedLoopEventStatus = event.closedLoopEventStatus;
+        this.payload = event.payload;
+    }
+
+    public boolean isEventStatusValid() {
+        return this.closedLoopEventStatus != null;
+    }
+
+    public String getClosedLoopControlName() {
+        return closedLoopControlName;
+    }
+
+    public void setClosedLoopControlName(String closedLoopControlName) {
+        this.closedLoopControlName = closedLoopControlName;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getClosedLoopEventClient() {
+        return closedLoopEventClient;
+    }
+
+    public void setClosedLoopEventClient(String closedLoopEventClient) {
+        this.closedLoopEventClient = closedLoopEventClient;
+    }
+
+    public ControlLoopTargetType getTargetType() {
+        return targetType;
+    }
+
+    public void setTargetType(ControlLoopTargetType targetType) {
+        this.targetType = targetType;
+    }
+
+    public String getTarget() {
+        return target;
+    }
+
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    public String getPolicyScope() {
+        return policyScope;
+    }
+
+    public void setPolicyScope(String policyScope) {
+        this.policyScope = policyScope;
+    }
+
+    public String getPolicyName() {
+        return policyName;
+    }
+
+    public void setPolicyName(String policyName) {
+        this.policyName = policyName;
+    }
+
+    public String getPolicyVersion() {
+        return policyVersion;
+    }
+
+    public void setPolicyVersion(String policyVersion) {
+        this.policyVersion = policyVersion;
+    }
+
+    public ControlLoopEventStatus getClosedLoopEventStatus() {
+        return closedLoopEventStatus;
+    }
+
+    public void setClosedLoopEventStatus(ControlLoopEventStatus closedLoopEventStatus) {
+        this.closedLoopEventStatus = closedLoopEventStatus;
+    }
+
+    public String getPayload() {
+        return payload;
+    }
+
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEventStatus.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEventStatus.java
new file mode 100644
index 0000000..961a4f8
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEventStatus.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+public enum ControlLoopEventStatus {
+    ONSET("ONSET"), ABATED("ABATED");
+
+    private String status;
+
+    private ControlLoopEventStatus(String status) {
+        this.status = status;
+    }
+
+    @Override
+    public String toString() {
+        return this.status;
+    }
+
+    /**
+     * Convert a String status to a ControlLoopEventStatus.
+     * 
+     * @param status the String status
+     * @return the ControlLoopEventStatus
+     */
+    public static ControlLoopEventStatus toStatus(String status) {
+        if (ONSET.status.equalsIgnoreCase(status)) {
+            return ONSET;
+        }
+        if (ABATED.status.equalsIgnoreCase(status)) {
+            return ABATED;
+        }
+        //
+        // In case DCAE uses the old abatement
+        //
+        if ("abatement".equalsIgnoreCase(status)) {
+            return ABATED;
+        }
+        return null;
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotification.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotification.java
new file mode 100644
index 0000000..a55c65e
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotification.java
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import java.io.Serializable;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+public abstract class ControlLoopNotification implements Serializable {
+
+    private static final long serialVersionUID = 7538596984567127915L;
+
+    private String closedLoopControlName;
+    private String version = "1.0.2";
+    private UUID requestId;
+    private String closedLoopEventClient;
+    private ControlLoopTargetType targetType;
+    private String target;
+    private String from;
+    private String policyScope;
+    private String policyName;
+    private String policyVersion;
+    private ControlLoopNotificationType notification;
+    private String message;
+    private ZonedDateTime notificationTime = ZonedDateTime.now(ZoneOffset.UTC);
+    private Integer opsClTimer;
+    private List<ControlLoopOperation> history = new LinkedList<>();
+
+    public ControlLoopNotification() {
+
+    }
+
+    /**
+     * Construct an instance.
+     * 
+     * @param event the event
+     */
+    public ControlLoopNotification(ControlLoopEvent event) {
+        if (event == null) {
+            return;
+        }
+
+        this.setClosedLoopControlName(event.getClosedLoopControlName());
+        this.setRequestId(event.getRequestId());
+        this.setClosedLoopEventClient(event.getClosedLoopEventClient());
+        this.setTargetType(event.getTargetType());
+        this.setTarget(event.getTarget());
+    }
+
+    public String getClosedLoopControlName() {
+        return closedLoopControlName;
+    }
+
+    public void setClosedLoopControlName(String closedLoopControlName) {
+        this.closedLoopControlName = closedLoopControlName;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getClosedLoopEventClient() {
+        return closedLoopEventClient;
+    }
+
+    public void setClosedLoopEventClient(String closedLoopEventClient) {
+        this.closedLoopEventClient = closedLoopEventClient;
+    }
+
+    public ControlLoopTargetType getTargetType() {
+        return targetType;
+    }
+
+    public void setTargetType(ControlLoopTargetType targetType) {
+        this.targetType = targetType;
+    }
+
+    public String getTarget() {
+        return target;
+    }
+
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    public String getPolicyScope() {
+        return policyScope;
+    }
+
+    public void setPolicyScope(String policyScope) {
+        this.policyScope = policyScope;
+    }
+
+    public String getPolicyName() {
+        return policyName;
+    }
+
+    public void setPolicyName(String policyName) {
+        this.policyName = policyName;
+    }
+
+    public String getPolicyVersion() {
+        return policyVersion;
+    }
+
+    public void setPolicyVersion(String policyVersion) {
+        this.policyVersion = policyVersion;
+    }
+
+    public ControlLoopNotificationType getNotification() {
+        return notification;
+    }
+
+    public void setNotification(ControlLoopNotificationType notification) {
+        this.notification = notification;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public ZonedDateTime getNotificationTime() {
+        return notificationTime;
+    }
+
+    public void setNotificationTime(ZonedDateTime notificationTime) {
+        this.notificationTime = notificationTime;
+    }
+
+    public Integer getOpsClTimer() {
+        return opsClTimer;
+    }
+
+    public void setOpsClTimer(Integer opsClTimer) {
+        this.opsClTimer = opsClTimer;
+    }
+
+    public List<ControlLoopOperation> getHistory() {
+        return history;
+    }
+
+    public void setHistory(List<ControlLoopOperation> history) {
+        this.history = history;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotificationType.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotificationType.java
new file mode 100644
index 0000000..51df874
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopNotificationType.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+public enum ControlLoopNotificationType {
+    ACTIVE("ACTIVE"), REJECTED("REJECTED"), OPERATION("OPERATION"), OPERATION_SUCCESS(
+            "OPERATION: SUCCESS"), OPERATION_FAILURE("OPERATION: FAILURE"), FINAL_FAILURE(
+                    "FINAL: FAILURE"), FINAL_SUCCESS("FINAL: SUCCESS"), FINAL_OPENLOOP("FINAL: OPENLOOP");
+
+    private String type;
+
+    private ControlLoopNotificationType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return this.type;
+    }
+
+    /**
+     * Convert a String type to a ControlLoopNotificationType.
+     * 
+     * @param type the String type
+     * @return the ControlLoopNotificationType
+     */
+    public static ControlLoopNotificationType toType(String type) {
+        if (ACTIVE.toString().equals(type)) {
+            return ACTIVE;
+        }
+        if (REJECTED.toString().equals(type)) {
+            return REJECTED;
+        }
+        if (OPERATION.toString().equals(type)) {
+            return OPERATION;
+        }
+        if (OPERATION_SUCCESS.toString().equals(type)) {
+            return OPERATION_SUCCESS;
+        }
+        if (OPERATION_FAILURE.toString().equals(type)) {
+            return OPERATION_FAILURE;
+        }
+        if (FINAL_FAILURE.toString().equals(type)) {
+            return FINAL_FAILURE;
+        }
+        if (FINAL_SUCCESS.toString().equals(type)) {
+            return FINAL_SUCCESS;
+        }
+        if (FINAL_OPENLOOP.toString().equals(type)) {
+            return FINAL_OPENLOOP;
+        }
+        return null;
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperation.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperation.java
new file mode 100644
index 0000000..8fd4148
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperation.java
@@ -0,0 +1,230 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import java.io.Serializable;
+import java.time.Instant;
+
+public class ControlLoopOperation implements Serializable {
+
+    private static final long serialVersionUID = 8662706581293017099L;
+
+    private String actor;
+    private String operation;
+    private String target;
+    private Instant start = Instant.now();
+    private Instant end;
+    private String subRequestId;
+    private String outcome;
+    private String message;
+
+    public ControlLoopOperation() {
+
+    }
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param op the existing instance
+     */
+    public ControlLoopOperation(ControlLoopOperation op) {
+        if (op == null) {
+            return;
+        }
+
+        this.actor = op.actor;
+        this.operation = op.operation;
+        this.target = op.target;
+        this.start = op.start;
+        this.end = op.end;
+        this.subRequestId = op.subRequestId;
+        this.outcome = op.outcome;
+        this.message = op.message;
+    }
+
+    public String toMessage() {
+        return "actor=" + actor + ",operation=" + operation + ",target=" + target + ",subRequestId=" + subRequestId;
+    }
+
+    public String toHistory() {
+        return "actor=" + actor + ",operation=" + operation + ",target=" + target + ",start=" + start + ",end=" + end
+                + ",subRequestId=" + subRequestId + ",outcome=" + outcome + ",message=" + message;
+    }
+
+    public String getActor() {
+        return actor;
+    }
+
+    public void setActor(String actor) {
+        this.actor = actor;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getTarget() {
+        return target;
+    }
+
+    public void setTarget(String target) {
+        this.target = target;
+    }
+
+    public Instant getStart() {
+        return start;
+    }
+
+    public void setStart(Instant start) {
+        this.start = start;
+    }
+
+    public Instant getEnd() {
+        return end;
+    }
+
+    public void setEnd(Instant end) {
+        this.end = end;
+    }
+
+    public String getSubRequestId() {
+        return subRequestId;
+    }
+
+    public void setSubRequestId(String subRequestId) {
+        this.subRequestId = subRequestId;
+    }
+
+    public String getOutcome() {
+        return outcome;
+    }
+
+    public void setOutcome(String outcome) {
+        this.outcome = outcome;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    @Override
+    public String toString() {
+        return "ControlLoopOperation [actor=" + actor + ", operation=" + operation + ", target=" + target + ", start="
+                + start + ", end=" + end + ", subRequestId=" + subRequestId + ", outcome=" + outcome + ", message="
+                + message + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((actor == null) ? 0 : actor.hashCode());
+        result = prime * result + ((end == null) ? 0 : end.hashCode());
+        result = prime * result + ((message == null) ? 0 : message.hashCode());
+        result = prime * result + ((operation == null) ? 0 : operation.hashCode());
+        result = prime * result + ((outcome == null) ? 0 : outcome.hashCode());
+        result = prime * result + ((start == null) ? 0 : start.hashCode());
+        result = prime * result + ((subRequestId == null) ? 0 : subRequestId.hashCode());
+        result = prime * result + ((target == null) ? 0 : target.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        ControlLoopOperation other = (ControlLoopOperation) obj;
+        if (actor == null) {
+            if (other.actor != null) {
+                return false;
+            }
+        } else if (!actor.equals(other.actor)) {
+            return false;
+        }
+        if (end == null) {
+            if (other.end != null) {
+                return false;
+            }
+        } else if (!end.equals(other.end)) {
+            return false;
+        }
+        if (message == null) {
+            if (other.message != null) {
+                return false;
+            }
+        } else if (!message.equals(other.message)) {
+            return false;
+        }
+        if (operation == null) {
+            if (other.operation != null) {
+                return false;
+            }
+        } else if (!operation.equals(other.operation)) {
+            return false;
+        }
+        if (outcome == null) {
+            if (other.outcome != null) {
+                return false;
+            }
+        } else if (!outcome.equals(other.outcome)) {
+            return false;
+        }
+        if (start == null) {
+            if (other.start != null) {
+                return false;
+            }
+        } else if (!start.equals(other.start)) {
+            return false;
+        }
+        if (subRequestId == null) {
+            if (other.subRequestId != null) {
+                return false;
+            }
+        } else if (!subRequestId.equals(other.subRequestId)) {
+            return false;
+        }
+        if (target == null) {
+            if (other.target != null) {
+                return false;
+            }
+        } else if (!target.equals(other.target)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperationWrapper.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperationWrapper.java
new file mode 100644
index 0000000..35f4821
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopOperationWrapper.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import java.util.UUID;
+
+public class ControlLoopOperationWrapper {
+
+    private UUID requestId;
+    private ControlLoopOperation operation;
+
+    public ControlLoopOperationWrapper() {
+
+    }
+
+    public ControlLoopOperationWrapper(UUID requestId, ControlLoopOperation operation) {
+        this.requestId = requestId;
+        this.operation = operation;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public ControlLoopOperation getOperation() {
+        return operation;
+    }
+
+    public void setOperation(ControlLoopOperation operation) {
+        this.operation = operation;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java
new file mode 100644
index 0000000..e1d107b
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+public enum ControlLoopTargetType {
+    VM("VM"), VF("VF"), VFC("VFC"), VNF("VNF");
+
+    private String type;
+
+    private ControlLoopTargetType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return this.type;
+    }
+
+    /**
+     * Convert a String type to a ControlLoopTargetType.
+     * 
+     * @param type the String type
+     * @return the ControlLoopTargetType
+     */
+    public static ControlLoopTargetType toType(String type) {
+        if (VM.toString().equals(type)) {
+            return VM;
+        }
+        if (VF.toString().equals(type)) {
+            return VF;
+        }
+        if (VFC.toString().equals(type)) {
+            return VFC;
+        }
+        if (VNF.toString().equals(type)) {
+            return VNF;
+        }
+
+        return null;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
new file mode 100644
index 0000000..245e3a6
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+public class PhysicalControlLoopEvent extends ControlLoopEvent {
+    private static final long serialVersionUID = -7282930271094849487L;
+
+    public PhysicalControlLoopEvent() {}
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param event the existing instance
+     */
+    public PhysicalControlLoopEvent(PhysicalControlLoopEvent event) {
+        super(event);
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
new file mode 100644
index 0000000..a76b807
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+public class PhysicalControlLoopNotification extends ControlLoopNotification {
+    private static final long serialVersionUID = 8105197217140032892L;
+
+    public PhysicalControlLoopNotification() {}
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param event the existing instance
+     */
+    public PhysicalControlLoopNotification(PhysicalControlLoopEvent event) {
+        super(event);
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java
new file mode 100644
index 0000000..1223d56
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+
+public class VirtualControlLoopEvent extends ControlLoopEvent {
+
+    private static final long serialVersionUID = -5752405682246066226L;
+    
+    @SerializedName("closedLoopAlarmStart")
+    private Instant closedLoopAlarmStart;
+    
+    @SerializedName("closedLoopAlarmEnd")
+    private Instant closedLoopAlarmEnd;
+    
+    @SerializedName("AAI")
+    private Map<String, String> aai = new HashMap<>();
+
+    public VirtualControlLoopEvent() {}
+
+
+    /**
+     * Construct an instance from an existing instance.
+     * 
+     * @param event the existing instance
+     */
+    public VirtualControlLoopEvent(VirtualControlLoopEvent event) {
+        super(event);
+        if (event == null) {
+            return;
+        }
+        if (event.aai != null) {
+            this.aai = new HashMap<>(event.aai);
+        }
+        this.closedLoopAlarmStart = event.closedLoopAlarmStart;
+        this.closedLoopAlarmEnd = event.closedLoopAlarmEnd;
+    }
+
+    public Instant getClosedLoopAlarmStart() {
+        return closedLoopAlarmStart;
+    }
+
+    public void setClosedLoopAlarmStart(Instant closedLoopAlarmStart) {
+        this.closedLoopAlarmStart = closedLoopAlarmStart;
+    }
+
+    public Instant getClosedLoopAlarmEnd() {
+        return closedLoopAlarmEnd;
+    }
+
+    public void setClosedLoopAlarmEnd(Instant closedLoopAlarmEnd) {
+        this.closedLoopAlarmEnd = closedLoopAlarmEnd;
+    }
+
+    public Map<String, String> getAai() {
+        return aai;
+    }
+
+    public void setAai(Map<String, String> aai) {
+        this.aai = aai;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopNotification.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopNotification.java
new file mode 100644
index 0000000..0a74365
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopNotification.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+
+public class VirtualControlLoopNotification extends ControlLoopNotification {
+
+    private static final long serialVersionUID = 5354756047932144017L;
+
+    @SerializedName("AAI")
+    private Map<String, String> aai = new HashMap<>();
+    
+    @SerializedName("closedLoopAlarmStart")
+    private Instant closedLoopAlarmStart;
+    
+    @SerializedName("closedLoopAlarmEnd")
+    private Instant closedLoopAlarmEnd;
+
+    public VirtualControlLoopNotification() {}
+
+    /**
+     * Construct an instance.
+     * 
+     * @param event the event
+     */
+    public VirtualControlLoopNotification(VirtualControlLoopEvent event) {
+        super(event);
+        if (event == null) {
+            return;
+        }
+        if (event.getAai() != null) {
+            this.setAai(new HashMap<>(event.getAai()));
+        }
+        this.closedLoopAlarmStart = event.getClosedLoopAlarmStart();
+        this.closedLoopAlarmEnd = event.getClosedLoopAlarmEnd();
+    }
+
+    public Map<String, String> getAai() {
+        return aai;
+    }
+
+    public void setAai(Map<String, String> aai) {
+        this.aai = aai;
+    }
+
+    public Instant getClosedLoopAlarmStart() {
+        return closedLoopAlarmStart;
+    }
+
+    public void setClosedLoopAlarmStart(Instant closedLoopAlarmStart) {
+        this.closedLoopAlarmStart = closedLoopAlarmStart;
+    }
+
+    public Instant getClosedLoopAlarmEnd() {
+        return closedLoopAlarmEnd;
+    }
+
+    public void setClosedLoopAlarmEnd(Instant closedLoopAlarmEnd) {
+        this.closedLoopAlarmEnd = closedLoopAlarmEnd;
+    }
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/params/ControlLoopParams.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/params/ControlLoopParams.java
new file mode 100644
index 0000000..11b90af
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/params/ControlLoopParams.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * AppcLcmActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop.params;
+
+import java.io.Serializable;
+
+public class ControlLoopParams implements Serializable {
+
+    private static final long serialVersionUID = 970755684770982776L;
+
+    private String closedLoopControlName;
+    private String controlLoopYaml;
+    private String policyName;
+    private String policyScope;
+    private String policyVersion;
+
+    public ControlLoopParams() {
+        super();
+    }
+
+    /**
+     * Construct an instance from an existing instance.
+     *
+     * @param params the existing instance
+     */
+    public ControlLoopParams(ControlLoopParams params) {
+        this.closedLoopControlName = params.closedLoopControlName;
+        this.controlLoopYaml = params.controlLoopYaml;
+        this.policyName = params.policyName;
+        this.policyScope = params.policyScope;
+        this.policyVersion = params.policyVersion;
+    }
+
+    public String getClosedLoopControlName() {
+        return closedLoopControlName;
+    }
+
+    public void setClosedLoopControlName(String closedLoopControlName) {
+        this.closedLoopControlName = closedLoopControlName;
+    }
+
+    public String getControlLoopYaml() {
+        return controlLoopYaml;
+    }
+
+    public void setControlLoopYaml(String controlLoopYaml) {
+        this.controlLoopYaml = controlLoopYaml;
+    }
+
+    public String getPolicyName() {
+        return policyName;
+    }
+
+    public void setPolicyName(String policyName) {
+        this.policyName = policyName;
+    }
+
+    public String getPolicyScope() {
+        return policyScope;
+    }
+
+    public void setPolicyScope(String policyScope) {
+        this.policyScope = policyScope;
+    }
+
+    public String getPolicyVersion() {
+        return policyVersion;
+    }
+
+    public void setPolicyVersion(String policyVersion) {
+        this.policyVersion = policyVersion;
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
new file mode 100644
index 0000000..b36ee7f
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
+import java.lang.reflect.Type;
+import java.time.Instant;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+import org.onap.policy.controlloop.ControlLoopNotificationType;
+import org.onap.policy.controlloop.ControlLoopTargetType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class Serialization {
+    public static final Gson gson =
+            new GsonBuilder().disableHtmlEscaping().registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+                    .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+                    .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
+                    .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
+
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+            .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+            .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
+            .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
+    public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+            .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+            .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
+    private Serialization() {}
+
+    public static class NotificationTypeAdapter
+            implements JsonSerializer<ControlLoopNotificationType>, JsonDeserializer<ControlLoopNotificationType> {
+        @Override
+        public JsonElement serialize(ControlLoopNotificationType src, Type typeOfSrc,
+                JsonSerializationContext context) {
+            return new JsonPrimitive(src.toString());
+        }
+
+        @Override
+        public ControlLoopNotificationType deserialize(JsonElement json, Type typeOfT,
+                JsonDeserializationContext context) {
+            return ControlLoopNotificationType.toType(json.getAsString());
+        }
+    }
+
+    public static class TargetTypeAdapter
+            implements JsonSerializer<ControlLoopTargetType>, JsonDeserializer<ControlLoopTargetType> {
+        @Override
+        public JsonElement serialize(ControlLoopTargetType src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toString());
+        }
+
+        @Override
+        public ControlLoopTargetType deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return ControlLoopTargetType.toType(json.getAsString());
+        }
+    }
+
+    public static class GsonUtcAdapter implements JsonSerializer<ZonedDateTime>, JsonDeserializer<ZonedDateTime> {
+        private static final Logger logger = LoggerFactory.getLogger(GsonUtcAdapter.class);
+        public static final DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSxxx");
+
+        @Override
+        public ZonedDateTime deserialize(JsonElement element, Type type, JsonDeserializationContext context) {
+            try {
+                return ZonedDateTime.parse(element.getAsString(), format);
+            } catch (Exception e) {
+                logger.error(e.getMessage(), e);
+            }
+            return null;
+        }
+
+        @Override
+        public JsonElement serialize(ZonedDateTime datetime, Type type, JsonSerializationContext context) {
+            return new JsonPrimitive(datetime.format(format));
+        }
+    }
+
+    public static class GsonInstantAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.ofEpochMilli(json.getAsLong());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toEpochMilli());
+        }
+
+    }
+
+}
diff --git a/models-interactions/model-impl/events/src/main/resources/definitions.yaml b/models-interactions/model-impl/events/src/main/resources/definitions.yaml
new file mode 100644
index 0000000..57b8c1f
--- /dev/null
+++ b/models-interactions/model-impl/events/src/main/resources/definitions.yaml
@@ -0,0 +1,128 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+AAI:
+  type: object
+  properties:
+    AICVServerSelfLink:
+      type: string
+    VNF_NAME:
+      type: string
+    AICVMID:
+      type: string
+    AICTenantID:
+      type: string
+    LOC_ID:
+      type: string
+    in_maint:
+      type: boolean
+    AICIdentity:
+      type: string
+    Prov_status:
+      type: string
+    OAM_IPV4:
+      type: string
+    is_closed_loop_disabled:
+      type: boolean
+    VM_NAME:
+      type: string
+    OAM_IPV6:
+      type: string
+  required:
+    - AICVServerSelfLink
+    - AICIdentity
+    - is_closed_loop_disabled
+ControlLoop:
+  type: object
+  description: Common fields for control loop events and notifications
+  properties:
+    closedLoopControlName:
+      type: string
+      description: A UNIQUE string identifying the Closed Loop ID this event is for. There are no semantics behind this string.
+    serviceInstance:
+      $ref: '../../../../sdc/src/main/resources/definitions.yaml#/serviceInstance'
+    resourceInstance:
+      $ref: '../../../../sdc/src/main/resources/definitions.yaml#/resourceInstance'
+    requestID:
+      type: string
+      description: This is required via ONAP Platform Logging Requirements.
+      pattern: /[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/
+    triggerID:
+      type: string
+      description: ID that maps back to Highland Park. Concatenation between eventID and firstEPOCH.
+    triggerSourceName:
+      type: string
+      description: pulled from eventSourceName of trigger H.P. alarm. The contents of this field should also be contained in the AAI Json sub-tag (see below).
+    closedLoopAlarmStart:
+      type: string
+      description: firstEpoch. UTC Timestamp when this event was detected by DCAE. Conform to ONAP Logging requirements.
+    closedLoopAlarmEnd:
+      type: string
+      description: lastEpoch.  UTC Timestamp when this event was detected as cleared by DCAE. Conform to ONAP Logging requirements.
+    closedLoopEventClient:
+      type: string
+      description: Open DCAE sub-system that detected the event and published this event message.
+    target:
+      type: string
+      description: The target entity that is being administered. This could be VM_NAME, VNF_NAME, etc. This should map to a field name in the AAI sub-tag shown below.
+    AAI:
+      $ref: '#/AAI'
+    from:
+      type: string
+    policyScope:
+      type: string
+    policyName:
+      type: string
+    policyVersion:
+      type: string
+  required:
+    - closedLoopControlName
+    - requestID
+    - triggerID
+    - triggerSourceName
+    - closedLoopAlarmStart
+    - closedLoopEventClient
+    - target
+    - AAI
+    - from
+    - policyScope
+    - policyName
+    - policyVersion
+Event:
+  allOf:
+    - $ref: '#/ControlLoop'
+    - properties:
+      closedLoopEventStatus:
+        type: string
+        description: The status for the event within Open DCAE. A value of “ONSET” indicates the event has been encountered. “ABATED” indicates the event has been abated.
+        valid_values:
+          - ONSET
+          - ABATEMENT
+    - required:
+      - closedLoopEventStatus
+Notification:
+    - $ref: '#/ControlLoop'
+    - properties:
+      notification:
+        type: string
+      notificationTime:
+        type: string
+      message:
+        type: string
+      OPS_CL_timer:
+        type: int
+    - required:
+      - notification
+      - notificationTime
+      - OPS_CL_timer
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventStatusTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventStatusTest.java
new file mode 100644
index 0000000..f890cfc
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventStatusTest.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import org.junit.Test;
+
+public class ControlLoopEventStatusTest {
+
+    @Test
+    public void test() {
+        ControlLoopEventStatus status = ControlLoopEventStatus.ABATED;
+        assertEquals(ControlLoopEventStatus.ABATED, ControlLoopEventStatus.toStatus(status.toString()));
+        assertNotEquals(ControlLoopEventStatus.ONSET, ControlLoopEventStatus.toStatus(status.toString()));
+
+        status = ControlLoopEventStatus.ONSET;
+        assertEquals(ControlLoopEventStatus.ONSET, ControlLoopEventStatus.toStatus(status.toString()));
+        assertNotEquals(ControlLoopEventStatus.ABATED, ControlLoopEventStatus.toStatus(status.toString()));
+        assertEquals(ControlLoopEventStatus.ABATED, ControlLoopEventStatus.toStatus("abatement"));
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventTest.java
new file mode 100644
index 0000000..feaf22e
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventTest.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+import org.junit.Test;
+
+public class ControlLoopEventTest {
+
+    private class TestControlLoopEvent extends ControlLoopEvent {
+        private static final long serialVersionUID = 1L;
+
+        public TestControlLoopEvent() {
+            super();
+        }
+
+        public TestControlLoopEvent(ControlLoopEvent event) {
+            super(event);
+        }
+    }
+
+    @Test
+    public void test() {
+        ControlLoopEvent event = new TestControlLoopEvent();
+
+        assertEquals("1.0.2", event.getVersion());
+
+        event = new TestControlLoopEvent(null);
+        assertEquals("1.0.2", event.getVersion());
+
+        event.setClosedLoopControlName("name");
+        assertEquals("name", event.getClosedLoopControlName());
+
+        event.setClosedLoopEventClient("client");
+        assertEquals("client", event.getClosedLoopEventClient());
+
+        event.setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
+        assertEquals(ControlLoopEventStatus.ONSET, event.getClosedLoopEventStatus());
+
+        event.setFrom("from");
+        assertEquals("from", event.getFrom());
+
+        event.setPayload("payload");
+        assertEquals("payload", event.getPayload());
+
+        event.setPolicyName("policyname");
+        assertEquals("policyname", event.getPolicyName());
+
+        event.setPolicyScope("scope");
+        assertEquals("scope", event.getPolicyScope());
+
+        event.setPolicyVersion("1");
+        assertEquals("1", event.getPolicyVersion());
+
+        UUID id = UUID.randomUUID();
+        event.setRequestId(id);
+        assertEquals(id, event.getRequestId());
+
+        event.setTarget("target");
+        assertEquals("target", event.getTarget());
+
+        event.setTargetType(ControlLoopTargetType.VF);
+        assertEquals(ControlLoopTargetType.VF, event.getTargetType());
+
+        event.setVersion("foo");
+        assertEquals("foo", event.getVersion());
+
+        ControlLoopEvent event2 = new TestControlLoopEvent(event);
+        assertTrue(event2.isEventStatusValid());
+
+        event2.setClosedLoopEventStatus(null);
+        assertFalse(event2.isEventStatusValid());
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java
new file mode 100644
index 0000000..0c1070e
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.util.Collections;
+import java.util.UUID;
+import org.junit.Test;
+import org.onap.policy.controlloop.util.Serialization;
+
+public class ControlLoopNotificationTest {
+
+    private class TestControlLoopNotification extends ControlLoopNotification {
+        private static final long serialVersionUID = 1L;
+
+        public TestControlLoopNotification() {
+            super();
+        }
+
+        public TestControlLoopNotification(ControlLoopEvent event) {
+            super(event);
+        }
+    }
+
+    @Test
+    public void test() {
+        ControlLoopNotification notification = new TestControlLoopNotification();
+
+        assertEquals("1.0.2", notification.getVersion());
+
+        notification.setClosedLoopControlName("name");
+        assertEquals("name", notification.getClosedLoopControlName());
+
+        notification.setClosedLoopEventClient("client");
+        assertEquals("client", notification.getClosedLoopEventClient());
+
+        notification.setFrom("from");
+        assertEquals("from", notification.getFrom());
+
+        notification.setHistory(Collections.emptyList());
+        assertTrue(notification.getHistory().size() == 0);
+
+        notification.setMessage("message");
+        assertEquals("message", notification.getMessage());
+
+        notification.setNotification(ControlLoopNotificationType.ACTIVE);
+        assertEquals(ControlLoopNotificationType.ACTIVE, notification.getNotification());
+
+        ZonedDateTime time = ZonedDateTime.now(ZoneOffset.UTC);
+        notification.setNotificationTime(time);
+        assertEquals(time, notification.getNotificationTime());
+
+        notification.setOpsClTimer(Integer.valueOf(1000));
+        assertEquals(Integer.valueOf(1000), notification.getOpsClTimer());
+
+        notification.setPolicyName("name");
+        assertEquals("name", notification.getPolicyName());
+
+        notification.setPolicyScope("scope");
+        assertEquals("scope", notification.getPolicyScope());
+
+        notification.setPolicyVersion("1");
+        assertEquals("1", notification.getPolicyVersion());
+
+        UUID id = UUID.randomUUID();
+        notification.setRequestId(id);
+        assertEquals(id, notification.getRequestId());
+
+        notification.setTarget("target");
+        assertEquals("target", notification.getTarget());
+
+        notification.setTargetType(ControlLoopTargetType.VFC);
+        assertEquals(ControlLoopTargetType.VFC, notification.getTargetType());
+
+        VirtualControlLoopEvent event = new VirtualControlLoopEvent();
+        event.setClosedLoopControlName("controlloop");
+
+        TestControlLoopNotification notification2 = new TestControlLoopNotification(event);
+        assertEquals("controlloop", notification2.getClosedLoopControlName());
+
+        notification2.setVersion("1");
+        assertEquals("1", notification2.getVersion());
+
+        String json = Serialization.gsonPretty.toJson(notification);
+
+        TestControlLoopNotification notification3 = Serialization.gson.fromJson(json,
+                TestControlLoopNotification.class);
+
+        //
+        // There is no equals for the class - chose not to create one
+        //
+        assertEquals(notification.getRequestId(), notification3.getRequestId());
+
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTypeTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTypeTest.java
new file mode 100644
index 0000000..a8330ba
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTypeTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class ControlLoopNotificationTypeTest {
+
+    @Test
+    public void test() {
+
+        assertEquals(ControlLoopNotificationType.ACTIVE, ControlLoopNotificationType.toType("ACTIVE"));
+        assertEquals(ControlLoopNotificationType.REJECTED, ControlLoopNotificationType.toType("REJECTED"));
+        assertEquals(ControlLoopNotificationType.OPERATION, ControlLoopNotificationType.toType("OPERATION"));
+        assertEquals(ControlLoopNotificationType.OPERATION_SUCCESS,
+                ControlLoopNotificationType.toType("OPERATION: SUCCESS"));
+        assertEquals(ControlLoopNotificationType.OPERATION_FAILURE,
+                ControlLoopNotificationType.toType("OPERATION: FAILURE"));
+        assertEquals(ControlLoopNotificationType.FINAL_FAILURE,
+                ControlLoopNotificationType.toType("FINAL: FAILURE"));
+        assertEquals(ControlLoopNotificationType.FINAL_SUCCESS,
+                ControlLoopNotificationType.toType("FINAL: SUCCESS"));
+        assertEquals(ControlLoopNotificationType.FINAL_OPENLOOP,
+                ControlLoopNotificationType.toType("FINAL: OPENLOOP"));
+
+        assertNull(ControlLoopNotificationType.toType("foo"));
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
new file mode 100644
index 0000000..eb1a351
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.time.Instant;
+import org.junit.Test;
+
+public class ControlLoopOperationTest {
+
+    @Test
+    public void test() {
+        ControlLoopOperation operation = new ControlLoopOperation();
+
+        assertEquals(operation, operation);
+        assertNotEquals(operation, new String());
+        assertNotEquals(operation, null);
+
+        assertTrue(operation.hashCode() != 0);
+        assertTrue(operation.toString().startsWith("ControlLoopOperation"));
+
+        assertNotNull(operation);
+
+        operation.setActor("actor");
+        assertEquals("actor", operation.getActor());
+
+        operation.setOperation("operation");
+        assertEquals("operation", operation.getOperation());
+
+        Instant now = Instant.now();
+        operation.setStart(now);
+        assertEquals(now, operation.getStart());
+        operation.setEnd(now);
+        assertEquals(now, operation.getEnd());
+
+        operation.setMessage("message");
+        assertEquals("message", operation.getMessage());
+
+        operation.setOutcome("outcome");
+        assertEquals("outcome", operation.getOutcome());
+
+        operation.setSubRequestId("1");
+        assertEquals("1", operation.getSubRequestId());
+
+        operation.setTarget("target");
+        assertEquals("target", operation.getTarget());
+
+        assertTrue(operation.hashCode() != 0);
+
+        ControlLoopOperation operation2 = new ControlLoopOperation(operation);
+        assertEquals(now, operation2.getEnd());
+
+        assertEquals(operation, operation2);
+
+        operation2.setActor("foo");
+        assertNotEquals(operation, operation2);
+
+        operation = new ControlLoopOperation(null);
+        assertNotNull(operation.getStart());
+
+        assertNotEquals(operation, operation2);
+
+        assertTrue(operation.toMessage().startsWith("actor="));
+        assertTrue(operation.toHistory().startsWith("actor="));
+
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationWrapperTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationWrapperTest.java
new file mode 100644
index 0000000..46fd9de
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationWrapperTest.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+import org.junit.Test;
+
+public class ControlLoopOperationWrapperTest {
+
+    @Test
+    public void test() {
+        ControlLoopOperationWrapper wrapper = new ControlLoopOperationWrapper();
+
+        assertNotNull(wrapper);
+
+        ControlLoopOperation operation = new ControlLoopOperation();
+        wrapper.setOperation(operation);
+        UUID id = UUID.randomUUID();
+        wrapper.setRequestId(id);
+
+        ControlLoopOperationWrapper wrapper2 = new ControlLoopOperationWrapper(wrapper.getRequestId(),
+                wrapper.getOperation());
+
+        assertEquals(operation, wrapper2.getOperation());
+        assertEquals(id, wrapper2.getRequestId());
+
+
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java
new file mode 100644
index 0000000..d1412fe
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class ControlLoopTargetTypeTest {
+
+    @Test
+    public void test() {
+        assertEquals(ControlLoopTargetType.VM, ControlLoopTargetType.toType("VM"));
+        assertEquals(ControlLoopTargetType.VF, ControlLoopTargetType.toType("VF"));
+        assertEquals(ControlLoopTargetType.VFC, ControlLoopTargetType.toType("VFC"));
+        assertEquals(ControlLoopTargetType.VNF, ControlLoopTargetType.toType("VNF"));
+
+        assertNull(ControlLoopTargetType.toType("foo"));
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopEventTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopEventTest.java
new file mode 100644
index 0000000..80f043e
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopEventTest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class PhysicalControlLoopEventTest {
+
+    @Test
+    public void test() {
+        PhysicalControlLoopEvent event = new PhysicalControlLoopEvent();
+        assertNotNull(event);
+
+        PhysicalControlLoopEvent event2 = new PhysicalControlLoopEvent(event);
+        assertNotNull(event2);
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopNotificationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopNotificationTest.java
new file mode 100644
index 0000000..f52bbc9
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopNotificationTest.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class PhysicalControlLoopNotificationTest {
+
+    @Test
+    public void test() {
+        PhysicalControlLoopNotification notification = new PhysicalControlLoopNotification();
+        assertNotNull(notification);
+
+        PhysicalControlLoopNotification notification2 = new PhysicalControlLoopNotification(
+                new PhysicalControlLoopEvent());
+        assertNotNull(notification2);
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopEventTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopEventTest.java
new file mode 100644
index 0000000..2acd303
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopEventTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.time.Instant;
+import org.junit.Test;
+
+public class VirtualControlLoopEventTest {
+
+    @Test
+    public void test() {
+        VirtualControlLoopEvent event = new VirtualControlLoopEvent();
+
+        assertNotNull(event);
+        assertNotNull(event.getAai());
+
+        Instant now = Instant.now();
+        event.setClosedLoopAlarmStart(now);
+        event.setClosedLoopAlarmEnd(now);
+
+        VirtualControlLoopEvent event2 = new VirtualControlLoopEvent(event);
+        assertEquals(now, event2.getClosedLoopAlarmStart());
+
+        event = new VirtualControlLoopEvent(null);
+        assertNull(event.getClosedLoopAlarmStart());
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopNotificationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopNotificationTest.java
new file mode 100644
index 0000000..2ab6222
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopNotificationTest.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.time.Instant;
+import java.util.Collections;
+import org.junit.Test;
+
+public class VirtualControlLoopNotificationTest {
+
+    @Test
+    public void test() {
+        VirtualControlLoopNotification notification = new VirtualControlLoopNotification();
+        assertNotNull(notification);
+
+        notification.setAai(Collections.emptyMap());
+        assertTrue(notification.getAai().isEmpty());
+
+        Instant now = Instant.now();
+        notification.setClosedLoopAlarmStart(now);
+
+        notification.setClosedLoopAlarmEnd(now);
+
+        VirtualControlLoopEvent event = new VirtualControlLoopEvent();
+
+        Instant later = Instant.now();
+        event.setAai(Collections.emptyMap());
+        event.setClosedLoopAlarmStart(later);
+        event.setClosedLoopAlarmEnd(later);
+
+        notification = new VirtualControlLoopNotification(event);
+        assertEquals(later, notification.getClosedLoopAlarmStart());
+        assertEquals(later, notification.getClosedLoopAlarmEnd());
+
+    }
+}
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java
new file mode 100644
index 0000000..bf23e57
--- /dev/null
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * controlloop
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.controlloop.params;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ControlLoopParamsTest {
+
+    @Test
+    public void test() {
+        ControlLoopParams params = new ControlLoopParams();
+        assertNotNull(params);
+
+        params.setClosedLoopControlName("name");
+        params.setControlLoopYaml("yaml");
+        params.setPolicyName("name");
+        params.setPolicyScope("scope");
+        params.setPolicyVersion("1");
+
+        ControlLoopParams params2 = new ControlLoopParams(params);
+
+        assertTrue(params2.getClosedLoopControlName().equals("name"));
+        assertTrue(params2.getControlLoopYaml().equals("yaml"));
+        assertTrue(params2.getPolicyName().equals("name"));
+        assertTrue(params2.getPolicyScope().equals("scope"));
+        assertTrue(params2.getPolicyVersion().equals("1"));
+
+    }
+}
diff --git a/models-interactions/model-impl/pom.xml b/models-interactions/model-impl/pom.xml
new file mode 100644
index 0000000..b4c0c48
--- /dev/null
+++ b/models-interactions/model-impl/pom.xml
@@ -0,0 +1,51 @@
+<!--
+  ============LICENSE_START=======================================================
+  controlloop-model-impl
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>pom</packaging>
+  
+  <parent>
+      <groupId>org.onap.policy.models</groupId>
+      <artifactId>policy-models-interactions</artifactId>
+      <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  
+  <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+  <artifactId>model-impl</artifactId>
+
+  <modules>
+      <module>aai</module>
+      <module>appc</module>
+      <module>appclcm</module>
+      <module>sdnr</module>
+      <module>events</module>
+      <module>so</module>
+      <module>rest</module>
+      <module>sdc</module>
+      <module>trafficgenerator</module>
+      <module>vfc</module>
+      <module>sdnc</module>
+  </modules>
+
+
+</project>
diff --git a/models-interactions/model-impl/rest/pom.xml b/models-interactions/model-impl/rest/pom.xml
new file mode 100644
index 0000000..51ab580
--- /dev/null
+++ b/models-interactions/model-impl/rest/pom.xml
@@ -0,0 +1,92 @@
+<!--
+  ============LICENSE_START=======================================================
+  rest
+  ================================================================================
+  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+    <artifactId>model-impl</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>rest</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <!-- Use Google Java Style Guide:
+                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                            with minor changes -->
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <excludes>
+                            </excludes>
+                            <consoleOutput>true</consoleOutput>
+                            <failsOnViolation>true</failsOnViolation>
+                            <violationSeverity>warning</violationSeverity>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java
new file mode 100644
index 0000000..b99f728
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java
@@ -0,0 +1,54 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Copyright (C) 2018 Amdocs. All rights reserved.
+ * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import java.net.URI;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+
+/**
+ * Allows for HTTP DELETE requests to contain a body, which the HttpDelete
+ * class does not support.
+ */
+public class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
+    public static final String METHOD_NAME = "DELETE";
+
+    public HttpDeleteWithBody(final String uri) {
+        super();
+        setURI(URI.create(uri));
+    }
+
+    public HttpDeleteWithBody(final URI uri) {
+        super();
+        setURI(uri);
+    }
+
+    public HttpDeleteWithBody() {
+        super();
+    }
+
+    @Override
+    public String getMethod() {
+        return METHOD_NAME;
+    }
+
+}
diff --git a/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/RestManager.java b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/RestManager.java
new file mode 100644
index 0000000..bbc30a7
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/RestManager.java
@@ -0,0 +1,193 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import java.nio.charset.Charset;
+import java.util.Map;
+import java.util.Map.Entry;
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpHeaders;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RestManager {
+
+    private static final Logger logger = LoggerFactory.getLogger(RestManager.class);
+
+    public class Pair<A, B> {
+        public final A first;
+        public final B second;
+
+        public Pair(A first, B second) {
+            this.first = first;
+            this.second = second;
+        }
+    }
+
+    /**
+     * Perform REST Post.
+     *
+     * @param url         the url
+     * @param username    the user name
+     * @param password    the password
+     * @param headers     any headers
+     * @param contentType what the content type is
+     * @param body        body to send
+     * @return the response status code and the body
+     */
+    public Pair<Integer, String> post(String url, String username, String password,
+                                      Map<String, String> headers, String contentType, String body) {
+        HttpPost post = new HttpPost(url);
+        addHeaders(post, username, password, headers);
+        post.addHeader("Content-Type", contentType);
+        try {
+            StringEntity input = new StringEntity(body);
+            input.setContentType(contentType);
+            post.setEntity(input);
+        } catch (Exception e) {
+            logger.error("post threw: ", e);
+            return null;
+        }
+        return sendRequest(post);
+    }
+
+    /**
+     * Do a REST get.
+     *
+     * @param url      URL
+     * @param username user name
+     * @param password password
+     * @param headers  any headers to add
+     * @return a Pair for the response status and the body
+     */
+    public Pair<Integer, String> get(String url, String username, String password,
+                                     Map<String, String> headers) {
+        HttpGet get = new HttpGet(url);
+        addHeaders(get, username, password, headers);
+        return sendRequest(get);
+    }
+
+    /**
+     * Perform REST Delete.
+     *
+     * @param url         the url
+     * @param username    the user name
+     * @param password    the password
+     * @param headers     any headers
+     * @param contentType what the content type is
+     * @param body        body (optional) to send
+     * @return the response status code and the body
+     */
+    public Pair<Integer, String> delete(String url, String username, String password, Map<String, String> headers,
+                                        String contentType, String body) {
+        HttpDeleteWithBody delete = new HttpDeleteWithBody(url);
+        addHeaders(delete, username, password, headers);
+        delete.addHeader("Content-Type", contentType);
+        if (body != null && !body.isEmpty()) {
+            try {
+                StringEntity input = new StringEntity(body);
+                input.setContentType(contentType);
+                delete.setEntity(input);
+            } catch (Exception e) {
+                logger.error("delete threw: ", e);
+                return null;
+            }
+        }
+        return sendRequest(delete);
+    }
+
+    /**
+     * Send REST request.
+     *
+     * @param request http request to send
+     * @return the response status code and the body
+     */
+    private Pair<Integer, String> sendRequest(HttpRequestBase request) {
+        if (logger.isDebugEnabled()) {
+            logger.debug("***** sendRequest to url {}:", request.getURI());
+        }
+
+        try (CloseableHttpClient client =
+                     HttpClientBuilder
+                             .create()
+                             .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+                             .build()) {
+            HttpResponse response = client.execute(request);
+            if (response != null) {
+                String returnBody = EntityUtils.toString(response.getEntity(), "UTF-8");
+                logger.debug("HTTP Response Status Code: {}",
+                        response.getStatusLine().getStatusCode());
+                logger.debug("HTTP Response Body:");
+                logger.debug(returnBody);
+
+                return new Pair<>(response.getStatusLine().getStatusCode(),
+                        returnBody);
+            } else {
+                logger.error("Response from {} is null", request.getURI());
+                return null;
+            }
+        } catch (Exception e) {
+            logger.error("Request failed to {}", request.getURI(), e);
+            return null;
+        }
+    }
+
+    /**
+     * Add header to the request.
+     *
+     * @param request  http request to send
+     * @param username the user name
+     * @param password the password
+     * @param headers  any headers
+     */
+    private void addHeaders(HttpRequestBase request, String username, String password, Map<String,
+            String> headers) {
+        String authHeader = makeAuthHeader(username, password);
+        if (headers != null) {
+            for (Entry<String, String> entry : headers.entrySet()) {
+                request.addHeader(entry.getKey(), headers.get(entry.getKey()));
+            }
+        }
+        if (authHeader != null) {
+            request.setHeader(HttpHeaders.AUTHORIZATION, authHeader);
+        }
+    }
+
+    private String makeAuthHeader(String username, String password) {
+        if (username == null || username.isEmpty()) {
+            return null;
+        }
+
+        String auth = username + ":" + (password == null ? "" : password);
+        return "Basic " + DatatypeConverter.printBase64Binary(auth.getBytes(Charset.forName("ISO-8859-1")));
+    }
+}
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/GetTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/GetTest.java
new file mode 100644
index 0000000..452c3fa
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/GetTest.java
@@ -0,0 +1,67 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.rest.RestManager.Pair;
+
+public class GetTest {
+
+    @Test(expected = NullPointerException.class)
+    public void testUrlNull() {
+        RestManager mgr = new RestManager();
+        mgr.get(null, "user", null, null);
+    }
+
+    @Test
+    public void testUsernameNull() {
+        RestManager mgr = new RestManager();
+
+        Pair<Integer, String> result = mgr.get("http://www.example.org", null, null, null);
+        assertEquals((Integer)200, result.first);
+        assertTrue(result.second != null);
+        assertTrue(result.second.length() > 0);
+    }
+
+    @Test
+    public void testUsernameEmpty() {
+        RestManager mgr = new RestManager();
+
+        Pair<Integer, String> result = mgr.get("http://www.example.org", "", null, null);
+        assertEquals((Integer)200, result.first);
+        assertTrue(result.second != null);
+        assertTrue(result.second.length() > 0);
+    }
+
+    @Test
+    public void testUrlExampleOrg() {
+        RestManager mgr = new RestManager();
+
+        Pair<Integer, String> result = mgr.get("http://www.example.org", "user", null, null);
+        assertEquals((Integer)200, result.first);
+        assertTrue(result.second != null);
+        assertTrue(result.second.length() > 0);
+    }
+}
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
new file mode 100644
index 0000000..2a114f5
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
@@ -0,0 +1,37 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Copyright (C) 2018 Amdocs. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class HttpDeleteWithBodyTest {
+
+    @Test
+    public void getMethod() {
+        String url = "http://www.example.org";
+        HttpDeleteWithBody deleteWithBody = new HttpDeleteWithBody(url);
+        assertEquals("DELETE", deleteWithBody.getMethod());
+        assertEquals(url, deleteWithBody.getURI().toString());
+    }
+}
\ No newline at end of file
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PairTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PairTest.java
new file mode 100644
index 0000000..2db9ebc
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PairTest.java
@@ -0,0 +1,43 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.policy.rest.RestManager.Pair;
+
+public class PairTest {
+
+    @Test
+    public void testPair() {
+        RestManager mgr = new RestManager();
+
+        Pair<Integer, Integer> pii = mgr.new Pair<>(1, 2);
+        assertEquals((Integer) 1, pii.first);
+        assertEquals((Integer) 2, pii.second);
+
+        Pair<Integer, String> pis = mgr.new Pair<>(1, "test");
+        assertEquals((Integer) 1, pis.first);
+        assertEquals("test", pis.second);
+    }
+}
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PostTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PostTest.java
new file mode 100644
index 0000000..5169468
--- /dev/null
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/PostTest.java
@@ -0,0 +1,51 @@
+/*
+ * ============LICENSE_START=======================================================
+ * rest
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.policy.rest.RestManager.Pair;
+
+public class PostTest {
+
+    @Test
+    public void testUsernameNull() {
+        RestManager mgr = new RestManager();
+        Pair<Integer, String> result = mgr.post("http://www.example.org", null, null, null, null, null);
+        assertEquals(null, result);
+    }
+
+    @Test
+    public void testUsernameEmpty() {
+        RestManager mgr = new RestManager();
+        Pair<Integer, String> result = mgr.post("http://www.example.org", "", null, null, null, null);
+        assertEquals(null, result);
+    }
+
+    @Test
+    public void testBodyNull() {
+        RestManager mgr = new RestManager();
+        Pair<Integer, String> result = mgr.post("http://www.example.org", "user", null, null, null, null);
+        assertEquals(null, result);
+    }
+}
diff --git a/models-interactions/model-impl/sdc/checkstyle-suppressions.xml b/models-interactions/model-impl/sdc/checkstyle-suppressions.xml
new file mode 100644
index 0000000..fd73d24
--- /dev/null
+++ b/models-interactions/model-impl/sdc/checkstyle-suppressions.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2018 AT&T Technologies. 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<!DOCTYPE suppressions PUBLIC
+     "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+     "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+ 
+<suppressions>
+  <suppress checks="AbbreviationAsWordInName"
+    files="ResourceInstance.java|ServiceInstance.java|Service.java"
+    lines="1-9999"/>
+</suppressions>
diff --git a/models-interactions/model-impl/sdc/pom.xml b/models-interactions/model-impl/sdc/pom.xml
new file mode 100644
index 0000000..42588c3
--- /dev/null
+++ b/models-interactions/model-impl/sdc/pom.xml
@@ -0,0 +1,83 @@
+<!--
+  ============LICENSE_START=======================================================
+  sdc
+  ================================================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>sdc</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <!-- Use Google Java Style Guide:
+                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                            with minor changes -->
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <excludes>
+                            </excludes>
+                            <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
+                            <consoleOutput>true</consoleOutput>
+                            <failsOnViolation>true</failsOnViolation>
+                            <violationSeverity>warning</violationSeverity>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
new file mode 100644
index 0000000..9b73446
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
@@ -0,0 +1,189 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class Resource implements Serializable {
+
+    private static final long serialVersionUID = -913729158733348027L;
+    
+    private UUID    resourceUuid;
+    private UUID    resourceInvariantUuid;
+    private String  resourceName;
+    private String  resourceVersion;
+    private ResourceType    resourceType;
+    
+    public Resource() {
+        //Empty Constructor
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param resource copy object
+     */
+    public Resource(Resource resource) {
+        this.resourceUuid = resource.resourceUuid;
+        this.resourceInvariantUuid = resource.resourceInvariantUuid;
+        this.resourceName = resource.resourceName;
+        this.resourceVersion = resource.resourceVersion;
+        this.resourceType = resource.resourceType;
+    }
+    
+    public Resource(UUID uuid) {
+        this.resourceUuid = uuid;
+    }
+    
+    public Resource(String name, ResourceType type) {
+        this.resourceName = name;
+        this.resourceType = type;
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param uuid uuid
+     * @param invariantUuid invariant uuid
+     * @param name name
+     * @param version version
+     * @param type type
+     */
+    public Resource(UUID uuid, UUID invariantUuid, String name, String version, ResourceType type) {
+        this.resourceUuid = uuid;
+        this.resourceInvariantUuid = invariantUuid;
+        this.resourceName = name;
+        this.resourceVersion = version;
+        this.resourceType = type;
+    }
+    
+    public UUID getResourceUuid() {
+        return resourceUuid;
+    }
+
+    public void setResourceUuid(UUID resourceUuid) {
+        this.resourceUuid = resourceUuid;
+    }
+
+    public UUID getResourceInvariantUuid() {
+        return resourceInvariantUuid;
+    }
+
+    public void setResourceInvariantUuid(UUID resourceInvariantUuid) {
+        this.resourceInvariantUuid = resourceInvariantUuid;
+    }
+
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public void setResourceName(String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public ResourceType getResourceType() {
+        return resourceType;
+    }
+
+    public void setResourceType(ResourceType resourceType) {
+        this.resourceType = resourceType;
+    }
+
+    @Override
+    public String toString() {
+        return "Resource [resourceUuid=" + resourceUuid + ", resourceInvariantUuid=" + resourceInvariantUuid
+                + ", resourceName=" + resourceName + ", resourceVersion=" + resourceVersion + ", resourceType="
+                + resourceType + "]";
+    }
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((resourceInvariantUuid == null) ? 0 : resourceInvariantUuid.hashCode());
+        result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode());
+        result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode());
+        result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode());
+        result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode());
+        return result;
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Resource other = (Resource) obj;
+        if (resourceInvariantUuid == null) {
+            if (other.resourceInvariantUuid != null) {
+                return false;
+            }
+        } else if (!resourceInvariantUuid.equals(other.resourceInvariantUuid)) {
+            return false;
+        }
+        if (resourceName == null) {
+            if (other.resourceName != null) {
+                return false;
+            }
+        } else if (!resourceName.equals(other.resourceName)) {
+            return false;
+        }
+        if (resourceType == null) {
+            if (other.resourceType != null) {
+                return false;
+            }
+        } else if (!resourceType.equals(other.resourceType)) {
+            return false;
+        }
+        if (resourceUuid == null) {
+            if (other.resourceUuid != null) {
+                return false;
+            }
+        } else if (!resourceUuid.equals(other.resourceUuid)) {
+            return false;
+        }
+        if (resourceVersion == null) {
+            if (other.resourceVersion != null) {
+                return false;
+            }
+        } else if (!resourceVersion.equals(other.resourceVersion)) {
+            return false;
+        }
+        return true;
+    }
+    
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
new file mode 100644
index 0000000..dce6ec0
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class ResourceInstance implements Serializable {
+    private static final long serialVersionUID = -5506162340393802424L;
+
+    private String resourceInstanceName;
+    private String resourceName;
+    private UUID    resourceInvariantUuid;
+    private String resourceVersion;
+    private ResourceType resourceType;
+    private UUID    resourceUuid;
+    
+    public ResourceInstance() {
+        //Empty Constructor
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param instance copy object
+     */
+    public ResourceInstance(ResourceInstance instance) {
+        if (instance == null) { 
+            return;
+        }
+        this.resourceInstanceName = instance.resourceInstanceName;
+        this.resourceName = instance.resourceName;
+        this.resourceInvariantUuid = instance.resourceInvariantUuid;
+        this.resourceVersion = instance.resourceVersion;
+        this.resourceType = instance.resourceType;
+        this.resourceUuid = instance.resourceUuid;
+    }
+    
+    public String getResourceInstanceName() {
+        return resourceInstanceName;
+    }
+
+    public void setResourceInstanceName(String resourceInstanceName) {
+        this.resourceInstanceName = resourceInstanceName;
+    }
+
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public void setResourceName(String resourceName) {
+        this.resourceName = resourceName;
+    }
+
+    public UUID getResourceInvariantUUID() {
+        return resourceInvariantUuid;
+    }
+
+    public void setResourceInvariantUUID(UUID resourceInvariantUuid) {
+        this.resourceInvariantUuid = resourceInvariantUuid;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public ResourceType getResourceType() {
+        return resourceType;
+    }
+
+    public void setResourceType(ResourceType resourceType) {
+        this.resourceType = resourceType;
+    }
+
+    public UUID getResourceUuid() {
+        return resourceUuid;
+    }
+
+    public void setResourceUuid(UUID resourceUuid) {
+        this.resourceUuid = resourceUuid;
+    }
+
+    @Override
+    public String toString() {
+        return "ResourceInstance [resourceInstanceName=" + resourceInstanceName + ", resourceName=" + resourceName
+                + ", resourceInvariantUuid=" + resourceInvariantUuid + ", resourceVersion=" + resourceVersion
+                + ", resourceType=" + resourceType + ", resourceUuid=" + resourceUuid + "]";
+    }
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((resourceInstanceName == null) ? 0 : resourceInstanceName.hashCode());
+        result = prime * result + ((resourceInvariantUuid == null) ? 0 : resourceInvariantUuid.hashCode());
+        result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode());
+        result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode());
+        result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode());
+        result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode());
+        return result;
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        ResourceInstance other = (ResourceInstance) obj;
+        if (resourceInstanceName == null) {
+            if (other.resourceInstanceName != null) {
+                return false;
+            }
+        } else if (!resourceInstanceName.equals(other.resourceInstanceName)) {
+            return false;
+        }
+        if (resourceInvariantUuid == null) {
+            if (other.resourceInvariantUuid != null) {
+                return false;
+            }
+        } else if (!resourceInvariantUuid.equals(other.resourceInvariantUuid)) {
+            return false;
+        }
+        if (resourceName == null) {
+            if (other.resourceName != null) {
+                return false;
+            }
+        } else if (!resourceName.equals(other.resourceName)) {
+            return false;
+        }
+        if (resourceType != other.resourceType) {
+            return false;
+        }
+        if (resourceUuid == null) {
+            if (other.resourceUuid != null) {
+                return false;
+            }
+        } else if (!resourceUuid.equals(other.resourceUuid)) {
+            return false;
+        }
+        if (resourceVersion == null) {
+            if (other.resourceVersion != null) {
+                return false;
+            }
+        } else if (!resourceVersion.equals(other.resourceVersion)) {
+            return false;
+        }
+        return true;
+    }
+    
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
new file mode 100644
index 0000000..e90ab6d
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+public enum ResourceType {
+    VF("VF"),
+    VFC("VFC"),
+    VL("VL"),
+    CP("CP")
+    ;
+
+    private String type;
+
+    private ResourceType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return this.type;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
new file mode 100644
index 0000000..f4f97c4
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java
@@ -0,0 +1,167 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class Service implements Serializable {
+
+    private static final long serialVersionUID = -1249276698549996806L;
+    
+    private UUID        serviceUUID;
+    private UUID        serviceInvariantUUID;
+    private String  serviceName;
+    private String  serviceVersion;
+    
+    public Service() {
+        //Empty Constructor
+    }
+    
+    public Service(UUID uuid) {
+        this.serviceUUID = uuid;
+    }
+    
+    public Service(String name) {
+        this.serviceName = name;
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param uuid service id
+     * @param invariantUUID service invariant id
+     * @param name name
+     * @param version version
+     */
+    public Service(UUID uuid, UUID invariantUUID, String name, String version) {
+        this.serviceUUID = uuid;
+        this.serviceInvariantUUID = invariantUUID;
+        this.serviceName = name;
+        this.serviceVersion = version;
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param service copy object
+     */
+    public Service(Service service) {
+        this.serviceUUID = service.serviceUUID;
+        this.serviceInvariantUUID = service.serviceInvariantUUID;
+        this.serviceName = service.serviceName;
+        this.serviceVersion = service.serviceVersion;
+    }
+    
+    public UUID getServiceUUID() {
+        return serviceUUID;
+    }
+
+    public void setServiceUUID(UUID serviceUUID) {
+        this.serviceUUID = serviceUUID;
+    }
+
+    public UUID getServiceInvariantUUID() {
+        return serviceInvariantUUID;
+    }
+
+    public void setServiceInvariantUUID(UUID serviceInvariantUUID) {
+        this.serviceInvariantUUID = serviceInvariantUUID;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getServiceVersion() {
+        return serviceVersion;
+    }
+
+    public void setServiceVersion(String serviceVersion) {
+        this.serviceVersion = serviceVersion;
+    }
+
+    @Override
+    public String toString() {
+        return "Service [serviceUUID=" + serviceUUID + ", serviceInvariantUUID=" + serviceInvariantUUID
+                + ", serviceName=" + serviceName + ", serviceVersion=" + serviceVersion + "]";
+    }
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((serviceInvariantUUID == null) ? 0 : serviceInvariantUUID.hashCode());
+        result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode());
+        result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode());
+        result = prime * result + ((serviceVersion == null) ? 0 : serviceVersion.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Service other = (Service) obj;
+        if (serviceInvariantUUID == null) {
+            if (other.serviceInvariantUUID != null) {
+                return false;
+            }
+        } else if (!serviceInvariantUUID.equals(other.serviceInvariantUUID)) {
+            return false;
+        }
+        if (serviceName == null) {
+            if (other.serviceName != null) {
+                return false;
+            }
+        } else if (!serviceName.equals(other.serviceName)) {
+            return false;
+        }
+        if (serviceUUID == null) {
+            if (other.serviceUUID != null) {
+                return false;
+            }
+        } else if (!serviceUUID.equals(other.serviceUUID)) {
+            return false;
+        }
+        if (serviceVersion == null) {
+            if (other.serviceVersion != null) {
+                return false;
+            }
+        } else if (!serviceVersion.equals(other.serviceVersion)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
new file mode 100644
index 0000000..49f1b85
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class ServiceInstance implements Serializable {
+    private static final long serialVersionUID = 6285260780966679625L;
+
+    private UUID        personaModelUUID;
+    private UUID        serviceUUID;
+    private UUID        serviceInstanceUUID;
+    private UUID        widgetModelUUID;
+    private String  widgetModelVersion;
+    private String  serviceName;
+    private String  serviceInstanceName;
+    
+    public ServiceInstance() {
+        //Empty Constructor
+    }
+    
+    /**
+     * Constructor.
+     * 
+     * @param instance copy object
+     */
+    public ServiceInstance(ServiceInstance instance) {
+        if (instance == null) {
+            return;
+        }
+        this.personaModelUUID = instance.personaModelUUID;
+        this.serviceUUID = instance.serviceUUID;
+        this.serviceInstanceUUID = instance.serviceInstanceUUID;
+        this.widgetModelUUID = instance.widgetModelUUID;
+        this.widgetModelVersion = instance.widgetModelVersion;
+        this.serviceName = instance.serviceName;
+        this.serviceInstanceName = instance.serviceInstanceName;
+    }
+    
+    public UUID getPersonaModelUUID() {
+        return personaModelUUID;
+    }
+
+    public void setPersonaModelUUID(UUID personaModelUUID) {
+        this.personaModelUUID = personaModelUUID;
+    }
+
+    public UUID getServiceUUID() {
+        return serviceUUID;
+    }
+
+    public void setServiceUUID(UUID serviceUUID) {
+        this.serviceUUID = serviceUUID;
+    }
+
+    public UUID getServiceInstanceUUID() {
+        return serviceInstanceUUID;
+    }
+
+    public void setServiceInstanceUUID(UUID serviceInstanceUUID) {
+        this.serviceInstanceUUID = serviceInstanceUUID;
+    }
+
+    public UUID getWidgetModelUUID() {
+        return widgetModelUUID;
+    }
+
+    public void setWidgetModelUUID(UUID widgetModelUUID) {
+        this.widgetModelUUID = widgetModelUUID;
+    }
+
+    public String getWidgetModelVersion() {
+        return widgetModelVersion;
+    }
+
+    public void setWidgetModelVersion(String widgetModelVersion) {
+        this.widgetModelVersion = widgetModelVersion;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getServiceInstanceName() {
+        return serviceInstanceName;
+    }
+
+    public void setServiceInstanceName(String serviceInstanceName) {
+        this.serviceInstanceName = serviceInstanceName;
+    }
+
+    @Override
+    public String toString() {
+        return "ServiceInstance [personaModelUUID=" + personaModelUUID + ", serviceUUID=" + serviceUUID
+                + ", serviceInstanceUUID=" + serviceInstanceUUID + ", widgetModelUUID=" + widgetModelUUID
+                + ", widgetModelVersion=" + widgetModelVersion + ", serviceName=" + serviceName
+                + ", serviceInstanceName=" + serviceInstanceName + "]";
+    }
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((personaModelUUID == null) ? 0 : personaModelUUID.hashCode());
+        result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode());
+        result = prime * result + ((serviceInstanceUUID == null) ? 0 : serviceInstanceUUID.hashCode());
+        result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode());
+        result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode());
+        result = prime * result + ((widgetModelUUID == null) ? 0 : widgetModelUUID.hashCode());
+        result = prime * result + ((widgetModelVersion == null) ? 0 : widgetModelVersion.hashCode());
+        return result;
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        ServiceInstance other = (ServiceInstance) obj;
+        if (personaModelUUID == null) {
+            if (other.personaModelUUID != null) {
+                return false;
+            }
+        } else if (!personaModelUUID.equals(other.personaModelUUID)) {
+            return false;
+        }
+        if (serviceInstanceName == null) {
+            if (other.serviceInstanceName != null) {
+                return false;
+            }
+        } else if (!serviceInstanceName.equals(other.serviceInstanceName)) {
+            return false;
+        }
+        if (serviceInstanceUUID == null) {
+            if (other.serviceInstanceUUID != null) {
+                return false;
+            }
+        } else if (!serviceInstanceUUID.equals(other.serviceInstanceUUID)) {
+            return false;
+        }
+        if (serviceName == null) {
+            if (other.serviceName != null) {
+                return false;
+            }
+        } else if (!serviceName.equals(other.serviceName)) {
+            return false;
+        }
+        if (serviceUUID == null) {
+            if (other.serviceUUID != null) {
+                return false;
+            }
+        } else if (!serviceUUID.equals(other.serviceUUID)) {
+            return false;
+        }
+        if (widgetModelUUID == null) {
+            if (other.widgetModelUUID != null) {
+                return false;
+            }
+        } else if (!widgetModelUUID.equals(other.widgetModelUUID)) {
+            return false;
+        }
+        if (widgetModelVersion == null) {
+            if (other.widgetModelVersion != null) {
+                return false;
+            }
+        } else if (!widgetModelVersion.equals(other.widgetModelVersion)) {
+            return false;
+        }
+        return true;
+    }
+    
+}
diff --git a/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml b/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml
new file mode 100644
index 0000000..16fff30
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/main/resources/definitions.yaml
@@ -0,0 +1,90 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+Service:
+  type: Object
+  properties:
+    serviceUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    serviceInvariantUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    serviceName:
+      type: string
+    serviceVersion:
+      type: string
+Resource:
+  type: Object
+  properties:
+    resourceUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    resourceInvariantUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    resourceName:
+      type: string
+    resourceVersion:
+      type: string
+    resourceType:
+      type: string
+      valid_values:
+        - VF
+        - VFC
+        - CP
+        - VL
+ServiceInstance:
+  type: Object
+  properties:
+    personaModelUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    serviceUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    serviceInstanceUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    widgetModelUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    widgetModelVersion:
+      type: string
+    serviceName:
+      type: string
+    serviceInstanceName:
+      type: string
+ResourceInstance:
+  type: object
+  properties:
+    resourceInstanceName:
+      type: string
+    resourceName:
+      type: string
+    resourceInvariantUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+    resourceVersion:
+      type: string
+    resourceType:
+      type: string
+      valid_values:
+        - VF
+        - VFC
+        - CP
+        - VL
+    resourceUUID:
+      type: string
+      pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java
new file mode 100644
index 0000000..9409635
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceInstanceTest.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class ResourceInstanceTest {
+
+    @Test
+    public void testConstructors() {
+        ResourceInstance ri = new ResourceInstance();
+        assertEquals(null, ri.getResourceInstanceName());
+        assertEquals(null, ri.getResourceUuid());
+        assertEquals(null, ri.getResourceInvariantUUID());
+        assertEquals(null, ri.getResourceName());
+        assertEquals(null, ri.getResourceType());
+        assertEquals(null, ri.getResourceVersion());
+
+        ResourceInstance ri2 = new ResourceInstance((ResourceInstance) null);
+        assertEquals(null, ri2.getResourceInstanceName());
+        assertEquals(null, ri2.getResourceUuid());
+        assertEquals(null, ri2.getResourceInvariantUUID());
+        assertEquals(null, ri2.getResourceName());
+        assertEquals(null, ri2.getResourceType());
+        assertEquals(null, ri2.getResourceVersion());
+
+        ri2 = new ResourceInstance(ri);
+        assertEquals(ri2.getResourceInstanceName(), ri.getResourceInstanceName());
+        assertEquals(ri2.getResourceUuid(), ri.getResourceUuid());
+        assertEquals(ri2.getResourceInvariantUUID(), ri.getResourceInvariantUUID());
+        assertEquals(ri2.getResourceName(), ri.getResourceName());
+        assertEquals(ri2.getResourceType(), ri.getResourceType());
+        assertEquals(ri2.getResourceVersion(), ri.getResourceVersion());
+    }
+
+    @Test
+    public void testInstanceName() {
+        ResourceInstance ri = new ResourceInstance();
+        String name = "nameTestInstance";
+        ri.setResourceInstanceName(name);;
+        assertEquals(name, ri.getResourceInstanceName());
+    }
+
+    @Test
+    public void testUuid() {
+        ResourceInstance ri = new ResourceInstance();
+        UUID uuid = UUID.randomUUID();
+        ri.setResourceUuid(uuid);
+        assertEquals(uuid, ri.getResourceUuid());
+    }
+
+    @Test
+    public void testInvariantUuid() {
+        ResourceInstance ri = new ResourceInstance();
+        UUID uuid = UUID.randomUUID();
+        ri.setResourceInvariantUUID(uuid);
+        assertEquals(uuid, ri.getResourceInvariantUUID());
+    }
+
+    @Test
+    public void testName() {
+        ResourceInstance ri = new ResourceInstance();
+        String name = "nameTest";
+        ri.setResourceName(name);
+        assertEquals(name, ri.getResourceName());
+    }
+
+    @Test
+    public void testVersion() {
+        ResourceInstance ri = new ResourceInstance();
+        String version = "versionTest";
+        ri.setResourceVersion(version);
+        assertEquals(version, ri.getResourceVersion());
+    }
+
+    @Test
+    public void testType() {
+        ResourceInstance ri = new ResourceInstance();
+        ri.setResourceType(ResourceType.CP);
+        assertEquals(ResourceType.CP, ri.getResourceType());
+    }
+
+    @Test
+    public void testEquals() {
+        ResourceInstance ri1 = new ResourceInstance();
+        ResourceInstance ri2 = new ResourceInstance(ri1);
+        assertTrue(ri1.equals(ri2));
+        assertTrue(ri2.equals(ri1));
+
+        ri1.setResourceInstanceName("instance");
+        ri1.setResourceName("resource");
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceVersion("0.0.0");
+        ri1.setResourceType(ResourceType.VL);
+        ri2 = new ResourceInstance(ri1);
+        assertTrue(ri1.equals(ri2));
+        assertTrue(ri2.equals(ri1));
+    }
+
+    @Test
+    public void testToString() {
+        ResourceInstance ri1 = new ResourceInstance();
+        ResourceInstance ri2 = new ResourceInstance(ri1);
+        assertEquals(ri1.toString(), ri2.toString());
+
+        ri1.setResourceInstanceName("instance");
+        ri1.setResourceName("resource");
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceVersion("0.0.0");
+        ri1.setResourceType(ResourceType.VL);
+        ri2 = new ResourceInstance(ri1);
+        assertEquals(ri1.toString(), ri2.toString());
+    }
+
+    @Test
+    public void testHashCode() {
+        ResourceInstance ri1 = new ResourceInstance();
+        ResourceInstance ri2 = new ResourceInstance(ri1);
+        assertEquals(ri1.hashCode(), ri2.hashCode());
+
+        ri1.setResourceInstanceName("instance");
+        ri1.setResourceName("resource");
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceInvariantUUID(UUID.randomUUID());
+        ri1.setResourceVersion("0.0.0");
+        ri1.setResourceType(ResourceType.VL);
+        ri2 = new ResourceInstance(ri1);
+        assertEquals(ri1.hashCode(), ri2.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java
new file mode 100644
index 0000000..60510a1
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ResourceTest.java
@@ -0,0 +1,153 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class ResourceTest {
+
+    @Test
+    public void testConstructors() {
+        Resource res = new Resource();
+        assertEquals(null, res.getResourceUuid());
+        assertEquals(null, res.getResourceInvariantUuid());
+        assertEquals(null, res.getResourceName());
+        assertEquals(null, res.getResourceType());
+        assertEquals(null, res.getResourceVersion());
+
+        UUID uuid = UUID.randomUUID();
+        res = new Resource(uuid);
+        assertEquals(uuid, res.getResourceUuid());
+        assertEquals(null, res.getResourceInvariantUuid());
+        assertEquals(null, res.getResourceName());
+        assertEquals(null, res.getResourceType());
+        assertEquals(null, res.getResourceVersion());
+
+        String name = "constTest";
+        res = new Resource(name, ResourceType.CP);
+        assertEquals(null, res.getResourceUuid());
+        assertEquals(name, res.getResourceName());
+        assertEquals(ResourceType.CP, res.getResourceType());
+        assertEquals(null, res.getResourceInvariantUuid());
+        assertEquals(null, res.getResourceVersion());
+
+        uuid = UUID.randomUUID();
+        UUID uuidInvariant = UUID.randomUUID();
+        name = "constTestUUID";
+        String version = "0.0.1";
+        res = new Resource(uuid, uuidInvariant, name, version, ResourceType.VF);
+        assertEquals(uuid, res.getResourceUuid());
+        assertEquals(uuidInvariant, res.getResourceInvariantUuid());
+        assertEquals(name, res.getResourceName());
+        assertEquals(ResourceType.VF, res.getResourceType());
+        assertEquals(version, res.getResourceVersion());
+
+        Resource r2 = new Resource(res);
+        assertEquals(uuid, r2.getResourceUuid());
+        assertEquals(uuidInvariant, r2.getResourceInvariantUuid());
+        assertEquals(name, r2.getResourceName());
+        assertEquals(ResourceType.VF, r2.getResourceType());
+        assertEquals(version, r2.getResourceVersion());
+    }
+
+    @Test
+    public void testUuid() {
+        Resource res = new Resource();
+        UUID uuid = UUID.randomUUID();
+        res.setResourceUuid(uuid);
+        assertEquals(uuid, res.getResourceUuid());
+    }
+
+    @Test
+    public void testInvariantUuid() {
+        Resource res = new Resource();
+        UUID uuid = UUID.randomUUID();
+        res.setResourceInvariantUuid(uuid);
+        assertEquals(uuid, res.getResourceInvariantUuid());
+    }
+
+    @Test
+    public void testName() {
+        Resource res = new Resource();
+        String name = "nameTest";
+        res.setResourceName(name);
+        assertEquals(name, res.getResourceName());
+    }
+
+    @Test
+    public void testVersion() {
+        Resource res = new Resource();
+        String version = "versionTest";
+        res.setResourceVersion(version);
+        assertEquals(version, res.getResourceVersion());
+    }
+
+    @Test
+    public void testType() {
+        Resource res = new Resource();
+        res.setResourceType(ResourceType.CP);
+        assertEquals(ResourceType.CP, res.getResourceType());
+    }
+
+    @Test
+    public void testEquals() {
+        Resource r1 = new Resource();
+        Resource r2 = new Resource(r1);
+        assertTrue(r1.equals(r2));
+        assertTrue(r2.equals(r1));
+
+        r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
+                ResourceType.VFC);
+        r2 = new Resource(r1);
+        assertTrue(r1.equals(r2));
+        assertTrue(r2.equals(r1));
+    }
+
+    @Test
+    public void testToString() {
+        Resource r1 = new Resource();
+        Resource r2 = new Resource(r1);
+        assertEquals(r1.toString(), r2.toString());
+
+        r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
+                ResourceType.VFC);
+        r2 = new Resource(r1);
+        assertEquals(r1.toString(), r2.toString());
+    }
+
+    @Test
+    public void testHashCode() {
+        Resource r1 = new Resource();
+        Resource r2 = new Resource(r1);
+        assertEquals(r1.hashCode(), r2.hashCode());
+
+        r1 = new Resource(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1",
+                ResourceType.VFC);
+        r2 = new Resource(r1);
+        assertEquals(r1.hashCode(), r2.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
new file mode 100644
index 0000000..ca2cb3d
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class ServiceInstanceTest {
+
+    @Test
+    public void testConstructors() {
+        ServiceInstance si = new ServiceInstance();
+        assertEquals(null, si.getServiceInstanceName());
+        assertEquals(null, si.getServiceUUID());
+        assertEquals(null, si.getServiceInstanceUUID());
+        assertEquals(null, si.getServiceName());
+        assertEquals(null, si.getPersonaModelUUID());
+        assertEquals(null, si.getWidgetModelUUID());
+        assertEquals(null, si.getWidgetModelVersion());
+
+        ServiceInstance si2 = new ServiceInstance((ServiceInstance) null);
+        assertEquals(null, si2.getServiceInstanceName());
+        assertEquals(null, si2.getServiceUUID());
+        assertEquals(null, si2.getServiceInstanceUUID());
+        assertEquals(null, si2.getServiceName());
+        assertEquals(null, si2.getPersonaModelUUID());
+        assertEquals(null, si2.getWidgetModelUUID());
+        assertEquals(null, si2.getWidgetModelVersion());
+
+        si2 = new ServiceInstance(si);
+        assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName());
+        assertEquals(si2.getServiceUUID(), si.getServiceUUID());
+        assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID());
+        assertEquals(si2.getServiceName(), si.getServiceName());
+        assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID());
+        assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID());
+        assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion());
+    }
+
+    @Test
+    public void testInstanceName() {
+        ServiceInstance si = new ServiceInstance();
+        String name = "nameTestInstance";
+        si.setServiceInstanceName(name);;
+        assertEquals(name, si.getServiceInstanceName());
+    }
+
+    @Test
+    public void testUuid() {
+        ServiceInstance si = new ServiceInstance();
+        UUID uuid = UUID.randomUUID();
+        si.setServiceUUID(uuid);
+        assertEquals(uuid, si.getServiceUUID());
+    }
+
+    @Test
+    public void testInstanceUuid() {
+        ServiceInstance si = new ServiceInstance();
+        UUID uuid = UUID.randomUUID();
+        si.setServiceInstanceUUID(uuid);
+        assertEquals(uuid, si.getServiceInstanceUUID());
+    }
+
+    @Test
+    public void testName() {
+        ServiceInstance si = new ServiceInstance();
+        String name = "nameTest";
+        si.setServiceName(name);
+        assertEquals(name, si.getServiceName());
+    }
+
+    @Test
+    public void testPersonaModelUuid() {
+        ServiceInstance si = new ServiceInstance();
+        UUID uuid = UUID.randomUUID();
+        si.setPersonaModelUUID(uuid);
+        assertEquals(uuid, si.getPersonaModelUUID());
+    }
+
+    @Test
+    public void testWidgetModelUuid() {
+        ServiceInstance si = new ServiceInstance();
+        UUID uuid = UUID.randomUUID();
+        si.setWidgetModelUUID(uuid);
+        assertEquals(uuid, si.getWidgetModelUUID());
+    }
+
+    @Test
+    public void testWidgetModelVersion() {
+        ServiceInstance si = new ServiceInstance();
+        String version = "2.2.2";
+        si.setWidgetModelVersion(version);;
+        assertEquals(version, si.getWidgetModelVersion());
+    }
+
+    @Test
+    public void testEquals() {
+        ServiceInstance si1 = new ServiceInstance();
+        ServiceInstance si2 = new ServiceInstance(si1);
+        assertTrue(si1.equals(si2));
+        assertTrue(si2.equals(si1));
+
+        si1.setServiceInstanceName("instance");
+        si1.setServiceName("service");
+        si1.setServiceInstanceUUID(UUID.randomUUID());
+        si1.setServiceUUID(UUID.randomUUID());
+        si1.setPersonaModelUUID(UUID.randomUUID());
+        si1.setWidgetModelUUID(UUID.randomUUID());
+        si1.setWidgetModelVersion("3.3.3");
+        si2 = new ServiceInstance(si1);
+        assertTrue(si1.equals(si2));
+        assertTrue(si2.equals(si1));
+    }
+
+    @Test
+    public void testToString() {
+        ServiceInstance si1 = new ServiceInstance();
+        ServiceInstance si2 = new ServiceInstance(si1);
+        assertEquals(si1.toString(), si2.toString());
+
+        si1.setServiceInstanceName("instance");
+        si1.setServiceName("service");
+        si1.setServiceInstanceUUID(UUID.randomUUID());
+        si1.setServiceUUID(UUID.randomUUID());
+        si1.setPersonaModelUUID(UUID.randomUUID());
+        si1.setWidgetModelUUID(UUID.randomUUID());
+        si1.setWidgetModelVersion("3.3.3");
+        si2 = new ServiceInstance(si1);
+        assertEquals(si1.toString(), si2.toString());
+    }
+
+    @Test
+    public void testHashCode() {
+        ServiceInstance si1 = new ServiceInstance();
+        ServiceInstance si2 = new ServiceInstance(si1);
+        assertEquals(si1.hashCode(), si2.hashCode());
+
+        si1.setServiceInstanceName("instance");
+        si1.setServiceName("service");
+        si1.setServiceInstanceUUID(UUID.randomUUID());
+        si1.setServiceUUID(UUID.randomUUID());
+        si1.setPersonaModelUUID(UUID.randomUUID());
+        si1.setWidgetModelUUID(UUID.randomUUID());
+        si1.setWidgetModelVersion("3.3.3");
+        si2 = new ServiceInstance(si1);
+        assertEquals(si1.hashCode(), si2.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
new file mode 100644
index 0000000..3bf6a53
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
@@ -0,0 +1,138 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdc
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class ServiceTest {
+
+    @Test
+    public void testConstructors() {
+        Service svc = new Service();
+        assertEquals(null, svc.getServiceUUID());
+        assertEquals(null, svc.getServiceInvariantUUID());
+        assertEquals(null, svc.getServiceName());
+        assertEquals(null, svc.getServiceVersion());
+
+        UUID uuid = UUID.randomUUID();
+        svc = new Service(uuid);
+        assertEquals(uuid, svc.getServiceUUID());
+        assertEquals(null, svc.getServiceInvariantUUID());
+        assertEquals(null, svc.getServiceName());
+        assertEquals(null, svc.getServiceVersion());
+
+        String name = "constTest";
+        svc = new Service(name);
+        assertEquals(null, svc.getServiceUUID());
+        assertEquals(name, svc.getServiceName());
+        assertEquals(null, svc.getServiceInvariantUUID());
+        assertEquals(null, svc.getServiceVersion());
+
+        uuid = UUID.randomUUID();
+        UUID uuidInvariant = UUID.randomUUID();
+        name = "constTestUUID";
+        String version = "0.0.1";
+        svc = new Service(uuid, uuidInvariant, name, version);
+        assertEquals(uuid, svc.getServiceUUID());
+        assertEquals(uuidInvariant, svc.getServiceInvariantUUID());
+        assertEquals(name, svc.getServiceName());
+        assertEquals(version, svc.getServiceVersion());
+
+        Service s2 = new Service(svc);
+        assertEquals(uuid, s2.getServiceUUID());
+        assertEquals(uuidInvariant, s2.getServiceInvariantUUID());
+        assertEquals(name, s2.getServiceName());
+        assertEquals(version, s2.getServiceVersion());
+    }
+
+    @Test
+    public void testUuid() {
+        Service svc = new Service();
+        UUID uuid = UUID.randomUUID();
+        svc.setServiceUUID(uuid);
+        assertEquals(uuid, svc.getServiceUUID());
+    }
+
+    @Test
+    public void testInvariantUuid() {
+        Service svc = new Service();
+        UUID uuid = UUID.randomUUID();
+        svc.setServiceInvariantUUID(uuid);
+        assertEquals(uuid, svc.getServiceInvariantUUID());
+    }
+
+    @Test
+    public void testName() {
+        Service svc = new Service();
+        String name = "nameTest";
+        svc.setServiceName(name);
+        assertEquals(name, svc.getServiceName());
+    }
+
+    @Test
+    public void testVersion() {
+        Service svc = new Service();
+        String version = "versionTest";
+        svc.setServiceVersion(version);
+        assertEquals(version, svc.getServiceVersion());
+    }
+
+    @Test
+    public void testEquals() {
+        Service s1 = new Service();
+        Service s2 = new Service(s1);
+        assertTrue(s1.equals(s2));
+        assertTrue(s2.equals(s1));
+
+        s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
+        s2 = new Service(s1);
+        assertTrue(s1.equals(s2));
+        assertTrue(s2.equals(s1));
+    }
+
+    @Test
+    public void testToString() {
+        Service s1 = new Service();
+        Service s2 = new Service(s1);
+        assertEquals(s1.toString(), s2.toString());
+
+        s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
+        s2 = new Service(s1);
+        assertEquals(s1.toString(), s2.toString());
+    }
+
+    @Test
+    public void testHashCode() {
+        Service s1 = new Service();
+        Service s2 = new Service(s1);
+        assertEquals(s1.hashCode(), s2.hashCode());
+
+        s1 = new Service(UUID.randomUUID(), UUID.randomUUID(), "equalsTest", "1.1.1");
+        s2 = new Service(s1);
+        assertEquals(s1.hashCode(), s2.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdc/src/test/resources/service_trinity.yaml b/models-interactions/model-impl/sdc/src/test/resources/service_trinity.yaml
new file mode 100644
index 0000000..391dc03
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/resources/service_trinity.yaml
@@ -0,0 +1,17 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+Service:
+  serviceName: trinity
+  
\ No newline at end of file
diff --git a/models-interactions/model-impl/sdc/src/test/resources/service_vSCP.yaml b/models-interactions/model-impl/sdc/src/test/resources/service_vSCP.yaml
new file mode 100644
index 0000000..1c377c9
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/resources/service_vSCP.yaml
@@ -0,0 +1,16 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+Service:
+  serviceName: vSCP
\ No newline at end of file
diff --git a/models-interactions/model-impl/sdc/src/test/resources/service_vUSP.yaml b/models-interactions/model-impl/sdc/src/test/resources/service_vUSP.yaml
new file mode 100644
index 0000000..6d6f9f1
--- /dev/null
+++ b/models-interactions/model-impl/sdc/src/test/resources/service_vUSP.yaml
@@ -0,0 +1,16 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Modifications Copyright (C) 2019 Nordix Foundation.
+#
+# 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.
+Service:
+  serviceName: vUSP
diff --git a/models-interactions/model-impl/sdnc/pom.xml b/models-interactions/model-impl/sdnc/pom.xml
new file mode 100644
index 0000000..8bc0776
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/pom.xml
@@ -0,0 +1,73 @@
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2018 Huawei. All rights reserved.
+  Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>sdnc</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <version>2.13.0</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>rest</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-core</artifactId>
+      <version>6.5.0.Final</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java
new file mode 100644
index 0000000..be26f87
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealNetworkInfo implements Serializable {
+
+    private static final long serialVersionUID = 3208673205100673119L;
+
+    @SerializedName("network-id")
+    private String networkId;
+
+    public SdncHealNetworkInfo() {
+        // Default constructor for SdncHealActionVmInfo
+    }
+
+    public String getNetworkId() {
+        return networkId;
+    }
+
+    public void setNetworkId(String networkId) {
+        this.networkId = networkId;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
new file mode 100644
index 0000000..88645d5
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealRequest implements Serializable {
+
+    private static final long serialVersionUID = -7341931593089709247L;
+
+    @SerializedName("sdnc-request-header")
+    private SdncHealRequestHeaderInfo requestHeaderInfo;
+
+    @SerializedName("request-information")
+    private SdncHealRequestInfo requestInfo;
+
+    @SerializedName("service-information")
+    private SdncHealServiceInfo serviceInfo;
+
+    @SerializedName("network-information")
+    private SdncHealNetworkInfo networkInfo;
+
+    public SdncHealRequest() {
+        // Default constructor for SdncHealRequest
+    }
+
+    public SdncHealRequestHeaderInfo getRequestHeaderInfo() {
+        return requestHeaderInfo;
+    }
+
+    public void setRequestHeaderInfo(SdncHealRequestHeaderInfo requestHeaderInfo) {
+        this.requestHeaderInfo = requestHeaderInfo;
+    }
+
+    public SdncHealRequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    public void setRequestInfo(SdncHealRequestInfo requestInfo) {
+        this.requestInfo = requestInfo;
+    }
+
+    public SdncHealServiceInfo getServiceInfo() {
+        return serviceInfo;
+    }
+
+    public void setServiceInfo(SdncHealServiceInfo serviceInfo) {
+        this.serviceInfo = serviceInfo;
+    }
+
+    public SdncHealNetworkInfo getNetworkInfo() {
+        return networkInfo;
+    }
+
+    public void setNetworkInfo(SdncHealNetworkInfo networkInfo) {
+        this.networkInfo = networkInfo;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java
new file mode 100644
index 0000000..0cdbb29
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealRequestHeaderInfo implements Serializable {
+
+    private static final long serialVersionUID = 3208673205100673119L;
+
+    @SerializedName("svc-request-id")
+    private String svcRequestId;
+
+    @SerializedName("svc-action")
+    private String svcAction;
+
+    public SdncHealRequestHeaderInfo() {
+        // Default constructor for SdncHealActionVmInfo
+    }
+
+    public String getSvcRequestId() {
+        return svcRequestId;
+    }
+
+    public void setSvcRequestId(String svcRequestId) {
+        this.svcRequestId = svcRequestId;
+    }
+
+    public String getSvcAction() {
+        return svcAction;
+    }
+
+    public void setSvcAction(String svcAction) {
+        this.svcAction = svcAction;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java
new file mode 100644
index 0000000..fa449a0
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealRequestInfo implements Serializable {
+
+    private static final long serialVersionUID = 3208673205100673119L;
+
+    @SerializedName("request-action")
+    private String requestAction;
+
+    public SdncHealRequestInfo() {
+        // Default constructor for SdncHealActionVmInfo
+    }
+
+    public String getRequestAction() {
+        return requestAction;
+    }
+
+    public void setRequestAction(String requestAction) {
+        this.requestAction = requestAction;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java
new file mode 100644
index 0000000..5b03db3
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncHealServiceInfo implements Serializable {
+
+    private static final long serialVersionUID = 3208673205100673119L;
+
+    @SerializedName("service-instance-id")
+    private String serviceInstanceId;
+
+    public SdncHealServiceInfo() {
+        // Default constructor for SdncHealActionVmInfo
+    }
+
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    public void setServiceInstanceId(String serviceInstanceId) {
+        this.serviceInstanceId = serviceInstanceId;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
new file mode 100644
index 0000000..5770a23
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
@@ -0,0 +1,168 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+
+import com.google.gson.JsonSyntaxException;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.drools.core.WorkingMemory;
+import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.onap.policy.sdnc.util.Serialization;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class SdncManager implements Runnable {
+
+    private String sdncUrlBase;
+    private String username;
+    private String password;
+    private SdncRequest sdncRequest;
+    private WorkingMemory workingMem;
+    private static final Logger logger = LoggerFactory.getLogger(SdncManager.class);
+
+    // The REST manager used for processing REST calls for this Sdnc manager
+    private RestManager restManager;
+
+    /**
+     * Constructor.
+     *
+     * @param wm Drools working memory
+     * @param request request
+     */
+    public SdncManager(WorkingMemory wm, SdncRequest request) {
+        if (wm == null || request == null) {
+            throw new IllegalArgumentException(
+                  "the parameters \"wm\" and \"request\" on the SdncManager constructor may not be null"
+            );
+        }
+        workingMem = wm;
+        sdncRequest = request;
+
+        restManager = new RestManager();
+
+        setSdncParams(getPeManagerEnvProperty("sdnc.url"), getPeManagerEnvProperty("sdnc.username"),
+            getPeManagerEnvProperty("sdnc.password"));
+    }
+
+    /**
+     * Set the parameters.
+     *
+     * @param baseUrl base URL
+     * @param name username
+     * @param pwd password
+     */
+    public void setSdncParams(String baseUrl, String name, String pwd) {
+        sdncUrlBase = baseUrl;
+        username = name;
+        password = pwd;
+    }
+
+    @Override
+    public void run() {
+        Map<String, String> headers = new HashMap<>();
+        Pair<Integer, String> httpDetails;
+
+        SdncResponse responseError = new SdncResponse();
+        SdncResponseOutput responseOutput = new SdncResponseOutput();
+        responseOutput.setResponseCode("404");
+        responseError.setResponseOutput(responseOutput);
+
+        headers.put("Accept", "application/json");
+        String sdncUrl = sdncUrlBase + "/GENERIC-RESOURCE-API:network-topology-operation";
+
+        try {
+            String sdncRequestJson = Serialization.gsonPretty.toJson(sdncRequest);
+            NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, sdncUrl, sdncRequestJson);
+            logger.info("[OUT|{}|{}|]{}{}", CommInfrastructure.REST, sdncUrl, NetLoggerUtil.SYSTEM_LS, sdncRequestJson);
+
+            httpDetails = restManager.post(sdncUrl, username, password, headers, "application/json",
+                                           sdncRequestJson);
+        } catch (Exception e) {
+            logger.info(e.getMessage(), e);
+            workingMem.insert(responseError);
+            return;
+        }
+
+        if (httpDetails == null) {
+            workingMem.insert(responseError);
+            return;
+        }
+
+        try {
+            SdncResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, SdncResponse.class);
+            NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, sdncUrl, httpDetails.second);
+            logger.info("[IN|{}|{}|]{}{}", "Sdnc", sdncUrl, NetLoggerUtil.SYSTEM_LS, httpDetails.second);
+            String body = Serialization.gsonPretty.toJson(response);
+            logger.info("Response to Sdnc Heal post:");
+            logger.info(body);
+            response.setRequestId(sdncRequest.getRequestId().toString());
+
+            if (!response.getResponseOutput().getResponseCode().equals("200")) {
+                logger.info(
+                    "Sdnc Heal Restcall failed with http error code {} {}", httpDetails.first, httpDetails.second
+                );
+            }
+
+            workingMem.insert(response);
+        } catch (JsonSyntaxException e) {
+            logger.info("Failed to deserialize into SdncResponse {}", e.getLocalizedMessage(), e);
+        } catch (Exception e) {
+            logger.info("Unknown error deserializing into SdncResponse {}", e.getLocalizedMessage(), e);
+        }
+    }
+
+    /**
+     * Protected setter for rest manager to allow mocked rest manager to be used for testing.
+     * @param restManager the test REST manager
+     */
+    protected void setRestManager(final RestManager restManager) {
+        this.restManager = restManager;
+    }
+
+    /**
+     * This method reads and validates environmental properties coming from the policy engine. Null properties cause
+     * an {@link IllegalArgumentException} runtime exception to be thrown
+     * @param  enginePropertyName name of the parameter to retrieve
+     * @return the property value
+     */
+
+    private String getPeManagerEnvProperty(String enginePropertyName) {
+        String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName);
+        if (enginePropertyValue == null) {
+            throw new IllegalArgumentException(
+                "The value of policy engine manager environment property \""
+                   + enginePropertyName + "\" may not be null"
+            );
+        }
+        return enginePropertyValue;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
new file mode 100644
index 0000000..4aaa844
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+import java.io.Serializable;
+import java.util.UUID;
+
+public class SdncRequest implements Serializable {
+
+    private static final long serialVersionUID = 3736300970326332512L;
+    // These fields are not serialized and not part of JSON
+    private transient String nsInstanceId;
+    private transient UUID requestId;
+
+    @SerializedName("input")
+    private SdncHealRequest healRequest;
+
+    public SdncRequest() {
+            // Default constructor for SdncRequest
+    }
+
+    public String getNsInstanceId() {
+        return nsInstanceId;
+    }
+
+    public void setNsInstanceId(String nsInstanceId) {
+        this.nsInstanceId = nsInstanceId;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public SdncHealRequest getHealRequest() {
+        return healRequest;
+    }
+
+    public void setHealRequest(SdncHealRequest healRequest) {
+        this.healRequest = healRequest;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java
new file mode 100644
index 0000000..496bf10
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncResponse implements Serializable {
+
+    private static final long serialVersionUID = 9151443891238218455L;
+
+    @SerializedName("output")
+    private SdncResponseOutput responseOutput;
+
+    private transient String requestId;
+
+    public SdncResponse() {
+        // Default constructor for SdncResponse
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public SdncResponseOutput getResponseOutput() {
+        return responseOutput;
+    }
+
+    public void setResponseOutput(SdncResponseOutput responseOutput) {
+        this.responseOutput = responseOutput;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java
new file mode 100644
index 0000000..094b264
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncResponseNetworkInfo implements Serializable {
+
+    private static final long serialVersionUID = 6827782899144150158L;
+
+    @SerializedName("instance-id")
+    private String instanceId;
+
+    @SerializedName("object-path")
+    private String objectPath;
+
+    public SdncResponseNetworkInfo() {
+        // Default constructor for SdncResponseNetworkInfo
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    public String getObjectPath() {
+        return objectPath;
+    }
+
+    public void setObjectPath(String objectPath) {
+        this.objectPath = objectPath;
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java
new file mode 100644
index 0000000..fc3335a
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class SdncResponseOutput implements Serializable {
+
+    private static final long serialVersionUID = 6827782899144150158L;
+
+    @SerializedName("svc-request-id")
+    private String svcRequestId;
+
+    @SerializedName("response-code")
+    private String responseCode;
+
+    @SerializedName("ack-final-indicator")
+    private String ackFinalIndicator;
+
+    public SdncResponseOutput() {
+        // Default constructor for SdncResponseDescriptor
+    }
+
+    public String getSvcRequestId() {
+        return svcRequestId;
+    }
+
+    public void setSvcRequestId(String svcRequestId) {
+        this.svcRequestId = svcRequestId;
+    }
+
+    public String getResponseCode() {
+        return responseCode;
+    }
+
+    public void setResponseCode(String responseCode) {
+        this.responseCode = responseCode;
+    }
+
+    public String getAckFinalIndicator() {
+        return ackFinalIndicator;
+    }
+
+    public void setAckFinalIndicator(String ackFinalIndicator) {
+        this.ackFinalIndicator = ackFinalIndicator;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java
new file mode 100644
index 0000000..05b8544
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SdncResponseServiceInfo implements Serializable {
+
+    private static final long serialVersionUID = 6827782899144150158L;
+
+    @SerializedName("instance-id")
+    private String instanceId;
+
+    public SdncResponseServiceInfo() {
+        // Default constructor for SdncResponseServiceInfo
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java
new file mode 100644
index 0000000..428f357
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public final class Serialization {
+    private Serialization() {
+    }
+    
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping()
+            .setPrettyPrinting()
+            .create();
+
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/DemoTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/DemoTest.java
new file mode 100644
index 0000000..53be338
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/DemoTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import java.util.LinkedList;
+
+import org.junit.Test;
+import org.onap.policy.sdnc.util.Serialization;
+
+public class DemoTest {
+
+    @Test
+    public void test() {
+        SdncRequest request = new SdncRequest();
+
+        request.setNsInstanceId("100");
+        request.setHealRequest(new SdncHealRequest());
+
+        request.getHealRequest().setRequestHeaderInfo(new SdncHealRequestHeaderInfo());
+        request.getHealRequest().getRequestHeaderInfo().setSvcRequestId("service-req-01");
+        request.getHealRequest().getRequestHeaderInfo().setSvcAction("servive-action");
+
+        request.getHealRequest().setRequestInfo(new SdncHealRequestInfo());
+        request.getHealRequest().getRequestInfo().setRequestAction("request-action");
+        
+        request.getHealRequest().setServiceInfo(new SdncHealServiceInfo());
+        request.getHealRequest().getServiceInfo().setServiceInstanceId("service-instance-01");
+        
+        request.getHealRequest().setNetworkInfo(new SdncHealNetworkInfo());
+        request.getHealRequest().getNetworkInfo().setNetworkId("network-5555");
+        
+
+        String body = Serialization.gsonPretty.toJson(request);
+        System.out.println(body);
+
+        SdncResponse response = new SdncResponse();
+
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+        response.setRequestId("request-01");
+        response.setResponseOutput(new SdncResponseOutput());
+        response.getResponseOutput().setSvcRequestId("service-req-01");
+        response.getResponseOutput().setResponseCode("200");
+        response.getResponseOutput().setAckFinalIndicator("final-indicator-00");
+        
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+        response = Serialization.gsonPretty.fromJson(body, SdncResponse.class);
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealAdditionalParamsTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealAdditionalParamsTest.java
new file mode 100644
index 0000000..e7decbc
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealAdditionalParamsTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class SdncHealAdditionalParamsTest {
+
+    @Test
+    public void testSdncHealAdditionalParameters() {
+        SdncHealRequestHeaderInfo additionalParams = new SdncHealRequestHeaderInfo();
+        assertNotNull(additionalParams);
+        assertNotEquals(0, additionalParams.hashCode());
+        
+        String action = "Go Home";
+        additionalParams.setSvcAction(action);
+        assertEquals(action, additionalParams.getSvcAction());
+        
+        String requestId = "My Request";
+        additionalParams.setSvcRequestId(requestId);
+        assertEquals(requestId, additionalParams.getSvcRequestId());
+        
+        assertNotEquals(0, additionalParams.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealRequestTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealRequestTest.java
new file mode 100644
index 0000000..c1ff45b
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealRequestTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class SdncHealRequestTest {
+
+    @Test
+    public void testSdncHealRequest() {
+        SdncHealRequest request = new SdncHealRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+        
+        SdncHealRequestInfo requestInfo = new SdncHealRequestInfo();
+        request.setRequestInfo(requestInfo);
+        assertEquals(requestInfo, request.getRequestInfo());
+        
+        assertNotEquals(0, request.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealServiceInfoTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealServiceInfoTest.java
new file mode 100644
index 0000000..b65e45f
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealServiceInfoTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class SdncHealServiceInfoTest {
+
+    @Test
+    public void testSdncHealServiceInfo() {
+        SdncHealServiceInfo serviceInfo = new SdncHealServiceInfo();
+        assertNotNull(serviceInfo);
+        assertNotEquals(0, serviceInfo.hashCode());
+        
+        String svrid = "ECity";
+        serviceInfo.setServiceInstanceId(svrid);
+        assertEquals(svrid, serviceInfo.getServiceInstanceId());
+        
+        assertNotEquals(0, serviceInfo.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncManagerTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncManagerTest.java
new file mode 100644
index 0000000..305fceb
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncManagerTest.java
@@ -0,0 +1,284 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import static org.mockito.ArgumentMatchers.anyMap;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.endsWith;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.startsWith;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.drools.core.WorkingMemory;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.onap.policy.sdnc.util.Serialization;
+
+public class SdncManagerTest {
+    private static WorkingMemory mockedWorkingMemory;
+
+    private RestManager   mockedRestManager;
+
+    private Pair<Integer, String> httpResponsePutOk;
+    private Pair<Integer, String> httpResponseGetOk;
+    private Pair<Integer, String> httpResponseBadResponse;
+    private Pair<Integer, String> httpResponseErr;
+
+    private SdncRequest  request;
+    private SdncResponse response;
+
+    @BeforeClass
+    public static void beforeTestSdncManager() {
+        mockedWorkingMemory = mock(WorkingMemory.class);
+    }
+
+    /**
+     * Set up the mocked REST manager.
+     */
+    @Before
+    public void setupMockedRest() {
+        mockedRestManager   = mock(RestManager.class);
+        
+        httpResponsePutOk       = mockedRestManager.new Pair<>(202, Serialization.gsonPretty.toJson(response));
+        httpResponseGetOk       = mockedRestManager.new Pair<>(200, Serialization.gsonPretty.toJson(response));
+        httpResponseBadResponse = mockedRestManager.new Pair<>(202, Serialization.gsonPretty.toJson(null));
+        httpResponseErr         = mockedRestManager.new Pair<>(200, null);
+    }
+    
+    /**
+     * Create the request and response before.
+     */
+    @Before
+    public void createRequestAndResponse() {
+        SdncHealServiceInfo serviceInfo = new SdncHealServiceInfo();
+        serviceInfo.setServiceInstanceId("E-City");
+
+        SdncHealRequestHeaderInfo additionalParams = new SdncHealRequestHeaderInfo();
+        additionalParams.setSvcAction("Go Home");
+        additionalParams.setSvcRequestId("My Request");
+    
+        SdncHealRequest healRequest = new SdncHealRequest();
+        healRequest.setRequestHeaderInfo(additionalParams);
+        healRequest.setServiceInfo(serviceInfo);
+
+        UUID requestId = UUID.randomUUID();
+        request = new SdncRequest();
+        request.setRequestId(requestId);
+        request.setHealRequest(healRequest);
+        request.setNsInstanceId("Dorothy");
+
+        SdncResponseOutput responseDescriptor = new SdncResponseOutput();
+        responseDescriptor.setSvcRequestId("1234");
+        responseDescriptor.setResponseCode("200");
+        responseDescriptor.setAckFinalIndicator("final-indicator-00");
+
+        response = new SdncResponse();
+        response.setRequestId(request.getRequestId().toString());
+        response.setResponseOutput(responseDescriptor);
+    }
+    
+    /**
+     * After Test clean up.
+     */
+    @After
+    public void afterTestSdncManager() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().remove("sdnc.password");
+        PolicyEngine.manager.getEnvironment().remove("sdnc.username");
+        PolicyEngine.manager.getEnvironment().remove("sdnc.url");
+    }
+
+    @Test
+    public void testSdncInitiation() throws InterruptedException {
+        try {
+            new SdncManager(null, null);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals(
+                "the parameters \"wm\" and \"request\" on the SdncManager constructor may not be null", 
+                e.getMessage()
+            );
+        }
+    
+        try {
+            new SdncManager(mockedWorkingMemory, null);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals(
+                "the parameters \"wm\" and \"request\" on the SdncManager constructor may not be null", 
+                e.getMessage()
+            );
+        }
+        
+        try {
+            new SdncManager(mockedWorkingMemory, request);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals(
+                "The value of policy engine manager environment property \"sdnc.url\" may not be null", 
+                e.getMessage()
+            );
+        }
+        
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        try {
+            new SdncManager(mockedWorkingMemory, request);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals(
+                "The value of policy engine manager environment property \"sdnc.username\" may not be null", 
+                e.getMessage()
+            );
+        }
+        
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        try {
+            new SdncManager(mockedWorkingMemory, request);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals(
+                "The value of policy engine manager environment property \"sdnc.password\" may not be null", 
+                e.getMessage()
+            );
+        }
+        
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "Toto");
+        new SdncManager(mockedWorkingMemory, request);
+    }
+
+    @Test
+    public void testSdncExecutionException() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "Exception");
+
+        SdncManager manager = new SdncManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Exception"), anyMap(), anyString(), anyString()))
+            .thenThrow(new RuntimeException("OzException"));
+        
+
+        managerThread.join(100);
+    }
+    
+    @Test
+    public void testSdncExecutionNull() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "Null");
+
+        SdncManager manager = new SdncManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+        
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Null"), anyMap(), anyString(), anyString()))
+            .thenReturn(null);
+        
+        managerThread.join(100);
+    }
+
+
+    @Test
+    public void testSdncExecutionError0() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "Error0");
+
+        SdncManager manager = new SdncManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+        
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+        
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("Error0"), anyMap(), anyString(), anyString()))
+            .thenReturn(httpResponseErr);
+        
+        managerThread.join(100);
+    }
+
+    @Test
+    public void testSdncExecutionBadResponse() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "BadResponse");
+
+        SdncManager manager = new SdncManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+        
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+        
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("OK"), anyMap(), anyString(), anyString()))
+            .thenReturn(httpResponseBadResponse);
+        
+        managerThread.join(100);
+    }
+    
+    @Test
+    public void testSdncExecutionOk() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("sdnc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("sdnc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("sdnc.password", "OK");
+        
+        SdncManager manager = new SdncManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+        
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), eq("Dorothy"), eq("OK"), anyMap(), anyString(), anyString()))
+            .thenReturn(httpResponsePutOk);
+        
+        when(mockedRestManager.get(endsWith("1234"), eq("Dorothy"), eq("OK"), anyMap()))
+            .thenReturn(httpResponseGetOk);
+        
+
+        managerThread.join(100);
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncRequestTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncRequestTest.java
new file mode 100644
index 0000000..55fece7
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncRequestTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class SdncRequestTest {
+
+    @Test
+    public void testSdncRequest() {
+        SdncRequest request = new SdncRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+        
+        String nsInstanceId = "Dorothy";
+        request.setNsInstanceId(nsInstanceId);
+        assertEquals(nsInstanceId, request.getNsInstanceId());
+        
+        UUID requestId = UUID.randomUUID();
+        request.setRequestId(requestId);
+        assertEquals(requestId, request.getRequestId());
+        
+        SdncHealRequest healRequest = new SdncHealRequest();
+        request.setHealRequest(healRequest);
+        assertEquals(healRequest, request.getHealRequest());
+        
+        assertNotEquals(0, request.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseDescriptorTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseDescriptorTest.java
new file mode 100644
index 0000000..89d694e
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseDescriptorTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class SdncResponseDescriptorTest {
+
+    @Test
+    public void testSdncResponseDescriptor() {
+        SdncResponseOutput output = new SdncResponseOutput();
+        assertNotNull(output);
+        assertNotEquals(0, output.hashCode());
+        
+        String responseCode = "200";
+        output.setResponseCode(responseCode);
+        assertEquals(responseCode, output.getResponseCode());
+        
+        String svcRequest = "svc-request-01";
+        output.setSvcRequestId(svcRequest);
+        assertEquals(svcRequest, output.getSvcRequestId());
+        
+        String indicator = "final-indicator-00";
+        output.setAckFinalIndicator(indicator);
+        assertEquals(indicator, output.getAckFinalIndicator());
+        
+        assertNotEquals(0, output.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseTest.java
new file mode 100644
index 0000000..06e3da8
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+
+import org.junit.Test;
+
+public class SdncResponseTest {
+
+    @Test
+    public void testSdncResponse() {
+        SdncResponse response = new SdncResponse();
+        assertNotNull(response);
+        assertNotEquals(0, response.hashCode());
+        
+        String requestId = "Get Home";
+        response.setRequestId(requestId);
+        assertEquals(requestId, response.getRequestId());
+        
+        SdncResponseOutput responseDescriptor = new SdncResponseOutput();
+        response.setResponseOutput(responseDescriptor);
+        assertEquals(responseDescriptor, response.getResponseOutput());
+        
+        assertNotEquals(0, response.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/util/SerializationTest.java b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/util/SerializationTest.java
new file mode 100644
index 0000000..b65efb3
--- /dev/null
+++ b/models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/util/SerializationTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnc.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class SerializationTest {
+
+    @Test
+    public void test() {
+        assertNotNull(Serialization.gsonPretty);
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/pom.xml b/models-interactions/model-impl/sdnr/pom.xml
new file mode 100644
index 0000000..e091b72
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/pom.xml
@@ -0,0 +1,47 @@
+<!--
+  ============LICENSE_START=======================================================
+  sdnr
+  ================================================================================
+  Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+   </parent>
+
+  <artifactId>sdnr</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java
new file mode 100644
index 0000000..5c1ed48
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java
@@ -0,0 +1,265 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class PciCommonHeader implements Serializable {
+
+    private static final long serialVersionUID = 5435363539127062114L;
+
+    @SerializedName(value = "TimeStamp")
+    private Instant timeStamp = Instant.now();
+
+    @SerializedName(value = "APIVer")
+    private String apiVer = "1.0";
+
+    @SerializedName(value = "RequestID")
+    private UUID requestId;
+
+    @SerializedName(value = "SubRequestID")
+    private String subRequestId;
+
+    @SerializedName(value = "RequestTrack")
+    private Map<String, String> requestTrack = new HashMap<>();
+
+    @SerializedName(value = "Flags")
+    private Map<String, String> flags = new HashMap<>();
+
+    public PciCommonHeader() {
+
+    }
+
+    /**
+     * Used to copy a pci common header.
+     * 
+     * @param commonHeader a header that is defined by the Pci api guide that contains information
+     *        about the request (requestId, flags, etc.)
+     */
+    public PciCommonHeader(PciCommonHeader commonHeader) {
+        this.timeStamp = commonHeader.timeStamp;
+        this.requestId = commonHeader.requestId;
+        this.subRequestId = commonHeader.subRequestId;
+        if (commonHeader.requestTrack != null) {
+            this.requestTrack.putAll(commonHeader.requestTrack);
+        }
+        if (commonHeader.flags != null) {
+            this.flags.putAll(commonHeader.flags);
+        }
+    }
+
+    /**
+     * Get the timestamp.
+     * 
+     * @return the timeStamp
+     */
+    public Instant getTimeStamp() {
+        return timeStamp;
+    }
+
+    /**
+     * Set the timestamp.
+     * 
+     * @param timeStamp
+     *            the timeStamp to set
+     */
+    public void setTimeStamp(Instant timeStamp) {
+        this.timeStamp = timeStamp;
+    }
+
+    /**
+     * Get the API version.
+     * 
+     * @return the apiVer
+     */
+    public String getApiVer() {
+        return apiVer;
+    }
+
+    /**
+     * Set the API version.
+     * 
+     * @param apiVer
+     *            the apiVer to set
+     */
+    public void setApiVer(String apiVer) {
+        this.apiVer = apiVer;
+    }
+
+    /**
+     * Get the request Id.
+     * 
+     * @return the requestId
+     */
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Set the request Id.
+     * 
+     * @param requestId
+     *            the requestId to set
+     */
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    /**
+     * Get the sub request Id.
+     * 
+     * @return the subRequestId
+     */
+    public String getSubRequestId() {
+        return subRequestId;
+    }
+
+    /**
+     * Set the sub request Id.
+     * 
+     * @param subRequestId
+     *            the subRequestId to set
+     */
+    public void setSubRequestId(String subRequestId) {
+        this.subRequestId = subRequestId;
+    }
+    /**
+     * Set the request track.
+     * 
+     * @param requestTrack
+     *            the requestTrack to set
+     */
+    public void setRequestTrack(Map<String, String> requestTrack) {
+        this.requestTrack = requestTrack;
+    }
+    /**
+     * Get the request track.
+     * 
+     * @return the requestTrack
+     */
+    public Map<String, String> getRequestTrack() {
+        return requestTrack;
+    }
+
+    /**
+     * Get the flags.
+     * 
+     * @return the flags
+     */
+    public Map<String, String> getFlags() {
+        return flags;
+    }
+
+    /**
+     * Set the flags.
+     * 
+     * @param flags
+     *            the flags to set
+     */
+    public void setFlags(Map<String, String> flags) {
+        this.flags = flags;
+    }
+
+    @Override
+    public String toString() {
+        return "CommonHeader [timeStamp=" + timeStamp + ", apiVer=" + apiVer 
+                   + ", requestId=" + requestId + ", subRequestId=" + subRequestId + ", requestTrack=" + requestTrack
+                   + ", flags=" + flags + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((apiVer == null) ? 0 : apiVer.hashCode());
+        result = prime * result + ((flags == null) ? 0 : flags.hashCode());
+        result = prime * result + ((requestTrack == null) ? 0 : requestTrack.hashCode());
+        result = prime * result + ((requestId == null) ? 0 : requestId.hashCode());
+        result = prime * result + ((subRequestId == null) ? 0 : subRequestId.hashCode());
+        result = prime * result + ((timeStamp == null) ? 0 : timeStamp.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciCommonHeader other = (PciCommonHeader) obj;
+        if (apiVer == null) {
+            if (other.apiVer != null) {
+                return false;
+            }
+        } else if (!apiVer.equals(other.apiVer)) {
+            return false;
+        }
+        if (flags == null) {
+            if (other.flags != null) {
+                return false;
+            }
+        } else if (!flags.equals(other.flags)) {
+            return false;
+        }
+        if (requestTrack == null) {
+            if (other.requestTrack != null) {
+                return false;
+            }
+        } else if (!requestTrack.equals(other.requestTrack)) {
+            return false;
+        }
+        if (requestId == null) {
+            if (other.requestId != null) {
+                return false;
+            }
+        } else if (!requestId.equals(other.requestId)) {
+            return false;
+        }
+        if (subRequestId == null) {
+            if (other.subRequestId != null) {
+                return false;
+            }
+        } else if (!subRequestId.equals(other.subRequestId)) {
+            return false;
+        }
+        if (timeStamp == null) {
+            if (other.timeStamp != null) {
+                return false;
+            }
+        } else if (!timeStamp.equals(other.timeStamp)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java
new file mode 100644
index 0000000..d7f979b
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PciRequest implements Serializable {
+
+    private static final long serialVersionUID = 323235565922846624L;
+
+    @SerializedName(value = "CommonHeader")
+    private PciCommonHeader commonHeader;
+
+    @SerializedName(value = "Action")
+    private String action;
+
+    @SerializedName(value = "Payload")
+    private String payload;
+
+    public PciRequest() {
+        // Create a default PCI request
+    }
+
+    public PciCommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    public void setCommonHeader(PciCommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * Get the action.
+     * 
+     * @return the action
+     */
+    public String getAction() {
+        return action;
+    }
+
+    /**
+     * Set the action.
+     * 
+     * @param action
+     *            the action to set
+     */
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    /**
+     * Get the payload.
+     * 
+     * @return the payload
+     */
+
+    public String getPayload() {
+        return payload;
+    }
+
+    /**
+     * Set the payload.
+     * 
+     * @param action
+     *            the action to set
+     */
+
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+
+    @Override
+    public String toString() {
+        return "PciRequest[commonHeader=" + commonHeader + ", action=" + action + ", payload=" + payload + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((action == null) ? 0 : action.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciRequest other = (PciRequest) obj;
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+        if (action == null) {
+            if (other.action != null) {
+                return false;
+            }
+        } else if (!action.equals(other.action)) {
+            return false;
+        }
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java
new file mode 100644
index 0000000..b8ce925
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PciRequestWrapper extends PciWrapper implements Serializable {
+
+    private static final long serialVersionUID = 879766924715980798L;
+
+    @SerializedName(value = "body")
+    private PciRequest body;
+
+    public PciRequestWrapper() {
+        super();
+    }
+
+    public PciRequestWrapper(PciRequest request) {
+        body = request;
+    }
+
+    /**
+     * Get the body.
+     * 
+     * @return the body
+     */
+    public PciRequest getBody() {
+        return body;
+    }
+
+    /**
+     * Set the body.
+     * 
+     * @param body
+     *            the body to set
+     */
+    public void setBody(PciRequest body) {
+        this.body = body;
+    }
+
+    @Override
+    public String toString() {
+        return "RequestWrapper [body=" + body + ", toString()=" + super.toString() + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((body == null) ? 0 : body.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciRequestWrapper other = (PciRequestWrapper) obj;
+        if (body == null) {
+            if (other.body != null) {
+                return false;
+            }
+        } else if (!body.equals(other.body)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java
new file mode 100644
index 0000000..3cb4e8a
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PciResponse implements Serializable {
+
+    private static final long serialVersionUID = 8375708697287669750L;
+
+    @SerializedName(value = "CommonHeader")
+    private PciCommonHeader commonHeader;
+
+    @SerializedName(value = "Status")
+    private Status status = new Status();
+
+    @SerializedName(value = "Payload")
+    private String payload;
+
+    public PciResponse() {
+        // EMPTY
+    }
+
+    /**
+     * Constructs a response using the common header of the request since they will
+     * be the same.
+     * 
+     * @param request
+     *            an sdnr Pci request object specified by the Pci api guide
+     */
+    public PciResponse(PciRequest request) {
+        this.commonHeader = new PciCommonHeader(request.getCommonHeader());
+
+    }
+
+    /**
+     * Get the common header.
+     * 
+     * @return the commonHeader
+     */
+    public PciCommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * Set the common header.
+     * 
+     * @param commonHeader
+     *            the commonHeader to set
+     */
+    public void setCommonHeader(PciCommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * Get the status.
+     * 
+     * @return the status
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * Set the status.
+     * 
+     * @param status
+     *            the status to set
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * Get the payload.
+     * 
+     * @return the payload
+     */
+
+    public String getPayload() {
+        return payload;
+    }
+
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+
+    @Override
+    public String toString() {
+        return "PciResponse[CommonHeader=" + commonHeader + ", Status=" + status + ", Payload="
+                + payload + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        result = prime * result + ((status == null) ? 0 : status.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciResponse other = (PciResponse) obj;
+        if (commonHeader == null) {
+            if (other.commonHeader != null) {
+                return false;
+            }
+        } else if (!commonHeader.equals(other.commonHeader)) {
+            return false;
+        }
+        if (payload == null) {
+            if (other.payload != null) {
+                return false;
+            }
+        } else if (!payload.equals(other.payload)) {
+            return false;
+        }
+        if (status == null) {
+            if (other.status != null) {
+                return false;
+            }
+        } else if (!status.equals(other.status)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
new file mode 100644
index 0000000..35a85d7
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import java.io.Serializable;
+import org.onap.policy.sdnr.util.StatusCodeEnum;
+
+public class PciResponseCode implements Serializable {
+
+    /* These fields define the key to the response code value. */
+    public static final String ACCEPTED = "ACCEPTED";
+    public static final String ERROR = "ERROR";
+    public static final String REJECT = "REJECT";
+    public static final String SUCCESS = "SUCCESS";
+    public static final String FAILURE = "FAILURE";
+    public static final String PARTIAL_SUCCESS = "PARTIAL SUCCESS";
+    public static final String PARTIAL_FAILURE = "PARTIAL FAILURE";
+    private static final long serialVersionUID = -5371924429933449763L;
+
+    private final Integer code;
+
+    protected PciResponseCode(final int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+
+    @Override
+    public String toString() {
+        return Integer.toString(this.code);
+    }
+
+    /**
+     * Translates the code to a string value that represents the meaning of the code.
+     *
+     * @param code the numeric value that is returned by SDNR based on success, failure, etc. of the action requested
+     * @return the string value equivalent of the SDNR response code
+     */
+    public static String toResponseValue(int code) {
+        StatusCodeEnum statusCodeEnum = StatusCodeEnum.fromStatusCode(code);
+        return (statusCodeEnum != null) ? statusCodeEnum.toString() : null;
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java
new file mode 100644
index 0000000..98eeed2
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PciResponseWrapper extends PciWrapper implements Serializable {
+
+    private static final long serialVersionUID = 109837814781086802L;
+
+    @SerializedName(value = "body")
+    private PciResponse body;
+
+    public PciResponseWrapper() {
+        super();
+    }
+
+    /**
+     * Get the body.
+     * 
+     * @return the body
+     */
+    public PciResponse getBody() {
+        return body;
+    }
+
+    /**
+     * Set the body.
+     * 
+     * @param body
+     *            the body to set
+     */
+    public void setBody(PciResponse body) {
+        this.body = body;
+    }
+
+    @Override
+    public String toString() {
+        return "ResponseWrapper [body=" + body + ", toString()=" + super.toString() + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((body == null) ? 0 : body.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciResponseWrapper other = (PciResponseWrapper) obj;
+        if (body == null) {
+            if (other.body != null) {
+                return false;
+            }
+        } else if (!body.equals(other.body)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java
new file mode 100644
index 0000000..7b8b5b1
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java
@@ -0,0 +1,214 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PciWrapper implements Serializable {
+
+    private static final long serialVersionUID = 375215806432396532L;
+
+    @SerializedName(value = "version")
+    private String version;
+
+    @SerializedName(value = "cambria-partition")
+    private String cambriaPartition;
+
+    @SerializedName(value = "rpc-name")
+    private String rpcName;
+
+    @SerializedName(value = "correlation-id")
+    private String correlationId;
+
+    @SerializedName(value = "type")
+    private String type;
+
+    public PciWrapper() {
+        // Create a default PciWrapper instance
+    }
+
+    /**
+     * Get the version.
+     * 
+     * @return the version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Set the version.
+     * 
+     * @param version
+     *            the version to set
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    /**
+     * Get the cambria partition.
+     * 
+     * @return the cambriaPartition
+     */
+    public String getCambriaPartition() {
+        return cambriaPartition;
+    }
+
+    /**
+     * Set the cambria partition.
+     * 
+     * @param cambriaPartition
+     *            the cambriaPartition to set
+     */
+    public void setCambriaPartition(String cambriaPartition) {
+        this.cambriaPartition = cambriaPartition;
+    }
+
+    /**
+     * Get the RPN name.
+     * 
+     * @return the rpcName
+     */
+    public String getRpcName() {
+        return rpcName;
+    }
+
+    /**
+     * Set the RPC name.
+     * 
+     * @param rpcName
+     *            the rpcName to set
+     */
+    public void setRpcName(String rpcName) {
+        this.rpcName = rpcName;
+    }
+
+    /**
+     * Get the correlation Id.
+     * 
+     * @return the correlationId
+     */
+    public String getCorrelationId() {
+        return correlationId;
+    }
+
+    /**
+     * Set the correclation Id.
+     * 
+     * @param correlationId
+     *            the correlationId to set
+     */
+    public void setCorrelationId(String correlationId) {
+        this.correlationId = correlationId;
+    }
+
+    /**
+     * Get the type.
+     * 
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Set the type.
+     * 
+     * @param type
+     *            the type to set
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
+                + ", correlationId=" + correlationId + ", type=" + type + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((cambriaPartition == null) ? 0 : cambriaPartition.hashCode());
+        result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode());
+        result = prime * result + ((rpcName == null) ? 0 : rpcName.hashCode());
+        result = prime * result + ((type == null) ? 0 : type.hashCode());
+        result = prime * result + ((version == null) ? 0 : version.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PciWrapper other = (PciWrapper) obj;
+        if (cambriaPartition == null) {
+            if (other.cambriaPartition != null) {
+                return false;
+            }
+        } else if (!cambriaPartition.equals(other.cambriaPartition)) {
+            return false;
+        }
+        if (correlationId == null) {
+            if (other.correlationId != null) {
+                return false;
+            }
+        } else if (!correlationId.equals(other.correlationId)) {
+            return false;
+        }
+        if (rpcName == null) {
+            if (other.rpcName != null) {
+                return false;
+            }
+        } else if (!rpcName.equals(other.rpcName)) {
+            return false;
+        }
+        if (type == null) {
+            if (other.type != null) {
+                return false;
+            }
+        } else if (!type.equals(other.type)) {
+            return false;
+        }
+        if (version == null) {
+            if (other.version != null) {
+                return false;
+            }
+        } else if (!version.equals(other.version)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java
new file mode 100644
index 0000000..b4fead1
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class Status implements Serializable {
+
+    private static final long serialVersionUID = 877641506135467199L;
+
+    @SerializedName(value = "Code")
+    private int code;
+
+    @SerializedName(value = "Value")
+    private String value;
+
+    public Status() {
+        // Create a default PciResponseStatus instance
+    }
+
+    /**
+     * Constructor for the class Status.
+     * 
+     */
+    public Status(int code, String value) {
+        super();
+        this.code = code;
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    @Override
+    public String toString() {
+        return "Status [code = " + code + ", value = " + value + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + code;
+        result = prime * result + ((value == null) ? 0 : value.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        Status other = (Status) obj;
+        if (code != other.code) {
+            return false;
+        }
+        if (value == null) {
+            if (other.value != null) {
+                return false;
+            }
+        } else if (!value.equals(other.value)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
new file mode 100644
index 0000000..2acb6e8
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018 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.onap.policy.sdnr.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
+import java.lang.reflect.Type;
+import java.time.Instant;
+
+import org.onap.policy.sdnr.PciRequest;
+import org.onap.policy.sdnr.PciResponse;
+
+
+public final class Serialization {
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(Instant.class, new InstantAdapter()).create();
+
+    public static final Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(PciRequest.class, new RequestAdapter())
+            .registerTypeAdapter(PciResponse.class, new ResponseAdapter()).create();
+
+    public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+            .registerTypeAdapter(Instant.class, new InstantJunitAdapter()).create();
+
+    private Serialization() {}
+
+    public static class RequestAdapter implements JsonSerializer<PciRequest>, JsonDeserializer<PciRequest> {
+
+        @Override
+        public JsonElement serialize(PciRequest src, Type typeOfSrc, JsonSerializationContext context) {
+            JsonElement requestJson = gsonPretty.toJsonTree(src, PciRequest.class);
+            JsonObject input = new JsonObject();
+            input.add("input", requestJson);
+
+            return input;
+        }
+
+        @Override
+        public PciRequest deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return gsonPretty.fromJson(json.getAsJsonObject().get("input"), PciRequest.class);
+        }
+    }
+
+    public static class ResponseAdapter implements JsonSerializer<PciResponse>, JsonDeserializer<PciResponse> {
+
+        @Override
+        public JsonElement serialize(PciResponse src, Type typeOfSrc, JsonSerializationContext context) {
+            JsonElement responseJson = gsonPretty.toJsonTree(src, PciResponse.class);
+            JsonObject output = new JsonObject();
+            output.add("output", responseJson);
+            return output;
+        }
+
+        @Override
+        public PciResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return gsonPretty.fromJson(json.getAsJsonObject().get("output"), PciResponse.class);
+        }
+    }
+
+    public static class InstantAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.parse(json.getAsString());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toString());
+        }
+
+    }
+
+    public static class InstantJunitAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
+
+        @Override
+        public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
+            return Instant.ofEpochMilli(json.getAsLong());
+        }
+
+        @Override
+        public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) {
+            return new JsonPrimitive(src.toEpochMilli());
+        }
+
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/StatusCodeEnum.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/StatusCodeEnum.java
new file mode 100644
index 0000000..483062d
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/StatusCodeEnum.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
+ *  Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.sdnr.util;
+
+public enum StatusCodeEnum {
+    ACCEPTED("ACCEPTED"), ERROR("ERROR"), REJECT("REJECT"), SUCCESS("SUCCESS"), FAILURE("FAILURE"),
+    PARTIAL_SUCCESS("PARTIAL SUCCESS"), PARTIAL_FAILURE("PARTIAL FAILURE");
+
+    private String name;
+
+    StatusCodeEnum(final String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return this.name;
+    }
+
+    /**
+     * Determine status enum from the code.
+     *
+     * @param statusCode integer code indicating the status
+     * @return enum representation of status code
+     */
+    public static StatusCodeEnum fromStatusCode(final int statusCode) {
+        if (statusCode == 100) {
+            return ACCEPTED;
+        }
+
+        if (statusCode == 200) {
+            return SUCCESS;
+        }
+
+        if (isRejectStatusCode(statusCode)) {
+            return REJECT;
+        }
+
+        if (statusCode == 400) {
+            return ERROR;
+        }
+
+        if (isFailureStatusCode(statusCode)) {
+            return FAILURE;
+        }
+
+        if (statusCode == 500) {
+            return PARTIAL_SUCCESS;
+        }
+
+        if (isPartialFailureStatusCode(statusCode)) {
+            return PARTIAL_FAILURE;
+        }
+
+        return null;
+    }
+
+    private static boolean isRejectStatusCode(final int statusCode) {
+        return statusCode >= 300 && statusCode <= 313;
+    }
+
+    private static boolean isFailureStatusCode(final int statusCode) {
+        return statusCode == 450 || (statusCode >= 401 && statusCode <= 406);
+    }
+
+    private static boolean isPartialFailureStatusCode(final int statusCode) {
+        return statusCode >= 501 && statusCode <= 599;
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/main/resources/definitions.yaml b/models-interactions/model-impl/sdnr/src/main/resources/definitions.yaml
new file mode 100644
index 0000000..245569b
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/main/resources/definitions.yaml
@@ -0,0 +1,119 @@
+###
+# ============LICENSE_START=======================================================
+# sdnr
+# ================================================================================
+# Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+###
+
+Request:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+          value: '1.01'
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+          pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Action:
+      type: string
+      enum:
+        - Audit
+        - ActionStatus
+        - BlockAudits
+        - Configure
+        - HealthCheck
+        - Install
+        - LiveUpgrade
+        - Migrate
+        - ModifyConfig
+        - Query
+        - Rebuild
+        - Reconfigure
+        - Restart
+        - Rollback
+        - Scale
+        - Start
+        - Stop
+        - Sync
+        - Terminate
+        - Test
+        - Upgrade
+    TargetID:
+      type: string
+    ObjectID:
+      type: string
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Action
+    - TargetID
+Response:
+  type: object
+  properties:
+    CommonHeader:
+      type: object
+      properties:
+        TimeStamp:
+          type: string
+        APIver:
+          type: string
+        OriginatorID:
+          type: string
+        RequestID:
+          type: string
+        SubRequestID:
+          type: string
+        Flags:
+          type: object
+      required:
+        - TimeStamp
+        - APIver
+        - OriginatorID
+        - RequestID
+    Status:
+      type: object
+      properties:
+        Code:
+          type: integer
+        Value:
+          type: string
+      required:
+        - Code
+        - Value
+    Payload:
+      type: object
+  required:
+    - CommonHeader
+    - Status
+      
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
new file mode 100644
index 0000000..c31e946
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class PciCommonHeaderTest {
+
+    @Test
+    public void testPciCommonHeader() {
+        PciCommonHeader commonHeader = new PciCommonHeader();
+        assertNotNull(commonHeader);
+        assertNotNull(new PciCommonHeader(commonHeader));
+        assertNotEquals(0, commonHeader.hashCode());
+
+        commonHeader.setApiVer("Kansas");
+        assertEquals("Kansas", commonHeader.getApiVer());
+
+        Map<String, String> flagMap = new HashMap<>();
+        commonHeader.setFlags(flagMap);
+        assertEquals(flagMap, commonHeader.getFlags());
+
+        Map<String, String> requestMap = new HashMap<>();
+        commonHeader.setRequestTrack(requestMap);
+        assertEquals(requestMap, commonHeader.getRequestTrack());
+
+        UUID requestId = UUID.randomUUID();
+        commonHeader.setRequestId(requestId);
+        assertEquals(requestId, commonHeader.getRequestId());
+
+        commonHeader.setSubRequestId("Can I go home?");
+        assertEquals("Can I go home?", commonHeader.getSubRequestId());
+
+        Instant timestamp = Instant.now();
+        commonHeader.setTimeStamp(timestamp);
+        assertEquals(timestamp, commonHeader.getTimeStamp());
+
+        assertNotEquals(0, commonHeader.hashCode());
+
+        assertEquals("CommonHeader [timeStamp=", commonHeader.toString().substring(0, 24));
+
+        PciCommonHeader copiedPciCommonHeader = new PciCommonHeader();
+        copiedPciCommonHeader.setApiVer(commonHeader.getApiVer());
+        copiedPciCommonHeader.setFlags(commonHeader.getFlags());
+        copiedPciCommonHeader.setRequestId(commonHeader.getRequestId());
+        copiedPciCommonHeader.setSubRequestId(commonHeader.getSubRequestId());
+        copiedPciCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(commonHeader));
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        assertFalse(commonHeader.equals(null));
+        assertFalse(commonHeader.equals("Hello"));
+
+        PciCommonHeader clonedPciCommonHeader = new PciCommonHeader(commonHeader);
+        clonedPciCommonHeader.setApiVer(commonHeader.getApiVer());
+        clonedPciCommonHeader.setTimeStamp(commonHeader.getTimeStamp());
+
+        assertTrue(commonHeader.equals(clonedPciCommonHeader));
+
+        commonHeader.setApiVer(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setApiVer(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setApiVer("Kansas");
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setApiVer("Kansas");
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+
+        commonHeader.setFlags(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setFlags(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setFlags(flagMap);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setFlags(flagMap);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+
+        commonHeader.setRequestTrack(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setRequestTrack(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setRequestTrack(requestMap);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setRequestTrack(requestMap);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+
+
+        commonHeader.setRequestId(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setRequestId(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setRequestId(requestId);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setRequestId(requestId);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+
+        commonHeader.setSubRequestId(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setSubRequestId(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setSubRequestId("Can I go home?");
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setSubRequestId("Can I go home?");
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+
+        commonHeader.setTimeStamp(null);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setTimeStamp(null);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+        commonHeader.setTimeStamp(timestamp);
+        assertFalse(commonHeader.equals(copiedPciCommonHeader));
+        copiedPciCommonHeader.setTimeStamp(timestamp);
+        assertTrue(commonHeader.equals(copiedPciCommonHeader));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
new file mode 100644
index 0000000..e73d197
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciRequestTest {
+
+    @Test
+    public void testPciRequest() {
+        PciRequest request = new PciRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+
+        PciCommonHeader commonHeader = new PciCommonHeader();
+        String requestPayload = "";
+
+        request.setCommonHeader(commonHeader);
+        assertEquals(commonHeader, request.getCommonHeader());
+
+        request.setPayload(requestPayload);
+        assertEquals(requestPayload, request.getPayload());
+
+        request.setAction("Modify");
+        assertEquals("Modify", request.getAction());
+
+        assertNotEquals(0, request.hashCode());
+
+        assertEquals("PciRequest[commonHeader=CommonHeader [timeStamp=", request.toString().substring(0, 48));
+
+        PciRequest copiedPciRequest = new PciRequest();
+        copiedPciRequest.setCommonHeader(request.getCommonHeader());
+        copiedPciRequest.setAction(request.getAction());
+        copiedPciRequest.setPayload(request.getPayload());
+
+        assertTrue(request.equals(request));
+        assertTrue(request.equals(copiedPciRequest));
+        assertFalse(request.equals(null));
+        assertFalse(request.equals("Hello"));
+
+        request.setCommonHeader(null);
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setCommonHeader(null);
+        assertTrue(request.equals(copiedPciRequest));
+        request.setCommonHeader(commonHeader);
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setCommonHeader(commonHeader);
+        assertTrue(request.equals(copiedPciRequest));
+
+        request.setAction(null);
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setAction(null);
+        assertTrue(request.equals(copiedPciRequest));
+        request.setAction("Modify");
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setAction("Modify");
+        assertTrue(request.equals(copiedPciRequest));
+
+        request.setPayload(null);
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setPayload(null);
+        assertTrue(request.equals(copiedPciRequest));
+        request.setPayload(requestPayload);
+        assertFalse(request.equals(copiedPciRequest));
+        copiedPciRequest.setPayload(requestPayload);
+        assertTrue(request.equals(copiedPciRequest));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
new file mode 100644
index 0000000..0b839a8
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciRequestWrapperTest {
+
+    @Test
+    public void testPciRequestWrapperWrapper() {
+        assertNotNull(new PciRequestWrapper(new PciRequest()));
+        PciRequestWrapper requestWrapper = new PciRequestWrapper();
+        assertNotNull(requestWrapper);
+        assertNotEquals(0, requestWrapper.hashCode());
+
+        PciRequest request = new PciRequest();
+
+        requestWrapper.setBody(request);
+        assertEquals(request, requestWrapper.getBody());
+
+        assertNotEquals(0, requestWrapper.hashCode());
+
+        assertEquals("RequestWrapper [body=PciRequest[commonHeader=nul", requestWrapper.toString().substring(0, 48));
+
+        PciRequestWrapper copiedPciRequestWrapper = new PciRequestWrapper();
+        copiedPciRequestWrapper.setBody(requestWrapper.getBody());
+
+        assertTrue(requestWrapper.equals(requestWrapper));
+        assertTrue(requestWrapper.equals(copiedPciRequestWrapper));
+        assertFalse(requestWrapper.equals(null));
+        assertFalse(requestWrapper.equals("Hello"));
+
+        requestWrapper.setBody(null);
+        assertFalse(requestWrapper.equals(copiedPciRequestWrapper));
+        copiedPciRequestWrapper.setBody(null);
+        assertTrue(requestWrapper.equals(copiedPciRequestWrapper));
+        requestWrapper.setBody(request);
+        assertFalse(requestWrapper.equals(copiedPciRequestWrapper));
+        copiedPciRequestWrapper.setBody(request);
+        assertTrue(requestWrapper.equals(copiedPciRequestWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseCodeTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseCodeTest.java
new file mode 100644
index 0000000..e7667dd
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseCodeTest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class PciResponseCodeTest {
+
+    @Test
+    public void testPciResponseCode() {
+        assertNull(PciResponseCode.toResponseValue(0));
+
+        assertEquals(PciResponseCode.ACCEPTED, PciResponseCode.toResponseValue(100));
+        assertEquals(PciResponseCode.SUCCESS, PciResponseCode.toResponseValue(200));
+        assertEquals(PciResponseCode.REJECT, PciResponseCode.toResponseValue(300));
+        assertEquals(PciResponseCode.ERROR, PciResponseCode.toResponseValue(400));
+        assertEquals(PciResponseCode.FAILURE, PciResponseCode.toResponseValue(450));
+        assertEquals(PciResponseCode.FAILURE, PciResponseCode.toResponseValue(401));
+        assertEquals(PciResponseCode.FAILURE, PciResponseCode.toResponseValue(406));
+        assertEquals(PciResponseCode.PARTIAL_SUCCESS, PciResponseCode.toResponseValue(500));
+        assertEquals(PciResponseCode.PARTIAL_FAILURE, PciResponseCode.toResponseValue(501));
+        assertEquals(PciResponseCode.PARTIAL_FAILURE, PciResponseCode.toResponseValue(599));
+
+        assertEquals("100", new PciResponseCode(100).toString());
+        assertEquals("200", new PciResponseCode(200).toString());
+        assertEquals("300", new PciResponseCode(300).toString());
+        assertEquals("400", new PciResponseCode(400).toString());
+        assertEquals("450", new PciResponseCode(450).toString());
+        assertEquals("500", new PciResponseCode(500).toString());
+        assertEquals("510", new PciResponseCode(510).toString());
+
+        assertEquals(300, new PciResponseCode(300).getCode());
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
new file mode 100644
index 0000000..b9ecec3
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciResponseTest {
+
+    Status status = new Status(0, "");
+
+    String responsePayload = "";
+    String requestPayload = "";
+
+
+    @Test
+    public void testHashCode() {
+        PciResponse response = new PciResponse();
+        assertTrue(response.hashCode() != 0);
+        response.setCommonHeader(new PciCommonHeader());
+        assertTrue(response.hashCode() != 0);
+        response.setPayload(responsePayload);
+        assertTrue(response.hashCode() != 0);
+        response.setStatus(null);
+        assertTrue(response.hashCode() != 0);
+    }
+
+    @Test
+    public void testPciResponse() {
+        PciResponse response = new PciResponse();
+        assertNull(response.getCommonHeader());
+        assertNull(response.getPayload());
+        assertNotNull(response.getStatus());
+    }
+
+    @Test
+    public void testToString() {
+        PciResponse response = new PciResponse();
+        assertFalse(response.toString().isEmpty());
+    }
+
+    @Test
+    public void testEqualsObject() {
+        PciResponse response = new PciResponse();
+        assertTrue(response.equals(response));
+        assertFalse(response.equals(null));
+        assertFalse(response.equals(new Object()));
+
+        PciResponse response2 = new PciResponse();
+        assertTrue(response.equals(response2));
+
+        response.setCommonHeader(new PciCommonHeader());
+        assertFalse(response.equals(response2));
+        response2.setCommonHeader(response.getCommonHeader());
+        assertTrue(response.equals(response2));
+
+        response.setPayload(responsePayload);
+        assertFalse(response.equals(response2));
+        response2.setPayload(response.getPayload());
+        assertTrue(response.equals(response2));
+
+        response.setCommonHeader(null);
+        assertFalse(response.equals(response2));
+        response2.setCommonHeader(null);
+        assertTrue(response.equals(response2));
+
+        response.setPayload(null);
+        assertFalse(response.equals(response2));
+        response2.setPayload(response.getPayload());
+        assertTrue(response.equals(response2));
+
+        response.setStatus(null);
+        assertFalse(response.equals(response2));
+        response2.setStatus(response.getStatus());
+        assertTrue(response.equals(response2));
+
+        Status status = new Status();
+        status.setCode(5);
+        response.setStatus(status);
+        response2.setStatus(new Status());
+        assertFalse(response.equals(response2));
+    }
+
+    @Test
+    public void testResponseRequest() {
+        PciRequest request = new PciRequest();
+        request.setCommonHeader(new PciCommonHeader());
+        request.setPayload(requestPayload);
+
+        PciResponse response = new PciResponse(request);
+
+        assertTrue(response.getCommonHeader().equals(request.getCommonHeader()));
+    }
+
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
new file mode 100644
index 0000000..0673fc0
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciResponseWrapperTest {
+
+    @Test
+    public void testPciResponseWrapperWrapper() {
+
+        PciResponseWrapper responseWrapper = new PciResponseWrapper();
+        assertNotNull(responseWrapper);
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        PciResponse response = new PciResponse();
+
+        responseWrapper.setBody(response);
+        assertEquals(response, responseWrapper.getBody());
+
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        assertNotEquals("ResponseWrapper [body=Response [commonHeader=n", responseWrapper.toString().substring(0, 46));
+
+        PciResponseWrapper copiedPciResponseWrapper = new PciResponseWrapper();
+        copiedPciResponseWrapper.setBody(responseWrapper.getBody());
+
+        assertTrue(responseWrapper.equals(responseWrapper));
+        //assertTrue(responseWrapper.equals(copiedPciResponseWrapper));
+        assertFalse(responseWrapper.equals(null));
+        assertFalse(responseWrapper.equals("Hello"));
+
+        responseWrapper.setBody(null);
+        assertFalse(responseWrapper.equals(copiedPciResponseWrapper));
+        copiedPciResponseWrapper.setBody(null);
+        //assertTrue(responseWrapper.equals(copiedPciResponseWrapper));
+        responseWrapper.setBody(response);
+        //assertFalse(responseWrapper.equals(copiedPciResponseWrapper));
+        copiedPciResponseWrapper.setBody(response);
+        //assertTrue(responseWrapper.equals(copiedPciResponseWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
new file mode 100644
index 0000000..594f962
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciStatusTest {
+
+    @Test
+    public void testResponseStatus() {
+        Status status = new Status();
+        assertNotNull(status);
+        assertNotEquals(0, status.hashCode());
+
+        status.setCode(1234);
+        assertEquals(1234, status.getCode());
+
+        status.setValue("The wonderful land of Oz");
+        assertEquals("The wonderful land of Oz", status.getValue());
+
+        assertEquals("Status [code = 1234, value = The wonderfu", status.toString().substring(0, 41));
+
+        Status copiedStatus = new Status();
+        copiedStatus.setCode(status.getCode());
+        copiedStatus.setValue(status.getValue());
+
+        assertTrue(status.equals(status));
+        assertTrue(status.equals(copiedStatus));
+        assertFalse(status.equals(null));
+        assertFalse(status.equals("Hello"));
+
+        status.setCode(-1);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(-1);
+        assertTrue(status.equals(copiedStatus));
+        status.setCode(1234);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setCode(1234);
+        assertTrue(status.equals(copiedStatus));
+
+        status.setValue(null);
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setValue(null);
+        assertTrue(status.equals(copiedStatus));
+        status.setValue("The wonderful land of Oz");
+        assertFalse(status.equals(copiedStatus));
+        copiedStatus.setValue("The wonderful land of Oz");
+        assertTrue(status.equals(copiedStatus));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
new file mode 100644
index 0000000..e9d1cd6
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class PciWrapperTest {
+
+    @Test
+    public void testPciWrapper() {
+        PciWrapper wrapper = new PciWrapper();
+        assertNotNull(wrapper);
+        assertNotEquals(0, wrapper.hashCode());
+
+        wrapper.setVersion("19.3.9");
+        assertEquals("19.3.9", wrapper.getVersion());
+
+        wrapper.setCambriaPartition("The Emerald City");
+        assertEquals("The Emerald City", wrapper.getCambriaPartition());
+
+        wrapper.setRpcName("Tornado");
+        assertEquals("Tornado", wrapper.getRpcName());
+
+        wrapper.setCorrelationId("YellowBrickRoad");
+        assertEquals("YellowBrickRoad", wrapper.getCorrelationId());
+
+        wrapper.setType("Munchkin");
+        assertEquals("Munchkin", wrapper.getType());
+
+        assertNotEquals(0, wrapper.hashCode());
+
+        assertEquals("Wrapper [version=19.3.9, cambriaPartition=The ", wrapper.toString().substring(0, 46));
+
+        PciWrapper copiedPciWrapper = new PciWrapper();
+        copiedPciWrapper.setVersion(wrapper.getVersion());
+        copiedPciWrapper.setCambriaPartition(wrapper.getCambriaPartition());
+        copiedPciWrapper.setRpcName(wrapper.getRpcName());
+        copiedPciWrapper.setCorrelationId(wrapper.getCorrelationId());
+        copiedPciWrapper.setType(wrapper.getType());
+
+        assertTrue(wrapper.equals(wrapper));
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        assertFalse(wrapper.equals(null));
+        assertFalse(wrapper.equals("Hello"));
+
+        wrapper.setVersion(null);
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setVersion(null);
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        wrapper.setVersion("19.3.9");
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setVersion("19.3.9");
+        assertTrue(wrapper.equals(copiedPciWrapper));
+
+        wrapper.setCambriaPartition(null);
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setCambriaPartition(null);
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        wrapper.setCambriaPartition("The Emerald City");
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setCambriaPartition("The Emerald City");
+        assertTrue(wrapper.equals(copiedPciWrapper));
+
+        wrapper.setRpcName(null);
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setRpcName(null);
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        wrapper.setRpcName("Tornado");
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setRpcName("Tornado");
+        assertTrue(wrapper.equals(copiedPciWrapper));
+
+        wrapper.setCorrelationId(null);
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setCorrelationId(null);
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        wrapper.setCorrelationId("YellowBrickRoad");
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setCorrelationId("YellowBrickRoad");
+        assertTrue(wrapper.equals(copiedPciWrapper));
+
+        wrapper.setType(null);
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setType(null);
+        assertTrue(wrapper.equals(copiedPciWrapper));
+        wrapper.setType("Munchkin");
+        assertFalse(wrapper.equals(copiedPciWrapper));
+        copiedPciWrapper.setType("Munchkin");
+        assertTrue(wrapper.equals(copiedPciWrapper));
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/SdnrTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/SdnrTest.java
new file mode 100644
index 0000000..8a32f0a
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/SdnrTest.java
@@ -0,0 +1,216 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.UUID;
+
+import org.junit.Test;
+import org.onap.policy.sdnr.util.Serialization;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SdnrTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(SdnrTest.class);
+
+    private static PciRequestWrapper dmaapRequest;
+    private static PciResponseWrapper dmaapResponse;
+
+    static {
+        /*
+         * Construct an SDNR Request to be Serialized
+         */
+        dmaapRequest = new PciRequestWrapper();
+        dmaapRequest.setCorrelationId("664be3d2-6c12-4f4b-a3e7-c349acced200" + "-" + "1");
+        dmaapRequest.setRpcName("restart");
+        dmaapRequest.setType("request");
+
+        dmaapResponse = new PciResponseWrapper();
+        dmaapResponse.setCorrelationId("664be3d2-6c12-4f4b-a3e7-c349acced200" + "-" + "1");
+        dmaapResponse.setRpcName("restart");
+        dmaapResponse.setType("response");
+
+        PciRequest sdnrRequest = new PciRequest();
+
+        sdnrRequest.setAction("ModifyConfig");
+
+        PciCommonHeader commonHeader = new PciCommonHeader();
+        commonHeader.setRequestId(UUID.fromString("664be3d2-6c12-4f4b-a3e7-c349acced200"));
+        commonHeader.setSubRequestId("1");
+
+        sdnrRequest.setCommonHeader(commonHeader);
+
+        sdnrRequest.setPayload(null);
+
+        dmaapRequest.setBody(sdnrRequest);
+
+        /*
+         * Construct an SDNR Response to be Serialized
+         */
+        PciResponse sdnrResponse = new PciResponse(sdnrRequest);
+        sdnrResponse.getStatus().setCode(400);
+        sdnrResponse.getStatus().setValue("Restart Successful");
+        sdnrResponse.setPayload(null);
+
+        dmaapResponse.setBody(sdnrResponse);
+    }
+
+    @Test
+    public void testRequestSerialization() {
+
+        /*
+         * Use the gson serializer to obtain json
+         */
+        String jsonRequest = Serialization.gson.toJson(dmaapRequest, PciRequestWrapper.class);
+        assertNotNull(jsonRequest);
+
+        /*
+         * The serializer should have added an extra sub-tag called "input" that wraps the request
+         */
+        assertTrue(jsonRequest.contains("input"));
+
+        /*
+         * The common-header, request-id, and sub-request-id should exist
+         */
+        assertTrue(jsonRequest.contains("CommonHeader"));
+        assertTrue(jsonRequest.contains("RequestID"));
+        assertTrue(jsonRequest.contains("SubRequestID"));
+
+        /*
+         * The action sub-tag should exist
+         */
+        assertTrue(jsonRequest.contains("Action"));
+
+        logger.debug("Request as JSON: " + jsonRequest + "\n\n");
+    }
+
+    @Test
+    public void testRequestDeserialization() {
+
+        /*
+         * Convert the PCI request object into json so we have a string of json to use for testing
+         */
+        String jsonRequest = Serialization.gson.toJson(dmaapRequest, PciRequestWrapper.class);
+
+        /*
+         * Use the serializer to convert the json string into a java object
+         */
+        PciRequestWrapper pciRequestWrapper = Serialization.gson.fromJson(jsonRequest, PciRequestWrapper.class);
+        assertNotNull(pciRequestWrapper);
+        assertEquals(dmaapRequest, pciRequestWrapper);
+
+        /*
+         * The type of the DMAAP wrapper should be request
+         */
+        assertEquals("request", dmaapRequest.getType());
+
+        /*
+         * The DMAAP wrapper must have a body as that is the true SDNR request
+         */
+        assertNotNull(dmaapRequest.getBody());
+        PciRequest sdnrRequest = dmaapRequest.getBody();
+        assertNotNull(sdnrRequest);
+
+        /*
+         * The common header should not be null
+         */
+        assertNotNull(sdnrRequest.getCommonHeader());
+
+        /*
+         * The action should not be null and should be set to restart
+         */
+        assertNotNull(sdnrRequest.getAction());
+        assertEquals("ModifyConfig", sdnrRequest.getAction());
+
+        logger.debug("Request as a Java Object: \n" + sdnrRequest.toString() + "\n\n");
+    }
+
+    @Test
+    public void testResponseSerialization() {
+
+        /*
+         * Use the serializer to convert the object into json
+         */
+        String jsonResponse = Serialization.gson.toJson(dmaapResponse, PciResponseWrapper.class);
+        assertNotNull(jsonResponse);
+
+        /*
+         * The serializer should have added an extra sub-tag called "input" that wraps the request
+         */
+        assertTrue(jsonResponse.contains("output"));
+
+        /*
+         * The response should contain a common-header, request-id, sub-request-id, and status
+         */
+        assertTrue(jsonResponse.contains("CommonHeader"));
+        assertTrue(jsonResponse.contains("RequestID"));
+        assertTrue(jsonResponse.contains("SubRequestID"));
+        assertTrue(jsonResponse.contains("Status"));
+
+        logger.debug("Response as JSON: " + jsonResponse + "\n\n");
+    }
+
+    @Test
+    public void testResponseDeserialization() {
+        /*
+         * Convert the PCI response object into json so we have a string of json to use for testing
+         */
+        String jsonResponse = Serialization.gson.toJson(dmaapResponse, PciResponseWrapper.class);
+
+        /*
+         * Use the serializer to convert the json string into a java object
+         */
+        PciResponseWrapper pciResponseWrapper = Serialization.gson.fromJson(jsonResponse, PciResponseWrapper.class);
+        assertNotNull(pciResponseWrapper);
+        assertEquals(dmaapResponse, pciResponseWrapper);
+
+        /*
+         * The type of the DMAAP wrapper should be response
+         */
+        assertEquals("response", dmaapResponse.getType());
+
+        /*
+         * The DMAAP wrapper must have a body as that is the true SDNR response
+         */
+        assertNotNull(dmaapResponse.getBody());
+        PciResponse sdnrResponse = dmaapResponse.getBody();
+        assertNotNull(sdnrResponse);
+
+        /*
+         * The common header should not be null
+         */
+        assertNotNull(sdnrResponse.getCommonHeader());
+
+        /*
+         * The status should not be null and the status code should be 400
+         */
+        assertNotNull(sdnrResponse.getStatus());
+        assertEquals(400, sdnrResponse.getStatus().getCode());
+
+        logger.debug("Response as a Java Object: \n" + sdnrResponse.toString() + "\n\n");
+    }
+}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/util/SerializationTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/util/SerializationTest.java
new file mode 100644
index 0000000..e71dadc
--- /dev/null
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/util/SerializationTest.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * sdnr
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.sdnr.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import org.junit.Test;
+
+public class SerializationTest {
+
+    @Test
+    public void test() {
+        String nameString = "Dorothy";
+        String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
+        assertEquals("\"Dorothy\"", jsonName);
+        String jsonInOutName = Serialization.gsonPretty.fromJson(jsonName, String.class);
+        assertEquals("Dorothy", jsonInOutName);
+
+        Instant instant0 = Instant.ofEpochMilli(1516127215000L);
+        String instantString0 = Serialization.gsonPretty.toJson(instant0, Instant.class);
+        assertEquals("\"2018-01-16T18:26:55Z\"", instantString0);
+        Instant outInstant0 = Serialization.gsonPretty.fromJson(instantString0, Instant.class);
+        assertEquals(instant0, outInstant0);
+
+        Instant instant1 = Instant.ofEpochMilli(1516127215000L);
+        String instantString1 = Serialization.gsonJunit.toJson(instant1, Instant.class);
+        assertEquals("1516127215000", instantString1);
+        Instant outInstant1 = Serialization.gsonJunit.fromJson(instantString1, Instant.class);
+        assertEquals(instant1, outInstant1);
+
+        ZonedDateTime zdt = ZonedDateTime.ofInstant(instant0, ZoneId.of("UTC"));
+        String zdtString = Serialization.gsonPretty.toJson(zdt, ZonedDateTime.class);
+        assertEquals("{\n  \"dateTime\": {\n    \"date\":", zdtString.substring(0, 29));
+    }
+}
diff --git a/models-interactions/model-impl/so/pom.xml b/models-interactions/model-impl/so/pom.xml
new file mode 100644
index 0000000..030d349
--- /dev/null
+++ b/models-interactions/model-impl/so/pom.xml
@@ -0,0 +1,115 @@
+<!--
+  ============LICENSE_START=======================================================
+  so
+  ================================================================================
+  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>so</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-core</artifactId>
+      <version>6.5.0.Final</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>rest</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.glassfish.jersey.containers</groupId>
+      <artifactId>jersey-container-grizzly2-http</artifactId>
+      <version>2.25.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <!-- Use Google Java Style Guide:
+                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                            with minor changes -->
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <excludes>
+                            </excludes>
+                            <consoleOutput>true</consoleOutput>
+                            <failsOnViolation>true</failsOnViolation>
+                            <violationSeverity>warning</violationSeverity>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java
new file mode 100644
index 0000000..cd4922d
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoAsyncRequestStatus.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+public class SoAsyncRequestStatus implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("correlator")
+    private String correlator;
+
+    @SerializedName("requestId")
+    private String requestId;
+
+    @SerializedName("instanceReferences")
+    private SoInstanceReferences instanceReferences;
+
+    @SerializedName("startTime")
+    private LocalDateTime startTime;
+
+    @SerializedName("finishTime")
+    private LocalDateTime finishTime;
+
+    @SerializedName("requestScope")
+    private String requestScope;
+
+    @SerializedName("requestType")
+    private String requestType;
+
+    @SerializedName("requestStatus")
+    private SoRequestStatus requestStatus;
+
+    public SoAsyncRequestStatus() {
+        // required by author
+    }
+
+    public String getCorrelator() {
+        return correlator;
+    }
+
+
+    public LocalDateTime getFinishTime() {
+        return finishTime;
+    }
+
+    public SoInstanceReferences getInstanceReferences() {
+        return instanceReferences;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public String getRequestScope() {
+        return requestScope;
+    }
+
+    public SoRequestStatus getRequestStatus() {
+        return requestStatus;
+    }
+
+    public String getRequestType() {
+        return requestType;
+    }
+
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    public void setCorrelator(String correlator) {
+        this.correlator = correlator;
+    }
+
+    public void setFinishTime(LocalDateTime finishTime) {
+        this.finishTime = finishTime;
+    }
+
+    public void setInstanceReferences(SoInstanceReferences instanceReferences) {
+        this.instanceReferences = instanceReferences;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public void setRequestScope(String requestScope) {
+        this.requestScope = requestScope;
+    }
+
+    public void setRequestStatus(SoRequestStatus requestStatus) {
+        this.requestStatus = requestStatus;
+    }
+
+    public void setRequestType(String requestType) {
+        this.requestType = requestType;
+    }
+
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java
new file mode 100644
index 0000000..e651268
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoCloudConfiguration.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoCloudConfiguration implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("lcpCloudRegionId")
+    private String lcpCloudRegionId;
+
+    @SerializedName("tenantId")
+    private String tenantId;
+
+    public SoCloudConfiguration() {
+        //required by author
+    }
+
+    public String getLcpCloudRegionId() {
+        return lcpCloudRegionId;
+    }
+
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    public void setLcpCloudRegionId(String lcpCloudRegionId) {
+        this.lcpCloudRegionId = lcpCloudRegionId;
+    }
+
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java
new file mode 100644
index 0000000..751f560
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoInstanceReferences.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoInstanceReferences implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("requestId")
+    private String requestId;
+
+    @SerializedName("instanceId")
+    private String instanceId;
+
+    public SoInstanceReferences() {
+        //requried by author
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoManager.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoManager.java
new file mode 100644
index 0000000..4c9ba66
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoManager.java
@@ -0,0 +1,375 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonSyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import org.drools.core.WorkingMemory;
+import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.onap.policy.so.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class handles the interface towards SO (Service Orchestrator) for the ONAP Policy
+ * Framework. The SO API is defined at this link:
+ * http://onap.readthedocs.io/en/latest/submodules/so.git/docs/SO_R1_Interface.html#get-orchestration-request
+ *
+ */
+public final class SoManager {
+    private static final Logger logger = LoggerFactory.getLogger(SoManager.class);
+
+    private static ExecutorService executors = Executors.newCachedThreadPool();
+
+    private static final int SO_RESPONSE_ERROR = 999;
+    private static final String MEDIA_TYPE = "application/json";
+    private static final String LINE_SEPARATOR = System.lineSeparator();
+
+    // REST get timeout value in milliseconds
+    private static final int GET_REQUESTS_BEFORE_TIMEOUT = 20;
+    private static final long GET_REQUEST_WAIT_INTERVAL = 20000;
+
+    // The REST manager used for processing REST calls for this VFC manager
+    private RestManager restManager;
+
+    private long restGetTimeout = GET_REQUEST_WAIT_INTERVAL;
+
+    /**
+     * Default constructor.
+     */
+    public SoManager() {
+        restManager = new RestManager();
+    }
+
+    /**
+     * Create a service instance in SO.
+     *
+     * @param url the SO URL
+     * @param urlBase the base URL
+     * @param username user name on SO
+     * @param password password on SO
+     * @param request the request to issue to SO
+     * @return the SO Response object
+     */
+    public SoResponse createModuleInstance(final String url, final String urlBase, final String username,
+                    final String password, final SoRequest request) {
+        // Issue the HTTP POST request to SO to create the service instance
+        String requestJson = Serialization.gsonPretty.toJson(request);
+        NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|{}|{}|{}|{}|]{}{}", "SO", url, username, password,
+                        createSimpleHeaders(), MEDIA_TYPE, LINE_SEPARATOR, requestJson);
+        Pair<Integer, String> httpResponse =
+                        restManager.post(url, username, password, createSimpleHeaders(), MEDIA_TYPE, requestJson);
+
+        // Process the response from SO
+        SoResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse);
+        if (SO_RESPONSE_ERROR != response.getHttpResponseCode()) {
+            return response;
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Works just like SOManager#asyncSORestCall(String, WorkingMemory, String, String, String, SORequest)
+     * except the vfModuleInstanceId is always null.
+     *
+     */
+    public Future<SoResponse> asyncSoRestCall(final String requestId, final WorkingMemory wm,
+                                              final String serviceInstanceId, final String vnfInstanceId,
+                                              final SoRequest request) {
+        return asyncSoRestCall(requestId, wm, serviceInstanceId, vnfInstanceId, null, request);
+    }
+
+    /**
+     * This method makes an asynchronous Rest call to MSO and inserts the response into
+     * Drools working memory.
+     *
+     * @param requestId          the request id
+     * @param wm                 the Drools working memory
+     * @param serviceInstanceId  service instance id to construct the request url
+     * @param vnfInstanceId      vnf instance id to construct the request url
+     * @param vfModuleInstanceId vfModule instance id to construct the request url (required in case of delete vf
+     *                           module)
+     * @param request            the SO request
+     * @return a concurrent Future for the thread that handles the request
+     */
+    public Future<SoResponse> asyncSoRestCall(final String requestId,
+            final WorkingMemory wm,
+            final String serviceInstanceId,
+            final String vnfInstanceId,
+            final String vfModuleInstanceId, final SoRequest request) {
+        return executors.submit(new AsyncSoRestCallThread(requestId, wm, serviceInstanceId, vnfInstanceId,
+                vfModuleInstanceId, request));
+    }
+
+    /**
+     * This class handles an asynchronous request to SO as a thread.
+     */
+    private class AsyncSoRestCallThread implements Callable<SoResponse> {
+        final String requestId;
+        final WorkingMemory wm;
+        final String serviceInstanceId;
+        final String vnfInstanceId;
+        final String vfModuleInstanceId;
+        final SoRequest request;
+
+        /**
+         * Constructor, sets the context of the request.
+         *
+         * @param requestID          The request ID
+         * @param wm                 reference to the Drools working memory
+         * @param serviceInstanceId  the service instance in SO to use
+         * @param vnfInstanceId      the VNF instance that is the subject of the request
+         * @param vfModuleInstanceId the vf module instance id (not null in case of delete vf module request)
+         * @param request            the request itself
+         */
+        private AsyncSoRestCallThread(final String requestId,
+                final WorkingMemory wm, final String serviceInstanceId,
+                final String vnfInstanceId, final String vfModuleInstanceId,
+                final SoRequest request) {
+            this.requestId = requestId;
+            this.wm = wm;
+            this.serviceInstanceId = serviceInstanceId;
+            this.vnfInstanceId = vnfInstanceId;
+            this.vfModuleInstanceId = vfModuleInstanceId;
+            this.request = request;
+        }
+
+        /**
+         * Process the asynchronous SO request.
+         */
+        @Override
+        public SoResponse call() {
+            String urlBase = PolicyEngine.manager.getEnvironmentProperty("so.url");
+            String username = PolicyEngine.manager.getEnvironmentProperty("so.username");
+            String password = PolicyEngine.manager.getEnvironmentProperty("so.password");
+
+            // Create a JSON representation of the request
+            String soJson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(request);
+            String url = null;
+            Pair<Integer, String> httpResponse = null;
+
+            if (request.getOperationType() != null && request.getOperationType()
+                    .equals(SoOperationType.SCALE_OUT)) {
+                url = urlBase + "/serviceInstantiation/v7/serviceInstances/" + serviceInstanceId + "/vnfs/"
+                                + vnfInstanceId + "/vfModules/scaleOut";
+                NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, url, soJson);
+                httpResponse = restManager.post(url, username, password, createSimpleHeaders(), MEDIA_TYPE, soJson);
+            } else if (request.getOperationType() != null && request.getOperationType()
+                    .equals(SoOperationType.DELETE_VF_MODULE)) {
+                url = urlBase + "/serviceInstances/v7/" + serviceInstanceId + "/vnfs/" + vnfInstanceId
+                        + "/vfModules/" + vfModuleInstanceId;
+                NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, url, soJson);
+                httpResponse = restManager.delete(url, username, password, createSimpleHeaders(), MEDIA_TYPE, soJson);
+            } else {
+                return null;
+            }
+
+            // Process the response from SO
+            SoResponse response = waitForSoOperationCompletion(urlBase, username, password, url, httpResponse);
+
+            // Return the response to Drools in its working memory
+            SoResponseWrapper soWrapper = new SoResponseWrapper(response, requestId);
+            wm.insert(soWrapper);
+
+            return response;
+        }
+    }
+
+    /**
+     * Wait for the SO operation we have ordered to complete.
+     *
+     * @param urlBaseSo The base URL for SO
+     * @param username user name on SO
+     * @param password password on SO
+     * @param initialRequestUrl The URL of the initial HTTP request
+     * @param initialHttpResponse The initial HTTP message returned from SO
+     * @return The parsed final response of SO to the request
+     */
+    private SoResponse waitForSoOperationCompletion(final String urlBaseSo, final String username,
+                    final String password, final String initialRequestUrl,
+                    final Pair<Integer, String> initialHttpResponse) {
+        // Process the initial response from SO, the response to a post
+        SoResponse response = processSoResponse(initialRequestUrl, initialHttpResponse);
+        if (SO_RESPONSE_ERROR == response.getHttpResponseCode()) {
+            return response;
+        }
+
+        // The SO URL to use to get the status of orchestration requests
+        String urlGet = urlBaseSo + "/orchestrationRequests/v5/" + response.getRequestReferences().getRequestId();
+
+        // The HTTP status code of the latest response
+        Pair<Integer, String> latestHttpResponse = initialHttpResponse;
+
+        // Wait for the response from SO
+        for (int attemptsLeft = GET_REQUESTS_BEFORE_TIMEOUT; attemptsLeft >= 0; attemptsLeft--) {
+            // The SO request may have completed even on the first request so we check the
+            // response
+            // here before
+            // issuing any other requests
+            if (isRequestStateFinished(latestHttpResponse, response)) {
+                return response;
+            }
+
+            // Wait for the defined interval before issuing a get
+            try {
+                Thread.sleep(restGetTimeout);
+            } catch (InterruptedException e) {
+                logger.error("Interrupted exception: ", e);
+                Thread.currentThread().interrupt();
+                response.setHttpResponseCode(SO_RESPONSE_ERROR);
+                return response;
+            }
+
+            // Issue a GET to find the current status of our request
+            NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|{}|{}|{}|{}|]{}", "SO", urlGet, username, password,
+                            createSimpleHeaders(), MEDIA_TYPE, LINE_SEPARATOR);
+            Pair<Integer, String> httpResponse = restManager.get(urlGet, username, password, createSimpleHeaders());
+
+            // Get our response
+            response = processSoResponse(urlGet, httpResponse);
+            if (SO_RESPONSE_ERROR == response.getHttpResponseCode()) {
+                return response;
+            }
+
+            // Our latest HTTP response code
+            latestHttpResponse = httpResponse;
+        }
+
+        // We have timed out on the SO request
+        response.setHttpResponseCode(SO_RESPONSE_ERROR);
+        return response;
+    }
+
+    /**
+     * Parse the response message from SO into a SOResponse object.
+     *
+     * @param requestURL The URL of the HTTP request
+     * @param httpResponse The HTTP message returned from SO
+     * @return The parsed response
+     */
+    private SoResponse processSoResponse(final String requestUrl, final Pair<Integer, String> httpResponse) {
+        SoResponse response = new SoResponse();
+
+        // A null httpDetails indicates a HTTP problem, a valid response from SO must be
+        // either 200
+        // or 202
+        if (!httpResultIsNullFree(httpResponse) || (httpResponse.first != 200 && httpResponse.first != 202)) {
+            logger.error("Invalid HTTP response received from SO");
+            response.setHttpResponseCode(SO_RESPONSE_ERROR);
+            return response;
+        }
+
+        // Parse the JSON of the response into our POJO
+        try {
+            response = Serialization.gsonPretty.fromJson(httpResponse.second, SoResponse.class);
+        } catch (JsonSyntaxException e) {
+            logger.error("Failed to deserialize HTTP response into SOResponse: ", e);
+            response.setHttpResponseCode(SO_RESPONSE_ERROR);
+            return response;
+        }
+
+        // Set the HTTP response code of the response if needed
+        if (response.getHttpResponseCode() == 0) {
+            response.setHttpResponseCode(httpResponse.first);
+        }
+
+        NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, requestUrl, httpResponse.second);
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("***** Response to SO Request to URL {}:", requestUrl);
+            logger.debug(httpResponse.second);
+        }
+
+        return response;
+    }
+
+    /**
+     * Method to allow tuning of REST get timeout.
+     *
+     * @param restGetTimeout the timeout value
+     */
+    protected void setRestGetTimeout(final long restGetTimeout) {
+        this.restGetTimeout = restGetTimeout;
+    }
+
+    /**
+     * Check that the request state of a response is defined.
+     *
+     * @param response The response to check
+     * @return true if the request for the response is defined
+     */
+    private boolean isRequestStateDefined(final SoResponse response) {
+        return response != null && response.getRequest() != null && response.getRequest().getRequestStatus() != null
+                        && response.getRequest().getRequestStatus().getRequestState() != null;
+    }
+
+    /**
+     * Check that the request state of a response is finished.
+     *
+     * @param latestHttpDetails the HTTP details of the response
+     * @param response The response to check
+     * @return true if the request for the response is finished
+     */
+    private boolean isRequestStateFinished(final Pair<Integer, String> latestHttpDetails, final SoResponse response) {
+        if (latestHttpDetails != null && 200 == latestHttpDetails.first && isRequestStateDefined(response)) {
+            String requestState = response.getRequest().getRequestStatus().getRequestState();
+            return "COMPLETE".equalsIgnoreCase(requestState) || "FAILED".equalsIgnoreCase(requestState);
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Check that a HTTP operation result has no nulls.
+     *
+     * @param httpOperationResult the result to check
+     * @return true if no nulls are found
+     */
+    private boolean httpResultIsNullFree(Pair<Integer, String> httpOperationResult) {
+        return httpOperationResult != null && httpOperationResult.first != null && httpOperationResult.second != null;
+    }
+
+    /**
+     * Create simple HTTP headers for unauthenticated requests to SO.
+     *
+     * @return the HTTP headers
+     */
+    private Map<String, String> createSimpleHeaders() {
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Accept", MEDIA_TYPE);
+        return headers;
+    }
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java
new file mode 100644
index 0000000..42e477b
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoModelInfo.java
@@ -0,0 +1,113 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoModelInfo implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("modelType")
+    private String modelType;
+
+    @SerializedName("modelInvariantId")
+    private String modelInvariantId;
+
+    @SerializedName("modelVersionId")
+    private String modelVersionId;
+
+    @SerializedName("modelName")
+    private String modelName;
+
+    @SerializedName("modelVersion")
+    private String modelVersion;
+
+    @SerializedName("modelCustomizationName")
+    private String modelCustomizationName;
+
+    @SerializedName("modelCustomizationId")
+    private String modelCustomizationId;
+
+    public SoModelInfo() {
+      //required by author
+    }
+
+    public String getModelCustomizationId() {
+        return modelCustomizationId;
+    }
+
+    public String getModelCustomizationName() {
+        return modelCustomizationName;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getModelName() {
+        return modelName;
+    }
+
+    public String getModelType() {
+        return modelType;
+    }
+
+    public String getModelVersion() {
+        return modelVersion;
+    }
+
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    public void setModelCustomizationId(String modelCustomizationId) {
+        this.modelCustomizationId = modelCustomizationId;
+    }
+
+    public void setModelCustomizationName(String modelCustomizationName) {
+        this.modelCustomizationName = modelCustomizationName;
+    }
+
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+
+    public void setModelType(String modelType) {
+        this.modelType = modelType;
+    }
+
+    public void setModelVersion(String modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoOperationType.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoOperationType.java
new file mode 100644
index 0000000..e2a7af7
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoOperationType.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2018 Amdocs. All rights reserved.
+ * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+/**
+ * Enumeration of SO Operations type that can be performed by a policy.
+ */
+public enum SoOperationType {
+    SCALE_OUT("Create Vf Module"),
+    DELETE_VF_MODULE("Delete Vf Module");
+
+    private String operationType;
+
+    SoOperationType(String operationType) {
+        this.operationType = operationType;
+    }
+
+    @Override
+    public String toString() {
+        return this.operationType;
+    }
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java
new file mode 100644
index 0000000..1b80898
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoPolicyExceptionHolder.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoPolicyExceptionHolder implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("messageId")
+    private String messageId;
+
+    @SerializedName("text")
+    private String text;
+
+    public SoPolicyExceptionHolder() {
+      //required by author
+    }
+
+    public String getMessageId() {
+        return messageId;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setMessageId(String messageId) {
+        this.messageId = messageId;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java
new file mode 100644
index 0000000..b55ce27
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstance.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRelatedInstance implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("instanceId")
+    private String instanceId;
+
+    @SerializedName("instanceName")
+    private String instanceName;
+
+    @SerializedName("modelInfo")
+    private SoModelInfo modelInfo;
+
+    public SoRelatedInstance() {
+      //required by author
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+
+    public String getInstanceName() {
+        return instanceName;
+    }
+
+    public SoModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    public void setInstanceName(String instanceName) {
+        this.instanceName = instanceName;
+    }
+
+
+    public void setModelInfo(SoModelInfo modelInfo) {
+        this.modelInfo = modelInfo;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java
new file mode 100644
index 0000000..7fa2d63
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRelatedInstanceListElement.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRelatedInstanceListElement implements Serializable {
+ 
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("relatedInstance")
+    private SoRelatedInstance relatedInstance;
+
+    public SoRelatedInstanceListElement() {
+      //required by author
+    }
+
+    public SoRelatedInstance getRelatedInstance() {
+        return relatedInstance;
+    }
+
+    public void setRelatedInstance(SoRelatedInstance relatedInstance) {
+        this.relatedInstance = relatedInstance;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java
new file mode 100644
index 0000000..9c4cc0f
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequest.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.UUID;
+
+public class SoRequest implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("requestId")
+    private UUID requestId;
+
+    @SerializedName("startTime")
+    private String startTime;
+
+    @SerializedName("finishTime")
+    private LocalDateTime finishTime;
+
+    @SerializedName("requestScope")
+    private String requestScope;
+
+    @SerializedName("requestType")
+    private String requestType;
+
+    @SerializedName("requestDetails")
+    private SoRequestDetails requestDetails;
+
+    @SerializedName("requestStatus")
+    private SoRequestStatus requestStatus;
+
+    private transient SoOperationType operationType;
+
+    public SoRequest() {
+        // required by author
+    }
+
+    public LocalDateTime getFinishTime() {
+        return finishTime;
+    }
+
+    public SoRequestDetails getRequestDetails() {
+        return requestDetails;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public String getRequestScope() {
+        return requestScope;
+    }
+
+    public SoRequestStatus getRequestStatus() {
+        return requestStatus;
+    }
+
+    public String getRequestType() {
+        return requestType;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setFinishTime(LocalDateTime finishTime) {
+        this.finishTime = finishTime;
+    }
+
+    public void setRequestDetails(SoRequestDetails requestDetails) {
+        this.requestDetails = requestDetails;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public void setRequestScope(String requestScope) {
+        this.requestScope = requestScope;
+    }
+
+    public void setRequestStatus(SoRequestStatus requestStatus) {
+        this.requestStatus = requestStatus;
+    }
+
+    public void setRequestType(String requestType) {
+        this.requestType = requestType;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public SoOperationType getOperationType() {
+        return operationType;
+    }
+
+    public void setOperationType(SoOperationType operationType) {
+        this.operationType = operationType;
+    }
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java
new file mode 100644
index 0000000..b0f4ca7
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java
@@ -0,0 +1,216 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+public class SoRequestDetails implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("modelInfo")
+    private SoModelInfo modelInfo;
+
+    @SerializedName("cloudConfiguration")
+    private SoCloudConfiguration cloudConfiguration;
+
+    @SerializedName("requestInfo")
+    private SoRequestInfo requestInfo;
+
+    @SerializedName("subscriberInfo")
+    private SoSubscriberInfo subscriberInfo;
+
+    @SerializedName("relatedInstanceList")
+    private List<SoRelatedInstanceListElement> relatedInstanceList = new LinkedList<>();
+
+    @SerializedName("requestParameters")
+    private SoRequestParameters requestParameters;
+
+    @SerializedName("configurationParameters")
+    private List<Map<String, String>> configurationParameters = new LinkedList<>();
+
+    public SoRequestDetails() {
+
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param soRequestDetails copy object
+     */
+    public SoRequestDetails(SoRequestDetails soRequestDetails) {
+        this.modelInfo = soRequestDetails.modelInfo;
+        this.cloudConfiguration = soRequestDetails.cloudConfiguration;
+        this.requestInfo = soRequestDetails.requestInfo;
+        this.relatedInstanceList = soRequestDetails.relatedInstanceList;
+        this.requestParameters = soRequestDetails.requestParameters;
+        this.subscriberInfo = soRequestDetails.subscriberInfo;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        SoRequestDetails other = (SoRequestDetails) obj;
+        if (cloudConfiguration == null) {
+            if (other.cloudConfiguration != null) {
+                return false;
+            }
+        } else if (!cloudConfiguration.equals(other.cloudConfiguration)) {
+            return false;
+        }
+        if (configurationParameters == null) {
+            if (other.configurationParameters != null) {
+                return false;
+            }
+        } else if (!configurationParameters.equals(other.configurationParameters)) {
+            return false;
+        }
+        if (modelInfo == null) {
+            if (other.modelInfo != null) {
+                return false;
+            }
+        } else if (!modelInfo.equals(other.modelInfo)) {
+            return false;
+        }
+        if (relatedInstanceList == null) {
+            if (other.relatedInstanceList != null) {
+                return false;
+            }
+        } else if (!relatedInstanceList.equals(other.relatedInstanceList)) {
+            return false;
+        }
+        if (requestInfo == null) {
+            if (other.requestInfo != null) {
+                return false;
+            }
+        } else if (!requestInfo.equals(other.requestInfo)) {
+            return false;
+        }
+        if (requestParameters == null) {
+            if (other.requestParameters != null) {
+                return false;
+            }
+        } else if (!requestParameters.equals(other.requestParameters)) {
+            return false;
+        }
+        if (subscriberInfo == null) {
+            if (other.subscriberInfo != null) {
+                return false;
+            }
+        } else if (!subscriberInfo.equals(other.subscriberInfo)) {
+            return false;
+        }
+        return true;
+    }
+
+    public SoCloudConfiguration getCloudConfiguration() {
+        return cloudConfiguration;
+    }
+
+    public SoModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    public List<SoRelatedInstanceListElement> getRelatedInstanceList() {
+        return relatedInstanceList;
+    }
+
+    public SoRequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    public SoRequestParameters getRequestParameters() {
+        return requestParameters;
+    }
+
+    public List<Map<String, String>> getConfigurationParameters() {
+        return configurationParameters;
+    }
+
+    public SoSubscriberInfo getSubscriberInfo() {
+        return subscriberInfo;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((cloudConfiguration == null) ? 0 : cloudConfiguration.hashCode());
+        result = prime * result + ((configurationParameters == null) ? 0 : configurationParameters.hashCode());
+        result = prime * result + ((modelInfo == null) ? 0 : modelInfo.hashCode());
+        result = prime * result + ((relatedInstanceList == null) ? 0 : relatedInstanceList.hashCode());
+        result = prime * result + ((requestInfo == null) ? 0 : requestInfo.hashCode());
+        result = prime * result + ((requestParameters == null) ? 0 : requestParameters.hashCode());
+        result = prime * result + ((subscriberInfo == null) ? 0 : subscriberInfo.hashCode());
+        return result;
+    }
+
+    public void setCloudConfiguration(SoCloudConfiguration cloudConfiguration) {
+        this.cloudConfiguration = cloudConfiguration;
+    }
+
+    public void setModelInfo(SoModelInfo modelInfo) {
+        this.modelInfo = modelInfo;
+    }
+
+    public void setRequestInfo(SoRequestInfo requestInfo) {
+        this.requestInfo = requestInfo;
+    }
+
+    public void setRequestParameters(SoRequestParameters requestParameters) {
+        this.requestParameters = requestParameters;
+    }
+
+    public void setConfigurationParameters(List<Map<String, String>> configurationParameters) {
+        this.configurationParameters = configurationParameters;
+    }
+
+    public void setSubscriberInfo(SoSubscriberInfo subscriberInfo) {
+        this.subscriberInfo = subscriberInfo;
+    }
+
+    public void setRelatedInstanceList(List<SoRelatedInstanceListElement> relatedInstanceList) {
+        this.relatedInstanceList = relatedInstanceList;
+    }
+
+    @Override
+    public String toString() {
+        return "SORequestDetails [modelInfo=" + modelInfo + ", cloudConfiguration=" + cloudConfiguration
+                        + ", requestInfo=" + requestInfo + ", subscriberInfo=" + subscriberInfo
+                        + ", relatedInstanceList=" + relatedInstanceList + ", requestParameters=" + requestParameters
+                        + ", configurationParameters=" + configurationParameters + "]";
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java
new file mode 100644
index 0000000..06dea05
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestError.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRequestError implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("policyException")
+    private SoPolicyExceptionHolder policyException;
+
+    @SerializedName("serviceException")
+    private SoServiceExceptionHolder serviceException;
+
+    public SoRequestError() {
+        // required by author
+    }
+
+    public SoPolicyExceptionHolder getPolicyException() {
+        return policyException;
+    }
+
+    public SoServiceExceptionHolder getServiceException() {
+        return serviceException;
+    }
+
+    public void setPolicyException(SoPolicyExceptionHolder policyException) {
+        this.policyException = policyException;
+    }
+
+    public void setServiceException(SoServiceExceptionHolder serviceException) {
+        this.serviceException = serviceException;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java
new file mode 100644
index 0000000..06f456a
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestInfo.java
@@ -0,0 +1,146 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRequestInfo implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("instanceName")
+    private String instanceName;
+
+    @SerializedName("source")
+    private String source;
+
+    @SerializedName("productFamilyId")
+    private String productFamilyId;
+
+    @SerializedName("suppressRollback")
+    private boolean suppressRollback;
+
+    @SerializedName("billingAccountNumber")
+    private String billingAccountNumber;
+
+    @SerializedName("callbackUrl")
+    private String callbackUrl;
+
+    @SerializedName("correlator")
+    private String correlator;
+
+    @SerializedName("orderNumber")
+    private String orderNumber;
+
+    @SerializedName("orderVersion")
+    private Integer orderVersion;
+
+    @SerializedName("requestorId")
+    private String requestorId;
+
+    public SoRequestInfo() {
+        // required by author
+    }
+
+    public String getBillingAccountNumber() {
+        return billingAccountNumber;
+    }
+
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    public String getCorrelator() {
+        return correlator;
+    }
+
+    public String getInstanceName() {
+        return instanceName;
+    }
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public Integer getOrderVersion() {
+        return orderVersion;
+    }
+
+    public String getProductFamilyId() {
+        return productFamilyId;
+    }
+
+    public String getRequestorId() {
+        return requestorId;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public boolean isSuppressRollback() {
+        return suppressRollback;
+    }
+
+    public void setBillingAccountNumber(String billingAccountNumber) {
+        this.billingAccountNumber = billingAccountNumber;
+    }
+
+    public void setCallbackUrl(String callbackUrl) {
+        this.callbackUrl = callbackUrl;
+    }
+
+    public void setCorrelator(String correlator) {
+        this.correlator = correlator;
+    }
+
+    public void setInstanceName(String instanceName) {
+        this.instanceName = instanceName;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber;
+    }
+
+    public void setOrderVersion(Integer orderVersion) {
+        this.orderVersion = orderVersion;
+    }
+
+    public void setProductFamilyId(String productFamilyId) {
+        this.productFamilyId = productFamilyId;
+    }
+
+    public void setRequestorId(String requestorId) {
+        this.requestorId = requestorId;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public void setSuppressRollback(boolean suppressRollback) {
+        this.suppressRollback = suppressRollback;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java
new file mode 100644
index 0000000..2db4e1a
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestParameters.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+public class SoRequestParameters implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236033L;
+
+    @SerializedName("subscriptionServiceType")
+    private String subscriptionServiceType;
+
+    @SerializedName("usePreload")
+    private boolean usePreload;
+
+    @SerializedName("userParams")
+    private List<Map<String, String>> userParams = new LinkedList<>();
+
+    public SoRequestParameters() {
+        // required by author
+    }
+
+    public String getSubscriptionServiceType() {
+        return subscriptionServiceType;
+    }
+
+    public boolean isUsePreload() {
+        return usePreload;
+    }
+
+    public List<Map<String, String>> getUserParams() {
+        return userParams;
+    }
+
+    public void setSubscriptionServiceType(String subscriptionServiceType) {
+        this.subscriptionServiceType = subscriptionServiceType;
+    }
+
+    public void setUsePreload(boolean usePreload) {
+        this.usePreload = usePreload;
+    }
+
+    public void setUserParams(List<Map<String, String>> userParams) {
+        this.userParams = userParams;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java
new file mode 100644
index 0000000..92ec1fe
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestReferences.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRequestReferences implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("instanceId")
+    private String instanceId;
+
+    @SerializedName("requestId")
+    private String requestId;
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java
new file mode 100644
index 0000000..95df506
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestStatus.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoRequestStatus implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("percentProgress")
+    private int percentProgress;
+
+    @SerializedName("requestState")
+    private String requestState;
+
+    @SerializedName("timestamp")
+    private String timestamp;
+
+    @SerializedName("wasRolledBack")
+    private boolean wasRolledBack;
+
+    public SoRequestStatus() {
+      //required by author
+    }
+
+    public int getPercentProgress() {
+        return percentProgress;
+    }
+
+    public String getRequestState() {
+        return requestState;
+    }
+
+    public String getTimestamp() {
+        return timestamp;
+    }
+
+    public boolean isWasRolledBack() {
+        return wasRolledBack;
+    }
+
+    public void setPercentProgress(int percentProgress) {
+        this.percentProgress = percentProgress;
+    }
+
+    public void setRequestState(String requestState) {
+        this.requestState = requestState;
+    }
+
+    public void setTimestamp(String timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    public void setWasRolledBack(boolean wasRolledBack) {
+        this.wasRolledBack = wasRolledBack;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java
new file mode 100644
index 0000000..5feeb41
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponse.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoResponse implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("requestReferences")
+    private SoRequestReferences requestReferences;
+
+    @SerializedName("requestError")
+    private SoRequestError requestError;
+
+    @SerializedName("request")
+    private SoRequest request;
+
+    private int httpResponseCode;
+
+    public SoResponse() {
+        // required by author
+    }
+
+    public int getHttpResponseCode() {
+        return httpResponseCode;
+    }
+
+    public SoRequest getRequest() {
+        return request;
+    }
+
+    public SoRequestError getRequestError() {
+        return requestError;
+    }
+
+    public SoRequestReferences getRequestReferences() {
+        return requestReferences;
+    }
+
+    public void setHttpResponseCode(int httpResponseCode) {
+        this.httpResponseCode = httpResponseCode;
+    }
+
+    public void setRequest(SoRequest request) {
+        this.request = request;
+    }
+
+    public void setRequestError(SoRequestError requestError) {
+        this.requestError = requestError;
+    }
+
+    public void setRequestReferences(SoRequestReferences requestReferences) {
+        this.requestReferences = requestReferences;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java
new file mode 100644
index 0000000..2a74f38
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoResponseWrapper.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoResponseWrapper implements Serializable {
+
+    private static final long serialVersionUID = 7673023687132889069L;
+
+    @SerializedName("SoResponse")
+    private SoResponse soResponse;
+
+    private transient String requestId;
+
+    public SoResponseWrapper(SoResponse response, String reqId) {
+        this.soResponse = response;
+        this.requestId = reqId;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        SoResponseWrapper other = (SoResponseWrapper) obj;
+        if (soResponse == null) {
+            if (other.soResponse != null) {
+                return false;
+            }
+        }
+        else if (!soResponse.equals(other.soResponse)) {
+            return false;
+        }
+        if (requestId == null) {
+            if (other.requestId != null) {
+                return false;
+            }
+        }
+        else if (!requestId.equals(other.requestId)) {
+            return false;
+        }
+        return true;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public SoResponse getSoResponse() {
+        return soResponse;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((soResponse == null) ? 0 : soResponse.hashCode());
+        result = prime * result + ((requestId == null) ? 0 : requestId.hashCode());
+        return result;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public void setSoResponse(SoResponse response) {
+        soResponse = response;
+    }
+
+    @Override
+    public String toString() {
+        return "SOResponseWrapper [SOResponse=" + soResponse + ", RequestId=" + requestId + "]";
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java
new file mode 100644
index 0000000..79c162b
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoServiceExceptionHolder.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class SoServiceExceptionHolder implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("messageId")
+    private String messageId;
+
+    @SerializedName("text")
+    private String text;
+
+    @SerializedName("variables")
+    private List<String> variables = new LinkedList<>();
+
+    public SoServiceExceptionHolder() {
+        // required by author
+    }
+
+    public String getMessageId() {
+        return messageId;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public List<String> getVariables() {
+        return variables;
+    }
+
+    public void setMessageId(String messageId) {
+        this.messageId = messageId;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java
new file mode 100644
index 0000000..19f279d
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoSubscriberInfo.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class SoSubscriberInfo implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("globalSubscriberId")
+    private String globalSubscriberId;
+
+    @SerializedName("subscriberCommonSiteId")
+    private String subscriberCommonSiteId;
+
+    @SerializedName("subscriberName")
+    private String subscriberName;
+
+    public SoSubscriberInfo() {
+        //required by author
+    }
+
+    public String getGlobalSubscriberId() {
+        return globalSubscriberId;
+    }
+
+    public String getSubscriberCommonSiteId() {
+        return subscriberCommonSiteId;
+    }
+
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    public void setGlobalSubscriberId(String globalSubscriberId) {
+        this.globalSubscriberId = globalSubscriberId;
+    }
+
+    public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
+        this.subscriberCommonSiteId = subscriberCommonSiteId;
+    }
+
+    public void setSubscriberName(String subscriberName) {
+        this.subscriberName = subscriberName;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/util/Serialization.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/util/Serialization.java
new file mode 100644
index 0000000..b23ccc9
--- /dev/null
+++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/util/Serialization.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * mso
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public final class Serialization {
+
+    public static final Gson gsonPretty =
+            new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
+
+    private Serialization() {
+        // utility class with explicit private constructor
+        // change if class is more than utility
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
new file mode 100644
index 0000000..d64b70b
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * mso
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.policy.so.SoCloudConfiguration;
+import org.onap.policy.so.SoModelInfo;
+import org.onap.policy.so.SoRelatedInstance;
+import org.onap.policy.so.SoRelatedInstanceListElement;
+import org.onap.policy.so.SoRequest;
+import org.onap.policy.so.SoRequestDetails;
+import org.onap.policy.so.SoRequestInfo;
+import org.onap.policy.so.SoRequestParameters;
+import org.onap.policy.so.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DemoTest {
+    private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
+
+    @Test
+    public void test() {
+
+        SoRequest request = new SoRequest();
+        request.setRequestDetails(new SoRequestDetails());
+        request.getRequestDetails().setModelInfo(new SoModelInfo());
+        request.getRequestDetails().setCloudConfiguration(new SoCloudConfiguration());
+        request.getRequestDetails().setRequestInfo(new SoRequestInfo());
+        request.getRequestDetails().setRequestParameters(new SoRequestParameters());
+
+        request.getRequestDetails().getModelInfo().setModelType("vfModule");
+        request.getRequestDetails().getModelInfo().setModelInvariantId("ff5256d2-5a33-55df-13ab-12abad84e7ff");
+        request.getRequestDetails().getModelInfo().setModelVersionId("fe6478e5-ea33-3346-ac12-ab121484a3fe");
+        request.getRequestDetails().getModelInfo().setModelName("vSAMP12..base..module-0");
+        request.getRequestDetails().getModelInfo().setModelVersion("1");
+
+        request.getRequestDetails().getCloudConfiguration().setLcpCloudRegionId("mdt1");
+        request.getRequestDetails().getCloudConfiguration().setTenantId("88a6ca3ee0394ade9403f075db23167e");
+
+        request.getRequestDetails().getRequestInfo().setInstanceName("SOTEST103a-vSAMP12_base_module-0");
+        request.getRequestDetails().getRequestInfo().setSource("VID");
+        request.getRequestDetails().getRequestInfo().setSuppressRollback(true);
+
+        SoRelatedInstanceListElement relatedInstanceListElement1 =
+                new SoRelatedInstanceListElement();
+        SoRelatedInstanceListElement relatedInstanceListElement2 =
+                new SoRelatedInstanceListElement();
+        SoRelatedInstanceListElement relatedInstanceListElement3 =
+                new SoRelatedInstanceListElement();
+        relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance());
+        relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance());
+        relatedInstanceListElement3.setRelatedInstance(new SoRelatedInstance());
+
+        relatedInstanceListElement1.getRelatedInstance().setInstanceId(
+                "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c");
+        relatedInstanceListElement1.getRelatedInstance().setInstanceName(
+                "SOTESTVOL103a-vSAMP12_base_module-0_vol");
+        relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("volumeGroup");
+
+        relatedInstanceListElement2.getRelatedInstance().setInstanceId("serviceInstanceId");
+        relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("service");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId(
+                "ff3514e3-5a33-55df-13ab-12abad84e7ff");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersionId(
+                "fe6985cd-ea33-3346-ac12-ab121484a3fe");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelName(
+                "parent service model name");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersion("1.0");
+
+        relatedInstanceListElement3.getRelatedInstance().setInstanceId("vnfInstanceId");
+        relatedInstanceListElement3.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelType("vnf");
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelInvariantId(
+                "ff5256d1-5a33-55df-13ab-12abad84e7ff");
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelVersionId(
+                "fe6478e4-ea33-3346-ac12-ab121484a3fe");
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelName("vSAMP12");
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelVersion("1.0");
+        relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelCustomizationName("vSAMP12 1");
+
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement1);
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement2);
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement3);
+
+        Map<String, String> userParam1 = new HashMap<>();
+        userParam1.put("name1", "value1");
+
+        Map<String, String> userParam2 = new HashMap<>();
+        userParam2.put("name2", "value2");
+
+        request.getRequestDetails().getRequestParameters().getUserParams().add(userParam1);
+        request.getRequestDetails().getRequestParameters().getUserParams().add(userParam2);
+
+        logger.debug(Serialization.gsonPretty.toJson(request));
+
+    }
+
+    @Test
+    public void testHack() {
+
+        logger.debug("**  HACK  **");
+
+        SoRequest request = new SoRequest();
+
+        request.setRequestDetails(new SoRequestDetails());
+        request.getRequestDetails().setModelInfo(new SoModelInfo());
+        request.getRequestDetails().setCloudConfiguration(new SoCloudConfiguration());
+        request.getRequestDetails().setRequestInfo(new SoRequestInfo());
+        request.getRequestDetails().setRequestParameters(new SoRequestParameters());
+        request.getRequestDetails().getRequestParameters().setUserParams(null);
+
+        request.getRequestDetails().getModelInfo().setModelType("vfModule");
+        request.getRequestDetails().getModelInfo().setModelInvariantId("a9c4a35a-de48-451a-9e4e-343f2ac52928");
+        request.getRequestDetails().getModelInfo().setModelVersionId("e0d98ad1-238d-4555-b439-023d3f9079f6");
+        request.getRequestDetails().getModelInfo().setModelName("0d9e0d9d352749f4B3cb..dnsscaling..module-0");
+        request.getRequestDetails().getModelInfo().setModelVersion("2.0");
+
+        request.getRequestDetails().getCloudConfiguration().setLcpCloudRegionId("DFW");
+        request.getRequestDetails().getCloudConfiguration().setTenantId("1015548");
+
+        request.getRequestDetails().getRequestInfo().setInstanceName(
+                "Vfmodule_Ete_Name1eScaling63928f-ccdc-4b34-bdef-9bf64109026e");
+        request.getRequestDetails().getRequestInfo().setSource("POLICY");
+        request.getRequestDetails().getRequestInfo().setSuppressRollback(false);
+
+        SoRelatedInstanceListElement relatedInstanceListElement1 =
+                new SoRelatedInstanceListElement();
+        SoRelatedInstanceListElement relatedInstanceListElement2 =
+                new SoRelatedInstanceListElement();
+        relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance());
+        relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance());
+
+        String serviceInstanceId = "98af39ce-6408-466b-921f-c2c7a8f59ed6";
+        relatedInstanceListElement1.getRelatedInstance().setInstanceId(serviceInstanceId);
+        relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("service");
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelInvariantId(
+                "24329a0c-1d57-4210-b1af-a65df64e9d59");
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelVersionId(
+                "ac642881-8e7e-4217-bd64-16ad41c42e30");
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelName("5116d67e-0b4f-46bf-a46f");
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelVersion("2.0");
+
+        String vnfInstanceId = "8eb411b8-a936-412f-b01f-9a9a435c0e93";
+        relatedInstanceListElement2.getRelatedInstance().setInstanceId(vnfInstanceId);
+        relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("vnf");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId(
+                "09fd971e-db5f-475d-997c-cf6704b6b8fe");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersionId(
+                "152ed917-6dcc-46ee-bf8a-a775c5aa5a74");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelName("9e4c31d2-4b25-4d9e-9fb4");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersion("2.0");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelCustomizationName(
+                "0d9e0d9d-3527-49f4-b3cb 2");
+
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement1);
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement2);
+
+        logger.debug(Serialization.gsonPretty.toJson(request));
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DummyWorkingMemory.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DummyWorkingMemory.java
new file mode 100644
index 0000000..caffef4
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DummyWorkingMemory.java
@@ -0,0 +1,316 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.drools.core.WorkingMemory;
+import org.drools.core.WorkingMemoryEntryPoint;
+import org.drools.core.common.InternalFactHandle;
+import org.drools.core.impl.InternalKnowledgeBase;
+import org.drools.core.spi.AsyncExceptionHandler;
+import org.drools.core.spi.GlobalResolver;
+import org.kie.api.event.kiebase.KieBaseEventListener;
+import org.kie.api.event.rule.AgendaEventListener;
+import org.kie.api.event.rule.RuleRuntimeEventListener;
+import org.kie.api.runtime.Environment;
+import org.kie.api.runtime.ObjectFilter;
+import org.kie.api.runtime.process.ProcessInstance;
+import org.kie.api.runtime.process.WorkItemManager;
+import org.kie.api.runtime.rule.Agenda;
+import org.kie.api.runtime.rule.AgendaFilter;
+import org.kie.api.runtime.rule.FactHandle;
+import org.kie.api.runtime.rule.FactHandle.State;
+import org.kie.api.runtime.rule.QueryResults;
+import org.kie.api.time.SessionClock;
+
+public class DummyWorkingMemory implements WorkingMemory {
+
+    @Override
+    public void addEventListener(RuleRuntimeEventListener listener) {
+    }
+
+    @Override
+    public void addEventListener(AgendaEventListener listener) {
+    }
+
+    @Override
+    public void addEventListener(KieBaseEventListener listener) {
+    }
+
+    @Override
+    public void removeEventListener(RuleRuntimeEventListener listener) {
+    }
+
+    @Override
+    public void removeEventListener(AgendaEventListener listener) {
+    }
+
+    @Override
+    public void removeEventListener(KieBaseEventListener listener) {
+    }
+
+    @Override
+    public Collection<RuleRuntimeEventListener> getRuleRuntimeEventListeners() {
+        return null;
+    }
+
+    @Override
+    public Collection<AgendaEventListener> getAgendaEventListeners() {
+        return null;
+    }
+
+    @Override
+    public Collection<KieBaseEventListener> getKieBaseEventListeners() {
+        return null;
+    }
+
+    @Override
+    public FactHandle insert(Object object, boolean dynamic) {
+        return null;
+    }
+
+    @Override
+    public FactHandle insert(Object object) {
+        return null;
+    }
+
+    @Override
+    public void dispose() {
+    }
+
+    @Override
+    public String getEntryPointId() {
+        return null;
+    }
+
+    @Override
+    public void retract(FactHandle handle) {
+    }
+
+    @Override
+    public void delete(FactHandle handle) {
+    }
+
+    @Override
+    public void delete(FactHandle handle, State fhState) {
+
+
+    }
+
+    @Override
+    public void update(FactHandle handle, Object object) {
+    }
+
+    @Override
+    public void update(FactHandle handle, Object object, String... modifiedProperties) {
+    }
+
+    @Override
+    public Collection<? extends Object> getObjects() {
+        return null;
+    }
+
+    @Override
+    public Collection<? extends Object> getObjects(ObjectFilter filter) {
+        return null;
+    }
+
+    @Override
+    public <T extends FactHandle> Collection<T> getFactHandles() {
+        return null;
+    }
+
+    @Override
+    public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter) {
+        return null;
+    }
+
+    @Override
+    public long getFactCount() {
+        return 0;
+    }
+
+    @Override
+    public Agenda getAgenda() {
+        return null;
+    }
+
+    @Override
+    public void setGlobal(String identifier, Object value) {
+    }
+
+    @Override
+    public Object getGlobal(String identifier) {
+        return null;
+    }
+
+    @Override
+    public Environment getEnvironment() {
+        return null;
+    }
+
+    @Override
+    public void setGlobalResolver(GlobalResolver globalResolver) {
+    }
+
+    @Override
+    public GlobalResolver getGlobalResolver() {
+        return null;
+    }
+
+    @Override
+    public InternalKnowledgeBase getKnowledgeBase() {
+        return null;
+    }
+
+    @Override
+    public int fireAllRules() {
+        return 0;
+    }
+
+    @Override
+    public int fireAllRules(AgendaFilter agendaFilter) {
+        return 0;
+    }
+
+    @Override
+    public int fireAllRules(int fireLimit) {
+        return 0;
+    }
+
+    @Override
+    public int fireAllRules(AgendaFilter agendaFilter, int fireLimit) {
+        return 0;
+    }
+
+    @Override
+    public Object getObject(FactHandle handle) {
+        return null;
+    }
+
+    @Override
+    public FactHandle getFactHandle(Object object) {
+        return null;
+    }
+
+    @Override
+    public FactHandle getFactHandleByIdentity(Object object) {
+        return null;
+    }
+
+    @Override
+    public Iterator<?> iterateObjects() {
+        return null;
+    }
+
+    @Override
+    public Iterator<?> iterateObjects(ObjectFilter filter) {
+        return null;
+    }
+
+    @Override
+    public Iterator<InternalFactHandle> iterateFactHandles() {
+        return null;
+    }
+
+    @Override
+    public Iterator<InternalFactHandle> iterateFactHandles(ObjectFilter filter) {
+        return null;
+    }
+
+    @Override
+    public void setFocus(String focus) {
+    }
+
+    @Override
+    public QueryResults getQueryResults(String query, Object... arguments) {
+        return null;
+    }
+
+    @Override
+    public void setAsyncExceptionHandler(AsyncExceptionHandler handler) {
+    }
+
+    @Override
+    public void clearAgenda() {
+    }
+
+    @Override
+    public void clearAgendaGroup(String group) {
+    }
+
+    @Override
+    public void clearActivationGroup(String group) {
+    }
+
+    @Override
+    public void clearRuleFlowGroup(String group) {
+    }
+
+    @Override
+    public ProcessInstance startProcess(String processId) {
+        return null;
+    }
+
+    @Override
+    public ProcessInstance startProcess(String processId, Map<String, Object> parameters) {
+        return null;
+    }
+
+    @Override
+    public Collection<ProcessInstance> getProcessInstances() {
+        return null;
+    }
+
+    @Override
+    public ProcessInstance getProcessInstance(long id) {
+        return null;
+    }
+
+    @Override
+    public ProcessInstance getProcessInstance(long id, boolean readOnly) {
+        return null;
+    }
+
+    @Override
+    public WorkItemManager getWorkItemManager() {
+        return null;
+    }
+
+    @Override
+    public void halt() {
+    }
+
+    @Override
+    public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String id) {
+        return null;
+    }
+
+    @Override
+    public SessionClock getSessionClock() {
+        return null;
+    }
+
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
new file mode 100644
index 0000000..39aa2da
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * 
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.time.LocalDateTime;
+
+import org.junit.Test;
+
+public class SoAsyncRequestStatusTest {
+
+    @Test
+    public void testConstructor() {
+        SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
+
+        assertTrue(obj.getCorrelator() == null);
+        assertTrue(obj.getFinishTime() == null);
+        assertTrue(obj.getInstanceReferences() == null);
+        assertTrue(obj.getRequestId() == null);
+        assertTrue(obj.getRequestScope() == null);
+        assertTrue(obj.getRequestStatus() == null);
+        assertTrue(obj.getStartTime() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
+
+        obj.setCorrelator("correlator");
+        assertEquals("correlator", obj.getCorrelator());
+
+        LocalDateTime finishTime = LocalDateTime.now();
+        obj.setFinishTime(finishTime);
+        assertEquals(finishTime, obj.getFinishTime());
+
+        SoInstanceReferences instanceReferences = new SoInstanceReferences();
+        obj.setInstanceReferences(instanceReferences);
+        assertEquals(instanceReferences, obj.getInstanceReferences());
+
+        obj.setRequestId("requestId");
+        assertEquals("requestId", obj.getRequestId());
+
+        obj.setRequestScope("requestScope");
+        assertEquals("requestScope", obj.getRequestScope());
+
+        SoRequestStatus requestStatus = new SoRequestStatus();
+        obj.setRequestStatus(requestStatus);
+        assertEquals(requestStatus, obj.getRequestStatus());
+
+        obj.setRequestType("requestType");
+        assertEquals("requestType", obj.getRequestType());
+
+        LocalDateTime startTime = LocalDateTime.now();
+        obj.setStartTime(startTime);
+        assertEquals(startTime, obj.getStartTime());
+
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
new file mode 100644
index 0000000..b816438
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * 
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoCloudConfigurationTest {
+
+    @Test
+    public void testConstructor() {
+        SoCloudConfiguration obj = new SoCloudConfiguration();
+
+        assertTrue(obj.getLcpCloudRegionId() == null);
+        assertTrue(obj.getTenantId() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoCloudConfiguration obj = new SoCloudConfiguration();
+
+        obj.setLcpCloudRegionId("lcpCloudRegionId");
+        assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId());
+
+        obj.setTenantId("tenantId");
+        assertEquals("tenantId", obj.getTenantId());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java
new file mode 100644
index 0000000..910c0ac
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java
@@ -0,0 +1,240 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2018-2019 AT&T. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import com.google.gson.Gson;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+@Path("/SO")
+public class SoDummyServerTest {
+
+    private static int postMessagesReceived = 0;
+    private static int putMessagesReceived = 0;
+    private static int statMessagesReceived = 0;
+    private static int getMessagesReceived = 0;
+    private static int deleteMessagesReceived = 0;
+
+    private static Map<String, SoResponse> ongoingRequestMap = new ConcurrentHashMap<>();
+
+    /**
+     * Stats method.
+     *
+     * @return response
+     */
+    @GET
+    @Path("/Stats")
+    public Response serviceGetStats() {
+        statMessagesReceived++;
+        return Response.status(200).entity("{\"GET\": " + getMessagesReceived + ",\"STAT\": " + statMessagesReceived
+                + ",\"POST\": " + postMessagesReceived + ",\"PUT\": " + putMessagesReceived
+                + ",\"DELETE\": " + deleteMessagesReceived + "}").build();
+
+    }
+
+    /**
+     * Get stat type.
+     *
+     * @param statType the stat type
+     * @return http response
+     */
+    @GET
+    @Path("/OneStat/{statType}")
+    public Response serviceGetStat(@PathParam("statType") final String statType) {
+        statMessagesReceived++;
+        return Response.status(200).entity("{\"TYPE\": " + statType + "}").build();
+    }
+
+    /**
+     * Post to service instantiation.
+     *
+     * @param jsonString string to send
+     * @return http response
+     */
+    @POST
+    @Path("/serviceInstantiation/v7")
+    public Response servicePostRequest(final String jsonString) {
+        postMessagesReceived++;
+        return buildResponse(jsonString);
+    }
+
+    /**
+     * Post.
+     *
+     * @param serviceInstanceId service instance id
+     * @param vnfInstanceId vnf instance id
+     * @param jsonString json body
+     * @return http response
+     */
+    @POST
+    @Path("/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/scaleOut")
+    public Response servicePostRequestVfModules(@PathParam("serviceInstanceId") final String serviceInstanceId,
+                    @PathParam("vnfInstanceId") final String vnfInstanceId, final String jsonString) {
+        postMessagesReceived++;
+        return buildResponse(jsonString);
+    }
+
+    /**
+     * Get instance ID.
+     *
+     * @param nsInstanceId node instance id
+     * @return http response
+     */
+    @GET
+    @Path("/orchestrationRequests/v5/{nsInstanceId}")
+    public Response soRequestStatus(@PathParam("nsInstanceId") final String nsInstanceId) {
+
+        SoResponse response = ongoingRequestMap.get(nsInstanceId);
+
+        int iterationsLeft = Integer.valueOf(response.getRequest().getRequestScope());
+        if (--iterationsLeft > 0) {
+            response.getRequest().setRequestScope(new Integer(iterationsLeft).toString());
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode()).entity(responseString).build();
+        }
+
+        ongoingRequestMap.remove(nsInstanceId);
+
+        if ("ReturnBadAfterWait".equals(response.getRequest().getRequestType())) {
+            return Response.status(400).build();
+        }
+
+        response.getRequest().getRequestStatus().setRequestState("COMPLETE");
+        response.getRequest().setRequestScope("0");
+        response.setHttpResponseCode(200);
+        String responseString = new Gson().toJson(response, SoResponse.class);
+        return Response.status(response.getHttpResponseCode()).entity(responseString).build();
+    }
+
+    /**
+     * Delete.
+     *
+     * @param serviceInstanceId service instance id
+     * @param vnfInstanceId vnf instance id
+     * @param vfModuleInstanceId vf module instance id
+     * @param jsonString json body
+     * @return http response
+     */
+    @DELETE
+    @Path("/serviceInstances/v7/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleInstanceId}")
+    public Response serviceDeleteRequestVfModules(
+            @PathParam("serviceInstanceId") final String serviceInstanceId,
+            @PathParam("vnfInstanceId") final String vnfInstanceId,
+            @PathParam("vfModuleInstanceId") final String vfModuleInstanceId,
+            final String jsonString) {
+        deleteMessagesReceived++;
+        return buildResponse(jsonString);
+    }
+
+    private Response buildResponse(String jsonString) {
+        if (jsonString == null) {
+            return Response.status(400).build();
+        }
+
+        SoRequest request = null;
+        try {
+            request = new Gson().fromJson(jsonString, SoRequest.class);
+        } catch (Exception e) {
+            return Response.status(400).build();
+        }
+
+        if (request == null) {
+            return Response.status(400).build();
+        }
+
+        if (request.getRequestType() == null) {
+            return Response.status(400).build();
+        }
+
+        if ("ReturnBadJson".equals(request.getRequestType())) {
+            return Response.status(200)
+                    .entity("{\"GET\": , " + getMessagesReceived + ",\"STAT\": " + statMessagesReceived
+                            + ",\"POST\":" + " , " + postMessagesReceived + ",\"PUT\": " + putMessagesReceived
+                            + ",\"DELETE\": " + deleteMessagesReceived + "}").build();
+        }
+
+        SoResponse response = new SoResponse();
+        response.setRequest(request);
+        response.setRequestReferences(new SoRequestReferences());
+        response.getRequestReferences().setRequestId(request.getRequestId().toString());
+
+        if ("ReturnCompleted".equals(request.getRequestType())) {
+            response.getRequest().getRequestStatus().setRequestState("COMPLETE");
+            response.setHttpResponseCode(200);
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode())
+                    .entity(responseString)
+                    .build();
+        }
+
+        if ("ReturnFailed".equals(request.getRequestType())) {
+            response.getRequest().getRequestStatus().setRequestState("FAILED");
+            response.setHttpResponseCode(200);
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode())
+                    .entity(responseString)
+                    .build();
+        }
+
+        if ("ReturnOnging202".equals(request.getRequestType())) {
+            ongoingRequestMap.put(request.getRequestId().toString(), response);
+
+            response.getRequest().getRequestStatus().setRequestState("ONGOING");
+            response.setHttpResponseCode(202);
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode())
+                    .entity(responseString)
+                    .build();
+        }
+
+        if ("ReturnOnging200".equals(request.getRequestType())) {
+            ongoingRequestMap.put(request.getRequestId().toString(), response);
+
+            response.getRequest().getRequestStatus().setRequestState("ONGOING");
+            response.setHttpResponseCode(200);
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode())
+                    .entity(responseString)
+                    .build();
+        }
+
+        if ("ReturnBadAfterWait".equals(request.getRequestType())) {
+            ongoingRequestMap.put(request.getRequestId().toString(), response);
+
+            response.getRequest().getRequestStatus().setRequestState("ONGOING");
+            response.setHttpResponseCode(200);
+            String responseString = new Gson().toJson(response, SoResponse.class);
+            return Response.status(response.getHttpResponseCode())
+                    .entity(responseString)
+                    .build();
+        }
+        return null;
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
new file mode 100644
index 0000000..0b0aa5f
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoInstanceReferencesTest {
+
+    @Test
+    public void testConstructor() {
+        SoInstanceReferences obj = new SoInstanceReferences();
+
+        assertTrue(obj.getInstanceId() == null);
+        assertTrue(obj.getRequestId() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoInstanceReferences obj = new SoInstanceReferences();
+
+        obj.setInstanceId("instanceId");
+        assertEquals("instanceId", obj.getInstanceId());
+
+        obj.setRequestId("requestId");
+        assertEquals("requestId", obj.getRequestId());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java
new file mode 100644
index 0000000..85f5ac7
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java
@@ -0,0 +1,407 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * TestSOManager
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ *
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.UUID;
+import java.util.concurrent.Future;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.drools.core.WorkingMemory;
+import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.drools.system.PolicyEngine;
+
+public class SoManagerTest {
+    private static final String BASE_URI = "http://localhost:46553/TestSOManager";
+    private static final String BASE_SO_URI = BASE_URI + "/SO";
+    private static HttpServer server;
+
+    /**
+     * Set up test class.
+     */
+    @BeforeClass
+    public static void setUp() throws IOException {
+        final ResourceConfig rc = new ResourceConfig(SoDummyServerTest.class);
+        //Grizzly by default doesn't allow payload for HTTP methods (ex: DELETE), for which HTTP spec doesn't
+        // explicitly state that.
+        //allow it before starting the server
+        server = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc, false);
+        server.getServerConfiguration().setAllowPayloadForUndefinedHttpMethods(true);
+        server.start();
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        server.shutdown();
+    }
+
+    @Test
+    public void testGrizzlyServer() throws ClientProtocolException, IOException {
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        HttpGet httpGet = new HttpGet("http://localhost:46553/TestSOManager/SO/Stats");
+        CloseableHttpResponse response = httpclient.execute(httpGet);
+
+        String returnBody = EntityUtils.toString(response.getEntity(), "UTF-8");
+        assertTrue(returnBody.matches("^\\{\"GET\": [0-9]*,\"STAT\": [0-9]*,\"POST\": [0-9]*,\"PUT\": [0-9]*,"
+                + "\"DELETE\": [0-9]*\\}$"));
+    }
+
+    @Test
+    public void testServiceInstantiation() throws IOException {
+        SoManager manager = new SoManager();
+        assertNotNull(manager);
+        manager.setRestGetTimeout(100);
+
+        SoResponse response = manager.createModuleInstance("http:/localhost:99999999", BASE_SO_URI, "sean",
+                "citizen", null);
+        assertNull(response);
+
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", null);
+        assertNull(response);
+
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", new SoRequest());
+        assertNull(response);
+
+        SoRequest request = new SoRequest();
+        request.setRequestId(UUID.randomUUID());
+        request.setRequestScope("Test");
+        request.setRequestType("ReturnBadJson");
+        request.setStartTime("2018-03-23 16:31");
+        request.setRequestStatus(new SoRequestStatus());
+        request.getRequestStatus().setRequestState("ONGOING");
+
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNull(response);
+
+        request.setRequestType("ReturnCompleted");
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNotNull(response);
+        assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+
+        request.setRequestType("ReturnFailed");
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNotNull(response);
+        assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState());
+
+        // Use scope to set the number of iterations we'll wait for
+
+        request.setRequestType("ReturnOnging200");
+        request.setRequestScope(new Integer(10).toString());
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNotNull(response);
+        assertNotNull(response.getRequest());
+        assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(20).toString());
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNotNull(response);
+        assertNotNull(response.getRequest());
+        assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+
+        // Test timeout after 20 attempts for a response
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(21).toString());
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNull(response);
+
+        // Test bad response after 3 attempts for a response
+        request.setRequestType("ReturnBadAfterWait");
+        request.setRequestScope(new Integer(3).toString());
+        response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
+                        "citizen", request);
+        assertNull(response);
+    }
+
+    @Test
+    public void testVfModuleCreation() throws IOException {
+        SoManager manager = new SoManager();
+        assertNotNull(manager);
+        manager.setRestGetTimeout(100);
+
+        PolicyEngine.manager.setEnvironmentProperty("so.username", "sean");
+        PolicyEngine.manager.setEnvironmentProperty("so.password", "citizen");
+
+        WorkingMemory wm = new DummyWorkingMemory();
+
+        SoRequest soRequest = new SoRequest();
+        soRequest.setOperationType(SoOperationType.SCALE_OUT);
+        PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999");
+        Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm,
+                        UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI);
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), soRequest);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        SoRequest request = new SoRequest();
+        request.setRequestId(UUID.randomUUID());
+        request.setRequestScope("Test");
+        request.setRequestType("ReturnBadJson");
+        request.setStartTime("2018-03-23 16:31");
+        request.setRequestStatus(new SoRequestStatus());
+        request.getRequestStatus().setRequestState("ONGOING");
+        request.setOperationType(SoOperationType.SCALE_OUT);
+
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnCompleted");
+
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnFailed");
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Use scope to set the number of iterations we'll wait for
+
+        request.setRequestType("ReturnOnging200");
+        request.setRequestScope(new Integer(10).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertNotNull(response.getRequest());
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(20).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertNotNull(response.getRequest());
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Test timeout after 20 attempts for a response
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(21).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Test bad response after 3 attempts for a response
+        request.setRequestType("ReturnBadAfterWait");
+        request.setRequestScope(new Integer(3).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                        UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+    }
+
+    @Test
+    public void testVfModuleDeletion() {
+        SoManager manager = new SoManager();
+        assertNotNull(manager);
+        manager.setRestGetTimeout(100);
+
+        PolicyEngine.manager.setEnvironmentProperty("so.username", "sean");
+        PolicyEngine.manager.setEnvironmentProperty("so.password", "citizen");
+
+        WorkingMemory wm = new DummyWorkingMemory();
+
+        SoRequest soRequest = new SoRequest();
+        soRequest.setOperationType(SoOperationType.DELETE_VF_MODULE);
+        PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999");
+        Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm,
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI);
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        SoRequest request = new SoRequest();
+        request.setRequestId(UUID.randomUUID());
+        request.setRequestScope("Test");
+        request.setRequestType("ReturnBadJson");
+        request.setStartTime("2018-03-23 16:31");
+        request.setRequestStatus(new SoRequestStatus());
+        request.getRequestStatus().setRequestState("ONGOING");
+        request.setOperationType(SoOperationType.DELETE_VF_MODULE);
+
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnCompleted");
+
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnFailed");
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Use scope to set the number of iterations we'll wait for
+
+        request.setRequestType("ReturnOnging200");
+        request.setRequestScope(new Integer(10).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertNotNull(response.getRequest());
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(20).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertNotNull(response.getRequest());
+            assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Test timeout after 20 attempts for a response
+        request.setRequestType("ReturnOnging202");
+        request.setRequestScope(new Integer(21).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+
+        // Test bad response after 3 attempts for a response
+        request.setRequestType("ReturnBadAfterWait");
+        request.setRequestScope(new Integer(3).toString());
+        asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+                UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
+        try {
+            SoResponse response = asyncRestCallFuture.get();
+            assertEquals(999, response.getHttpResponseCode());
+        } catch (Exception e) {
+            fail("test should not throw an exception");
+        }
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
new file mode 100644
index 0000000..51dd5cd
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * 
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoModelInfoTest {
+
+    @Test
+    public void testConstructor() {
+        SoModelInfo obj = new SoModelInfo();
+
+        assertTrue(obj.getModelCustomizationId() == null);
+        assertTrue(obj.getModelCustomizationName() == null);
+        assertTrue(obj.getModelInvariantId() == null);
+        assertTrue(obj.getModelName() == null);
+        assertTrue(obj.getModelType() == null);
+        assertTrue(obj.getModelVersion() == null);
+        assertTrue(obj.getModelVersionId() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoModelInfo obj = new SoModelInfo();
+
+        obj.setModelCustomizationId("modelCustomizationId");
+        assertEquals("modelCustomizationId", obj.getModelCustomizationId());
+
+        obj.setModelCustomizationName("modelCustomizationName");
+        assertEquals("modelCustomizationName", obj.getModelCustomizationName());
+
+        obj.setModelInvariantId("modelInvariantId");
+        assertEquals("modelInvariantId", obj.getModelInvariantId());
+
+        obj.setModelName("modelName");
+        assertEquals("modelName", obj.getModelName());
+
+        obj.setModelType("modelType");
+        assertEquals("modelType", obj.getModelType());
+
+        obj.setModelVersion("modelVersion");
+        assertEquals("modelVersion", obj.getModelVersion());
+
+        obj.setModelVersionId("modelVersionId");
+        assertEquals("modelVersionId", obj.getModelVersionId());
+
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
new file mode 100644
index 0000000..e8899dd
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoPolicyExceptionHolderTest {
+
+    @Test
+    public void testConstructor() {
+        SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
+
+        assertTrue(obj.getMessageId() == null);
+        assertTrue(obj.getText() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
+
+        obj.setMessageId("messageId");
+        assertEquals("messageId", obj.getMessageId());
+
+        obj.setText("text");
+        assertEquals("text", obj.getText());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
new file mode 100644
index 0000000..82b11e0
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * 
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRelatedInstanceListElementTest {
+
+    @Test
+    public void testConstructor() {
+        SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
+
+        assertTrue(obj.getRelatedInstance() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
+
+        SoRelatedInstance relatedInstance = new SoRelatedInstance();
+        obj.setRelatedInstance(relatedInstance);
+        assertEquals(relatedInstance, obj.getRelatedInstance());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
new file mode 100644
index 0000000..019012f
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRelatedInstanceTest {
+
+    @Test
+    public void testConstructor() {
+        SoRelatedInstance obj = new SoRelatedInstance();
+
+        assertTrue(obj.getInstanceId() == null);
+        assertTrue(obj.getInstanceName() == null);
+        assertTrue(obj.getModelInfo() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRelatedInstance obj = new SoRelatedInstance();
+
+        obj.setInstanceId("instanceId");
+        assertEquals("instanceId", obj.getInstanceId());
+
+        obj.setInstanceName("instanceName");
+        assertEquals("instanceName", obj.getInstanceName());
+
+        SoModelInfo modelInfo = new SoModelInfo();
+        obj.setModelInfo(modelInfo);
+        assertEquals(modelInfo, obj.getModelInfo());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
new file mode 100644
index 0000000..64f6ee5
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class SoRequestDetailsTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestDetails obj = new SoRequestDetails();
+
+        assertTrue(obj.getCloudConfiguration() == null);
+        assertTrue(obj.getModelInfo() == null);
+        assertTrue(obj.getRequestInfo() == null);
+        assertTrue(obj.getRequestParameters() == null);
+        assertTrue(obj.getSubscriberInfo() == null);
+
+        assertTrue(obj.getRelatedInstanceList() != null);
+        assertEquals(0, obj.getRelatedInstanceList().size());
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestDetails obj = new SoRequestDetails();
+
+        SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
+        obj.setCloudConfiguration(cloudConfiguration);
+        assertEquals(cloudConfiguration, obj.getCloudConfiguration());
+
+        SoModelInfo modelInfo = new SoModelInfo();
+        obj.setModelInfo(modelInfo);
+        assertEquals(modelInfo, obj.getModelInfo());
+
+        SoRequestInfo requestInfo = new SoRequestInfo();
+        obj.setRequestInfo(requestInfo);
+        assertEquals(requestInfo, obj.getRequestInfo());
+
+        SoRequestParameters requestParameters = new SoRequestParameters();
+        obj.setRequestParameters(requestParameters);
+        assertEquals(requestParameters, obj.getRequestParameters());
+
+        SoSubscriberInfo subscriberInfo = new SoSubscriberInfo();
+        obj.setSubscriberInfo(subscriberInfo);
+        assertEquals(subscriberInfo, obj.getSubscriberInfo());
+    }
+    
+    @Test
+    public void testSoMRequestDetailsMethods() {
+        SoRequestDetails details = new SoRequestDetails();
+        assertNotNull(details);
+        assertNotEquals(0, details.hashCode());
+
+        SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
+        details.setCloudConfiguration(cloudConfiguration);
+        assertEquals(cloudConfiguration, details.getCloudConfiguration());
+        assertNotEquals(0, details.hashCode());
+
+        SoModelInfo modelInfo = new SoModelInfo();
+        details.setModelInfo(modelInfo);
+        assertEquals(modelInfo, details.getModelInfo());
+        assertNotEquals(0, details.hashCode());
+
+        List<SoRelatedInstanceListElement> relatedInstanceList = new ArrayList<>();
+        details.setRelatedInstanceList(relatedInstanceList);
+        assertEquals(relatedInstanceList, details.getRelatedInstanceList());
+        assertNotEquals(0, details.hashCode());
+
+        SoRequestInfo requestInfo = new SoRequestInfo();
+        details.setRequestInfo(requestInfo);
+        assertEquals(requestInfo, details.getRequestInfo());
+        assertNotEquals(0, details.hashCode());
+
+        SoRequestParameters requestParameters = new SoRequestParameters();
+        details.setRequestParameters(requestParameters);
+        assertEquals(requestParameters, details.getRequestParameters());
+        assertNotEquals(0, details.hashCode());
+
+        SoSubscriberInfo subscriberInfo = new SoSubscriberInfo();
+        details.setSubscriberInfo(subscriberInfo);
+        assertEquals(subscriberInfo, details.getSubscriberInfo());
+        assertNotEquals(0, details.hashCode());
+
+        assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0,  46));
+
+        SoRequestDetails copiedDetails = new SoRequestDetails(details);
+
+        assertTrue(details.equals(details));
+        assertTrue(details.equals(copiedDetails));
+        assertFalse(details.equals(null));
+        assertFalse(details.equals("Hello"));
+        
+        details.setCloudConfiguration(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setCloudConfiguration(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setCloudConfiguration(cloudConfiguration);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setCloudConfiguration(cloudConfiguration);
+        assertTrue(details.equals(copiedDetails));
+
+        details.setModelInfo(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setModelInfo(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setModelInfo(modelInfo);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setModelInfo(modelInfo);
+        assertTrue(details.equals(copiedDetails));
+        
+        details.setRequestInfo(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRequestInfo(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setRequestInfo(requestInfo);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRequestInfo(requestInfo);
+        assertTrue(details.equals(copiedDetails));
+
+        details.setRequestParameters(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRequestParameters(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setRequestParameters(requestParameters);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRequestParameters(requestParameters);
+        assertTrue(details.equals(copiedDetails));
+
+        details.setSubscriberInfo(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setSubscriberInfo(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setSubscriberInfo(subscriberInfo);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setSubscriberInfo(subscriberInfo);
+        assertTrue(details.equals(copiedDetails));
+
+        details.setRelatedInstanceList(null);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRelatedInstanceList(null);
+        assertTrue(details.equals(copiedDetails));
+        details.setRelatedInstanceList(relatedInstanceList);
+        assertFalse(details.equals(copiedDetails));
+        copiedDetails.setRelatedInstanceList(relatedInstanceList);
+        assertTrue(details.equals(copiedDetails));
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
new file mode 100644
index 0000000..e0b8193
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRequestErrorTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestError obj = new SoRequestError();
+
+        assertTrue(obj.getPolicyException() == null);
+        assertTrue(obj.getServiceException() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestError obj = new SoRequestError();
+
+        SoPolicyExceptionHolder policyException = new SoPolicyExceptionHolder();
+        obj.setPolicyException(policyException);
+        assertEquals(policyException, obj.getPolicyException());
+
+        SoServiceExceptionHolder serviceException = new SoServiceExceptionHolder();
+        obj.setServiceException(serviceException);
+        assertEquals(serviceException, obj.getServiceException());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
new file mode 100644
index 0000000..2302696
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRequestInfoTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestInfo obj = new SoRequestInfo();
+
+        assertTrue(obj.getBillingAccountNumber() == null);
+        assertTrue(obj.getCallbackUrl() == null);
+        assertTrue(obj.getCorrelator() == null);
+        assertTrue(obj.getInstanceName() == null);
+        assertTrue(obj.getOrderNumber() == null);
+        assertTrue(obj.getOrderVersion() == null);
+        assertTrue(obj.getProductFamilyId() == null);
+        assertTrue(obj.getRequestorId() == null);
+        assertTrue(obj.getSource() == null);
+        assertTrue(obj.isSuppressRollback() == false);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestInfo obj = new SoRequestInfo();
+
+        obj.setBillingAccountNumber("billingAccountNumber");
+        assertEquals("billingAccountNumber", obj.getBillingAccountNumber());
+
+        obj.setCallbackUrl("callbackUrl");
+        assertEquals("callbackUrl", obj.getCallbackUrl());
+
+        obj.setCorrelator("correlator");
+        assertEquals("correlator", obj.getCorrelator());
+
+        obj.setInstanceName("instanceName");
+        assertEquals("instanceName", obj.getInstanceName());
+
+        obj.setOrderNumber("orderNumber");
+        assertEquals("orderNumber", obj.getOrderNumber());
+
+        int orderVersion = 2008;
+        obj.setOrderVersion(orderVersion);
+        assertEquals((Integer) orderVersion, obj.getOrderVersion());
+
+        obj.setProductFamilyId("productFamilyId");
+        assertEquals("productFamilyId", obj.getProductFamilyId());
+
+        obj.setRequestorId("requestorId");
+        assertEquals("requestorId", obj.getRequestorId());
+
+        obj.setSource("source");
+        assertEquals("source", obj.getSource());
+
+        obj.setSuppressRollback(true);
+        assertEquals(true, obj.isSuppressRollback());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
new file mode 100644
index 0000000..92638f9
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRequestParametersTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestParameters obj = new SoRequestParameters();
+
+        assertTrue(obj.getSubscriptionServiceType() == null);
+        assertTrue(obj.getUserParams() != null);
+        assertEquals(0, obj.getUserParams().size());
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestParameters obj = new SoRequestParameters();
+
+        obj.setSubscriptionServiceType("subscriptionServiceType");
+        assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
new file mode 100644
index 0000000..4248199
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRequestReferencesTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestReferences obj = new SoRequestReferences();
+
+        assertTrue(obj.getInstanceId() == null);
+        assertTrue(obj.getRequestId() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestReferences obj = new SoRequestReferences();
+
+        obj.setInstanceId("instanceId");
+        assertEquals("instanceId", obj.getInstanceId());
+
+        obj.setRequestId("requestId");
+        assertEquals("requestId", obj.getRequestId());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
new file mode 100644
index 0000000..b83cb00
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoRequestStatusTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequestStatus obj = new SoRequestStatus();
+
+        assertEquals(0, obj.getPercentProgress());
+        assertTrue(obj.getRequestState() == null);
+        assertTrue(obj.getTimestamp() == null);
+        assertFalse(obj.isWasRolledBack());
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequestStatus obj = new SoRequestStatus();
+
+        obj.setPercentProgress(2008);
+        assertEquals(2008, obj.getPercentProgress());
+
+        obj.setRequestState("requestState");
+        assertEquals("requestState", obj.getRequestState());
+
+        obj.setTimestamp("timestamp");
+        assertEquals("timestamp", obj.getTimestamp());
+
+        obj.setWasRolledBack(true);
+        assertTrue(obj.isWasRolledBack());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
new file mode 100644
index 0000000..93b855b
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.time.LocalDateTime;
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class SoRequestTest {
+
+    @Test
+    public void testConstructor() {
+        SoRequest obj = new SoRequest();
+
+        assertTrue(obj.getFinishTime() == null);
+        assertTrue(obj.getRequestDetails() == null);
+        assertTrue(obj.getRequestId() == null);
+        assertTrue(obj.getRequestScope() == null);
+        assertTrue(obj.getRequestStatus() == null);
+        assertTrue(obj.getRequestType() == null);
+        assertTrue(obj.getStartTime() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoRequest obj = new SoRequest();
+
+        LocalDateTime finishTime = LocalDateTime.now();
+        obj.setFinishTime(finishTime);
+        assertEquals(finishTime, obj.getFinishTime());
+
+        UUID uuid = UUID.randomUUID();
+        obj.setRequestId(uuid);
+        assertEquals(uuid, obj.getRequestId());
+
+        obj.setRequestScope("requestScope");
+        assertEquals("requestScope", obj.getRequestScope());
+
+        SoRequestStatus requestStatus = new SoRequestStatus();
+        obj.setRequestStatus(requestStatus);
+        assertEquals(requestStatus, obj.getRequestStatus());
+
+        obj.setRequestType("requestType");
+        assertEquals("requestType", obj.getRequestType());
+
+        obj.setOperationType(SoOperationType.DELETE_VF_MODULE);
+        assertEquals(SoOperationType.DELETE_VF_MODULE, obj.getOperationType());
+
+        LocalDateTime startTime = LocalDateTime.now();
+        obj.setStartTime(startTime.toString());
+        assertEquals(startTime.toString(), obj.getStartTime());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
new file mode 100644
index 0000000..eb1b0ef
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoResponseTest {
+
+    @Test
+    public void testConstructor() {
+        SoResponse obj = new SoResponse();
+
+        assertEquals(0, obj.getHttpResponseCode());
+        assertTrue(obj.getRequest() == null);
+        assertTrue(obj.getRequestError() == null);
+        assertTrue(obj.getRequestReferences() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoResponse obj = new SoResponse();
+
+        obj.setHttpResponseCode(2008);
+        assertEquals(2008, obj.getHttpResponseCode());
+
+        SoRequest request = new SoRequest();
+        obj.setRequest(request);
+        assertEquals(request, obj.getRequest());
+
+        SoRequestError requestError = new SoRequestError();
+        obj.setRequestError(requestError);
+        assertEquals(requestError, obj.getRequestError());
+
+        SoRequestReferences requestReferences = new SoRequestReferences();
+        obj.setRequestReferences(requestReferences);
+        assertEquals(requestReferences, obj.getRequestReferences());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
new file mode 100644
index 0000000..deedc79
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class SoResponseWrapperTest {
+
+    @Test
+    public void testConstructor() {
+        SoResponse response = new SoResponse();
+        SoResponseWrapper obj = new SoResponseWrapper(response, "reqID");
+
+        assertEquals(response, obj.getSoResponse());
+        assertEquals("reqID", obj.getRequestId());
+    }
+
+    @Test
+    public void testSetGet() {
+        SoResponse response = new SoResponse();
+        SoResponseWrapper obj = new SoResponseWrapper(response, "reqID");
+
+        SoResponse response2 = new SoResponse();
+        response2.setHttpResponseCode(2008);
+        obj.setSoResponse(response2);
+        assertEquals(response2, obj.getSoResponse());
+
+        obj.setRequestId("id2");
+        assertEquals("id2", obj.getRequestId());
+    }
+
+    @Test
+    public void testSoResponseWrapperMethods() {
+        String requestId = UUID.randomUUID().toString();
+        SoResponse response = new SoResponse();
+
+        SoResponseWrapper responseWrapper = new SoResponseWrapper(response, requestId);
+        assertNotNull(responseWrapper);
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        assertEquals(response, responseWrapper.getSoResponse());
+
+        assertNotEquals(0, responseWrapper.hashCode());
+
+        assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0,  46));
+
+        SoResponseWrapper identicalResponseWrapper = new SoResponseWrapper(response, requestId);
+
+        assertEquals(responseWrapper,  responseWrapper);
+        assertEquals(responseWrapper,  identicalResponseWrapper);
+        assertNotEquals(null, responseWrapper);
+        assertNotEquals("Hello", responseWrapper);
+        assertFalse(responseWrapper.equals(null));
+        assertFalse(responseWrapper.equals("AString"));
+
+        assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null));
+        assertNotEquals(new SoResponseWrapper(null, null), identicalResponseWrapper);
+
+        assertNotEquals(0, new SoResponseWrapper(null, null).hashCode());
+
+        identicalResponseWrapper.setSoResponse(new SoResponse());
+        assertNotEquals(responseWrapper,  identicalResponseWrapper);
+        identicalResponseWrapper.setSoResponse(response);
+        assertEquals(responseWrapper,  identicalResponseWrapper);
+
+        identicalResponseWrapper.setRequestId(UUID.randomUUID().toString());
+        assertNotEquals(responseWrapper,  identicalResponseWrapper);
+        identicalResponseWrapper.setRequestId(requestId);
+        assertEquals(responseWrapper,  identicalResponseWrapper);
+
+        responseWrapper.setRequestId(null);
+        assertNotEquals(responseWrapper,  identicalResponseWrapper);
+        identicalResponseWrapper.setRequestId(null);
+        assertEquals(responseWrapper,  identicalResponseWrapper);
+        responseWrapper.setRequestId(requestId);
+        assertNotEquals(responseWrapper,  identicalResponseWrapper);
+        identicalResponseWrapper.setRequestId(requestId);
+        assertEquals(responseWrapper,  identicalResponseWrapper);
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
new file mode 100644
index 0000000..b5f31e5
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoServiceExceptionHolderTest {
+
+    @Test
+    public void testConstructor() {
+        SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
+
+        assertTrue(obj.getMessageId() == null);
+        assertTrue(obj.getText() == null);
+        assertTrue(obj.getVariables() != null);
+        assertEquals(0, obj.getVariables().size());
+    }
+
+    @Test
+    public void testSetGet() {
+        SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
+
+        obj.setMessageId("messageId");
+        assertEquals("messageId", obj.getMessageId());
+
+        obj.setText("text");
+        assertEquals("text", obj.getText());
+    }
+}
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
new file mode 100644
index 0000000..4d5bc75
--- /dev/null
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * so
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class SoSubscriberInfoTest {
+
+    @Test
+    public void testConstructor() {
+        SoSubscriberInfo obj = new SoSubscriberInfo();
+
+        assertTrue(obj.getGlobalSubscriberId() == null);
+        assertTrue(obj.getSubscriberCommonSiteId() == null);
+        assertTrue(obj.getSubscriberName() == null);
+    }
+
+    @Test
+    public void testSetGet() {
+        SoSubscriberInfo obj = new SoSubscriberInfo();
+
+        obj.setGlobalSubscriberId("globalSubscriberId");
+        assertEquals("globalSubscriberId", obj.getGlobalSubscriberId());
+
+        obj.setSubscriberCommonSiteId("subscriberCommonSiteId");
+        assertEquals("subscriberCommonSiteId", obj.getSubscriberCommonSiteId());
+
+        obj.setSubscriberName("subscriberName");
+        assertEquals("subscriberName", obj.getSubscriberName());
+    }
+}
diff --git a/models-interactions/model-impl/trafficgenerator/pom.xml b/models-interactions/model-impl/trafficgenerator/pom.xml
new file mode 100644
index 0000000..30ad065
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/pom.xml
@@ -0,0 +1,87 @@
+<!--
+  ============LICENSE_START=======================================================
+  trafficgenerator
+  ================================================================================
+  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+
+  <artifactId>trafficgenerator</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <!-- Use Google Java Style Guide:
+                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                            with minor changes -->
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <excludes>
+                            </excludes>
+                            <consoleOutput>true</consoleOutput>
+                            <failsOnViolation>true</failsOnViolation>
+                            <violationSeverity>warning</violationSeverity>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java
new file mode 100644
index 0000000..296ed55
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * trafficgenerator
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.vnf.trafficgenerator;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PgRequest implements Serializable {
+
+    private static final long serialVersionUID = -3283942659786236032L;
+
+    @SerializedName("pg-streams")
+    public PgStreams pgStreams;
+
+    public PgRequest() {
+        //required by author
+    }
+}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java
new file mode 100644
index 0000000..1b50695
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * trafficgenerator
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.vnf.trafficgenerator;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class PgStream implements Serializable {
+
+    private static final long serialVersionUID = 5567635677419358210L;
+
+    @SerializedName("id")
+    public String streamId;
+    @SerializedName("is-enabled")
+    public String isEnabled;
+
+    public PgStream() {
+        //required by author
+    }
+}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java
new file mode 100644
index 0000000..886b871
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * trafficgenerator
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.vnf.trafficgenerator;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+public class PgStreams implements Serializable {
+
+    private static final long serialVersionUID = 5567635677419358210L;
+
+    @SerializedName("pg-stream")
+    public List<PgStream> pgStream = new LinkedList<>();
+
+    public PgStreams() {
+        // required by author
+    }
+}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java
new file mode 100644
index 0000000..77b8e78
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * trafficgenerator
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.vnf.trafficgenerator.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public final class Serialization {
+
+    public static final Gson gsonPretty =
+            new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
+
+    private Serialization() {}
+}
diff --git a/models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java b/models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java
new file mode 100644
index 0000000..ee3c476
--- /dev/null
+++ b/models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * trafficgenerator
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.onap.policy.vnf.trafficgenerator;
+
+import org.junit.Test;
+
+import org.onap.policy.vnf.trafficgenerator.PgRequest;
+import org.onap.policy.vnf.trafficgenerator.PgStream;
+import org.onap.policy.vnf.trafficgenerator.PgStreams;
+import org.onap.policy.vnf.trafficgenerator.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DemoTest {
+    private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
+
+    @Test
+    public void test() {
+        PgRequest request = new PgRequest();
+        request.pgStreams = new PgStreams();
+
+        PgStream pgStream;
+        for (int i = 0; i < 5; i++) {
+            pgStream = new PgStream();
+            pgStream.streamId = "fw_udp" + (i + 1);
+            pgStream.isEnabled = "true";
+            request.pgStreams.pgStream.add(pgStream);
+        }
+
+        String body = Serialization.gsonPretty.toJson(request);
+        logger.debug(body);
+
+        // fail("Not yet implemented");
+    }
+
+}
diff --git a/models-interactions/model-impl/vfc/pom.xml b/models-interactions/model-impl/vfc/pom.xml
new file mode 100644
index 0000000..9a36cd2
--- /dev/null
+++ b/models-interactions/model-impl/vfc/pom.xml
@@ -0,0 +1,113 @@
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017 Intel Corp. All rights reserved.
+  Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+        <artifactId>model-impl</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+
+  <artifactId>vfc</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <version>2.13.0</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>rest</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-core</artifactId>
+      <version>6.5.0.Final</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <!-- Use Google Java Style Guide:
+                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                            with minor changes -->
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <excludes>
+                            </excludes>
+                            <consoleOutput>true</consoleOutput>
+                            <failsOnViolation>true</failsOnViolation>
+                            <violationSeverity>warning</violationSeverity>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java
new file mode 100644
index 0000000..8ca08be
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealActionVmInfo.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class VfcHealActionVmInfo implements Serializable {
+
+    private static final long serialVersionUID = 3208673205100673119L;
+
+    @SerializedName("vmid")
+    private String vmid;
+
+    @SerializedName("vmname")
+    private String vmname;
+
+    public VfcHealActionVmInfo() {
+        // Default constructor
+    }
+
+    public String getVmid() {
+        return vmid;
+    }
+
+    public void setVmid(String vmid) {
+        this.vmid = vmid;
+    }
+
+    public String getVmname() {
+        return vmname;
+    }
+
+    public void setVmname(String vmname) {
+        this.vmname = vmname;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java
new file mode 100644
index 0000000..f722bee
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealAdditionalParams.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class VfcHealAdditionalParams implements Serializable {
+
+    private static final long serialVersionUID = 2656694137285096191L;
+
+    @SerializedName("action")
+    private String action;
+
+    @SerializedName("actionvminfo")
+    private VfcHealActionVmInfo actionInfo;
+
+    public VfcHealAdditionalParams() {
+        // Default constructor
+    }
+
+    public String getAction() {
+        return action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public VfcHealActionVmInfo getActionInfo() {
+        return actionInfo;
+    }
+
+    public void setActionInfo(VfcHealActionVmInfo actionInfo) {
+        this.actionInfo = actionInfo;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java
new file mode 100644
index 0000000..0d4b038
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcHealRequest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class VfcHealRequest implements Serializable {
+
+    private static final long serialVersionUID = -7341931593089709247L;
+
+    @SerializedName("vnfInstanceId")
+    private String vnfInstanceId;
+
+    @SerializedName("cause")
+    private String cause;
+
+    @SerializedName("additionalParams")
+    private VfcHealAdditionalParams additionalParams;
+
+    public VfcHealRequest() {
+        // Default constructor
+    }
+
+    public String getVnfInstanceId() {
+        return vnfInstanceId;
+    }
+
+    public void setVnfInstanceId(String vnfInstanceId) {
+        this.vnfInstanceId = vnfInstanceId;
+    }
+
+    public String getCause() {
+        return cause;
+    }
+
+    public void setCause(String cause) {
+        this.cause = cause;
+    }
+
+    public VfcHealAdditionalParams getAdditionalParams() {
+        return additionalParams;
+    }
+
+    public void setAdditionalParams(VfcHealAdditionalParams additionalParams) {
+        this.additionalParams = additionalParams;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
new file mode 100644
index 0000000..695b1b1
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcManager.java
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * ================================================================================
+ * 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.onap.policy.vfc;
+
+import com.google.gson.JsonSyntaxException;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.drools.core.WorkingMemory;
+import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.onap.policy.vfc.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class VfcManager implements Runnable {
+
+    private String vfcUrlBase;
+    private String username;
+    private String password;
+    private VfcRequest vfcRequest;
+    private WorkingMemory workingMem;
+    private static final Logger logger = LoggerFactory.getLogger(VfcManager.class);
+
+    // The REST manager used for processing REST calls for this VFC manager
+    private RestManager restManager;
+
+    /**
+     * Constructor.
+     *
+     * @param wm Drools working memory
+     * @param request request
+     */
+    public VfcManager(WorkingMemory wm, VfcRequest request) {
+        if (wm == null || request == null) {
+            throw new IllegalArgumentException(
+                    "the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null");
+        }
+        workingMem = wm;
+        vfcRequest = request;
+
+        restManager = new RestManager();
+
+        // use getPEManagerEnvProperty() for required properties; others are optional
+        setVfcParams(getPeManagerEnvProperty("vfc.url"), PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+                PolicyEngine.manager.getEnvironmentProperty("vfc.password"));
+    }
+
+    /**
+     * Set the parameters.
+     *
+     * @param baseUrl base URL
+     * @param name username
+     * @param pwd password
+     */
+    public void setVfcParams(String baseUrl, String name, String pwd) {
+        vfcUrlBase = baseUrl + "/api/nslcm/v1";
+        username = name;
+        password = pwd;
+    }
+
+    @Override
+    public void run() {
+        Map<String, String> headers = new HashMap<>();
+        Pair<Integer, String> httpDetails;
+
+        VfcResponse responseError = new VfcResponse();
+        responseError.setResponseDescriptor(new VfcResponseDescriptor());
+        responseError.getResponseDescriptor().setStatus("error");
+
+        headers.put("Accept", "application/json");
+        String vfcUrl = vfcUrlBase + "/ns/" + vfcRequest.getNsInstanceId() + "/heal";
+        try {
+            String vfcRequestJson = Serialization.gsonPretty.toJson(vfcRequest);
+            NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, vfcUrl, vfcRequestJson);
+
+            httpDetails = restManager.post(vfcUrl, username, password, headers, "application/json", vfcRequestJson);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            workingMem.insert(responseError);
+            return;
+        }
+
+        if (httpDetails == null) {
+            workingMem.insert(responseError);
+            return;
+        }
+
+        if (httpDetails.first != 202) {
+            logger.warn("VFC Heal Restcall failed");
+            return;
+        }
+
+        try {
+            VfcResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, VfcResponse.class);
+            NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, vfcUrl, httpDetails.second);
+            String body = Serialization.gsonPretty.toJson(response);
+            logger.debug("Response to VFC Heal post:");
+            logger.debug(body);
+
+            String jobId = response.getJobId();
+            int attemptsLeft = 20;
+
+            String urlGet = vfcUrlBase + "/jobs/" + jobId;
+            VfcResponse responseGet = null;
+
+            while (attemptsLeft-- > 0) {
+                NetLoggerUtil.getNetworkLogger().info("[OUT|{}|{}|]", "VFC", urlGet);
+                Pair<Integer, String> httpDetailsGet = restManager.get(urlGet, username, password, headers);
+                responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.second, VfcResponse.class);
+                NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, vfcUrl, httpDetailsGet.second);
+                responseGet.setRequestId(vfcRequest.getRequestId().toString());
+                body = Serialization.gsonPretty.toJson(responseGet);
+                logger.debug("Response to VFC Heal get:");
+                logger.debug(body);
+
+                String responseStatus = responseGet.getResponseDescriptor().getStatus();
+                if (httpDetailsGet.first == 200
+                        && ("finished".equalsIgnoreCase(responseStatus) || "error".equalsIgnoreCase(responseStatus))) {
+                    logger.debug("VFC Heal Status {}", responseGet.getResponseDescriptor().getStatus());
+                    workingMem.insert(responseGet);
+                    break;
+                }
+                Thread.sleep(20000);
+            }
+            if ((attemptsLeft <= 0) && (responseGet != null) && (responseGet.getResponseDescriptor() != null)
+                    && (responseGet.getResponseDescriptor().getStatus() != null)
+                    && (!responseGet.getResponseDescriptor().getStatus().isEmpty())) {
+                logger.debug("VFC timeout. Status: ({})", responseGet.getResponseDescriptor().getStatus());
+                workingMem.insert(responseGet);
+            }
+        } catch (JsonSyntaxException e) {
+            logger.error("Failed to deserialize into VfcResponse {}", e.getLocalizedMessage(), e);
+        } catch (InterruptedException e) {
+            logger.error("Interrupted exception: {}", e.getLocalizedMessage(), e);
+            Thread.currentThread().interrupt();
+        } catch (Exception e) {
+            logger.error("Unknown error deserializing into VfcResponse {}", e.getLocalizedMessage(), e);
+        }
+    }
+
+    /**
+     * Protected setter for rest manager to allow mocked rest manager to be used for testing.
+     *
+     * @param restManager the test REST manager
+     */
+    protected void setRestManager(final RestManager restManager) {
+        this.restManager = restManager;
+    }
+
+    /**
+     * This method reads and validates environmental properties coming from the policy engine. Null
+     * properties cause an {@link IllegalArgumentException} runtime exception to be thrown
+     *
+     * @param string the name of the parameter to retrieve
+     * @return the property value
+     */
+
+    private String getPeManagerEnvProperty(String enginePropertyName) {
+        String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName);
+        if (enginePropertyValue == null) {
+            throw new IllegalArgumentException("The value of policy engine manager environment property \""
+                    + enginePropertyName + "\" may not be null");
+        }
+        return enginePropertyValue;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java
new file mode 100644
index 0000000..cf0d950
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcRequest.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+public class VfcRequest implements Serializable {
+
+    private static final long serialVersionUID = 3736300970326332512L;
+    // These fields are not serialized and not part of JSON
+    private transient String nsInstanceId;
+    private transient UUID requestId;
+
+    @SerializedName("healVnfData")
+    private VfcHealRequest healRequest;
+
+    public VfcRequest() {
+        // Default constructor
+    }
+
+    public String getNsInstanceId() {
+        return nsInstanceId;
+    }
+
+    public void setNsInstanceId(String nsInstanceId) {
+        this.nsInstanceId = nsInstanceId;
+    }
+
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    public VfcHealRequest getHealRequest() {
+        return healRequest;
+    }
+
+    public void setHealRequest(VfcHealRequest healRequest) {
+        this.healRequest = healRequest;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java
new file mode 100644
index 0000000..d13e14b
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponse.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+public class VfcResponse implements Serializable {
+
+    private static final long serialVersionUID = 9151443891238218455L;
+
+    @SerializedName("jobId")
+    private String jobId;
+
+    @SerializedName("responseDescriptor")
+    private VfcResponseDescriptor responseDescriptor;
+
+    private transient String requestId;
+
+    public VfcResponse() {
+        // Default constructor
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public VfcResponseDescriptor getResponseDescriptor() {
+        return responseDescriptor;
+    }
+
+    public void setResponseDescriptor(VfcResponseDescriptor responseDescriptor) {
+        this.responseDescriptor = responseDescriptor;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java
new file mode 100644
index 0000000..8fff683
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/VfcResponseDescriptor.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class VfcResponseDescriptor implements Serializable {
+
+    private static final long serialVersionUID = 6827782899144150158L;
+
+    @SerializedName("progress")
+    private String progress;
+
+    @SerializedName("status")
+    private String status;
+
+    @SerializedName("statusDescription")
+    private String statusDescription;
+
+    @SerializedName("errorCode")
+    private String errorCode;
+
+    @SerializedName("responseId")
+    private String responseId;
+
+    @SerializedName("responseHistoryList")
+    private List<VfcResponseDescriptor> responseHistoryList;
+
+    public VfcResponseDescriptor() {
+        // Default constructor
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public String getProgress() {
+        return progress;
+    }
+
+    public void setProgress(String progress) {
+        this.progress = progress;
+    }
+
+    public String getStatusDescription() {
+        return statusDescription;
+    }
+
+    public void setStatusDescription(String statusDescription) {
+        this.statusDescription = statusDescription;
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public void setErrorCode(String errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getResponseId() {
+        return responseId;
+    }
+
+    public void setResponseId(String responseId) {
+        this.responseId = responseId;
+    }
+
+    public List<VfcResponseDescriptor> getResponseHistoryList() {
+        return responseHistoryList;
+    }
+
+    public void setResponseHistoryList(List<VfcResponseDescriptor> responseHistoryList) {
+        this.responseHistoryList = responseHistoryList;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/util/Serialization.java b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/util/Serialization.java
new file mode 100644
index 0000000..a0eaad0
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/main/java/org/onap/policy/vfc/util/Serialization.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018 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.onap.policy.vfc.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public final class Serialization {
+    public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping()
+            .setPrettyPrinting()
+            .create();
+
+    private Serialization() {
+    }
+
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
new file mode 100644
index 0000000..4d060a7
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import java.util.LinkedList;
+
+import org.junit.Test;
+import org.onap.policy.vfc.util.Serialization;
+
+public class DemoTest {
+
+    @Test
+    public void test() {
+        VfcRequest request = new VfcRequest();
+
+        request.setNsInstanceId("100");
+        request.setHealRequest(new VfcHealRequest());
+        request.getHealRequest().setVnfInstanceId("1");
+        request.getHealRequest().setCause("vm is down");
+
+        request.getHealRequest().setAdditionalParams(new VfcHealAdditionalParams());
+        request.getHealRequest().getAdditionalParams().setAction("restartvm");
+
+        request.getHealRequest().getAdditionalParams().setActionInfo(new VfcHealActionVmInfo());
+        request.getHealRequest().getAdditionalParams().getActionInfo().setVmid("33");
+        request.getHealRequest().getAdditionalParams().getActionInfo().setVmname("xgw-smp11");
+
+        String body = Serialization.gsonPretty.toJson(request);
+        System.out.println(body);
+
+        VfcResponse response = new VfcResponse();
+        response.setJobId("1");
+
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+        response.setResponseDescriptor(new VfcResponseDescriptor());
+        response.getResponseDescriptor().setProgress("40");
+        response.getResponseDescriptor().setStatus("processing");
+        response.getResponseDescriptor().setStatusDescription("OMC VMs are decommissioned in VIM");
+        response.getResponseDescriptor().setErrorCode(null);
+        response.getResponseDescriptor().setResponseId("42");
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+        VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
+        responseDescriptor.setProgress("20");
+        responseDescriptor.setStatus("processing");
+        responseDescriptor.setStatusDescription("OMC VMs are decommissioned in VIM");
+        responseDescriptor.setErrorCode(null);
+        responseDescriptor.setResponseId("11");
+
+        response.getResponseDescriptor().setResponseHistoryList(new LinkedList<>());
+        response.getResponseDescriptor().getResponseHistoryList().add(responseDescriptor);
+
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+        response = Serialization.gsonPretty.fromJson(body, VfcResponse.class);
+        body = Serialization.gsonPretty.toJson(response);
+        System.out.println(body);
+
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
new file mode 100644
index 0000000..49dd06e
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class VfcHealActionVmInfoTest {
+
+    @Test
+    public void testVfcHealActionVmInfo() {
+        VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
+        assertNotNull(actionInfo);
+        assertNotEquals(0, actionInfo.hashCode());
+
+        String vmid = "ECity";
+        actionInfo.setVmid(vmid);
+        assertEquals(vmid, actionInfo.getVmid());
+
+        String vmName = "Emerald City";
+        actionInfo.setVmname(vmName);
+        assertEquals(vmName, actionInfo.getVmname());
+
+        assertNotEquals(0, actionInfo.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
new file mode 100644
index 0000000..a66264e
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class VfcHealAdditionalParamsTest {
+
+    @Test
+    public void testVfcHealAdditionalParameters() {
+        VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
+        assertNotNull(additionalParams);
+        assertNotEquals(0, additionalParams.hashCode());
+
+        String action = "Go Home";
+        additionalParams.setAction(action);
+        assertEquals(action, additionalParams.getAction());
+
+        VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
+        additionalParams.setActionInfo(actionInfo );
+        assertEquals(actionInfo, additionalParams.getActionInfo());
+
+        assertNotEquals(0, additionalParams.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
new file mode 100644
index 0000000..a4fc659
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class VfcHealRequestTest {
+
+    @Test
+    public void testVfcHealRequest() {
+        VfcHealRequest request = new VfcHealRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+
+        String vnfInstanceId = "Go To Oz";
+        request.setVnfInstanceId(vnfInstanceId);
+        assertEquals(vnfInstanceId, request.getVnfInstanceId());
+
+        String cause = "West Witch";
+        request.setCause(cause);
+        assertEquals(cause, request.getCause());
+
+        VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
+        request.setAdditionalParams(additionalParams);
+        assertEquals(additionalParams, request.getAdditionalParams());
+
+        assertNotEquals(0, request.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
new file mode 100644
index 0000000..504af4d
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
@@ -0,0 +1,294 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import static org.mockito.ArgumentMatchers.anyMap;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.endsWith;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.startsWith;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.drools.core.WorkingMemory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.rest.RestManager.Pair;
+import org.onap.policy.vfc.util.Serialization;
+
+public class VfcManagerTest {
+    private static WorkingMemory mockedWorkingMemory;
+
+    private RestManager   mockedRestManager;
+
+    private Pair<Integer, String> httpResponsePutOk;
+    private Pair<Integer, String> httpResponseGetOk;
+    private Pair<Integer, String> httpResponseBadResponse;
+    private Pair<Integer, String> httpResponseErr;
+
+    private VfcRequest  request;
+    private VfcResponse response;
+
+    @BeforeClass
+    public static void beforeTestVfcManager() {
+        mockedWorkingMemory = mock(WorkingMemory.class);
+    }
+
+    /**
+     * Set up the mocked REST manager.
+     */
+    @Before
+    public void setupMockedRest() {
+        mockedRestManager   = mock(RestManager.class);
+
+        httpResponsePutOk       = mockedRestManager.new Pair<>(202, Serialization.gsonPretty.toJson(response));
+        httpResponseGetOk       = mockedRestManager.new Pair<>(200, Serialization.gsonPretty.toJson(response));
+        httpResponseBadResponse = mockedRestManager.new Pair<>(202, Serialization.gsonPretty.toJson(null));
+        httpResponseErr         = mockedRestManager.new Pair<>(200, null);
+    }
+
+    /**
+     * Create the request and response before.
+     */
+    @Before
+    public void createRequestAndResponse() {
+        VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
+        actionInfo.setVmid("TheWizard");
+        actionInfo.setVmname("The Wizard of Oz");
+
+        VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
+        additionalParams.setAction("Go Home");
+        additionalParams.setActionInfo(actionInfo);
+
+        VfcHealRequest healRequest = new VfcHealRequest();
+        healRequest.setAdditionalParams(additionalParams);
+        healRequest.setCause("WestWitch");
+        healRequest.setVnfInstanceId("EmeraldCity");
+
+        final UUID requestId = UUID.randomUUID();
+        request = new VfcRequest();
+        request.setHealRequest(healRequest);
+        request.setNsInstanceId("Dorothy");
+        request.setRequestId(requestId);
+
+        List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();;
+
+        VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
+        responseDescriptor.setErrorCode("1234");
+        responseDescriptor.setProgress("Follow The Yellow Brick Road");
+        responseDescriptor.setResponseHistoryList(responseHistoryList);
+        responseDescriptor.setResponseId(UUID.randomUUID().toString());
+        responseDescriptor.setStatus("finished");
+        responseDescriptor.setStatusDescription("There's no place like home");
+
+        response = new VfcResponse();
+        response.setJobId("1234");
+        response.setRequestId(request.getRequestId().toString());
+        response.setResponseDescriptor(responseDescriptor);
+    }
+
+    /**
+     * Remove the environnment.
+     */
+    @After
+    public void tearDown() {
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+
+    @Test
+    public void testVfcInitiation() {
+        try {
+            new VfcManager(null, null);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null", 
+                    e.getMessage());
+        }
+
+        try {
+            new VfcManager(mockedWorkingMemory, null);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null", 
+                    e.getMessage());
+        }
+
+        try {
+            new VfcManager(mockedWorkingMemory, request);
+            fail("test should throw an exception here");
+        }
+        catch (IllegalArgumentException e) {
+            assertEquals("The value of policy engine manager environment property \"vfc.url\" may not be null", 
+                    e.getMessage());
+        }
+
+        // add url; username & password are not required
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        new VfcManager(mockedWorkingMemory, request);
+
+        // url & username, but no password
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+
+        // url, username, and password
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "Toto");
+        new VfcManager(mockedWorkingMemory, request);
+    }
+
+    @Test
+    public void testVfcExecutionException() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "Exception");
+
+        VfcManager manager = new VfcManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(
+            startsWith("http://somewhere.over.the.rainbow"),
+            eq("Dorothy"),
+            eq("Exception"),
+            anyMap(),
+            anyString(),
+            anyString()))
+            .thenThrow(new RuntimeException("OzException"));
+
+        managerThread.join();
+
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+
+    @Test
+    public void testVfcExecutionNull() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "Null");
+
+        VfcManager manager = new VfcManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), 
+                eq("Dorothy"), eq("Null"), anyMap(), anyString(), anyString()))
+                .thenReturn(null);
+
+        managerThread.join();
+
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+
+    @Test
+    public void testVfcExecutionError0() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "Error0");
+
+        VfcManager manager = new VfcManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), 
+                eq("Dorothy"), eq("Error0"), anyMap(), anyString(), anyString()))
+                .thenReturn(httpResponseErr);
+
+        managerThread.join();
+
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+
+    @Test
+    public void testVfcExecutionBadResponse() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "BadResponse");
+
+        VfcManager manager = new VfcManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), 
+                eq("Dorothy"), eq("OK"), anyMap(), anyString(), anyString()))
+                .thenReturn(httpResponseBadResponse);
+
+        managerThread.join();
+
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+
+    @Test
+    public void testVfcExecutionOk() throws InterruptedException {
+        PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
+        PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
+        PolicyEngine.manager.getEnvironment().put("vfc.password", "OK");
+
+        VfcManager manager = new VfcManager(mockedWorkingMemory, request);
+        manager.setRestManager(mockedRestManager);
+
+        Thread managerThread = new Thread(manager);
+        managerThread.start();
+
+        when(mockedRestManager.post(startsWith("http://somewhere.over.the.rainbow"), 
+                eq("Dorothy"), eq("OK"), anyMap(), anyString(), anyString()))
+                .thenReturn(httpResponsePutOk);
+
+        when(mockedRestManager.get(endsWith("1234"), eq("Dorothy"), eq("OK"), anyMap()))
+            .thenReturn(httpResponseGetOk);
+
+        managerThread.join();
+
+        PolicyEngine.manager.getEnvironment().remove("vfc.password");
+        PolicyEngine.manager.getEnvironment().remove("vfc.username");
+        PolicyEngine.manager.getEnvironment().remove("vfc.url");
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
new file mode 100644
index 0000000..67720cc
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.UUID;
+
+import org.junit.Test;
+
+public class VfcRequestTest {
+
+    @Test
+    public void testVfcRequest() {
+        VfcRequest request = new VfcRequest();
+        assertNotNull(request);
+        assertNotEquals(0, request.hashCode());
+
+        String nsInstanceId = "Dorothy";
+        request.setNsInstanceId(nsInstanceId);
+        assertEquals(nsInstanceId, request.getNsInstanceId());
+
+        UUID requestId = UUID.randomUUID();
+        request.setRequestId(requestId);
+        assertEquals(requestId, request.getRequestId());
+
+        VfcHealRequest healRequest = new VfcHealRequest();
+        request.setHealRequest(healRequest);
+        assertEquals(healRequest, request.getHealRequest());
+
+        assertNotEquals(0, request.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
new file mode 100644
index 0000000..571c475
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class VfcResponseDescriptorTest {
+
+    @Test
+    public void testVfcResponseDescriptor() {
+        VfcResponseDescriptor descriptor = new VfcResponseDescriptor();
+        assertNotNull(descriptor);
+        assertNotEquals(0, descriptor.hashCode());
+
+        String errorCode = "WitchIsDead";
+        descriptor.setErrorCode(errorCode);
+        assertEquals(errorCode, descriptor.getErrorCode());
+
+        String progress = "Visited Wizard";
+        descriptor.setProgress(progress);
+        assertEquals(progress, descriptor.getProgress());
+
+        List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();
+        descriptor.setResponseHistoryList(responseHistoryList);
+        assertEquals(responseHistoryList, descriptor.getResponseHistoryList());
+
+        String responseId = "WishHard";
+        descriptor.setResponseId(responseId);
+        assertEquals(responseId, descriptor.getResponseId());
+
+        String status = "Back in Kansas";
+        descriptor.setStatus(status);
+        assertEquals(status, descriptor.getStatus());
+
+        String statusDescription = "Back on the prairie";
+        descriptor.setStatusDescription(statusDescription);
+        assertEquals(statusDescription, descriptor.getStatusDescription());
+
+        assertNotEquals(0, descriptor.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
new file mode 100644
index 0000000..196ae2f
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.onap.policy.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class VfcResponseTest {
+
+    @Test
+    public void testVfcResponse() {
+        VfcResponse response = new VfcResponse();
+        assertNotNull(response);
+        assertNotEquals(0, response.hashCode());
+
+        String jobId = "GetToOz";
+        response.setJobId(jobId);
+        assertEquals(jobId, response.getJobId());
+
+        String requestId = "Get Home";
+        response.setRequestId(requestId);
+        assertEquals(requestId, response.getRequestId());
+
+        VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
+        response.setResponseDescriptor(responseDescriptor);
+        assertEquals(responseDescriptor, response.getResponseDescriptor());
+
+        assertNotEquals(0, response.hashCode());
+    }
+}
diff --git a/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/util/SerializationTest.java b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/util/SerializationTest.java
new file mode 100644
index 0000000..983760a
--- /dev/null
+++ b/models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/util/SerializationTest.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * vfc
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2018 AT&T Corporation. 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.onap.policy.vfc.util;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class SerializationTest {
+
+    @Test
+    public void test() {
+        assertNotNull(Serialization.gsonPretty);
+    }
+}
