Aharoni, Pavel (pa0916) | ca3cb01 | 2018-10-22 15:29:57 +0300 | [diff] [blame] | 1 | /*-
|
| 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 |
|
| 23 | package org.onap.osam.model.serviceInstantiation;
|
| 24 |
|
| 25 |
|
| 26 | import com.fasterxml.jackson.annotation.JsonProperty;
|
| 27 | import org.onap.osam.domain.mso.ModelInfo;
|
| 28 |
|
| 29 | import java.util.Collections;
|
| 30 | import java.util.List;
|
| 31 | import java.util.Map;
|
| 32 |
|
| 33 | public class Vnf {
|
| 34 | private final ModelInfo modelInfo;
|
| 35 |
|
| 36 | private final String productFamilyId;
|
| 37 |
|
| 38 | private final String instanceName;
|
| 39 |
|
| 40 | private final String platformName;
|
| 41 |
|
| 42 | private final String lcpCloudRegionId;
|
| 43 |
|
| 44 | private final String tenantId;
|
| 45 |
|
| 46 | private final Boolean isUserProvidedNaming;
|
| 47 |
|
| 48 | private final List<Map<String, String>> instanceParams;
|
| 49 |
|
| 50 | private final String lineOfBusiness;
|
| 51 |
|
| 52 |
|
| 53 | private final Map<String, Map<String, VfModule>> vfModules;
|
| 54 |
|
| 55 | public Vnf(@JsonProperty("modelInfo") ModelInfo modelInfo,
|
| 56 | @JsonProperty("productFamilyId") String productFamilyId,
|
| 57 | @JsonProperty("instanceName") String instanceName,
|
| 58 | @JsonProperty("isUserProvidedNaming") Boolean isUserProvidedNaming,
|
| 59 | @JsonProperty("platformName") String platformName,
|
| 60 | @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
|
| 61 | @JsonProperty("tenantId") String tenantId,
|
| 62 | @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
|
| 63 | @JsonProperty("lineOfBusinessName") String lineOfBusiness,
|
| 64 | @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules) {
|
| 65 | this.modelInfo = modelInfo;
|
| 66 | this.modelInfo.setModelType("vnf");
|
| 67 | this.productFamilyId = productFamilyId;
|
| 68 | this.instanceName = instanceName;
|
| 69 | this.isUserProvidedNaming = isUserProvidedNaming;
|
| 70 | this.platformName = platformName;
|
| 71 | this.lcpCloudRegionId = lcpCloudRegionId;
|
| 72 | this.tenantId = tenantId;
|
| 73 | this.instanceParams = instanceParams;
|
| 74 | this.vfModules = vfModules;
|
| 75 | this.lineOfBusiness = lineOfBusiness;
|
| 76 | }
|
| 77 |
|
| 78 | public ModelInfo getModelInfo() {
|
| 79 | return modelInfo;
|
| 80 | }
|
| 81 |
|
| 82 | public String getProductFamilyId() {
|
| 83 | return productFamilyId;
|
| 84 | }
|
| 85 |
|
| 86 | public String getInstanceName() {
|
| 87 | return instanceName;
|
| 88 | }
|
| 89 |
|
| 90 | @JsonProperty("isUserProvidedNaming")
|
| 91 | public Boolean isUserProvidedNaming() {
|
| 92 | return isUserProvidedNaming;
|
| 93 | }
|
| 94 |
|
| 95 | public String getPlatformName() {
|
| 96 | return platformName;
|
| 97 | }
|
| 98 |
|
| 99 | public String getLcpCloudRegionId() {
|
| 100 | return lcpCloudRegionId;
|
| 101 | }
|
| 102 |
|
| 103 | public String getTenantId() {
|
| 104 | return tenantId;
|
| 105 | }
|
| 106 |
|
| 107 | public List<Map<String, String>> getInstanceParams() {
|
| 108 | return instanceParams == null ? Collections.emptyList() : instanceParams;
|
| 109 | }
|
| 110 |
|
| 111 | public Map<String, Map<String, VfModule>> getVfModules() {
|
| 112 | return vfModules;
|
| 113 | }
|
| 114 |
|
| 115 | public String getLineOfBusiness() {
|
| 116 | return lineOfBusiness;
|
| 117 | }
|
| 118 | }
|