diff --git a/appc-client/client-kit/.gitignore b/appc-client/client-kit/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/appc-client/client-kit/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-client/client-kit/pom.xml b/appc-client/client-kit/pom.xml
new file mode 100644
index 0000000..ab3b1fa
--- /dev/null
+++ b/appc-client/client-kit/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ================================================================================
+  Copyright (C) 2017 Amdocs
+  =============================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  ============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>
+        <artifactId>appc-java-client</artifactId>
+        <groupId>org.openecomp.appc.client</groupId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>client-kit</artifactId>
+
+
+    <properties>
+        <licenseDir>${project.parent.parent.basedir}</licenseDir>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.appc.client</groupId>
+            <artifactId>client-lib</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-parser-impl</artifactId>
+            <version>${yang.parser.impl.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/RPC.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/RPC.java
new file mode 100644
index 0000000..001a303
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/RPC.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RPC {
+    String name();
+    Class<?> outputType();
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcClientServiceFactoryProvider.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcClientServiceFactoryProvider.java
new file mode 100644
index 0000000..ba6284e
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcClientServiceFactoryProvider.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.api;
+
+import org.openecomp.appc.client.lcm.impl.business.AppcLifeCycleManagerServiceFactoryImpl;
+
+public class AppcClientServiceFactoryProvider {
+
+    private static AppcLifeCycleManagerServiceFactory appcLifeCycleManagerServiceFactory;
+
+    public static synchronized <T> T getFactory(Class<T> clazz) {
+        if (clazz.equals(AppcLifeCycleManagerServiceFactory.class)) {
+            if (appcLifeCycleManagerServiceFactory == null) {
+                appcLifeCycleManagerServiceFactory = new AppcLifeCycleManagerServiceFactoryImpl();
+            }
+            return (T) appcLifeCycleManagerServiceFactory;
+        } else {
+            throw new IllegalArgumentException(clazz.getName());
+        }
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcLifeCycleManagerServiceFactory.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcLifeCycleManagerServiceFactory.java
new file mode 100644
index 0000000..7bf9790
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/AppcLifeCycleManagerServiceFactory.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.api;
+
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+
+import java.util.Properties;
+
+public interface AppcLifeCycleManagerServiceFactory {
+
+    /**
+     * Creates a new stateful LCM API
+     * @param context application context parameters
+     * @param properties configures the behaviour of the LCM
+     * @return a new stateful LCM API
+     * @throws AppcClientException in case of problem in instantiation
+     */
+    LifeCycleManagerStateful createLifeCycleManagerStateful(ApplicationContext context, Properties properties) throws AppcClientException;
+
+    /**
+     * performs a shutdown of LCM API.
+     * in case of graceful, will try and execute the remaining requests, otherwise, will force the shutdown right away
+     * @param isForceShutdown - boolean. If true to perform force shutdown, other to perform graceful shutdown.
+     */
+    void shutdownLifeCycleManager(boolean isForceShutdown);
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ApplicationContext.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ApplicationContext.java
new file mode 100644
index 0000000..5829b0f
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ApplicationContext.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.api;
+
+/**
+ * Created by gital on 11/27/2016.
+ */
+public class ApplicationContext {
+
+    private String mechID;
+    private String applicationID;
+
+    public String getMechID() {
+        return mechID;
+    }
+
+    public void setMechID(String mechID) {
+        this.mechID = mechID;
+    }
+
+    public String getApplicationID() {
+        return applicationID;
+    }
+
+    public void setApplicationID(String applicationID) {
+        this.applicationID = applicationID;
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/LifeCycleManagerStateful.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/LifeCycleManagerStateful.java
new file mode 100644
index 0000000..3a2aeb0
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/LifeCycleManagerStateful.java
@@ -0,0 +1,901 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/*
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.api;
+
+import org.openecomp.appc.client.lcm.model.AuditOutput;
+import org.openecomp.appc.client.lcm.model.AuditInput;
+import org.openecomp.appc.client.lcm.model.CheckLockOutput;
+import org.openecomp.appc.client.lcm.model.CheckLockInput;
+import org.openecomp.appc.client.lcm.model.ConfigBackupOutput;
+import org.openecomp.appc.client.lcm.model.ConfigBackupInput;
+import org.openecomp.appc.client.lcm.model.ConfigBackupDeleteOutput;
+import org.openecomp.appc.client.lcm.model.ConfigBackupDeleteInput;
+import org.openecomp.appc.client.lcm.model.ConfigExportOutput;
+import org.openecomp.appc.client.lcm.model.ConfigExportInput;
+import org.openecomp.appc.client.lcm.model.ConfigModifyOutput;
+import org.openecomp.appc.client.lcm.model.ConfigModifyInput;
+import org.openecomp.appc.client.lcm.model.ConfigRestoreOutput;
+import org.openecomp.appc.client.lcm.model.ConfigRestoreInput;
+import org.openecomp.appc.client.lcm.model.ConfigScaleoutOutput;
+import org.openecomp.appc.client.lcm.model.ConfigScaleoutInput;
+import org.openecomp.appc.client.lcm.model.ConfigureOutput;
+import org.openecomp.appc.client.lcm.model.ConfigureInput;
+import org.openecomp.appc.client.lcm.model.EvacuateOutput;
+import org.openecomp.appc.client.lcm.model.EvacuateInput;
+import org.openecomp.appc.client.lcm.model.HealthCheckOutput;
+import org.openecomp.appc.client.lcm.model.HealthCheckInput;
+import org.openecomp.appc.client.lcm.model.LiveUpgradeOutput;
+import org.openecomp.appc.client.lcm.model.LiveUpgradeInput;
+import org.openecomp.appc.client.lcm.model.LockOutput;
+import org.openecomp.appc.client.lcm.model.LockInput;
+import org.openecomp.appc.client.lcm.model.MigrateOutput;
+import org.openecomp.appc.client.lcm.model.MigrateInput;
+import org.openecomp.appc.client.lcm.model.RebuildOutput;
+import org.openecomp.appc.client.lcm.model.RebuildInput;
+import org.openecomp.appc.client.lcm.model.RestartOutput;
+import org.openecomp.appc.client.lcm.model.RestartInput;
+import org.openecomp.appc.client.lcm.model.RollbackOutput;
+import org.openecomp.appc.client.lcm.model.RollbackInput;
+import org.openecomp.appc.client.lcm.model.SnapshotOutput;
+import org.openecomp.appc.client.lcm.model.SnapshotInput;
+import org.openecomp.appc.client.lcm.model.SoftwareUploadOutput;
+import org.openecomp.appc.client.lcm.model.SoftwareUploadInput;
+import org.openecomp.appc.client.lcm.model.StartOutput;
+import org.openecomp.appc.client.lcm.model.StartInput;
+import org.openecomp.appc.client.lcm.model.StopOutput;
+import org.openecomp.appc.client.lcm.model.StopInput;
+import org.openecomp.appc.client.lcm.model.SyncOutput;
+import org.openecomp.appc.client.lcm.model.SyncInput;
+import org.openecomp.appc.client.lcm.model.TerminateOutput;
+import org.openecomp.appc.client.lcm.model.TerminateInput;
+import org.openecomp.appc.client.lcm.model.TestOutput;
+import org.openecomp.appc.client.lcm.model.TestInput;
+import org.openecomp.appc.client.lcm.model.UnlockOutput;
+import org.openecomp.appc.client.lcm.model.UnlockInput;
+import org.openecomp.appc.RPC;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+
+/**
+ * Defines the services and request/response requirements for the ECOMP APP-C
+ * component.
+ */
+@javax.annotation.Generated(value = {
+        "templates/client-kit/open-api-to-java.ftl" }, date = "2017-05-04T20:09:01.723+05:30", comments = "Auto-generated from Open API specification")
+public interface LifeCycleManagerStateful {
+
+    /**
+     * The Audit command compares the configuration of the VNF associated with the
+     * current request against the configuration that is stored in APPC's
+     * configuration store. A successful Audit means that the current VNF
+     * configuration matches the APPC stored configuration. A failed Audit indicates
+     * that the request configuration is different from the stored configuration.
+     * This command can be applied to any VNF type. The only restriction is that a
+     * particular VNF should be able to support the interface for Reading
+     * Configuration using existing adapters and use the following protocols: CLI,
+     * RestConf and XML. The Audit action does not require any payload parameters
+     *
+     * @param auditInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "audit", outputType = AuditOutput.class)
+    AuditOutput audit(AuditInput auditInput) throws AppcClientException;
+
+    /**
+     * The Audit command compares the configuration of the VNF associated with the
+     * current request against the configuration that is stored in APPC's
+     * configuration store. A successful Audit means that the current VNF
+     * configuration matches the APPC stored configuration. A failed Audit indicates
+     * that the request configuration is different from the stored configuration.
+     * This command can be applied to any VNF type. The only restriction is that a
+     * particular VNF should be able to support the interface for Reading
+     * Configuration using existing adapters and use the following protocols: CLI,
+     * RestConf and XML. The Audit action does not require any payload parameters
+     *
+     * @param auditInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "audit", outputType = AuditOutput.class)
+    void audit(AuditInput auditInput, ResponseHandler<AuditOutput> listener) throws AppcClientException;
+
+    /**
+     * The CheckLock command returns true if the specified VNF is locked, false if
+     * not. A CheckLock command is deemed successful if the processing completes
+     * without error, whether the VNF is locked or not. The command returns only a
+     * single response with a final status. The APPC also locks the target VNF
+     * during any command processing, so a VNF can have a locked status even if no
+     * Lock command has been explicitly called. The CheckLock command returns a
+     * specific response structure that extends the default LCM response. The
+     * CheckLock action does not require any payload parameters
+     *
+     * @param checkLockInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "check-lock", outputType = CheckLockOutput.class)
+    CheckLockOutput checkLock(CheckLockInput checkLockInput) throws AppcClientException;
+
+    /**
+     * The CheckLock command returns true if the specified VNF is locked, false if
+     * not. A CheckLock command is deemed successful if the processing completes
+     * without error, whether the VNF is locked or not. The command returns only a
+     * single response with a final status. The APPC also locks the target VNF
+     * during any command processing, so a VNF can have a locked status even if no
+     * Lock command has been explicitly called. The CheckLock command returns a
+     * specific response structure that extends the default LCM response. The
+     * CheckLock action does not require any payload parameters
+     *
+     * @param checkLockInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "check-lock", outputType = CheckLockOutput.class)
+    void checkLock(CheckLockInput checkLockInput, ResponseHandler<CheckLockOutput> listener) throws AppcClientException;
+
+    /**
+     * An operation to Backup configurations of a virtual network function (or VM)
+     *
+     * @param configBackupInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-backup", outputType = ConfigBackupOutput.class)
+    ConfigBackupOutput configBackup(ConfigBackupInput configBackupInput) throws AppcClientException;
+
+    /**
+     * An operation to Backup configurations of a virtual network function (or VM)
+     *
+     * @param configBackupInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-backup", outputType = ConfigBackupOutput.class)
+    void configBackup(ConfigBackupInput configBackupInput, ResponseHandler<ConfigBackupOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * An operation to Delete backup configurations of a virtual network function
+     * (or VM)
+     *
+     * @param configBackupDeleteInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-backup-delete", outputType = ConfigBackupDeleteOutput.class)
+    ConfigBackupDeleteOutput configBackupDelete(ConfigBackupDeleteInput configBackupDeleteInput)
+            throws AppcClientException;
+
+    /**
+     * An operation to Delete backup configurations of a virtual network function
+     * (or VM)
+     *
+     * @param configBackupDeleteInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-backup-delete", outputType = ConfigBackupDeleteOutput.class)
+    void configBackupDelete(ConfigBackupDeleteInput configBackupDeleteInput,
+            ResponseHandler<ConfigBackupDeleteOutput> listener) throws AppcClientException;
+
+    /**
+     * An operation to Export configurations of a virtual network function (or VM)
+     *
+     * @param configExportInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-export", outputType = ConfigExportOutput.class)
+    ConfigExportOutput configExport(ConfigExportInput configExportInput) throws AppcClientException;
+
+    /**
+     * An operation to Export configurations of a virtual network function (or VM)
+     *
+     * @param configExportInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-export", outputType = ConfigExportOutput.class)
+    void configExport(ConfigExportInput configExportInput, ResponseHandler<ConfigExportOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * Use the ModifyConfig command when a full configuration cycle is either not
+     * required or is considered too costly. The ModifyConfig LCM action affects
+     * only a subset of the total configuration data of a VNF. The set of
+     * configuration parameters to be affected is a subset of the total
+     * configuration data of the target VNF type. The payload block must contain the
+     * configuration parameters to be modified and their values. A successful modify
+     * returns a success response. A failed modify returns a failure response and
+     * the specific failure messages in the response payload block
+     *
+     * @param configModifyInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-modify", outputType = ConfigModifyOutput.class)
+    ConfigModifyOutput configModify(ConfigModifyInput configModifyInput) throws AppcClientException;
+
+    /**
+     * Use the ModifyConfig command when a full configuration cycle is either not
+     * required or is considered too costly. The ModifyConfig LCM action affects
+     * only a subset of the total configuration data of a VNF. The set of
+     * configuration parameters to be affected is a subset of the total
+     * configuration data of the target VNF type. The payload block must contain the
+     * configuration parameters to be modified and their values. A successful modify
+     * returns a success response. A failed modify returns a failure response and
+     * the specific failure messages in the response payload block
+     *
+     * @param configModifyInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-modify", outputType = ConfigModifyOutput.class)
+    void configModify(ConfigModifyInput configModifyInput, ResponseHandler<ConfigModifyOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * An operation to restore the configurations of a virtual network function (or
+     * VM)
+     *
+     * @param configRestoreInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-restore", outputType = ConfigRestoreOutput.class)
+    ConfigRestoreOutput configRestore(ConfigRestoreInput configRestoreInput) throws AppcClientException;
+
+    /**
+     * An operation to restore the configurations of a virtual network function (or
+     * VM)
+     *
+     * @param configRestoreInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-restore", outputType = ConfigRestoreOutput.class)
+    void configRestore(ConfigRestoreInput configRestoreInput, ResponseHandler<ConfigRestoreOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * An operation to scaleout the configurations of a virtual network function (or
+     * VM)
+     *
+     * @param configScaleoutInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-scaleout", outputType = ConfigScaleoutOutput.class)
+    ConfigScaleoutOutput configScaleout(ConfigScaleoutInput configScaleoutInput) throws AppcClientException;
+
+    /**
+     * An operation to scaleout the configurations of a virtual network function (or
+     * VM)
+     *
+     * @param configScaleoutInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "config-scaleout", outputType = ConfigScaleoutOutput.class)
+    void configScaleout(ConfigScaleoutInput configScaleoutInput, ResponseHandler<ConfigScaleoutOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * An operation to configure the configurations of a virtual network function
+     * (or VM)
+     *
+     * @param configureInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "configure", outputType = ConfigureOutput.class)
+    ConfigureOutput configure(ConfigureInput configureInput) throws AppcClientException;
+
+    /**
+     * An operation to configure the configurations of a virtual network function
+     * (or VM)
+     *
+     * @param configureInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "configure", outputType = ConfigureOutput.class)
+    void configure(ConfigureInput configureInput, ResponseHandler<ConfigureOutput> listener) throws AppcClientException;
+
+    /**
+     * An operation to evacuate a virtual network function (or VM)
+     *
+     * @param evacuateInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "evacuate", outputType = EvacuateOutput.class)
+    EvacuateOutput evacuate(EvacuateInput evacuateInput) throws AppcClientException;
+
+    /**
+     * An operation to evacuate a virtual network function (or VM)
+     *
+     * @param evacuateInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "evacuate", outputType = EvacuateOutput.class)
+    void evacuate(EvacuateInput evacuateInput, ResponseHandler<EvacuateOutput> listener) throws AppcClientException;
+
+    /**
+     * This command runs a VNF health check and returns the result. A health check
+     * is VNF-specific. For a complex VNF, APPC initiates further subordinate health
+     * checks
+     *
+     * @param healthCheckInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "health-check", outputType = HealthCheckOutput.class)
+    HealthCheckOutput healthCheck(HealthCheckInput healthCheckInput) throws AppcClientException;
+
+    /**
+     * This command runs a VNF health check and returns the result. A health check
+     * is VNF-specific. For a complex VNF, APPC initiates further subordinate health
+     * checks
+     *
+     * @param healthCheckInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "health-check", outputType = HealthCheckOutput.class)
+    void healthCheck(HealthCheckInput healthCheckInput, ResponseHandler<HealthCheckOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * The LiveUpgrade LCM action upgrades the target VNF to a new version without
+     * interrupting VNF operation. A successful upgrade returns a success status. A
+     * failed upgrade returns a failure code and the failure messages in the
+     * response payload block. The payload includes the IP of the location that
+     * hosts the new software version installer file and the new software version.
+     * Connections or operations that are active at the time of the LiveUpgrade
+     * action request will not be interrupted by the action and, therefore, the
+     * action may take a significant amount of time to run. A LiveUpgrade is defined
+     * as non-disruptive; it is the responsibility of the VNF to handle disruptions
+     * if they occur
+     *
+     * @param liveUpgradeInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "live-upgrade", outputType = LiveUpgradeOutput.class)
+    LiveUpgradeOutput liveUpgrade(LiveUpgradeInput liveUpgradeInput) throws AppcClientException;
+
+    /**
+     * The LiveUpgrade LCM action upgrades the target VNF to a new version without
+     * interrupting VNF operation. A successful upgrade returns a success status. A
+     * failed upgrade returns a failure code and the failure messages in the
+     * response payload block. The payload includes the IP of the location that
+     * hosts the new software version installer file and the new software version.
+     * Connections or operations that are active at the time of the LiveUpgrade
+     * action request will not be interrupted by the action and, therefore, the
+     * action may take a significant amount of time to run. A LiveUpgrade is defined
+     * as non-disruptive; it is the responsibility of the VNF to handle disruptions
+     * if they occur
+     *
+     * @param liveUpgradeInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "live-upgrade", outputType = LiveUpgradeOutput.class)
+    void liveUpgrade(LiveUpgradeInput liveUpgradeInput, ResponseHandler<LiveUpgradeOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * Use the Lock command to ensure exclusive access during a series of critical
+     * LCM commands. The Lock action will return a successful result if the VNF is
+     * not already locked or if it was locked with the same request-id, otherwise
+     * the action returns a response with a reject status code. When a VNF is
+     * locked, any subsequent sequential commands with same request-id will be
+     * accepted. Commands associated with other request-ids will be rejected. The
+     * Lock command returns only one final response with the status of the request
+     * processing. The APPC also locks the target VNF during any command processing.
+     * If a lock action is then requested on that VNF, it will be rejected because
+     * the VNF was already locked, even though no actual lock command was explicitly
+     * invoked
+     *
+     * @param lockInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "lock", outputType = LockOutput.class)
+    LockOutput lock(LockInput lockInput) throws AppcClientException;
+
+    /**
+     * Use the Lock command to ensure exclusive access during a series of critical
+     * LCM commands. The Lock action will return a successful result if the VNF is
+     * not already locked or if it was locked with the same request-id, otherwise
+     * the action returns a response with a reject status code. When a VNF is
+     * locked, any subsequent sequential commands with same request-id will be
+     * accepted. Commands associated with other request-ids will be rejected. The
+     * Lock command returns only one final response with the status of the request
+     * processing. The APPC also locks the target VNF during any command processing.
+     * If a lock action is then requested on that VNF, it will be rejected because
+     * the VNF was already locked, even though no actual lock command was explicitly
+     * invoked
+     *
+     * @param lockInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "lock", outputType = LockOutput.class)
+    void lock(LockInput lockInput, ResponseHandler<LockOutput> listener) throws AppcClientException;
+
+    /**
+     * Migrates a running target VFC from its current AIC host to another. A
+     * destination AIC node will be selected by relying on AIC internal rules to
+     * migrate. A successful Migrate action returns a success response and the new
+     * AIC node identity in the response payload block. A failed Migrate action
+     * returns a failure and the failure messages in the response payload block
+     *
+     * @param migrateInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "migrate", outputType = MigrateOutput.class)
+    MigrateOutput migrate(MigrateInput migrateInput) throws AppcClientException;
+
+    /**
+     * Migrates a running target VFC from its current AIC host to another. A
+     * destination AIC node will be selected by relying on AIC internal rules to
+     * migrate. A successful Migrate action returns a success response and the new
+     * AIC node identity in the response payload block. A failed Migrate action
+     * returns a failure and the failure messages in the response payload block
+     *
+     * @param migrateInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "migrate", outputType = MigrateOutput.class)
+    void migrate(MigrateInput migrateInput, ResponseHandler<MigrateOutput> listener) throws AppcClientException;
+
+    /**
+     * Recreates a target VFC instance to a known, stable state. A successful
+     * rebuild returns a success response and the rebuild details in the response
+     * payload block. A failed rebuild returns a failure and the failure messages in
+     * the response payload block
+     *
+     * @param rebuildInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "rebuild", outputType = RebuildOutput.class)
+    RebuildOutput rebuild(RebuildInput rebuildInput) throws AppcClientException;
+
+    /**
+     * Recreates a target VFC instance to a known, stable state. A successful
+     * rebuild returns a success response and the rebuild details in the response
+     * payload block. A failed rebuild returns a failure and the failure messages in
+     * the response payload block
+     *
+     * @param rebuildInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "rebuild", outputType = RebuildOutput.class)
+    void rebuild(RebuildInput rebuildInput, ResponseHandler<RebuildOutput> listener) throws AppcClientException;
+
+    /**
+     * An operation to restart a virtual network function (or VM)
+     *
+     * @param restartInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "restart", outputType = RestartOutput.class)
+    RestartOutput restart(RestartInput restartInput) throws AppcClientException;
+
+    /**
+     * An operation to restart a virtual network function (or VM)
+     *
+     * @param restartInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "restart", outputType = RestartOutput.class)
+    void restart(RestartInput restartInput, ResponseHandler<RestartOutput> listener) throws AppcClientException;
+
+    /**
+     * Sets a VNF to the previous version of the configuration without explicitly
+     * invoking the configuration set name. This command is used when the
+     * configuration was successful, but the health-check was not. A successful
+     * rollback returns a success status when the restart process has completed. A
+     * failed or a partially failed (for a complex VNF) rollback returns a failure
+     * and the failure messages in the response payload block. This command can be
+     * applied to any VNF type. The only restriction is that the particular VNF
+     * should be built based on the generic heap stack
+     *
+     * @param rollbackInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "rollback", outputType = RollbackOutput.class)
+    RollbackOutput rollback(RollbackInput rollbackInput) throws AppcClientException;
+
+    /**
+     * Sets a VNF to the previous version of the configuration without explicitly
+     * invoking the configuration set name. This command is used when the
+     * configuration was successful, but the health-check was not. A successful
+     * rollback returns a success status when the restart process has completed. A
+     * failed or a partially failed (for a complex VNF) rollback returns a failure
+     * and the failure messages in the response payload block. This command can be
+     * applied to any VNF type. The only restriction is that the particular VNF
+     * should be built based on the generic heap stack
+     *
+     * @param rollbackInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "rollback", outputType = RollbackOutput.class)
+    void rollback(RollbackInput rollbackInput, ResponseHandler<RollbackOutput> listener) throws AppcClientException;
+
+    /**
+     * Creates a snapshot of a VNF, or VM. The Snapshot command returns a customized
+     * response containing a reference to the newly created snapshot instance if the
+     * action is successful. This command can be applied to any VNF type. The only
+     * restriction is that the particular VNF should be built based on the generic
+     * heap stack
+     *
+     * @param snapshotInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "snapshot", outputType = SnapshotOutput.class)
+    SnapshotOutput snapshot(SnapshotInput snapshotInput) throws AppcClientException;
+
+    /**
+     * Creates a snapshot of a VNF, or VM. The Snapshot command returns a customized
+     * response containing a reference to the newly created snapshot instance if the
+     * action is successful. This command can be applied to any VNF type. The only
+     * restriction is that the particular VNF should be built based on the generic
+     * heap stack
+     *
+     * @param snapshotInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "snapshot", outputType = SnapshotOutput.class)
+    void snapshot(SnapshotInput snapshotInput, ResponseHandler<SnapshotOutput> listener) throws AppcClientException;
+
+    /**
+     * This LCM command uploads the file that contains a new software version to the
+     * target VNF
+     *
+     * @param softwareUploadInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "software-upload", outputType = SoftwareUploadOutput.class)
+    SoftwareUploadOutput softwareUpload(SoftwareUploadInput softwareUploadInput) throws AppcClientException;
+
+    /**
+     * This LCM command uploads the file that contains a new software version to the
+     * target VNF
+     *
+     * @param softwareUploadInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "software-upload", outputType = SoftwareUploadOutput.class)
+    void softwareUpload(SoftwareUploadInput softwareUploadInput, ResponseHandler<SoftwareUploadOutput> listener)
+            throws AppcClientException;
+
+    /**
+     * An operation to start a virtual network function (or VM)
+     *
+     * @param startInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "start", outputType = StartOutput.class)
+    StartOutput start(StartInput startInput) throws AppcClientException;
+
+    /**
+     * An operation to start a virtual network function (or VM)
+     *
+     * @param startInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "start", outputType = StartOutput.class)
+    void start(StartInput startInput, ResponseHandler<StartOutput> listener) throws AppcClientException;
+
+    /**
+     * Stop a target VNF or VNFC. A successful stop returns a success response. For
+     * a multi-component stop to be considered successful, all component stop
+     * actions must succeed. A failed stop returns a failure and the failure
+     * messages in the response payload block
+     *
+     * @param stopInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "stop", outputType = StopOutput.class)
+    StopOutput stop(StopInput stopInput) throws AppcClientException;
+
+    /**
+     * Stop a target VNF or VNFC. A successful stop returns a success response. For
+     * a multi-component stop to be considered successful, all component stop
+     * actions must succeed. A failed stop returns a failure and the failure
+     * messages in the response payload block
+     *
+     * @param stopInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "stop", outputType = StopOutput.class)
+    void stop(StopInput stopInput, ResponseHandler<StopOutput> listener) throws AppcClientException;
+
+    /**
+     * The Sync action updates the current configuration in the APPC store with the
+     * running configuration from the device. A successful Sync returns a success
+     * status. A failed Sync returns a failure response status and failure messages
+     * in the response payload block. This command can be applied to any VNF type.
+     * The only restriction is that a particular VNF should be able to support the
+     * interface for Reading Configuration using existing adapters and use the
+     * following protocols: CLI, RestConf and XML
+     *
+     * @param syncInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "sync", outputType = SyncOutput.class)
+    SyncOutput sync(SyncInput syncInput) throws AppcClientException;
+
+    /**
+     * The Sync action updates the current configuration in the APPC store with the
+     * running configuration from the device. A successful Sync returns a success
+     * status. A failed Sync returns a failure response status and failure messages
+     * in the response payload block. This command can be applied to any VNF type.
+     * The only restriction is that a particular VNF should be able to support the
+     * interface for Reading Configuration using existing adapters and use the
+     * following protocols: CLI, RestConf and XML
+     *
+     * @param syncInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "sync", outputType = SyncOutput.class)
+    void sync(SyncInput syncInput, ResponseHandler<SyncOutput> listener) throws AppcClientException;
+
+    /**
+     * Terminate a target VNF and release its resources (possibly gracefully).
+     * Specific scripts can be run before termination by placing them under the
+     * Terminate life cycle event. All configuration files related to the target VNF
+     * are deleted. The resources of a terminated VNF that are not managed by APPC,
+     * such as those handled by SDNC or other components, are not handled and remain
+     * the responsibility of their respective managing functions. A successful
+     * Terminate action returns a success response. For a multi-component terminate
+     * to be considered successful, all component Terminate actions must also
+     * succeed. A failed Terminate returns a failure status and the failure messages
+     * in the response payload block
+     *
+     * @param terminateInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "terminate", outputType = TerminateOutput.class)
+    TerminateOutput terminate(TerminateInput terminateInput) throws AppcClientException;
+
+    /**
+     * Terminate a target VNF and release its resources (possibly gracefully).
+     * Specific scripts can be run before termination by placing them under the
+     * Terminate life cycle event. All configuration files related to the target VNF
+     * are deleted. The resources of a terminated VNF that are not managed by APPC,
+     * such as those handled by SDNC or other components, are not handled and remain
+     * the responsibility of their respective managing functions. A successful
+     * Terminate action returns a success response. For a multi-component terminate
+     * to be considered successful, all component Terminate actions must also
+     * succeed. A failed Terminate returns a failure status and the failure messages
+     * in the response payload block
+     *
+     * @param terminateInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "terminate", outputType = TerminateOutput.class)
+    void terminate(TerminateInput terminateInput, ResponseHandler<TerminateOutput> listener) throws AppcClientException;
+
+    /**
+     * The Test LCM action checks a target VNF or VNFC for correct operation. The
+     * functionality of the Test LCM action involves should involve more than a
+     * HealthCheck , it should provide a means for launching a test transaction and
+     * determining if the transaction completed successfully or not. A transaction
+     * launcher microservice will have to be supplied by the VNF and called by APPC.
+     * A successful test returns a success and the results of the test in the
+     * payload block. A failed test returns a failure and specific failure messages
+     * in the payload block
+     *
+     * @param testInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "test", outputType = TestOutput.class)
+    TestOutput test(TestInput testInput) throws AppcClientException;
+
+    /**
+     * The Test LCM action checks a target VNF or VNFC for correct operation. The
+     * functionality of the Test LCM action involves should involve more than a
+     * HealthCheck , it should provide a means for launching a test transaction and
+     * determining if the transaction completed successfully or not. A transaction
+     * launcher microservice will have to be supplied by the VNF and called by APPC.
+     * A successful test returns a success and the results of the test in the
+     * payload block. A failed test returns a failure and specific failure messages
+     * in the payload block
+     *
+     * @param testInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "test", outputType = TestOutput.class)
+    void test(TestInput testInput, ResponseHandler<TestOutput> listener) throws AppcClientException;
+
+    /**
+     * Run the Unlock command to release the lock on a VNF and allow other clients
+     * to perform LCM commands on that VNF. The Unlock command will result in
+     * success if the VNF successfully unlocked or if it was already unlocked,
+     * otherwise commands will be rejected. The Unlock command will only return
+     * success if the VNF was locked with same request-id (on page 6). The Unlock
+     * command returns only one final response with the status of the request
+     * processing. The APPC also locks the target VNF during any command processing.
+     * If an Unlock action is then requested on that VNF with a different
+     * request-id, it will be rejected because the VNF is already locked for another
+     * process, even though no actual lock command was explicitly invoked
+     *
+     * @param unlockInput
+     *            - RPC input object
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "unlock", outputType = UnlockOutput.class)
+    UnlockOutput unlock(UnlockInput unlockInput) throws AppcClientException;
+
+    /**
+     * Run the Unlock command to release the lock on a VNF and allow other clients
+     * to perform LCM commands on that VNF. The Unlock command will result in
+     * success if the VNF successfully unlocked or if it was already unlocked,
+     * otherwise commands will be rejected. The Unlock command will only return
+     * success if the VNF was locked with same request-id (on page 6). The Unlock
+     * command returns only one final response with the status of the request
+     * processing. The APPC also locks the target VNF during any command processing.
+     * If an Unlock action is then requested on that VNF with a different
+     * request-id, it will be rejected because the VNF is already locked for another
+     * process, even though no actual lock command was explicitly invoked
+     *
+     * @param unlockInput
+     *            - RPC input object
+     * @param listener
+     *            - callback implementation
+     * @throws AppcClientException
+     *             - throw AppcClientException
+     */
+    @RPC(name = "unlock", outputType = UnlockOutput.class)
+    void unlock(UnlockInput unlockInput, ResponseHandler<UnlockOutput> listener) throws AppcClientException;
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ResponseHandler.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ResponseHandler.java
new file mode 100644
index 0000000..f762dea
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/api/ResponseHandler.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.api;
+
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+
+public interface ResponseHandler<T> {
+
+    /**
+     * Handler to react when a response arrives
+     * @param response the response output object
+     */
+    void onResponse(T response);
+
+    /**
+     * Handler to react when an exception arrives instead of a response
+     * @param exception detailed with type of exception
+     */
+    void onException(AppcClientException exception);
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientBusinessException.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientBusinessException.java
new file mode 100644
index 0000000..054dcc1
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientBusinessException.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.exceptions;
+
+public class AppcClientBusinessException extends AppcClientException {
+
+    public AppcClientBusinessException() {
+        super();
+    }
+
+    public AppcClientBusinessException(String message) {
+        super(message);
+    }
+
+    public AppcClientBusinessException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public AppcClientBusinessException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientException.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientException.java
new file mode 100644
index 0000000..aad22ee
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientException.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.exceptions;
+
+public class AppcClientException extends Exception {
+
+    public AppcClientException() {
+        super();
+    }
+
+    public AppcClientException(String message) {
+        super(message);
+    }
+
+    public AppcClientException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public AppcClientException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientInternalException.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientInternalException.java
new file mode 100644
index 0000000..a92eb55
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/exceptions/AppcClientInternalException.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.exceptions;
+
+public class AppcClientInternalException extends AppcClientException {
+
+    public AppcClientInternalException() {
+        super();
+    }
+
+    public AppcClientInternalException(String message) {
+        super(message);
+    }
+
+    public AppcClientInternalException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public AppcClientInternalException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/AppcLifeCycleManagerServiceFactoryImpl.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/AppcLifeCycleManagerServiceFactoryImpl.java
new file mode 100644
index 0000000..2cd6711
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/AppcLifeCycleManagerServiceFactoryImpl.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.client.lcm.api.AppcLifeCycleManagerServiceFactory;
+import org.openecomp.appc.client.lcm.api.ApplicationContext;
+import org.openecomp.appc.client.lcm.api.LifeCycleManagerStateful;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+
+import java.lang.reflect.Proxy;
+import java.util.Properties;
+
+public class AppcLifeCycleManagerServiceFactoryImpl implements AppcLifeCycleManagerServiceFactory {
+
+    private LifeCycleManagerStateful lifeCycleManagerStateful;
+    private LCMRequestProcessor lcmRequestProcessor;
+
+    @Override
+    public synchronized LifeCycleManagerStateful createLifeCycleManagerStateful(ApplicationContext context, Properties properties) throws AppcClientException{
+        if (lifeCycleManagerStateful == null) {
+            lcmRequestProcessor = new LCMRequestProcessor(context, properties);
+            lifeCycleManagerStateful = (LifeCycleManagerStateful) Proxy.newProxyInstance(LifeCycleManagerStateful.class.getClassLoader(), new Class<?>[]{LifeCycleManagerStateful.class}, new RPCInvocator(lcmRequestProcessor));
+        }
+        else {
+            throw new IllegalStateException("already instansiated LifeCycleManagerStateful instance");
+        }
+        return lifeCycleManagerStateful;
+    }
+
+    @Override
+    public void shutdownLifeCycleManager(boolean isForceShutdown) {
+        if(lcmRequestProcessor != null){
+            lcmRequestProcessor.shutdown(isForceShutdown);
+        }
+        else{
+            throw new IllegalStateException("The life cycle manager library wasn't instantiated properly, therefore the shutdown event will not be handled");
+        }
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreAsyncResponseHandlerImpl.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreAsyncResponseHandlerImpl.java
new file mode 100644
index 0000000..c01199e
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreAsyncResponseHandlerImpl.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.client.impl.core.CoreException;
+import org.openecomp.appc.client.impl.core.ICoreAsyncResponseHandler;
+import org.openecomp.appc.client.lcm.api.ResponseHandler;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+class CoreAsyncResponseHandlerImpl<T> extends CoreResponseHandler implements ICoreAsyncResponseHandler {
+
+    private final ResponseHandler<T> responseHandler;
+
+    CoreAsyncResponseHandlerImpl(ResponseHandler<T> responseHandler, Class<T> rpcOutput, ObjectMapper mapper) {
+        super(rpcOutput, mapper);
+        this.responseHandler = responseHandler;
+    }
+
+    public boolean onResponse(String message, String type) {
+        Boolean[] isFinal = new Boolean[1];
+        isFinal[0] = false;
+        try {
+            T responseObject = (T) super.getResponse(message, type, isFinal);
+            responseHandler.onResponse(responseObject);
+            return isFinal[0];
+        } catch (Exception e) {
+            this.onException(e);
+            isFinal[0] = true;
+        }
+        return isFinal[0];
+    }
+
+    public void onException(Exception e) {
+        AppcClientException ex = new AppcClientException(e);
+        responseHandler.onException(ex);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreResponseHandler.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreResponseHandler.java
new file mode 100644
index 0000000..7a04251
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreResponseHandler.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.client.lcm.exceptions.AppcClientInternalException;
+
+import org.openecomp.appc.client.lcm.model.Status;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+class CoreResponseHandler<T> {
+    private final Class<T> rpcOutput;
+    private final ObjectMapper mapper;
+
+    private final EELFLogger LOG = EELFManager.getInstance().getLogger(CoreResponseHandler.class);
+
+    CoreResponseHandler(Class<T> rpcOutput, ObjectMapper mapper) {
+        this.rpcOutput = rpcOutput;
+        this.mapper = mapper;
+    }
+
+    T getResponse(String message, String type, Boolean[] isFinal) throws AppcClientInternalException {
+        if (type.equals("error")) {
+            try {
+                String correlationId = getCorrelationID(message);
+                LOG.error("Received response with error on correlation id: " + correlationId);
+            } catch (IOException e) {
+                LOG.error("Received response with error and couldn't extract correlationID");
+            }
+            throw new AppcClientInternalException(message);
+        }
+        T responseObject = jsonToResponseObject(message);
+        int code = getStatusCode(responseObject);
+
+        int family = code / 100;
+
+        switch (family) {
+            case 1:
+            case 5:
+                // not final
+                break;
+            case 2:
+            case 3:
+            case 4:
+                isFinal[0] = true;
+                // final
+                break;
+            default: // Should never happen
+                throw new AppcClientInternalException(new IllegalStateException("Unsupported status code " + code + ". message: " + message));
+        }
+        return responseObject;
+
+    }
+
+    private T jsonToResponseObject(String message) throws AppcClientInternalException {
+        try {
+            JsonNode jsonOutput = mapper.readTree(message).get("output");
+            return rpcOutput.cast(mapper.treeToValue(jsonOutput, rpcOutput));
+        } catch (IOException e) {
+            throw new AppcClientInternalException("failed to read message: " + message, e);
+        }
+    }
+
+    private int getStatusCode(Object response) throws AppcClientInternalException {
+        try {
+            Method method = response.getClass().getMethod("getStatus");
+            Status status = (Status) method.invoke(response);
+            return status.getCode();
+        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
+            throw new AppcClientInternalException("failed to get status code from response: " + response, e);
+        }
+    }
+
+    private String getCorrelationID(String message) throws IOException {
+        JsonNode common = mapper.readTree(message).get("output").get("common-header");
+        String correlationId = common.get("request-id").asText() + "-" + common.get("sub-request-id").asText();
+        return correlationId;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreSyncResponseHandlerImpl.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreSyncResponseHandlerImpl.java
new file mode 100644
index 0000000..34aae47
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/CoreSyncResponseHandlerImpl.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.client.impl.core.CoreException;
+import org.openecomp.appc.client.impl.core.ICoreSyncResponseHandler;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientInternalException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+class CoreSyncResponseHandlerImpl<T> extends CoreResponseHandler implements ICoreSyncResponseHandler {
+
+    CoreSyncResponseHandlerImpl(Class rpcOutput, ObjectMapper mapper) {
+        super(rpcOutput, mapper);
+    }
+
+    public <T> T onResponse(String message, String type) throws CoreException {
+        Boolean[] isFinal = new Boolean[1];
+        isFinal[0] = false;
+        T responseObject = null;
+        try {
+            responseObject = (T) super.getResponse(message, type, isFinal);
+            responseObject = (isFinal[0]) ? responseObject : null;
+        } catch (AppcClientInternalException e) {
+            throw new CoreException(e);
+        }
+
+        return responseObject;
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/LCMRequestProcessor.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/LCMRequestProcessor.java
new file mode 100644
index 0000000..941e74d
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/LCMRequestProcessor.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.client.impl.core.*;
+import org.openecomp.appc.client.lcm.api.ApplicationContext;
+import org.openecomp.appc.client.lcm.api.ResponseHandler;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientBusinessException;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientInternalException;
+import org.openecomp.appc.client.lcm.model.CommonHeader;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Properties;
+import java.util.concurrent.TimeoutException;
+
+class LCMRequestProcessor {
+
+    private final IInvocationManager invocationManager;
+    private final ObjectMapper mapper;
+
+    LCMRequestProcessor(ApplicationContext context, Properties properties) throws AppcClientBusinessException {
+        try{
+            invocationManager = InvocationManagerFactory.getInstance();
+            invocationManager.init(properties);
+            mapper = new ObjectMapper();
+            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+        } catch (CoreException e) {
+            throw new AppcClientBusinessException(e);
+        }
+    }
+
+    <T> void processAsync(Object rpcInput, String rpcName, Class<T> rpcOutputType, ResponseHandler<T> handler) throws AppcClientInternalException {
+        try {
+            String correlationID = createCorrelationID(rpcInput);
+            String rpcStr = marshallRPCInput(rpcInput);
+            ICoreAsyncResponseHandler asyncResponseHandler = new CoreAsyncResponseHandlerImpl<T>(handler, rpcOutputType, mapper);
+            invocationManager.asyncRequest(rpcStr, asyncResponseHandler, correlationID, rpcName);
+        } catch (CoreException e) {
+            throw new AppcClientInternalException(e);
+        }
+    }
+
+    <T> T processSync(Object rpcInput, String rpcName, Class<T> rpcOutputType) throws AppcClientInternalException, AppcClientBusinessException {
+        T response = null;
+        try {
+            String correlationID = createCorrelationID(rpcInput);
+            String rpcStr = marshallRPCInput(rpcInput);
+            ICoreSyncResponseHandler syncResponseHandler = new CoreSyncResponseHandlerImpl<T>(rpcOutputType, mapper);
+            response = invocationManager.syncRequest(rpcStr, syncResponseHandler, correlationID, rpcName);
+        }catch (CoreException e){
+            if (e.getCause() instanceof AppcClientInternalException) {
+                throw (AppcClientInternalException) e.getCause();
+            }
+            else {
+                throw new AppcClientInternalException(e);
+            }
+        }catch (TimeoutException e){
+            throw new AppcClientBusinessException(e);
+        }
+        return response;
+    }
+
+    private CommonHeader getCommonHeader(Object rpcInput) throws AppcClientInternalException {
+        try {
+            Class<?> clazz = rpcInput.getClass();
+            Method method = clazz.getMethod("getCommonHeader");
+            return CommonHeader.class.cast(method.invoke(rpcInput));
+        } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
+            throw new AppcClientInternalException("can't get commonHeader");
+        }
+    }
+
+    private String createCorrelationID(Object rpcInput) throws AppcClientInternalException {
+        CommonHeader commonHeader = getCommonHeader(rpcInput);
+        return commonHeader.getRequestId() + "-" + commonHeader.getSubRequestId();
+    }
+
+    private String marshallRPCInput(Object rpcInput) throws AppcClientInternalException {
+        try {
+            JsonNode body =  mapper.valueToTree(rpcInput);
+            ObjectNode message = mapper.createObjectNode();
+            message.set("input", body);
+            return message.toString();
+        } catch (RuntimeException e) {
+            throw new AppcClientInternalException("can't marshall input", e);
+        }
+    }
+
+    void shutdown(boolean isForceShutdown){
+        invocationManager.shutdown(isForceShutdown);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/RPCInvocator.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/RPCInvocator.java
new file mode 100644
index 0000000..97ff1c4
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/impl/business/RPCInvocator.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.client.lcm.impl.business;
+
+import org.openecomp.appc.RPC;
+import org.openecomp.appc.client.lcm.api.ResponseHandler;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientBusinessException;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
+import org.openecomp.appc.client.lcm.exceptions.AppcClientInternalException;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+class RPCInvocator implements InvocationHandler {
+
+    private final LCMRequestProcessor lcmRequestProcessor;
+
+    RPCInvocator(LCMRequestProcessor lcmRequestProcessor) {
+        this.lcmRequestProcessor = lcmRequestProcessor;
+    }
+
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+        if (isLCMRequest(method)) {
+            try {
+                return invokeImpl(method, args);
+            }
+            catch (AppcClientInternalException | AppcClientBusinessException e) {
+                throw new AppcClientException(e);
+            }
+        } else {
+            // Delegate non-RPC Object's methods (hashCode/equals/etc) to the proxy instance itself
+            return method.invoke(proxy, args);
+        }
+    }
+
+    private <T> T invokeImpl(Method method, Object[] args) throws AppcClientInternalException, AppcClientBusinessException {
+        Object rpcInput = args[0];
+        RPC annotation = method.getAnnotation(RPC.class);
+        String rpcName = annotation.name();
+        @SuppressWarnings("unchecked")
+        Class<T> rpcOutputType = (Class<T>) annotation.outputType();
+
+        T result = null;
+        if (isAsync(method)) {
+            @SuppressWarnings("unchecked")
+            ResponseHandler<T> handler = (ResponseHandler<T>) args[1];
+            lcmRequestProcessor.processAsync(rpcInput, rpcName, rpcOutputType, handler);
+        }
+        else {
+            result = lcmRequestProcessor.processSync(rpcInput, rpcName, rpcOutputType);
+        }
+        return result;
+    }
+
+    private boolean isLCMRequest(Method method) {
+        return method.isAnnotationPresent(RPC.class);
+    }
+
+    private boolean isAsync(Method method) {
+        return method.getReturnType().equals(Void.TYPE);
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Action.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Action.java
new file mode 100644
index 0000000..3884428
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Action.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+/**
+* The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+*
+*/
+public enum Action {
+
+    Restart("Restart"),
+    Rebuild("Rebuild"),
+    Migrate("Migrate"),
+    Evacuate("Evacuate"),
+    Snapshot("Snapshot"),
+    Rollback("Rollback"),
+    Sync("Sync"),
+    Audit("Audit"),
+    Stop("Stop"),
+    Start("Start"),
+    Terminate("Terminate"),
+    SoftwareUpload("SoftwareUpload"),
+    HealthCheck("HealthCheck"),
+    LiveUpgrade("LiveUpgrade"),
+    Lock("Lock"),
+    Unlock("Unlock"),
+    Test("Test"),
+    CheckLock("CheckLock"),
+    Configure("Configure"),
+    ConfigModify("ConfigModify"),
+    ConfigScaleOut("ConfigScaleOut"),
+    ConfigRestore("ConfigRestore"),
+    ConfigBackup("ConfigBackup"),
+    ConfigBackupDelete("ConfigBackupDelete"),
+    ConfigExport("ConfigExport");
+
+    private String value;
+
+    Action(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return String.valueOf(value);
+    }
+
+    @JsonCreator
+    public static Action fromValue(String text) {
+        for (Action var : Action.values()) {
+            if (String.valueOf(var.value).equals(text)) {
+                return var;
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ActionIdentifiers.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ActionIdentifiers.java
new file mode 100644
index 0000000..54bd9a6
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ActionIdentifiers.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.501+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ActionIdentifiers {
+
+    @JsonProperty("service-instance-id")
+    private String serviceInstanceId;
+
+    @JsonProperty("vnf-id")
+    private String vnfId;
+
+    @JsonProperty("vnfc-name")
+    private String vnfcName;
+
+    @JsonProperty("vserver-id")
+    private String vserverId;
+
+    /**
+     * identifies a specific service the command refers to. When multiple APP-C instances are used and applied to a subset of services, this will become significant . The field is mandatory when the vnf-id is empty
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * identifies a specific service the command refers to. When multiple APP-C instances are used and applied to a subset of services, this will become significant . The field is mandatory when the vnf-id is empty
+     */
+    public void setServiceInstanceId(String serviceInstanceId) {
+        this.serviceInstanceId = serviceInstanceId;
+    }
+
+    /**
+     * identifies the VNF to which this action is to be applied(vnf-id uniquely identifies the service-instance referred to). Note that some actions are applied to multiple VNFs in the same service. When this is the case, vnf-id may be left out, but service-instance-id must appear. The field is mandatory when service-instance-id is empty
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * identifies the VNF to which this action is to be applied(vnf-id uniquely identifies the service-instance referred to). Note that some actions are applied to multiple VNFs in the same service. When this is the case, vnf-id may be left out, but service-instance-id must appear. The field is mandatory when service-instance-id is empty
+     */
+    public void setVnfId(String vnfId) {
+        this.vnfId = vnfId;
+    }
+
+    /**
+     * identifies the VNFC to which this action is to be applied. Some actions apply only to a component within a VNF (e.g. RESTART is sometimes applied to on VM only). In such a case, the name of the VNFC is used to search for the component within the VNF
+     */
+    public String getVnfcName() {
+        return vnfcName;
+    }
+
+    /**
+     * identifies the VNFC to which this action is to be applied. Some actions apply only to a component within a VNF (e.g. RESTART is sometimes applied to on VM only). In such a case, the name of the VNFC is used to search for the component within the VNF
+     */
+    public void setVnfcName(String vnfcName) {
+        this.vnfcName = vnfcName;
+    }
+
+    /**
+     * identifies a specific VM within the given service/vnf to which this action is to be applied
+     */
+    public String getVserverId() {
+        return vserverId;
+    }
+
+    /**
+     * identifies a specific VM within the given service/vnf to which this action is to be applied
+     */
+    public void setVserverId(String vserverId) {
+        this.vserverId = vserverId;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditInput.java
new file mode 100644
index 0000000..b5f15e0
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.512+05:30",
+    comments = "Auto-generated from Open API specification")
+public class AuditInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditOutput.java
new file mode 100644
index 0000000..975c01b
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/AuditOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.517+05:30",
+    comments = "Auto-generated from Open API specification")
+public class AuditOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockInput.java
new file mode 100644
index 0000000..a0fdfee
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockInput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.519+05:30",
+    comments = "Auto-generated from Open API specification")
+public class CheckLockInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockOutput.java
new file mode 100644
index 0000000..b72ac04
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CheckLockOutput.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.523+05:30",
+    comments = "Auto-generated from Open API specification")
+public class CheckLockOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    public enum Locked {
+        TRUE,
+        FALSE;
+    }
+
+    @JsonProperty("locked")
+    private Locked locked;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE
+     */
+    public Locked getLocked() {
+        return locked;
+    }
+
+    /**
+     * TRUE/FALSE - returns TRUE when the given VNF was locked, otherwise returns FALSE
+     */
+    public void setLocked(Locked locked) {
+        this.locked = locked;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CommonHeader.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CommonHeader.java
new file mode 100644
index 0000000..e71ad12
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/CommonHeader.java
@@ -0,0 +1,143 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A common header for all APP-C requests
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.49+05:30",
+    comments = "Auto-generated from Open API specification")
+public class CommonHeader {
+
+    @JsonProperty("timestamp")
+    private ZULU timestamp;
+
+    @JsonProperty("api-ver")
+    private String apiVer;
+
+    @JsonProperty("originator-id")
+    private String originatorId;
+
+    @JsonProperty("request-id")
+    private String requestId;
+
+    @JsonProperty("sub-request-id")
+    private String subRequestId;
+
+    @JsonProperty("flags")
+    private Flags flags;
+
+    /**
+     * Define a common definition of a time stamp (expressed as a formatted string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ
+     */
+    public ZULU getTimestamp() {
+        return timestamp;
+    }
+
+    /**
+     * Define a common definition of a time stamp (expressed as a formatted string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ
+     */
+    public void setTimestamp(ZULU timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    /**
+     * api-ver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)
+     */
+    public String getApiVer() {
+        return apiVer;
+    }
+
+    /**
+     * api-ver is the API version identifier. A given release of APPC should support all previous versions of APPC API (correlate with general requirements)
+     */
+    public void setApiVer(String apiVer) {
+        this.apiVer = apiVer;
+    }
+
+    /**
+     * originator-id an identifier of the calling system which can be used addressing purposes, i.e. returning asynchronous response to the proper destination over UEB (especially in case of multiple consumers of APP-C APIs)
+     */
+    public String getOriginatorId() {
+        return originatorId;
+    }
+
+    /**
+     * originator-id an identifier of the calling system which can be used addressing purposes, i.e. returning asynchronous response to the proper destination over UEB (especially in case of multiple consumers of APP-C APIs)
+     */
+    public void setOriginatorId(String originatorId) {
+        this.originatorId = originatorId;
+    }
+
+    /**
+     * UUID for the request ID. An OSS/BSS identifier for the request that caused the current action. Multiple API calls may be made with the same request-id The request-id shall be recorded throughout the operations on a single request
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * UUID for the request ID. An OSS/BSS identifier for the request that caused the current action. Multiple API calls may be made with the same request-id The request-id shall be recorded throughout the operations on a single request
+     */
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    /**
+     * Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request
+     */
+    public String getSubRequestId() {
+        return subRequestId;
+    }
+
+    /**
+     * Uniquely identifies a specific LCM action. It is persistent over the life-cycle of a single request
+     */
+    public void setSubRequestId(String subRequestId) {
+        this.subRequestId = subRequestId;
+    }
+
+    /**
+     * Flags are generic flags that apply to any and all commands, all are optional
+     */
+    public Flags getFlags() {
+        return flags;
+    }
+
+    /**
+     * Flags are generic flags that apply to any and all commands, all are optional
+     */
+    public void setFlags(Flags flags) {
+        this.flags = flags;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteInput.java
new file mode 100644
index 0000000..96a8766
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteInput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.533+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigBackupDeleteInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteOutput.java
new file mode 100644
index 0000000..4edcfdb
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupDeleteOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.537+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigBackupDeleteOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupInput.java
new file mode 100644
index 0000000..8f6f64f
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.526+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigBackupInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupOutput.java
new file mode 100644
index 0000000..14f8721
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigBackupOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.529+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigBackupOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportInput.java
new file mode 100644
index 0000000..e42e2df
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportInput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.541+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigExportInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportOutput.java
new file mode 100644
index 0000000..25984aa
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigExportOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.543+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigExportOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyInput.java
new file mode 100644
index 0000000..c4c16d6
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.559+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigModifyInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyOutput.java
new file mode 100644
index 0000000..bc7e249
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigModifyOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.563+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigModifyOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreInput.java
new file mode 100644
index 0000000..bfda830
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.565+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigRestoreInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreOutput.java
new file mode 100644
index 0000000..788c973
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigRestoreOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.568+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigRestoreOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutInput.java
new file mode 100644
index 0000000..a819044
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.571+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigScaleoutInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutOutput.java
new file mode 100644
index 0000000..553d726
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigScaleoutOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.574+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigScaleoutOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureInput.java
new file mode 100644
index 0000000..a1fe989
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.577+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigureInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureOutput.java
new file mode 100644
index 0000000..3de0814
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ConfigureOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.585+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ConfigureOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateInput.java
new file mode 100644
index 0000000..b7908cd
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.587+05:30",
+    comments = "Auto-generated from Open API specification")
+public class EvacuateInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateOutput.java
new file mode 100644
index 0000000..dd1dc0e
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/EvacuateOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.59+05:30",
+    comments = "Auto-generated from Open API specification")
+public class EvacuateOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Flags.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Flags.java
new file mode 100644
index 0000000..f0fa8f0
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Flags.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Flags are generic flags that apply to any and all commands, all are optional
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.498+05:30",
+    comments = "Auto-generated from Open API specification")
+public class Flags {
+
+    public enum Mode {
+        EXCLUSIVE,
+        NORMAL;
+    }
+
+    @JsonProperty("mode")
+    private Mode mode;
+
+    public enum Force {
+        TRUE,
+        FALSE;
+    }
+
+    @JsonProperty("force")
+    private Force force;
+
+    @JsonProperty("ttl")
+    private int ttl;
+
+    /**
+     * EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)
+     */
+    public Mode getMode() {
+        return mode;
+    }
+
+    /**
+     * EXCLUSIVE (accept no queued requests on this VNF while processing) or NORMAL (queue other requests until complete)
+     */
+    public void setMode(Mode mode) {
+        this.mode = mode;
+    }
+
+    /**
+     * TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state
+     */
+    public Force getForce() {
+        return force;
+    }
+
+    /**
+     * TRUE/FALSE - Execute action even if target is in unstable (i.e. locked, transiting, etc.) state
+     */
+    public void setForce(Force force) {
+        this.force = force;
+    }
+
+    /**
+     * The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation
+     */
+    public int getTtl() {
+        return ttl;
+    }
+
+    /**
+     * The timeout value (expressed in seconds) for action execution, between action being received by APPC and action initiation
+     */
+    public void setTtl(int ttl) {
+        this.ttl = ttl;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckInput.java
new file mode 100644
index 0000000..2124d3c
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.593+05:30",
+    comments = "Auto-generated from Open API specification")
+public class HealthCheckInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckOutput.java
new file mode 100644
index 0000000..6c2f5cc
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/HealthCheckOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.596+05:30",
+    comments = "Auto-generated from Open API specification")
+public class HealthCheckOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeInput.java
new file mode 100644
index 0000000..980bcae
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.602+05:30",
+    comments = "Auto-generated from Open API specification")
+public class LiveUpgradeInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeOutput.java
new file mode 100644
index 0000000..3b40bde
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LiveUpgradeOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.604+05:30",
+    comments = "Auto-generated from Open API specification")
+public class LiveUpgradeOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockInput.java
new file mode 100644
index 0000000..cb6bbe5
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.607+05:30",
+    comments = "Auto-generated from Open API specification")
+public class LockInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockOutput.java
new file mode 100644
index 0000000..8c08002
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/LockOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.609+05:30",
+    comments = "Auto-generated from Open API specification")
+public class LockOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateInput.java
new file mode 100644
index 0000000..89504a9
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.612+05:30",
+    comments = "Auto-generated from Open API specification")
+public class MigrateInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateOutput.java
new file mode 100644
index 0000000..38a4393
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/MigrateOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.615+05:30",
+    comments = "Auto-generated from Open API specification")
+public class MigrateOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Payload.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Payload.java
new file mode 100644
index 0000000..23a15ce
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Payload.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.472+05:30",
+    comments = "Auto-generated from Open API specification")
+public class Payload {
+
+    private String value;
+
+    public Payload() {}
+
+    @JsonCreator
+    public Payload(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildInput.java
new file mode 100644
index 0000000..1041d51
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.618+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RebuildInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildOutput.java
new file mode 100644
index 0000000..48ade93
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RebuildOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.621+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RebuildOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartInput.java
new file mode 100644
index 0000000..49a4a7c
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.623+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RestartInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartOutput.java
new file mode 100644
index 0000000..69fc9de
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RestartOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.629+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RestartOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackInput.java
new file mode 100644
index 0000000..576954c
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackInput.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.653+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RollbackInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    @JsonProperty("identity-url")
+    private String identityUrl;
+
+    @JsonProperty("snapshot-id")
+    private String snapshotId;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+    public String getIdentityUrl() {
+        return identityUrl;
+    }
+
+    public void setIdentityUrl(String identityUrl) {
+        this.identityUrl = identityUrl;
+    }
+
+    public String getSnapshotId() {
+        return snapshotId;
+    }
+
+    public void setSnapshotId(String snapshotId) {
+        this.snapshotId = snapshotId;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackOutput.java
new file mode 100644
index 0000000..ae8bbd0
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/RollbackOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.656+05:30",
+    comments = "Auto-generated from Open API specification")
+public class RollbackOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotInput.java
new file mode 100644
index 0000000..fe13e98
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotInput.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.659+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SnapshotInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    @JsonProperty("identity-url")
+    private String identityUrl;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+    public String getIdentityUrl() {
+        return identityUrl;
+    }
+
+    public void setIdentityUrl(String identityUrl) {
+        this.identityUrl = identityUrl;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotOutput.java
new file mode 100644
index 0000000..931f09d
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SnapshotOutput.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.665+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SnapshotOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("snapshot-id")
+    private String snapshotId;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    public String getSnapshotId() {
+        return snapshotId;
+    }
+
+    public void setSnapshotId(String snapshotId) {
+        this.snapshotId = snapshotId;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadInput.java
new file mode 100644
index 0000000..286b351
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.668+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SoftwareUploadInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadOutput.java
new file mode 100644
index 0000000..02bf80c
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SoftwareUploadOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.672+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SoftwareUploadOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationInput.java
new file mode 100644
index 0000000..a372287
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-07-19T14:31:26.579+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StartApplicationInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationOutput.java
new file mode 100644
index 0000000..7b3c193
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartApplicationOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-07-19T14:31:26.58+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StartApplicationOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartInput.java
new file mode 100644
index 0000000..cfcf463
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.675+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StartInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartOutput.java
new file mode 100644
index 0000000..c3e5864
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StartOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.679+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StartOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Status.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Status.java
new file mode 100644
index 0000000..c70d864
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/Status.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.507+05:30",
+    comments = "Auto-generated from Open API specification")
+public class Status {
+
+    @JsonProperty("code")
+    private int code;
+
+    @JsonProperty("message")
+    private String message;
+
+    /**
+     * Response code
+     */
+    public int getCode() {
+        return code;
+    }
+
+    /**
+     * Response code
+     */
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    /**
+     * Response message
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * Response message
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationInput.java
new file mode 100644
index 0000000..56e8282
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-07-19T14:31:26.586+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StopApplicationInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationOutput.java
new file mode 100644
index 0000000..071276d
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopApplicationOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-07-19T14:31:26.588+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StopApplicationOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopInput.java
new file mode 100644
index 0000000..1cc7af4
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.689+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StopInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopOutput.java
new file mode 100644
index 0000000..2fb0b71
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/StopOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.692+05:30",
+    comments = "Auto-generated from Open API specification")
+public class StopOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncInput.java
new file mode 100644
index 0000000..c9b8613
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.695+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SyncInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncOutput.java
new file mode 100644
index 0000000..0fbe7e9
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/SyncOutput.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.698+05:30",
+    comments = "Auto-generated from Open API specification")
+public class SyncOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateInput.java
new file mode 100644
index 0000000..44b0b8e
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.701+05:30",
+    comments = "Auto-generated from Open API specification")
+public class TerminateInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateOutput.java
new file mode 100644
index 0000000..f3740c4
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TerminateOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.704+05:30",
+    comments = "Auto-generated from Open API specification")
+public class TerminateOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestInput.java
new file mode 100644
index 0000000..27507d9
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.706+05:30",
+    comments = "Auto-generated from Open API specification")
+public class TestInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestOutput.java
new file mode 100644
index 0000000..5c20901
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/TestOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.708+05:30",
+    comments = "Auto-generated from Open API specification")
+public class TestOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockInput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockInput.java
new file mode 100644
index 0000000..e073c2d
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockInput.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.711+05:30",
+    comments = "Auto-generated from Open API specification")
+public class UnlockInput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("action")
+    private Action action;
+
+    @JsonProperty("action-identifiers")
+    private ActionIdentifiers actionIdentifiers;
+
+    @JsonProperty("payload")
+    private Payload payload;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * The action to be taken by APP-C, e.g. Restart, Rebuild, Migrate
+     */
+    public void setAction(Action action) {
+        this.action = action;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public ActionIdentifiers getActionIdentifiers() {
+        return actionIdentifiers;
+    }
+
+    /**
+     * A block containing the action arguments. These are used to specify the object upon which APP-C LCM command is to operate
+     */
+    public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) {
+        this.actionIdentifiers = actionIdentifiers;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public Payload getPayload() {
+        return payload;
+    }
+
+    /**
+     * The payload can be any valid JSON string value. Json escape characters need to be added when required to include an inner json within the payload to make it a valid json string value
+     */
+    public void setPayload(Payload payload) {
+        this.payload = payload;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockOutput.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockOutput.java
new file mode 100644
index 0000000..fb7cfee
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/UnlockOutput.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.716+05:30",
+    comments = "Auto-generated from Open API specification")
+public class UnlockOutput {
+
+    @JsonProperty("common-header")
+    private CommonHeader commonHeader;
+
+    @JsonProperty("status")
+    private Status status;
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public CommonHeader getCommonHeader() {
+        return commonHeader;
+    }
+
+    /**
+     * A common header for all APP-C requests
+     */
+    public void setCommonHeader(CommonHeader commonHeader) {
+        this.commonHeader = commonHeader;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public Status getStatus() {
+        return status;
+    }
+
+    /**
+     * The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement
+     */
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+}
diff --git a/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ZULU.java b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ZULU.java
new file mode 100644
index 0000000..0517a90
--- /dev/null
+++ b/appc-client/client-kit/src/main/java/org/openecomp/appc/client/lcm/model/ZULU.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * NOTE: This file is auto-generated and should not be changed manually.
+ */
+package org.openecomp.appc.client.lcm.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Define a common definition of a time stamp (expressed as a formatted string) as follows yyyy-MM-ddTHH:mm:ss.SSSSSSSSZ
+ */
+@javax.annotation.Generated(
+    value = {"templates/client-kit/open-api-to-java.ftl"},
+    date = "2017-05-04T20:09:01.441+05:30",
+    comments = "Auto-generated from Open API specification")
+public class ZULU {
+
+    private String value;
+
+    public ZULU() {}
+
+    @JsonCreator
+    public ZULU(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/appc-client/client-kit/src/test/java/json2java/Json2JavaGeneratorTest.java b/appc-client/client-kit/src/test/java/json2java/Json2JavaGeneratorTest.java
new file mode 100644
index 0000000..b5ded02
--- /dev/null
+++ b/appc-client/client-kit/src/test/java/json2java/Json2JavaGeneratorTest.java
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package json2java;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.appc.generator.JsonHelper;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.regex.Pattern;
+
+public class Json2JavaGeneratorTest {
+
+    private static JsonNode jsonNode = null;
+    private static final String MODEL_PACKAGE = "org.openecomp.appc.client.lcm.model";
+    private static final String GENERATED_LCM_API_CLASS = "org.openecomp.appc.client.lcm.api.LifeCycleManagerStateful";
+
+    //@Before
+    public void readIOfiles() throws IOException{
+        if(jsonNode == null){
+            jsonRead();
+        }
+
+    }
+
+    //@Test
+    public void testGeneratedJavaModel() {
+        Iterator<Map.Entry<String, JsonNode>> definitions = jsonNode.get("definitions").fields();
+        for (; definitions.hasNext(); ) {
+            Map.Entry<String, JsonNode> definitionEntry = definitions.next();
+            String definitionEntryKey = definitionEntry.getKey();
+            String className = MODEL_PACKAGE + "." + definitionEntryKey;
+            Class<?> generatedClass = null;
+            String errMsg = "the " + className + " was supposed to be generated, but not found";
+            try {
+                generatedClass = Class.forName(className);
+                Assert.assertNotNull(errMsg, generatedClass);
+            } catch (ClassNotFoundException e) {
+                Assert.fail(errMsg);
+            }
+
+            JsonNode properties = definitionEntry.getValue().get("properties");
+            if (generatedClass != null && properties != null && properties.fields() != null) {
+                Field[] declaredFields = generatedClass.getDeclaredFields();
+                Set<String> generatedFieldNames = new HashSet();
+                for(Field field : declaredFields){
+                    generatedFieldNames.add(field.getName().toLowerCase());
+                }
+                Iterator<Map.Entry<String, JsonNode>> propertiesFields = properties.fields();
+                int totalExpectedFields = 0;
+                for (; propertiesFields.hasNext(); ) {
+                    totalExpectedFields++;
+                    Map.Entry<String, JsonNode> propertyEntry = propertiesFields.next();
+                    String propertyEntryKey = propertyEntry.getKey();
+                    String fieldNameFromJson = propertyEntryKey.replaceAll(Pattern.quote("-"),"").toLowerCase();
+                    errMsg = "the field " + propertyEntryKey + " for " + className + " was supposed to be generated, but not found";
+                    boolean contains = generatedFieldNames.contains(fieldNameFromJson);
+                    Assert.assertTrue(errMsg, contains);
+                }
+                Assert.assertEquals("number of fields in "+className+" are not as expected!",totalExpectedFields,generatedFieldNames.size());
+            }
+        }
+    }
+
+    //@Test
+    public void testGeneratedJavaAPI() {
+        Map<String/*rpcOperation*/,Set<String> /*bodyInputParams*/> jsonBodyInputParams = new HashMap();
+        Map<String/*rpcOperation*/,Set<String> /*bodyOutputParams*/> jsonBodyOutputParams= new HashMap();
+        JsonHelper.populateRpcInputOutputSchemaRefFromJson(jsonNode,jsonBodyInputParams, jsonBodyOutputParams);
+        Assert.assertFalse(jsonBodyInputParams.isEmpty());
+        Assert.assertFalse(jsonBodyOutputParams.isEmpty());
+
+        //verify LifecycleManagementStatefulService was generated
+        Class<?> generatedClass = null;
+        String errMsg = "the " + GENERATED_LCM_API_CLASS + " was supposed to be generated, but not found";
+        try {
+            generatedClass = Class.forName(GENERATED_LCM_API_CLASS);
+            Assert.assertNotNull(errMsg, generatedClass);
+        } catch (ClassNotFoundException e) {
+            Assert.fail(errMsg);
+        }
+
+        //verify LifecycleManagementStatefulService was generated with methods
+        Method[] declaredMethods = generatedClass.getDeclaredMethods();
+        Assert.assertNotNull("no method was generated for "+GENERATED_LCM_API_CLASS,declaredMethods);
+
+        //verify correctness of input parameters and return type of each method
+        Set<String> generatedNonVoidMethods = new HashSet();
+        Set<String> generatedVoidMethods = new HashSet();
+        for(Method method : declaredMethods){
+            String returnType = method.getReturnType().getName();
+            Class<?>[] parameterTypes = method.getParameterTypes();
+            String methodName = method.getName().toLowerCase();
+            if(returnType.equals("void")){
+                generatedVoidMethods.add(methodName);
+            }else {
+                generatedNonVoidMethods.add(methodName);
+                //verify correctness of return type
+                String returnTypeSuffix = JsonHelper.getStringSuffix(returnType,".");
+                Set<String> jsonOutputParams = jsonBodyOutputParams.get(methodName);
+                Assert.assertNotNull(methodName+ " was not expected to return anything!",jsonOutputParams);
+                boolean contains = jsonOutputParams.contains(returnTypeSuffix);
+                Assert.assertTrue(methodName+ " was not expected to be with "+returnTypeSuffix+" return type!", contains);
+            }
+            //verify correctness of method input parameters
+            for (Class<?> parameterType :parameterTypes){
+                String parameterTypeSuffix = JsonHelper.getStringSuffix(parameterType.getName(), ".");
+                if(returnType.equals("void") && parameterTypeSuffix.equals("ResponseHandler")){
+                    continue;
+                }
+                Set<String> jsonInputParams = jsonBodyInputParams.get(methodName);
+                Assert.assertNotNull(methodName+ " was not expected to be with any input parameter!",jsonInputParams);
+                boolean contains = jsonInputParams.contains(parameterTypeSuffix);
+                Assert.assertTrue(methodName+ " was not expected to be with "+parameterTypeSuffix+" parameter!", contains);
+            }
+
+        }
+
+        //verify total number of generated methods is same as expected
+        Assert.assertEquals("Total number of generated methods are not as expected!!",jsonBodyInputParams.size()*2,declaredMethods.length);
+        //verify all expected methods(void and non void) were generated
+        for(Map.Entry<String, Set<String>> rpcInputParams : jsonBodyInputParams.entrySet()){
+            errMsg = "none void method " + rpcInputParams.getKey() + "(case insensitive) for " + GENERATED_LCM_API_CLASS + " was supposed to be generated, but not found";
+            boolean contains = generatedNonVoidMethods.contains(rpcInputParams.getKey());
+            Assert.assertTrue(errMsg, contains);
+
+            errMsg = "void method " + rpcInputParams.getKey() + "(case insensitive) for " + GENERATED_LCM_API_CLASS + " was supposed to be generated, but not found";
+            contains = generatedVoidMethods.contains(rpcInputParams.getKey());
+            Assert.assertTrue(errMsg, contains);
+        }
+
+    }
+
+
+    private static void jsonRead ()throws IOException {
+        String jsonFilePath = System.getProperty("outputFile");
+        File file = new File(jsonFilePath);
+        ObjectMapper mapper = new ObjectMapper();
+        jsonNode = mapper.readTree(file);
+    }
+
+}
diff --git a/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/JsonHelper.java b/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/JsonHelper.java
new file mode 100644
index 0000000..6d9bf62
--- /dev/null
+++ b/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/JsonHelper.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.generator;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+public class JsonHelper {
+
+    private enum PopulateType{
+        PARAMETER,
+        SCHEMA_REF,
+        ;
+    }
+
+    public static void populateRpcInputOutputParamsFromJson(final JsonNode jsonNode, Map<String, Set<String>> jsonBodyInputParams, Map<String, Set<String>> jsonBodyOutputParams) {
+        populateRpcInputOutputParamsFromJson(jsonNode,jsonBodyInputParams, jsonBodyOutputParams,PopulateType.PARAMETER,false);
+    }
+    public static void populateRpcInputOutputSchemaRefFromJson(final JsonNode jsonNode, Map<String, Set<String>> jsonBodyInputParams, Map<String, Set<String>> jsonBodyOutputParams) {
+        populateRpcInputOutputParamsFromJson(jsonNode,jsonBodyInputParams, jsonBodyOutputParams,PopulateType.SCHEMA_REF,true);
+    }
+    public static void populateRpcInputOutputParamsFromJson(final JsonNode jsonNode, Map<String, Set<String>> jsonBodyInputParams, Map<String, Set<String>> jsonBodyOutputParams,PopulateType populateType,boolean normalizeRpcOperation) {
+        //get all yang2json Input and output Params and populate jsonBodyInputParams & jsonBodyOutputParams
+        for(Iterator<JsonNode> pathsElements = jsonNode.get("paths").elements(); pathsElements.hasNext(); ){
+            JsonNode pathNode = pathsElements.next();
+            String rpcOperation = pathNode.get("post").get("operationId").textValue();
+            String bodyInputSchemaRef = pathNode.get("post").get("parameters").get(0).get("schema").get("properties").get("input").get("$ref").textValue();
+            String bodyInputSchemaRefSuffix = JsonHelper.getStringSuffix(bodyInputSchemaRef,"/");
+            rpcOperation = normalizeRpcOperation ? rpcOperation.replaceAll(Pattern.quote("-"),"").toLowerCase() : rpcOperation;
+
+            String bodyOutputSchemaRef = pathNode.get("post").get("responses").get("200").get("schema").get("properties").get("output").get("$ref").textValue();
+            String bodyOutputSchemaRefSuffix = JsonHelper.getStringSuffix(bodyOutputSchemaRef,"/");
+
+            Set<String> inputParametersOrSchemaRef;
+            Set<String> outputParametersOrSchemaRef;
+            if(populateType == PopulateType.SCHEMA_REF){
+                inputParametersOrSchemaRef = new HashSet();
+                inputParametersOrSchemaRef.add(bodyInputSchemaRefSuffix);
+
+                outputParametersOrSchemaRef = new HashSet();
+                outputParametersOrSchemaRef.add(bodyOutputSchemaRefSuffix);
+            }else{
+                inputParametersOrSchemaRef = extractParams(jsonNode,bodyInputSchemaRefSuffix);
+                outputParametersOrSchemaRef = extractParams(jsonNode,bodyOutputSchemaRefSuffix);
+            }
+            jsonBodyInputParams.put(rpcOperation,inputParametersOrSchemaRef);
+            jsonBodyOutputParams.put(rpcOperation,outputParametersOrSchemaRef);
+        }
+    }
+
+    private static Set<String> extractParams(final JsonNode jsonNode,String schemaRefName) {
+        Iterator<Map.Entry<String, JsonNode>> fields = jsonNode.get("definitions").get(schemaRefName).get("properties").fields();
+        Set<String> params = new HashSet();
+        for( ;fields.hasNext(); ){
+            Map.Entry<String, JsonNode> fieldEntry = fields.next();
+            params.add(fieldEntry.getKey());
+        }
+        return params;
+    }
+
+    public static String getStringSuffix(String input, String afterString){
+        int indexOf = input.lastIndexOf(afterString);
+        String stringSuffix = (indexOf > -1) ? input.substring(indexOf+1) : input;
+        return stringSuffix;
+    }
+}
diff --git a/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/yang2json/Yang2JsonGeneratorTest.java b/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/yang2json/Yang2JsonGeneratorTest.java
new file mode 100644
index 0000000..2e8ef95
--- /dev/null
+++ b/appc-client/client-kit/src/test/java/org/openecomp/appc/generator/yang2json/Yang2JsonGeneratorTest.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.appc.generator.yang2json;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Optional;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
+import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
+import org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver;
+import org.openecomp.appc.generator.JsonHelper;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+public class Yang2JsonGeneratorTest {
+
+    private static SchemaContext yangSchema = null;
+    private static JsonNode jsonNode = null;
+
+    public void readIOfiles() throws IOException{
+        if(yangSchema == null){
+            yangParse();
+        }
+        if(jsonNode == null){
+            jsonRead();
+        }
+
+    }
+
+    public void testJsonRpcNum(){
+
+        int rpcYangNum = yangSchema.getModules().iterator().next().getRpcs().size();
+        int rpcJsonNum = jsonNode.get("paths").size();
+        Assert.assertTrue(rpcYangNum == rpcJsonNum);
+    }
+
+    public void testJsonRpcsAndInOutParams(){
+
+        Map<String/*rpcOperation*/,Set<String> /*bodyInputParams*/> jsonBodyInputParams = new HashMap();
+        Map<String/*rpcOperation*/,Set<String> /*bodyOutputParams*/> jsonBodyOutputParams= new HashMap();
+        JsonHelper.populateRpcInputOutputParamsFromJson(jsonNode,jsonBodyInputParams, jsonBodyOutputParams);
+
+        Set<RpcDefinition> rpcDefinitions = yangSchema.getModules().iterator().next().getRpcs();
+        for(RpcDefinition rpcDef : rpcDefinitions){
+            String rpcOperation = rpcDef.getQName().getLocalName();
+            //verify all yang rpc operations & all input yang params/groupings exist in yang2json
+            Assert.assertTrue(jsonBodyInputParams.containsKey(rpcOperation));
+            Collection<DataSchemaNode> inputChildNodes = rpcDef.getInput().getChildNodes();
+            if(inputChildNodes != null || !inputChildNodes.isEmpty()) {
+                Assert.assertTrue(rpcOperation+": yang and yang2json input params size is not equal!",jsonBodyInputParams.get(rpcOperation).size() == inputChildNodes.size());
+                Set<String> inputYangParams = getYangParams(inputChildNodes);
+                Assert.assertTrue(rpcOperation+": yang and yang2json input params are not same!",jsonBodyInputParams.get(rpcOperation).containsAll(inputYangParams));
+            }
+
+            //verify all yang rpc operations & all output yang params/groupings exist in yang2json
+            Assert.assertTrue(jsonBodyOutputParams.containsKey(rpcOperation));
+            Collection<DataSchemaNode> outputChildNodes = rpcDef.getOutput().getChildNodes();
+            if(outputChildNodes != null || !outputChildNodes.isEmpty()) {
+                Assert.assertTrue(rpcOperation+": yang and yang2json output params size is not equal!",jsonBodyOutputParams.get(rpcOperation).size()== outputChildNodes.size());
+                Set<String> outputYangParams = getYangParams(outputChildNodes);
+                Assert.assertTrue(rpcOperation+": yang and yang2json output params are not same!",jsonBodyOutputParams.get(rpcOperation).containsAll(outputYangParams));
+            }
+        }
+    }
+
+
+    private Set<String> getYangParams(Collection<DataSchemaNode> dataSchemaNodes) {
+        Set<String> yangParams = new HashSet();
+        for(DataSchemaNode child : dataSchemaNodes){
+            yangParams.add(child.getQName().getLocalName());
+        }
+        return yangParams;
+    }
+
+
+
+    private static void yangParse(){
+
+        try {
+            //sourceFileName
+            String yangFileName = System.getProperty("inputFile");
+            YangTextSchemaContextResolver yangContextResolver = null;
+            yangContextResolver = YangTextSchemaContextResolver.create("yang-context-resolver");
+            URL url = new File(yangFileName).toURI().toURL();
+            yangContextResolver.registerSource(url);
+            Optional<SchemaContext> yangSchemaContext = yangContextResolver.getSchemaContext();
+            yangSchema = yangSchemaContext.get();
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (YangSyntaxErrorException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (SchemaSourceException e) {
+            e.printStackTrace();
+        }
+
+
+    }
+
+
+    private static void jsonRead ()throws IOException {
+        String jsonFilePath = System.getProperty("outputFile");
+        File file = new File(jsonFilePath);
+        ObjectMapper mapper = new ObjectMapper();
+        jsonNode = mapper.readTree(file);
+    }
+}
