diff options
Diffstat (limited to 'ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/deploymenthandler/InventoryDeploymentRequest.java')
-rw-r--r-- | ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/deploymenthandler/InventoryDeploymentRequest.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/deploymenthandler/InventoryDeploymentRequest.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/deploymenthandler/InventoryDeploymentRequest.java new file mode 100644 index 0000000..564d4b3 --- /dev/null +++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/deploymenthandler/InventoryDeploymentRequest.java @@ -0,0 +1,63 @@ +package org.onap.ccsdk.dashboard.model.deploymenthandler; + +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model for message used by the controller to create a DeploymentRequest for + * the Deployment Handler API. + * + * <pre> + { + "deploymentId" : "deploymentId", + "body" : + { + "serviceTypeId" : "serviceTypeId", + "inputs" : + { + "input1" : "parameter1" + "input2" : "parameter2" + ... + "inputn" : "parametern" + } + } + } + * </pre> + */ +public final class InventoryDeploymentRequest { + + /** Unique deployment identifier assigned by the API client. */ + private final String deploymentId; + + /** The service type identifier (a unique ID assigned by DCAE inventory) for the service to be deployed. */ + private final String serviceTypeId; + + /** + * Object containing inputs needed by the service blueprint to create an instance of the service. + * Content of the object depends on the service being deployed. + */ + private final Map<String, Object> inputs; + + @JsonCreator + public InventoryDeploymentRequest(@JsonProperty("deploymentId") String deploymentId, + @JsonProperty("serviceTypeId") String serviceTypeId, + @JsonProperty("inputs") Map<String, Object> inputs) { + this.deploymentId = deploymentId; + this.serviceTypeId = serviceTypeId; + this.inputs = inputs; + } + + public String getDeploymentId() { + return this.deploymentId; + } + + public String getServiceTypeId() { + return this.serviceTypeId; + } + + public Map<String, Object> getInputs() { + return this.inputs; + } +} |