summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt (renamed from vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.java)92
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/model/VolumeGroupRequestDetails.java1
3 files changed, 33 insertions, 63 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
index e71315d67..ecf7fc933 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
@@ -11,7 +11,6 @@ import org.onap.vid.changeManagement.RequestDetailsWrapper
import org.onap.vid.model.serviceInstantiation.*
import org.onap.vid.mso.model.*
import org.onap.vid.mso.model.BaseResourceInstantiationRequestDetails.*
-import org.onap.vid.mso.model.VfModuleOrVolumeGroupRequestDetails.*
import org.onap.vid.mso.rest.SubscriberInfo
import org.onap.vid.properties.Features
import org.onap.vid.services.AsyncInstantiationBusinessLogic
@@ -295,7 +294,7 @@ class MsoRequestBuilder
}.collect(Collectors.toList<VfModuleMacro>())
}
- fun aggregateAllInstanceParams(instanceParams: Map<String, String>?, supplementaryParams: Map<String, String>?): List<VfModuleOrVolumeGroupRequestDetails.UserParamMap<String, String>> {
+ fun aggregateAllInstanceParams(instanceParams: Map<String, String>?, supplementaryParams: Map<String, String>?): List<UserParamMap<String, String>> {
var instanceParamsFinal: Map<String, String> = instanceParams ?: emptyMap()
val supplementaryParamsFinal: Map<String, String> = supplementaryParams ?: emptyMap()
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
index 794714edf..f4318719d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
@@ -17,16 +17,11 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+package org.onap.vid.mso.model
-package org.onap.vid.mso.model;
-
-import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonInclude
+import com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL
+import java.util.*
/* Based on this model:
@@ -98,55 +93,32 @@ import java.util.Map;
*/
-public class VfModuleOrVolumeGroupRequestDetails extends BaseResourceInstantiationRequestDetails {
-
- public VfModuleOrVolumeGroupRequestDetails(
- @JsonProperty(value = "modelInfo", required = true) ModelInfo modelInfo,
- @JsonProperty(value = "cloudConfiguration", required = true) CloudConfiguration cloudConfiguration,
- @JsonProperty(value = "requestInfo", required = true) RequestInfo requestInfo,
- @JsonProperty(value = "relatedInstanceList", required = true) List<RelatedInstance> relatedInstanceList,
- @JsonProperty(value = "requestParameters", required = true) RequestParametersVfModuleOrVolumeGroup requestParameters)
- {
- super(modelInfo, cloudConfiguration, requestInfo, relatedInstanceList, requestParameters);
- }
-
- public static class RequestParametersVfModuleOrVolumeGroup extends BaseResourceInstantiationRequestDetails.RequestParameters {
- @JsonInclude(NON_NULL) private final Boolean usePreload;
-
- private RequestParametersVfModuleOrVolumeGroup(List<? extends UserParamTypes> userParams, Boolean usePreload, String testApi) {
- super(userParams, testApi);
- this.usePreload = usePreload;
- }
-
- public Boolean isUsePreload() {
- return usePreload;
- }
- }
-
- public static class RequestParametersVfModuleOrVolumeGroupInstantiation extends RequestParametersVfModuleOrVolumeGroup {
- public RequestParametersVfModuleOrVolumeGroupInstantiation(
- List<? extends UserParamTypes> userParams, Boolean usePreload, String testApi) {
- super(userParams, usePreload, testApi);
- }
- }
-
- public static class RequestParametersVfModuleUpgrade extends RequestParametersVfModuleOrVolumeGroup {
- @JsonInclude(NON_NULL) private final Boolean rebuildVolumeGroups;
-
- public RequestParametersVfModuleUpgrade(List<? extends UserParamTypes> userParams, Boolean usePreload, String testApi, Boolean rebuildVolumeGroups) {
- super(userParams, usePreload, testApi);
- this.rebuildVolumeGroups = rebuildVolumeGroups;
- }
-
- public Boolean getRebuildVolumeGroups() {
- return rebuildVolumeGroups;
- }
- }
-
- public static class UserParamMap<K,V> extends HashMap<K,V> implements UserParamTypes, Map<K,V> {
- public UserParamMap() {
- super();
- }
- }
-}
+data class VfModuleOrVolumeGroupRequestDetails(
+ val modelInfo: ModelInfo,
+ val cloudConfiguration: CloudConfiguration,
+ val requestInfo: RequestInfo,
+ val relatedInstanceList: List<RelatedInstance>?,
+ val requestParameters: RequestParametersVfModuleOrVolumeGroup?)
+ : BaseResourceInstantiationRequestDetails(modelInfo, cloudConfiguration, requestInfo, relatedInstanceList, requestParameters)
+
+open class RequestParametersVfModuleOrVolumeGroup internal constructor(
+ userParams: List<UserParamTypes>,
+ @get:JsonInclude(NON_NULL) val isUsePreload: Boolean?,
+ testApi: String?
+) : BaseResourceInstantiationRequestDetails.RequestParameters(userParams, testApi)
+
+class RequestParametersVfModuleOrVolumeGroupInstantiation(
+ userParams: List<UserParamTypes>,
+ usePreload: Boolean?,
+ testApi: String?
+) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi)
+
+class RequestParametersVfModuleUpgrade(
+ userParams: List<UserParamTypes>,
+ usePreload: Boolean?,
+ testApi: String?,
+ @get:JsonInclude(NON_NULL) val rebuildVolumeGroups: Boolean?
+) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi)
+
+class UserParamMap<K, V> : HashMap<K, V>(), UserParamTypes, MutableMap<K, V>
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/VolumeGroupRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/VolumeGroupRequestDetails.java
index 6b7d6b9e3..a637f85dc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/VolumeGroupRequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/VolumeGroupRequestDetails.java
@@ -22,7 +22,6 @@ package org.onap.vid.mso.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-import org.onap.vid.mso.model.VfModuleOrVolumeGroupRequestDetails.RequestParametersVfModuleOrVolumeGroup;
public class VolumeGroupRequestDetails extends BaseResourceInstantiationRequestDetails {
#aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */