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.inventory;
24 import com.fasterxml.jackson.annotation.JsonCreator;
25 import com.fasterxml.jackson.annotation.JsonProperty;
27 public class ServiceComponentRequest {
29 /** Component ID of the Service Component */
30 public String componentId;
31 /** Component Type of the Service Component */
32 public String componentType;
34 * Specifies the name of the underlying source service responsible for this
37 public String componentSource;
39 * Used to determine if this component can be shared amongst different Services
41 public Integer shareable;
44 public ServiceComponentRequest(@JsonProperty("componentId") String componentId,
45 @JsonProperty("componentType") String componentType,
46 @JsonProperty("componentSource") String componentSource, @JsonProperty("shareable") Integer shareable) {
47 this.componentId = componentId;
48 this.componentType = componentType;
49 this.componentSource = componentSource;
50 this.shareable = shareable;
53 public static ServiceComponentRequest from(ServiceComponent sc) {
54 return new ServiceComponentRequest(sc.componentId, sc.componentType, sc.componentSource, sc.shareable);