From 13f9fe7b3f0f7be30606ffd3d0ddfa13d68a7b0a Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Fri, 11 Oct 2024 11:16:13 +0200 Subject: [PATCH] refactor: Replace var to val --- .../common/interfaces/transfers/Container.kt | 28 +++++++++---------- .../common/interfaces/transfers/File.kt | 26 ++++++++--------- .../common/interfaces/transfers/Transfer.kt | 18 ++++++------ .../interfaces/upload/InitUploadResponse.kt | 6 ++-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Container.kt b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Container.kt index 47a8c07f..1f5fe258 100644 --- a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Container.kt +++ b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Container.kt @@ -18,20 +18,20 @@ package com.infomaniak.multiplatform_swisstransfer.common.interfaces.transfers interface Container> { - var uuid: String - var duration: Long - var createdDateTimestamp: Long - var expiredDateTimestamp: Long - var numberOfFiles: Int - var message: String? - var needPassword: Boolean - var language: String - var sizeUploaded: Long - var deletedDateTimestamp: Long? - var swiftVersion: Int - var downloadLimit: Int - var source: String + val uuid: String + val duration: Long + val createdDateTimestamp: Long + val expiredDateTimestamp: Long + val numberOfFiles: Int + val message: String? + val needPassword: Boolean + val language: String + val sizeUploaded: Long + val deletedDateTimestamp: Long? + val swiftVersion: Int + val downloadLimit: Int + val source: String // @SerialName("WSUser") // TODO: What's this ? // val wsUser: JsonElement? - var files: F + val files: F } diff --git a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/File.kt b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/File.kt index 52d07cb0..b2d7df79 100644 --- a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/File.kt +++ b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/File.kt @@ -18,17 +18,17 @@ package com.infomaniak.multiplatform_swisstransfer.common.interfaces.transfers interface File { - var containerUuid: String - var uuid: String - var fileName: String - var fileSizeInBytes: Long - var downloadCounter: Int - var createdDateTimestamp: Long - var expiredDateTimestamp: Long - var eVirus: String - var deletedDate: String? - var mimeType: String - var receivedSizeInBytes: Long - var path: String? - var thumbnailPath: String? + val containerUuid: String + val uuid: String + val fileName: String + val fileSizeInBytes: Long + val downloadCounter: Int + val createdDateTimestamp: Long + val expiredDateTimestamp: Long + val eVirus: String + val deletedDate: String? + val mimeType: String + val receivedSizeInBytes: Long + val path: String? + val thumbnailPath: String? } diff --git a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Transfer.kt b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Transfer.kt index 6827be74..601d3418 100644 --- a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Transfer.kt +++ b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/transfers/Transfer.kt @@ -18,13 +18,13 @@ package com.infomaniak.multiplatform_swisstransfer.common.interfaces.transfers interface Transfer { - var linkUuid: String - var containerUuid: String - var downloadCounterCredit: Int - var createdDateTimestamp: Long - var expiredDateTimestamp: Long - var hasBeenDownloadedOneTime: Boolean - var isMailSent: Boolean - var downloadHost: String - var container: ContainerType + val linkUuid: String + val containerUuid: String + val downloadCounterCredit: Int + val createdDateTimestamp: Long + val expiredDateTimestamp: Long + val hasBeenDownloadedOneTime: Boolean + val isMailSent: Boolean + val downloadHost: String + val container: ContainerType } diff --git a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/InitUploadResponse.kt b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/InitUploadResponse.kt index 13d25270..61d6246e 100644 --- a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/InitUploadResponse.kt +++ b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/InitUploadResponse.kt @@ -18,7 +18,7 @@ package com.infomaniak.multiplatform_swisstransfer.common.interfaces.upload interface InitUploadResponse { - var container: C - var uploadHost: String - var filesUuid: List + val container: C + val uploadHost: String + val filesUuid: List }