2 * Copyright © 2018 IBM.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.apps.controllerblueprints.resource.dict
19 import com.fasterxml.jackson.annotation.JsonFormat
20 import com.fasterxml.jackson.annotation.JsonProperty
21 import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
22 import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
23 import org.onap.ccsdk.apps.controllerblueprints.resource.dict.data.DecryptionRule
24 import java.io.Serializable
27 open class ResourceDefinition{
29 @JsonProperty(value = "name", required = true)
30 lateinit var name: String
32 @JsonProperty(value = "property", required = true)
33 lateinit var property : PropertyDefinition
35 var tags: String? = null
37 @JsonProperty(value = "updated-by")
38 lateinit var updatedBy: String
40 @JsonProperty(value = "resource-type", required = true)
41 lateinit var resourceType: String
43 @JsonProperty(value = "resource-path", required = true)
44 lateinit var resourcePath: String
46 @JsonProperty(value = "sources", required = true)
47 lateinit var sources: MutableMap<String, NodeTemplate>
49 @JsonProperty("decryption-rules")
50 var decryptionRules: MutableList<DecryptionRule>? = null
54 open class ResourceAssignment {
56 @JsonProperty(value = "name", required = true)
57 lateinit var name: String
59 @JsonProperty(value = "property")
60 var property: PropertyDefinition? = null
62 @JsonProperty("input-param")
63 var inputParameter: Boolean = false
65 @JsonProperty("dictionary-name")
66 var dictionaryName: String? = null
68 @JsonProperty("dictionary-source")
69 var dictionarySource: String? = null
71 @JsonProperty("dependencies")
72 var dependencies: MutableList<String>? = null
74 @JsonProperty("version")
77 @JsonProperty("status")
78 var status: String? = null
80 @JsonProperty("message")
81 var message: String? = null
83 @JsonProperty("updated-date")
84 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
85 var updatedDate: Date? = null
87 @JsonProperty("updated-by")
88 var updatedBy: String? = null
92 * Interface for Source Definitions (ex Input Source,
93 * Default Source, Database Source, Rest Sources, etc)
95 interface ResourceSource : Serializable