mirror of
https://github.com/nextcloud/android-library.git
synced 2025-07-23 00:49:38 +00:00
make field non nullable
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:

committed by
backportbot[bot]
![backportbot[bot]](/assets/img/avatar_default.png)
parent
e624e2a110
commit
27e0a2a71f
@ -16,7 +16,7 @@ data class TaskTypes(
|
||||
|
||||
data class TaskType(
|
||||
val id: String?,
|
||||
val name: String?,
|
||||
val name: String,
|
||||
val description: String?
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ fun TaskTypes.toV2(): List<TaskTypeData> =
|
||||
id = taskType.id,
|
||||
name = taskType.name,
|
||||
description = taskType.description,
|
||||
inputShape = null,
|
||||
outputShape = null
|
||||
inputShape = emptyMap(),
|
||||
outputShape = emptyMap()
|
||||
)
|
||||
}
|
||||
|
@ -95,11 +95,11 @@ class GetTaskTypesRemoteOperationV2 : OCSRemoteOperation<List<TaskTypeData>>() {
|
||||
val outputShape = taskType.outputShape
|
||||
|
||||
val hasOneTextInput =
|
||||
inputShape?.size == 1 &&
|
||||
inputShape.size == 1 &&
|
||||
inputShape.values.first().type == supportedTaskType
|
||||
|
||||
val hasOneTextOutput =
|
||||
outputShape?.size == 1 &&
|
||||
outputShape.size == 1 &&
|
||||
outputShape.values.first().type == supportedTaskType
|
||||
|
||||
return hasOneTextInput && hasOneTextOutput
|
||||
|
@ -14,14 +14,14 @@ data class TaskTypes(
|
||||
|
||||
data class TaskTypeData(
|
||||
val id: String?,
|
||||
val name: String?,
|
||||
val name: String,
|
||||
val description: String?,
|
||||
val inputShape: Map<String, Shape>?,
|
||||
val outputShape: Map<String, Shape>?
|
||||
val inputShape: Map<String, Shape>,
|
||||
val outputShape: Map<String, Shape>
|
||||
)
|
||||
|
||||
data class Shape(
|
||||
val name: String?,
|
||||
val description: String?,
|
||||
val type: String?
|
||||
val name: String,
|
||||
val description: String,
|
||||
val type: String
|
||||
)
|
||||
|
Reference in New Issue
Block a user