1 package org.onap.ccsdk.dashboard.model.inventory;
3 import com.fasterxml.jackson.annotation.JsonCreator;
4 import com.fasterxml.jackson.annotation.JsonProperty;
6 public class ServiceComponentRequest {
8 /** Component ID of the Service Component */
9 public String componentId;
10 /** Component Type of the Service Component */
11 public String componentType;
12 /** Specifies the name of the underlying source service responsible for this component */
13 public String componentSource;
14 /** Used to determine if this component can be shared amongst different Services */
15 public Integer shareable;
18 public ServiceComponentRequest (@JsonProperty("componentId") String componentId,
19 @JsonProperty("componentType") String componentType,
20 @JsonProperty("componentSource") String componentSource,
21 @JsonProperty("shareable") Integer shareable) {
22 this.componentId = componentId;
23 this.componentType = componentType;
24 this.componentSource = componentSource;
25 this.shareable = shareable;
28 public static ServiceComponentRequest from(ServiceComponent sc) {
29 return new ServiceComponentRequest(sc.componentId, sc.componentType, sc.componentSource, sc.shareable);