173744a01c31df119c1834e0f6706f42551a0ca6
[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 used by the controller to create a DeploymentRequest for
31  * the Deployment Handler API.
32  * 
33  * <pre>
34         {
35                 "deploymentId" : "deploymentId",
36                 "body" :
37                         { 
38                                 "serviceTypeId" : "serviceTypeId",
39                                 "inputs" :
40                                         {
41                                                 "input1" : "parameter1"
42                                                 "input2" : "parameter2"
43                                                                 ...
44                                                 "inputn" : "parametern"
45                                         }       
46                         }
47         }
48  * </pre>
49  */
50 public final class InventoryDeploymentRequest {
51
52     /** Unique deployment identifier assigned by the API client. */
53     private final String deploymentId;
54
55     /**
56      * The service type identifier (a unique ID assigned by DCAE inventory) for the
57      * service to be deployed.
58      */
59     private final String serviceTypeId;
60
61     /**
62      * Object containing inputs needed by the service blueprint to create an
63      * instance of the service. Content of the object depends on the service being
64      * deployed.
65      */
66     private final Map<String, Object> inputs;
67
68     @JsonCreator
69     public InventoryDeploymentRequest(@JsonProperty("deploymentId") String deploymentId,
70             @JsonProperty("serviceTypeId") String serviceTypeId, @JsonProperty("inputs") Map<String, Object> inputs) {
71         this.deploymentId = deploymentId;
72         this.serviceTypeId = serviceTypeId;
73         this.inputs = inputs;
74     }
75
76     public String getDeploymentId() {
77         return this.deploymentId;
78     }
79
80     public String getServiceTypeId() {
81         return this.serviceTypeId;
82     }
83
84     public Map<String, Object> getInputs() {
85         return this.inputs;
86     }
87 }