diff options
author | Ittay Stern <ittay.stern@att.com> | 2020-01-12 16:21:09 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-01-12 17:31:24 +0200 |
commit | d4313c4df202ce4c024dfd65331b324042b2141a (patch) | |
tree | fcb8b9c31d57577564155599f69f5f2be49e71ac /vid-app-common/src/main/java/org | |
parent | 63ab2aa201b213d6b7d5b5b42fed4a76deecf18d (diff) |
Provide literal usePreload=false when usePreload is <null>
Issue-ID: VID-746
Change-Id: Iab121726177397d1dbde37a1f7b93b30275a9ded
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt | 7 |
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 |