new config not reflected in TCA processing
[dcaegen2/analytics/tca-gen2.git] / dcae-analytics / dcae-analytics-model / src / main / java / org / onap / dcae / analytics / model / configbindingservice / BaseConfigBindingServiceProperties.java
1 /*
2  * ================================================================================
3  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
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  * ============LICENSE_END=========================================================
17  *
18  */
19
20 package org.onap.dcae.analytics.model.configbindingservice;
21
22 import lombok.Data;
23 import lombok.EqualsAndHashCode;
24 import lombok.Getter;
25 import lombok.RequiredArgsConstructor;
26 import lombok.Setter;
27 import lombok.ToString;
28
29 import java.util.LinkedHashMap;
30 import java.util.List;
31 import java.util.Map;
32
33 /**
34  * Base call for Controller Config Binding Service Properties. Other analytics components
35  * must extend this base class and add properties specific to their requirements
36  * <p>NOTE: The base class supports all standard config binding service properties and additional custom properties</p>
37  *
38  * @author Rajiv Singla
39  */
40 @Data
41 public abstract class BaseConfigBindingServiceProperties implements ConfigBindingServiceModel {
42
43     protected Map<String, List<String>> servicesCalls = new LinkedHashMap<>();
44     protected Map<String, PublisherDetails> streamsPublishes = new LinkedHashMap<>();
45     protected Map<String, SubscriberDetails> streamsSubscribes = new LinkedHashMap<>();
46
47     /**
48      * Publisher and Subscriber common properties
49      */
50     @Data
51     @ToString(exclude = "aafPassword")
52     public static class PubSubCommonDetails {
53
54         private String type;
55         private String aafUsername;
56         private String aafPassword;
57         private DmaapInfo dmaapInfo;
58
59         // custom additional properties
60         private String proxyUrl;
61         private Boolean ignoreSSLValidation;
62
63     }
64
65     /**
66      * Publisher Details
67      */
68     @Getter
69     @Setter
70     @RequiredArgsConstructor
71     @ToString(callSuper = true)
72     @EqualsAndHashCode(callSuper = true)
73     public static class PublisherDetails extends PubSubCommonDetails {
74
75     }
76
77
78     /**
79      * Subscriber Details
80      */
81     @Getter
82     @Setter
83     @RequiredArgsConstructor
84     @ToString(callSuper = true)
85     @EqualsAndHashCode(callSuper = true)
86     public static class SubscriberDetails extends PubSubCommonDetails {
87
88         // custom subscriber properties
89         private String consumerGroup;
90         private List<String> consumerIds;
91         private Integer messageLimit;
92         private Integer timeout;
93
94         // custom polling configuration
95         private Polling polling;
96     }
97
98     /**
99      * DMaaP Info
100      */
101     @Data
102     public static class DmaapInfo {
103
104         private String clientRole;
105         private String clientId;
106         private String location;
107         private String topicUrl;
108
109     }
110
111
112     /**
113      * Polling Details
114      */
115     @Data
116     public static class Polling {
117
118         private Integer fixedRate;
119         private AutoAdjusting autoAdjusting;
120
121     }
122
123
124     /**
125      * Auto Adjusting Polling Details
126      */
127     @Data
128     public static class AutoAdjusting {
129
130         private Integer min;
131         private Integer stepUp;
132         private Integer max;
133         private Integer stepDown;
134
135     }
136
137
138 }