2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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=========================================================
21 package org.onap.vid.model.serviceInstantiation;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import org.onap.vid.job.JobAdapter;
26 import org.onap.vid.job.JobType;
27 import org.onap.vid.mso.model.ModelInfo;
29 import java.util.Collection;
30 import java.util.Collections;
31 import java.util.List;
34 import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
39 @JsonInclude(NON_NULL)
40 public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest {
42 @JsonInclude(NON_NULL) private final String volumeGroupInstanceName;
43 @JsonInclude(NON_NULL) private Boolean usePreload;
44 private Map<String, String> supplementaryParams;
46 public VfModule( @JsonProperty("modelInfo") ModelInfo modelInfo,
47 @JsonProperty("instanceName") String instanceName,
48 @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
49 @JsonProperty("action") String action,
50 @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
51 @JsonProperty("legacyRegion") String legacyRegion,
52 @JsonProperty("tenantId") String tenantId,
53 @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
54 @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
55 @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
56 @JsonProperty("sdncPreLoad") Boolean usePreload,
57 @JsonProperty("instanceId") String instanceId,
58 @JsonProperty("trackById") String trackById,
59 @JsonProperty("isFailed") Boolean isFailed,
60 @JsonProperty("statusMessage") String statusMessage) {
61 super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
62 this.volumeGroupInstanceName = volumeGroupInstanceName;
63 this.usePreload = usePreload;
64 this.supplementaryParams = supplementaryParams;
67 public String getVolumeGroupInstanceName() {
68 return volumeGroupInstanceName;
71 public Boolean isUsePreload() {
76 public Map<String, String> getSupplementaryParams() {
77 return supplementaryParams;
81 protected String getModelType() {
86 public Collection<BaseResource> getChildren() {
87 return Collections.emptyList();
91 public JobType getJobType() {
92 return JobType.VfmoduleInstantiation;