1 package org.onap.ccsdk.dashboard.model.inventory;
3 import java.util.Collection;
4 import java.util.Optional;
6 import com.fasterxml.jackson.annotation.JsonCreator;
7 import com.fasterxml.jackson.annotation.JsonProperty;
9 public class ServiceTypeUploadRequest {
11 /** Owner of the Service Type */
13 /** Name of the Service Type */
14 public String typeName;
15 /** Version number of the Service Type */
16 public Integer typeVersion;
17 /** String representation of a Cloudify blueprint with unbound variables */
18 public String blueprintTemplate;
19 /** Application controller name */
20 public String application;
21 /** onboarding component name */
22 public String component;
25 public ServiceTypeUploadRequest(@JsonProperty("owner") String owner,
26 @JsonProperty("typeName") String typeName,
27 @JsonProperty("typeVersion") Integer typeVersion,
28 @JsonProperty("blueprintTemplate") String blueprintTemplate,
29 @JsonProperty("application") String application,
30 @JsonProperty("component") String component ) {
32 this.typeName = typeName;
33 this.typeVersion = typeVersion;
34 this.blueprintTemplate = blueprintTemplate;
35 this.application = application;
36 this.component = component;
39 public static ServiceTypeUploadRequest from(ServiceType serviceType) {
40 return new ServiceTypeUploadRequest(serviceType.getOwner(), serviceType.getTypeName(),
41 serviceType.getTypeVersion(), serviceType.getBlueprintTemplate(),
42 serviceType.getApplication(), serviceType.getComponent());
44 public String getBlueprintTemplate() {
45 return this.blueprintTemplate;