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.
17 @file:Suppress("unused")
19 package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
21 import com.fasterxml.jackson.annotation.JsonProperty
23 open class ResourceSourceProperties
25 open class InputResourceSource : ResourceSourceProperties() {
27 lateinit var key: String
29 @get:JsonProperty("key-dependencies")
30 lateinit var keyDependencies: MutableList<String>
33 open class DefaultResourceSource : ResourceSourceProperties() {
35 lateinit var key: String
37 @get:JsonProperty("key-dependencies")
38 lateinit var keyDependencies: MutableList<String>
41 open class DatabaseResourceSource : ResourceSourceProperties() {
43 lateinit var type: String
45 @get:JsonProperty("endpoint-selector")
46 var endpointSelector: String? = null
47 lateinit var query: String
49 @get:JsonProperty("input-key-mapping")
50 var inputKeyMapping: MutableMap<String, String>? = null
52 @get:JsonProperty("output-key-mapping")
53 var outputKeyMapping: MutableMap<String, String>? = null
55 @get:JsonProperty("key-dependencies")
56 lateinit var keyDependencies: MutableList<String>
59 open class RestResourceSource : ResourceSourceProperties() {
61 lateinit var verb: String
63 @get:JsonProperty("payload")
64 var payload: String? = null
66 @get:JsonProperty("resolved-payload")
67 var resolvedPayload: String? = null
68 lateinit var type: String
70 @get:JsonProperty("endpoint-selector")
71 var endpointSelector: String? = null
73 @get:JsonProperty("url-path")
74 lateinit var urlPath: String
75 lateinit var path: String
77 @get:JsonProperty("expression-type")
78 lateinit var expressionType: String
80 @get:JsonProperty("input-key-mapping")
81 var inputKeyMapping: MutableMap<String, String>? = null
83 @get:JsonProperty("output-key-mapping")
84 var outputKeyMapping: MutableMap<String, String>? = null
86 @get:JsonProperty("headers")
87 var headers: Map<String, String> = emptyMap()
89 @get:JsonProperty("key-dependencies")
90 lateinit var keyDependencies: MutableList<String>
93 open class CapabilityResourceSource : ResourceSourceProperties() {
95 @get:JsonProperty("script-type")
96 lateinit var scriptType: String
98 @get:JsonProperty("script-class-reference")
99 lateinit var scriptClassReference: String
101 @get:JsonProperty("instance-dependencies")
102 var instanceDependencies: List<String>? = null
104 @get:JsonProperty("key-dependencies")
105 lateinit var keyDependencies: MutableList<String>