Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b90a0656 authored by alperozturk's avatar alperozturk Committed by Alper Öztürk
Browse files

array to object

parent a63f9f27
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -45,12 +45,8 @@ class GetTaskTypesRemoteOperationV2 : OCSRemoteOperation<List<TaskTypeData>>() {

                val supportedTaskTypeList =
                    taskTypeList?.filter { taskType ->
                        taskType.inputShape?.any { inputShape ->
                            inputShape.type == supportedTaskType
                        } == true &&
                            taskType.outputShape?.any { outputShape ->
                                outputShape.type == supportedTaskType
                            } == true
                        taskType.inputShape?.input?.type == supportedTaskType &&
                            taskType.outputShape?.output?.type == supportedTaskType
                    }

                result = RemoteOperationResult(true, getMethod)
+10 −8
Original line number Diff line number Diff line
@@ -16,18 +16,20 @@ data class TaskTypeData(
    val id: String?,
    val name: String?,
    val description: String?,
    val inputShape: List<TaskInputShape>?,
    val outputShape: List<TaskOutputShape>?
    val inputShape: TaskInputShape?,
    val outputShape: TaskOutputShape?
)

data class TaskInputShape(
    val name: String?,
    val description: String?,
    val type: String?
    val input: Shape?
)

data class TaskOutputShape(
    val name: String?,
    val description: String?,
    val type: String?
    val output: Shape?
)

data class Shape(
    val name: String,
    val description: String,
    val type: String
)