ae229b22c928cf0fe2a61cb99a04989d93f854be
[ccsdk/dashboard.git] /
1 /*******************************************************************************
2  * =============LICENSE_START=========================================================
3  *
4  * =================================================================================
5  *  Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  *  Licensed under the Apache License, Version 2.0 (the "License");
8  *  you may not use this file except in compliance with the License.
9  *  You may obtain a copy of the License at
10  *  
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *  
13  *  Unless required by applicable law or agreed to in writing, software
14  *  distributed under the License is distributed on an "AS IS" BASIS,
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *  See the License for the specific language governing permissions and
17  *  limitations under the License.
18  * ============LICENSE_END=========================================================
19  *
20  *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  *******************************************************************************/
22 package org.onap.ccsdk.dashboard.model.deploymenthandler;
23
24 import java.util.Map;
25
26 import com.fasterxml.jackson.annotation.JsonCreator;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28
29 /**
30  * Model for message POST-ed to controller to create a Deployment via the
31  * Deployment Handler API:
32  * 
33  * <pre>
34         { 
35                 "serviceTypeId" : "serviceTypeId",
36                 "type" : "install/update",
37                 "inputs" :
38                         {
39                                 "input1" : "parameter1"
40                                 "input2" : "parameter2"
41                                                 ...
42                                 "inputn" : "parametern"
43                         }       
44         }
45  * </pre>
46  * 
47  * THIS OBJECT INCLUDES THE DEPLOYMENTID CREATED BY THE USER!
48  */
49 public class DeploymentRequestObject {
50
51     /** Unique deployment identifier assigned by the API client. */
52     private final String deploymentId;
53
54     /** type of deployment request */
55     private final String method;
56
57     /**
58      * The service type identifier (a unique ID assigned by DCAE inventory) for the
59      * service to be deployed.
60      */
61     private final String serviceTypeId;
62
63     /** The cloudify tenant name for the deployment */
64     private final String tenant;
65     /**
66      * Object containing inputs needed by the service blueprint to create an
67      * instance of the service. Content of the object depends on the service being
68      * deployed.
69      */
70     private final Map<String, Object> inputs;
71
72     @JsonCreator
73     public DeploymentRequestObject(@JsonProperty("deploymentId") String deploymentId,
74             @JsonProperty("serviceTypeId") String serviceTypeId, @JsonProperty("inputs") Map<String, Object> inputs,
75             @JsonProperty("tenant") String tenant, @JsonProperty("method") String method) {
76         this.deploymentId = deploymentId;
77         this.serviceTypeId = serviceTypeId;
78         this.inputs = inputs;
79         this.tenant = tenant;
80         this.method = method;
81     }
82
83     public String getDeploymentId() {
84         return this.deploymentId;
85     }
86
87     public String getServiceTypeId() {
88         return this.serviceTypeId;
89     }
90
91     public Map<String, Object> getInputs() {
92         return this.inputs;
93     }
94
95     public String getTenant() {
96         return this.tenant;
97     }
98
99     public String getMethod() {
100         return method;
101     }
102 }