Enabling Code Formatter
[ccsdk/cds.git] / ms / blueprintsprocessor / functions / resource-resolution / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / functions / resource / resolution / ResourceSourceProperties.kt
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.cds.blueprintsprocessor.functions.resource.resolution
20
21 import com.fasterxml.jackson.annotation.JsonProperty
22
23 open class ResourceSourceProperties
24
25 open class InputResourceSource : ResourceSourceProperties() {
26
27     lateinit var key: String
28
29     @get:JsonProperty("key-dependencies")
30     lateinit var keyDependencies: MutableList<String>
31 }
32
33 open class DefaultResourceSource : ResourceSourceProperties() {
34
35     lateinit var key: String
36
37     @get:JsonProperty("key-dependencies")
38     lateinit var keyDependencies: MutableList<String>
39 }
40
41 open class DatabaseResourceSource : ResourceSourceProperties() {
42
43     lateinit var type: String
44
45     @get:JsonProperty("endpoint-selector")
46     var endpointSelector: String? = null
47     lateinit var query: String
48
49     @get:JsonProperty("input-key-mapping")
50     var inputKeyMapping: MutableMap<String, String>? = null
51
52     @get:JsonProperty("output-key-mapping")
53     var outputKeyMapping: MutableMap<String, String>? = null
54
55     @get:JsonProperty("key-dependencies")
56     lateinit var keyDependencies: MutableList<String>
57 }
58
59 open class RestResourceSource : ResourceSourceProperties() {
60
61     lateinit var verb: String
62
63     @get:JsonProperty("payload")
64     var payload: String? = null
65
66     @get:JsonProperty("resolved-payload")
67     var resolvedPayload: String? = null
68     lateinit var type: String
69
70     @get:JsonProperty("endpoint-selector")
71     var endpointSelector: String? = null
72
73     @get:JsonProperty("url-path")
74     lateinit var urlPath: String
75     lateinit var path: String
76
77     @get:JsonProperty("expression-type")
78     lateinit var expressionType: String
79
80     @get:JsonProperty("input-key-mapping")
81     var inputKeyMapping: MutableMap<String, String>? = null
82
83     @get:JsonProperty("output-key-mapping")
84     var outputKeyMapping: MutableMap<String, String>? = null
85
86     @get:JsonProperty("headers")
87     var headers: Map<String, String> = emptyMap()
88
89     @get:JsonProperty("key-dependencies")
90     lateinit var keyDependencies: MutableList<String>
91 }
92
93 open class CapabilityResourceSource : ResourceSourceProperties() {
94
95     @get:JsonProperty("script-type")
96     lateinit var scriptType: String
97
98     @get:JsonProperty("script-class-reference")
99     lateinit var scriptClassReference: String
100
101     @get:JsonProperty("instance-dependencies")
102     var instanceDependencies: List<String>? = null
103
104     @get:JsonProperty("key-dependencies")
105     lateinit var keyDependencies: MutableList<String>
106 }