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() {
26 lateinit var key: String
27 @get:JsonProperty("key-dependencies")
28 lateinit var keyDependencies: MutableList<String>
31 open class DefaultResourceSource : ResourceSourceProperties() {
32 lateinit var key: String
33 @get:JsonProperty("key-dependencies")
34 lateinit var keyDependencies: MutableList<String>
37 open class DatabaseResourceSource : ResourceSourceProperties() {
38 lateinit var type: String
39 @get:JsonProperty("endpoint-selector")
40 var endpointSelector: String? = null
41 lateinit var query: String
42 @get:JsonProperty("input-key-mapping")
43 var inputKeyMapping: MutableMap<String, String>? = null
44 @get:JsonProperty("output-key-mapping")
45 var outputKeyMapping: MutableMap<String, String>? = null
46 @get:JsonProperty("key-dependencies")
47 lateinit var keyDependencies: MutableList<String>
50 open class RestResourceSource : ResourceSourceProperties() {
51 lateinit var verb: String
52 @get:JsonProperty("payload")
53 var payload: String? = null
54 lateinit var type: String
55 @get:JsonProperty("endpoint-selector")
56 var endpointSelector: String? = null
57 @get:JsonProperty("url-path")
58 lateinit var urlPath: String
59 lateinit var path: String
60 @get:JsonProperty("expression-type")
61 lateinit var expressionType: String
62 @get:JsonProperty("input-key-mapping")
63 var inputKeyMapping: MutableMap<String, String>? = null
64 @get:JsonProperty("output-key-mapping")
65 var outputKeyMapping: MutableMap<String, String>? = null
66 @get:JsonProperty("headers")
67 var headers: Map<String, String> = emptyMap()
68 @get:JsonProperty("key-dependencies")
69 lateinit var keyDependencies: MutableList<String>
72 open class CapabilityResourceSource : ResourceSourceProperties() {
73 @get:JsonProperty("script-type")
74 lateinit var scriptType: String
75 @get:JsonProperty("script-class-reference")
76 lateinit var scriptClassReference: String
77 @get:JsonProperty("instance-dependencies")
78 var instanceDependencies: List<String>? = null
79 @get:JsonProperty("key-dependencies")
80 lateinit var keyDependencies: MutableList<String>