diff options
Diffstat (limited to 'ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceTypeUploadRequest.java')
-rw-r--r-- | ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceTypeUploadRequest.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceTypeUploadRequest.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceTypeUploadRequest.java new file mode 100644 index 0000000..3ef334f --- /dev/null +++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceTypeUploadRequest.java @@ -0,0 +1,48 @@ +package org.onap.ccsdk.dashboard.model.inventory; + +import java.util.Collection; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ServiceTypeUploadRequest { + + /** Owner of the Service Type */ + public String owner; + /** Name of the Service Type */ + public String typeName; + /** Version number of the Service Type */ + public Integer typeVersion; + /** String representation of a Cloudify blueprint with unbound variables */ + public String blueprintTemplate; + /** Application controller name */ + public String application; + /** onboarding component name */ + public String component; + + @JsonCreator + public ServiceTypeUploadRequest(@JsonProperty("owner") String owner, + @JsonProperty("typeName") String typeName, + @JsonProperty("typeVersion") Integer typeVersion, + @JsonProperty("blueprintTemplate") String blueprintTemplate, + @JsonProperty("application") String application, + @JsonProperty("component") String component ) { + this.owner = owner; + this.typeName = typeName; + this.typeVersion = typeVersion; + this.blueprintTemplate = blueprintTemplate; + this.application = application; + this.component = component; + } + + public static ServiceTypeUploadRequest from(ServiceType serviceType) { + return new ServiceTypeUploadRequest(serviceType.getOwner(), serviceType.getTypeName(), + serviceType.getTypeVersion(), serviceType.getBlueprintTemplate(), + serviceType.getApplication(), serviceType.getComponent()); + } + public String getBlueprintTemplate() { + return this.blueprintTemplate; + + } +} |