564d4b32c57905528dcb058cc3f8174ffd640153
[ccsdk/dashboard.git] /
1 package org.onap.ccsdk.dashboard.model.deploymenthandler;
2
3 import java.util.Map;
4
5 import com.fasterxml.jackson.annotation.JsonCreator;
6 import com.fasterxml.jackson.annotation.JsonProperty;
7
8 /**
9  * Model for message used by the controller to create a DeploymentRequest for 
10  * the Deployment Handler API.
11  * 
12  * <pre>
13         {
14                 "deploymentId" : "deploymentId",
15                 "body" :
16                         { 
17                                 "serviceTypeId" : "serviceTypeId",
18                                 "inputs" :
19                                         {
20                                                 "input1" : "parameter1"
21                                                 "input2" : "parameter2"
22                                                                 ...
23                                                 "inputn" : "parametern"
24                                         }       
25                         }
26         }
27  * </pre>
28  */
29 public final class InventoryDeploymentRequest {
30
31         /** Unique deployment identifier assigned by the API client. */
32         private final String deploymentId;
33         
34         /** The service type identifier (a unique ID assigned by DCAE inventory) for the service to be deployed. */
35         private final String serviceTypeId;
36         
37         /** 
38          * Object containing inputs needed by the service blueprint to create an instance of the service.
39          * Content of the object depends on the service being deployed.
40          */
41         private final Map<String, Object> inputs;
42         
43         @JsonCreator
44         public InventoryDeploymentRequest(@JsonProperty("deploymentId") String deploymentId, 
45                         @JsonProperty("serviceTypeId") String serviceTypeId, 
46                         @JsonProperty("inputs") Map<String, Object> inputs) {
47                 this.deploymentId = deploymentId;
48                 this.serviceTypeId = serviceTypeId;
49                 this.inputs = inputs;
50         }
51         
52         public String getDeploymentId() {
53                 return this.deploymentId;
54         }
55         
56         public String getServiceTypeId() {
57                 return this.serviceTypeId;
58         }
59         
60         public Map<String, Object> getInputs() {
61                 return this.inputs;
62         }
63 }