blob: dec47cd97c6c6263b34bc1785c1cfdef41099305 [file] [log] [blame]
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +03001/*-
2 * ============LICENSE_START=======================================================
3 * OSAM
4 * ================================================================================
5 * Copyright (C) 2018 AT&T
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
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
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=========================================================
19 */
20
21
22
23package org.onap.osam.model.serviceInstantiation;
24
25import com.fasterxml.jackson.annotation.JsonInclude;
26import com.fasterxml.jackson.annotation.JsonProperty;
27import org.onap.osam.domain.mso.ModelInfo;
28
29import java.util.Collections;
30import java.util.List;
31import java.util.Map;
32
33import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
34
35public class VfModule {
36
37
38
39 private final ModelInfo modelInfo;
40
41 @JsonInclude(NON_NULL) private final String instanceName;
42
43 private final List<Map<String, String>> instanceParams;
44 @JsonInclude(NON_NULL) private final String volumeGroupInstanceName;
45
46 public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo,
47 @JsonProperty("instanceName") String instanceName,
48 @JsonProperty(value = "volumeGroupName") String volumeGroupInstanceName,
49 @JsonProperty("instanceParams") List<Map<String, String>> instanceParams) {
50 this.modelInfo = modelInfo;
51 this.modelInfo.setModelType("vfModule");
52 this.instanceName = instanceName;
53 this.instanceParams = instanceParams;
54 this.volumeGroupInstanceName = volumeGroupInstanceName;
55 }
56
57 public ModelInfo getModelInfo() {
58 return modelInfo;
59 }
60
61 public String getInstanceName() {
62 return instanceName;
63 }
64
65 public String getVolumeGroupInstanceName() {
66 return volumeGroupInstanceName;
67 }
68
69 public List<Map<String, String>> getInstanceParams() {
70 return instanceParams == null ? Collections.emptyList() : instanceParams;
71 }
72
73}