Merge "Add rest client DSL properties"
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / commons / rest-lib / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / rest / BluePrintRestLibData.kt
1 /*
2  * Copyright © 2017-2018 AT&T Intellectual Property.
3  * Modifications Copyright © 2019 Huawei.
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
18 package org.onap.ccsdk.cds.blueprintsprocessor.rest
19
20 open class RestClientProperties {
21     lateinit var type: String
22     lateinit var url: String
23 }
24
25 open class SSLRestClientProperties : RestClientProperties() {
26     lateinit var keyStoreInstance: String // JKS, PKCS12
27     lateinit var sslTrust: String
28     lateinit var sslTrustPassword: String
29     var sslKey: String? = null
30     var sslKeyPassword: String? = null
31 }
32
33 // FIXME("Define basic auth userName and password properties")
34 open class SSLBasicAuthRestClientProperties : SSLRestClientProperties() {
35     var basicAuth: BasicAuthRestClientProperties? = null
36 }
37
38 // FIXME("Define token properties")
39 open class SSLTokenAuthRestClientProperties : SSLRestClientProperties() {
40     var tokenAuth: TokenAuthRestClientProperties? = null
41 }
42
43 open class BasicAuthRestClientProperties : RestClientProperties() {
44     lateinit var password: String
45     lateinit var username: String
46 }
47
48 open class TokenAuthRestClientProperties : RestClientProperties() {
49     var token: String? = null
50 }
51
52 open class DME2RestClientProperties : RestClientProperties() {
53     lateinit var service: String
54     lateinit var subContext: String
55     lateinit var version: String
56     lateinit var envContext: String
57     lateinit var routeOffer: String
58     var partner: String? = null
59     lateinit var appId: String
60 }
61
62 open class PolicyManagerRestClientProperties : RestClientProperties() {
63     lateinit var env: String
64     lateinit var clientAuth: String
65     lateinit var authorisation: String
66 }