aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java
diff options
context:
space:
mode:
Diffstat (limited to 'ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java')
-rw-r--r--ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java
new file mode 100644
index 0000000..c4c2fd9
--- /dev/null
+++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceComponentRequest.java
@@ -0,0 +1,31 @@
+package org.onap.ccsdk.dashboard.model.inventory;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceComponentRequest {
+
+ /** Component ID of the Service Component */
+ public String componentId;
+ /** Component Type of the Service Component */
+ public String componentType;
+ /** Specifies the name of the underlying source service responsible for this component */
+ public String componentSource;
+ /** Used to determine if this component can be shared amongst different Services */
+ public Integer shareable;
+
+ @JsonCreator
+ public ServiceComponentRequest (@JsonProperty("componentId") String componentId,
+ @JsonProperty("componentType") String componentType,
+ @JsonProperty("componentSource") String componentSource,
+ @JsonProperty("shareable") Integer shareable) {
+ this.componentId = componentId;
+ this.componentType = componentType;
+ this.componentSource = componentSource;
+ this.shareable = shareable;
+ }
+
+ public static ServiceComponentRequest from(ServiceComponent sc) {
+ return new ServiceComponentRequest(sc.componentId, sc.componentType, sc.componentSource, sc.shareable);
+ }
+}