2 * Copyright © 2019 IBM.
3 * Modifications Copyright © 2020 Bell Canada.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 package org.onap.ccsdk.cds.blueprintsprocessor.core.api.data
20 import com.fasterxml.jackson.databind.JsonNode
21 import com.google.protobuf.ByteString
24 enum class StatusType {
28 /* TODO: Group fields into another struct containing originatorId, requestId, subRequestId, correlationId generally go together */
29 // timeOuts are in seconds
31 data class RemoteIdentifier(
32 var blueprintName: String,
33 var blueprintVersion: String,
34 var blueprintUUID: String
37 data class RemoteScriptUploadBlueprintInput(
38 val remoteIdentifier: RemoteIdentifier? = null,
39 val requestId: String,
40 val subRequestId: String,
41 val originatorId: String,
42 val correlationId: String? = null,
43 val timeOut: Long = 30,
44 val archiveType: String = "CBA_ZIP",
45 val binData: ByteString
48 data class RemoteScriptUploadBlueprintOutput(
49 val requestId: String,
50 val subRequestId: String,
51 val status: StatusType = StatusType.SUCCESS,
52 val timestamp: Date = Date(),
56 data class RemoteScriptExecutionInput(
57 var originatorId: String,
58 var requestId: String,
59 var subRequestId: String,
60 var correlationId: String? = null,
61 var remoteIdentifier: RemoteIdentifier? = null,
63 var timeOut: Long = 30,
64 var properties: MutableMap<String, JsonNode> = hashMapOf()
67 data class RemoteScriptExecutionOutput(
68 var requestId: String,
69 var response: List<String>,
70 var status: StatusType = StatusType.SUCCESS,
71 var timestamp: Date = Date(),
75 data class PrepareRemoteEnvInput(
76 var originatorId: String,
77 var requestId: String,
78 var subRequestId: String,
79 var correlationId: String? = null,
80 var remoteIdentifier: RemoteIdentifier? = null,
81 var packages: JsonNode,
82 var timeOut: Long = 120,
83 var properties: MutableMap<String, JsonNode> = hashMapOf()