a0606c7943756c27a69095cc5dafe8327421cee7
[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 POST-ed to controller to create a Deployment via the Deployment Handler API:
10  * 
11  * <pre>
12         { 
13                 "serviceTypeId" : "serviceTypeId",
14                 "type" : "install/update",
15                 "inputs" :
16                         {
17                                 "input1" : "parameter1"
18                                 "input2" : "parameter2"
19                                                 ...
20                                 "inputn" : "parametern"
21                         }       
22         }
23  * </pre>
24  * 
25  * THIS OBJECT INCLUDES THE DEPLOYMENTID CREATED BY THE USER!
26  */
27 public class DeploymentRequestObject {
28         
29         /** Unique deployment identifier assigned by the API client. */
30         private final String deploymentId;
31         
32         /** type of deployment request */
33         private final String method;
34         
35         /** The service type identifier (a unique ID assigned by DCAE inventory) for the service to be deployed. */
36         private final String serviceTypeId;
37         
38         /** The cloudify tenant name for the deployment */
39         private final String tenant;
40         /** 
41          * Object containing inputs needed by the service blueprint to create an instance of the service.
42          * Content of the object depends on the service being deployed.
43          */
44         private final Map<String, Object> inputs;
45         
46         @JsonCreator
47         public DeploymentRequestObject(@JsonProperty("deploymentId") String deploymentId,
48                         @JsonProperty("serviceTypeId") String serviceTypeId,
49                         @JsonProperty("inputs") Map<String, Object> inputs,
50                         @JsonProperty("tenant") String tenant,
51                         @JsonProperty("method") String method) {
52                 this.deploymentId = deploymentId;
53                 this.serviceTypeId = serviceTypeId;
54                 this.inputs = inputs;
55                 this.tenant = tenant;
56                 this.method = method;
57         }
58         
59         public String getDeploymentId() {
60                 return this.deploymentId;
61         }
62         
63         public String getServiceTypeId() {
64                 return this.serviceTypeId;
65         }
66         
67         public Map<String, Object> getInputs() {
68                 return this.inputs;
69         }
70         
71         public String getTenant() {
72                 return this.tenant;
73         }
74
75         public String getMethod() {
76                 return method;
77         }
78 }