df3339f6df8ab84bb6193abcdda725de106b8e16
[dcaegen2/services/sdk.git] /
1 /*
2  * ============LICENSE_START=======================================================
3  * DCAEGEN2-SERVICES-SDK
4  * ================================================================================
5  * Copyright (C) 2018-2019 NOKIA Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.dcaegen2.services.sdk.rest.services.aai.client.api;
22
23 import java.io.Serializable;
24 import java.util.Map;
25 import org.immutables.gson.Gson;
26 import org.immutables.value.Value;
27
28 @Value.Immutable(prehash = true)
29 @Value.Style(builder = "new")
30 @Gson.TypeAdapters
31 public abstract class AaiClientConfiguration implements Serializable {
32
33     private static final String PNF_PATH = "/network/pnfs/pnf";
34     private static final String SERVICE_INSTANCE_PATH = "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}";
35
36     private static final long serialVersionUID = 1L;
37
38     @Value.Parameter
39     @Value.Default
40     public String baseUrl() {
41         return "";
42     }
43
44     /**
45      * Please use baseUrl() instead
46      */
47     @Deprecated
48     @Value.Default
49     public String pnfUrl() {
50         return baseUrl() + PNF_PATH;
51     }
52
53     @Value.Parameter
54     public abstract String aaiUserName();
55
56     @Value.Parameter
57     public abstract String aaiUserPassword();
58
59     @Value.Parameter
60     public abstract Boolean aaiIgnoreSslCertificateErrors();
61
62     /**
63      * Please use baseUrl() instead
64      */
65     @Deprecated
66     @Value.Default
67     public String aaiServiceInstancePath() {
68         return SERVICE_INSTANCE_PATH;
69     }
70
71     @Value.Parameter
72     public abstract Map<String, String> aaiHeaders();
73
74     @Value.Parameter
75     public abstract String trustStorePath();
76
77     @Value.Parameter
78     public abstract  String trustStorePasswordPath();
79
80     @Value.Parameter
81     public abstract String keyStorePath();
82
83     @Value.Parameter
84     public abstract String keyStorePasswordPath();
85
86     @Value.Parameter
87     public abstract Boolean enableAaiCertAuth();
88 }