1 /*******************************************************************************
2 * =============LICENSE_START=========================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21 *******************************************************************************/
22 package org.onap.ccsdk.dashboard.model.deploymenthandler;
25 import java.util.Optional;
27 import com.fasterxml.jackson.annotation.JsonCreator;
28 import com.fasterxml.jackson.annotation.JsonProperty;
31 * Model for message POST-ed to controller to create a Deployment via the
32 * Deployment Handler API:
37 "deploymentTag" : "tag",
38 "blueprintName" : "name",
39 "blueprintVersion" : "version",
40 "blueprintId" : "bp_id",
43 "input1" : "parameter1",
44 "input2" : "parameter2",
46 "inputn" : "parametern"
48 "tenant" : "tenant_name"
52 * THIS OBJECT INCLUDES THE DEPLOYMENTID CREATED BY THE USER!
54 public class DeploymentInput {
56 /** component or namespace for the service */
57 private final String component;
59 /** tag to identify the deployment */
60 private final String tag;
62 /** The blueprint name for the service to be deployed. */
63 private final String blueprintName;
65 /** blueprint version for the service to be deployed */
66 private final Optional<Integer> blueprintVersion;
68 /** blueprint typeId from inventory */
69 private final Optional<String> blueprintId;
71 /** The cloudify tenant name for the deployment */
72 private final String tenant;
74 * Object containing inputs needed by the service blueprint to create an
75 * instance of the service. Content of the object depends on the service being
78 private final Map<String, Object> inputs;
81 public DeploymentInput(@JsonProperty("component") String component, @JsonProperty("tag") String tag,
82 @JsonProperty("blueprintName") String blueprintName,
83 @JsonProperty("blueprintVersion") Integer blueprintVersion, @JsonProperty("blueprintId") String blueprintId,
84 @JsonProperty("inputs") Map<String, Object> inputs, @JsonProperty("tenant") String tenant) {
85 this.component = component;
87 this.blueprintName = blueprintName;
88 this.blueprintVersion = Optional.ofNullable(blueprintVersion);
89 this.blueprintId = Optional.ofNullable(blueprintId);
94 public String getBlueprintName() {
95 return this.blueprintName;
98 public Map<String, Object> getInputs() {
102 public String getTenant() {
106 public Optional<Integer> getBlueprintVersion() {
107 return blueprintVersion;
110 public String getTag() {
114 public String getComponent() {
118 public Optional<String> getBlueprintId() {