b0ac9e9c6b83c84d89fbaf46088a0686e4b26c35
[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                 "inputs" :
37                         {
38                                 "input1" : "parameter1"
39                                 "input2" : "parameter2"
40                                                 ...
41                                 "inputn" : "parametern"
42                         }       
43         }
44  * </pre>
45  */
46 public class DeploymentRequest {
47
48     /**
49      * The service type identifier (a unique ID assigned by DCAE inventory) for the
50      * service to be deployed.
51      */
52     private final String serviceTypeId;
53
54     /**
55      * Object containing inputs needed by the service blueprint to create an
56      * instance of the service. Content of the object depends on the service being
57      * deployed.
58      */
59     private final Map<String, Object> inputs;
60
61     @JsonCreator
62     public DeploymentRequest(@JsonProperty("serviceTypeId") String serviceTypeId,
63             @JsonProperty("inputs") Map<String, Object> inputs) {
64         this.serviceTypeId = serviceTypeId;
65         this.inputs = inputs;
66     }
67
68     public String getServiceTypeId() {
69         return this.serviceTypeId;
70     }
71
72     public Map<String, Object> getInputs() {
73         return this.inputs;
74     }
75 }