0f1267cbb3443839cfaf508bcba80204957c5ca7
[ccsdk/cds.git] /
1 /*
2  * Copyright © 2017-2018 AT&T Intellectual Property.
3  * Modifications Copyright © 2018 IBM.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17 @file:Suppress("unused")
18
19 package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
20
21 import com.fasterxml.jackson.annotation.JsonProperty
22
23 open class ResourceSourceProperties
24
25 open class InputResourceSource : ResourceSourceProperties() {
26     lateinit var key: String
27     @get:JsonProperty("key-dependencies")
28     lateinit var keyDependencies: MutableList<String>
29 }
30
31 open class DefaultResourceSource : ResourceSourceProperties() {
32     lateinit var key: String
33     @get:JsonProperty("key-dependencies")
34     lateinit var keyDependencies: MutableList<String>
35 }
36
37 open class DatabaseResourceSource : ResourceSourceProperties() {
38     lateinit var type: String
39     lateinit var query: String
40     @get:JsonProperty("input-key-mapping")
41     var inputKeyMapping: MutableMap<String, String>? = null
42     @get:JsonProperty("output-key-mapping")
43     var outputKeyMapping: MutableMap<String, String>? = null
44     @get:JsonProperty("key-dependencies")
45     lateinit var keyDependencies: MutableList<String>
46 }
47
48 open class RestResourceSource : ResourceSourceProperties() {
49     lateinit var type: String
50     @get:JsonProperty("url-path")
51     lateinit var urlPath: String
52     lateinit var path: String
53     @get:JsonProperty("expression-type")
54     lateinit var expressionType: String
55     @get:JsonProperty("input-key-mapping")
56     var inputKeyMapping: MutableMap<String, String>? = null
57     @get:JsonProperty("output-key-mapping")
58     var outputKeyMapping: MutableMap<String, String>? = null
59     @get:JsonProperty("key-dependencies")
60     lateinit var keyDependencies: MutableList<String>
61 }
62
63 open class CapabilityResourceSource : ResourceSourceProperties() {
64     lateinit var type: String
65     @get:JsonProperty("instance-name")
66     lateinit var instanceName: String
67     @get:JsonProperty("instance-dependencies")
68     var instanceDependencies: List<String>? = null
69     @get:JsonProperty("key-dependencies")
70     lateinit var keyDependencies: MutableList<String>
71 }