2 * Copyright © 2017-2018 AT&T Intellectual Property.
3 * Modifications Copyright © 2018 IBM.
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.apps.blueprintsprocessor.core.api.data
20 import com.fasterxml.jackson.annotation.JsonFormat
21 import com.fasterxml.jackson.databind.node.ObjectNode
22 import io.swagger.annotations.ApiModelProperty
26 * BlueprintProcessorData
27 * @author Brinda Santh
31 open class ExecutionServiceInput {
32 @get:ApiModelProperty(required = true)
33 lateinit var commonHeader: CommonHeader
34 @get:ApiModelProperty(required = true)
35 lateinit var actionIdentifiers: ActionIdentifiers
36 @get:ApiModelProperty(required = true)
37 lateinit var payload: ObjectNode
40 open class ExecutionServiceOutput {
41 @get:ApiModelProperty(required = true)
42 lateinit var commonHeader: CommonHeader
43 @get:ApiModelProperty(required = true)
44 lateinit var actionIdentifiers: ActionIdentifiers
45 @get:ApiModelProperty(required = true)
46 var status: Status = Status()
47 @get:ApiModelProperty(required = true)
48 lateinit var payload: ObjectNode
51 const val ACTION_MODE_ASYNC = "async"
52 const val ACTION_MODE_SYNC = "sync"
54 open class ActionIdentifiers {
55 @get:ApiModelProperty(required = false)
56 lateinit var blueprintName: String
57 @get:ApiModelProperty(required = false)
58 lateinit var blueprintVersion: String
59 @get:ApiModelProperty(required = true)
60 lateinit var actionName: String
61 @get:ApiModelProperty(required = true, allowableValues = "sync, async")
62 lateinit var mode: String
65 open class CommonHeader {
66 @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
67 @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
68 var timestamp: Date = Date()
69 @get:ApiModelProperty(required = true)
70 lateinit var originatorId: String
71 @get:ApiModelProperty(required = true)
72 lateinit var requestId: String
73 @get:ApiModelProperty(required = true)
74 lateinit var subRequestId: String
75 @get:ApiModelProperty(required = false)
76 var flags: Flags? = null
80 var isForce: Boolean = false
81 @get:ApiModelProperty(value = "3600")
86 @get:ApiModelProperty(required = true)
88 @get:ApiModelProperty(required = true)
89 var eventType: String = "EVENT-ACTION-RESPONSE"
90 @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
91 @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
92 var timestamp: Date = Date()
93 @get:ApiModelProperty(required = false)
94 var errorMessage: String? = null
95 @get:ApiModelProperty(required = true)
96 var message: String = "success"
99 open class BluePrintManagementInput {
100 @get:ApiModelProperty(required = true)
101 lateinit var commonHeader: CommonHeader
102 @get:ApiModelProperty(required = false)
103 lateinit var blueprintName: String
104 @get:ApiModelProperty(required = false)
105 lateinit var blueprintVersion: String
106 @get:ApiModelProperty(required = true)
107 lateinit var fileChunk: FileChunk
110 open class FileChunk {
111 @get:ApiModelProperty(required = true)
112 lateinit var chunk: ByteArray
115 open class BluePrintManagementOutput {
116 @get:ApiModelProperty(required = true)
117 lateinit var commonHeader: CommonHeader
118 @get:ApiModelProperty(required = true)
119 var status: Status = Status()