summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2020-01-13 05:50:00 +0000
committerGerrit Code Review <gerrit@onap.org>2020-01-13 05:50:00 +0000
commit900cf30dcc6e7932e85b6799ee2e019a48084071 (patch)
tree63543ac069200f85b793532ebadb981539fd0699 /vid-app-common/src/main
parent82d86c14991ffc3de6481fa255951986de3d4108 (diff)
parentd4313c4df202ce4c024dfd65331b324042b2141a (diff)
Merge "Provide literal usePreload=false when usePreload is <null>"
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
index bba4081dd..bf9e41ad9 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
@@ -103,7 +103,7 @@ data class VfModuleOrVolumeGroupRequestDetails(
open class RequestParametersVfModuleOrVolumeGroup internal constructor(
userParams: List<UserParamTypes>,
- @get:JsonInclude(NON_NULL) val isUsePreload: Boolean?,
+ val isUsePreload: Boolean,
testApi: String?
) : BaseResourceInstantiationRequestDetails.RequestParameters(userParams, testApi)
@@ -111,7 +111,7 @@ class RequestParametersVfModuleOrVolumeGroupInstantiation(
userParams: List<UserParamTypes>,
usePreload: Boolean?,
testApi: String?
-) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi)
+) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload.orFalse(), testApi)
class RequestParametersVfModuleUpgrade(
userParams: List<UserParamTypes>,
@@ -119,7 +119,8 @@ class RequestParametersVfModuleUpgrade(
testApi: String?,
@get:JsonInclude(NON_NULL) val retainAssignments: Boolean?,
@get:JsonInclude(NON_NULL) val rebuildVolumeGroups: Boolean?
-) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi)
+) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload.orFalse(), testApi)
class UserParamMap<K, V> : HashMap<K, V>(), UserParamTypes, MutableMap<K, V>
+private fun Boolean?.orFalse(): Boolean = this ?: false